Fault Management Framework - How to use test conditions

I am building a fault policy file based on an external service that generates custom SOAP faults. I want to query a value in these faults but I don't know how to construct the test condition.
I can find plenty of documented examples e.g.
<Conditions>
<faultName
xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
name="bpelx:remoteFault”>
<condition>
*<test>$fault.code="3220"</test>*
<action ref="ora-retry"/>
</condition>
</faultName>
But where can I find the $fault object to know how to create the xpath expression?
This is my business fault logged in Enterprise Manager -
     <bpelFault>
     <faultType>1</faultType>
     <FaultManagementFrameworkService xmlns="http://yorkshirewater.com/faultmanagementframeworkservice/">
     <part name="fault">
          <ns0:FaultManagementFrameworkServiceFault xmlns:ns0="http://yorkshirewater.com/faultmanagementframeworkservice/">
          *<FaultCode>001</FaultCode>*
          <FaultCategory>ConnectionException</FaultCategory>
          <FaultDescription>Not Found</FaultDescription>
          <ServiceName>FaultManagementFrameworkService</ServiceName>
          <Operation>CreateConnectionError</Operation>
          <User>&lt;anonymous></User>
          </ns0:FaultManagementFrameworkServiceFault>
     </part>
     </FaultManagementFrameworkService>
     </bpelFault>
I want to access the FaultCode value but can only currently capture all errors e.g.
<Conditions>
<faultName xmlns:osb="http://yorkshirewater.com/faultmanagementframeworkservice/" name="osb:FaultManagementFrameworkService">
<condition>
<action ref="ora-human-intervention"/>
</condition>
</faultName>

The code 3220 is just a copy from some Oracle documentation of an example test case.
What I really want to do is get a value from my own business error e.g.
<bpelFault>
<faultType>1</faultType>
<FaultManagementFrameworkService xmlns="http://yorkshirewater.com/faultmanagementframeworkservice/">
<part name="fault">
<ns0:FaultManagementFrameworkServiceFault xmlns:ns0="http://yorkshirewater.com/faultmanagementframeworkservice/">
<FaultCode>001</FaultCode>
<FaultCategory>ConnectionException</FaultCategory>
<FaultDescription>Not Found</FaultDescription>
<ServiceName>FaultManagementFrameworkService</ServiceName>
<Operation>CreateConnectionError</Operation>
<User><anonymous></User>
</ns0:FaultManagementFrameworkServiceFault>
</part>
</FaultManagementFrameworkService>
</bpelFault>
If I use the following in my fault policy it will pick up all errors on the service (using Oracle Service Bus and a service call) -
<Conditions>
<faultName xmlns:osb="http://yorkshirewater.com/faultmanagementframeworkservice/" name="osb:FaultManagementFrameworkService">
<condition>
<action ref="ora-human-intervention"/>
</condition>
</faultName>
But I would actually like to drill down further and query the FaultCode value (001 in the above example) -
<Conditions>
<faultName xmlns:osb="http://yorkshirewater.com/faultmanagementframeworkservice/" name="osb:FaultManagementFrameworkService">
<condition>
<test>$fault.fault/osb:FaultManagementFrameworkServiceFault/osb:FaultCode="001"</test>
<action ref="ora-human-intervention"/>
</condition>
</faultName>
Am I trying to do something that's not possible? If so how do you apply test conditions for business errors?

Similar Messages

  • Oracle Fault Management Framework - how to intercept first invocation

    I know the Oracle Fault Management Framework is only activated on faults that occur on invokes.
    Which is fine for all internal calls.
    However, is there any way to get the framework to be activated on the very first invoke?
    I want to be able to get the framework to log all fault details and then rethrow. I'ms using Oracle version 10.1.3.4.
    However, if an external third party calls my process (say Process A) and an error occurs in process A that is NOT from an invoke, eg xpath error.
    The framework does NOT get activated.
    Any ideas how to get around this other than going into every BPEL and adding in a catchAll , log, throw fault?
    Thanks.

    There should be no difference between managing internal and external calls using the fault handler.
    If we can just talk about process A as a BPEL process which utilizes the fault management.
    It should not matter where the services process A calls reside. The fault management system will only get calls as part of an error occurring on an invoke.
    I don't agree with your comment that the framework will get called if a fault occurs any where within the domain. e.g. If process A has an assign activity and fails because it can't convert a string into date. The fault management system will not be called. Therefore it is independent if the services process A calls are internal or external.
    What is your reasoning behind having a process that continues in the event of a fault when the first fault could cause subsequent faults.
    If no fault is manged either by the framework or a catch then the raw error will be returned back to the consumer. So you will be able to debug that initial fault. Does this not fulfill your uses case?
    cheers
    James

  • How does BPEL Fault Management Framework gel with ESB Error Handling ?

    I see that BPEL 10.1.3.3 has pretty neat Fault Management Framework (although I have to admit it is not very well advertised).
    The next logical question is: what about ESB ? Would that help in ESB error handling ? I understand that ESB has its own Error Hospital etc.; however, we have to constantly grapple with two distinct paths for any piece of integration functionality (1. ESB 2. BPEL). I guess, all of this will be moot in the 11g timeframe. Still wondering if anyone out there has somehow unified error handling for these two distinct offerings ?

    It's not available in ESB, you have to implement/extend that by your self. Off course in the next release everthing will be better :-)
    But, if you are able to use Oracle AIA (http://edelivery.oracle.com) You could use Oracle AIA Foundation, that has a fault 'hospital' implemented both for BPEL and ESB.
    Marc
    http://orasoa.blogspot.com

  • SOA 11g Fault Management Framework Issue

    Hi,
    I am using soa 11.1.1.3.
    I have a composite with bpel process. Bpel process invokes a external web service.
    I add fault-bindings.xml and fault policy to catch remote fault.
    When I turn off web service, bpel process has the remote fault but the fault didn't be caught by fault management framework.
    Here is my fault-policies.xml and fault-ibindings.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicyBindings version="0.0.1"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <!-- only applies for the bpel process -->
         <component faultPolicy="FusionMidFaults" >
    </component>
    </faultPolicyBindings>
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <faultPolicy version="0.0.1" id="FusionMidFaults"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Conditions>
    <!--
    <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults"
    name="medns:mediatorFault">
    <condition>
    <action ref="MediatorJavaAction"/>
    </condition>
    </faultName>
    -->
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:remoteFault">
    <condition>
    <action ref="BPELJavaAction"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:bindingFault">
    <condition>
    <action ref="BPELJavaAction"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:runtimeFault">
    <condition>
    <action ref="BPELJavaAction"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <!-- Generics -->
    <Action id="default-terminate">
    <abort/>
    </Action>
    <Action id="default-replay-scope">
    <replayScope/>
    </Action>
    <Action id="default-rethrow-fault">
    <rethrowFault/>
    </Action>
    <Action id="default-human-intervention">
    <humanIntervention/>
    </Action>
    <!--
    <Action id="MediatorJavaAction">
    <javaAction className="MediatorJavaAction.myClass"
    defaultAction="default-terminate">
    <returnValue value="MANUAL" ref="default-human-intervention"/>
    </javaAction>
    </Action>
    -->
    <Action id="BPELJavaAction">
    <!-- this is user provided class-->
    <javaAction className="com.rubiconred.faultManagement.MyFaultPolicyJavaAction"
    defaultAction="default-terminate">
    <returnValue value="MANUAL" ref="default-human-intervention"/>
    </javaAction>
    </Action>
    </Actions>
    </faultPolicy>
    </faultPolicies>

    Hi, I've the same issue. I created the fault-bindings.xml and fault-policies.xml in the same directory as composite.xml. I throw a fault in the BPEL process, but it does not get caught by the fault policy mechanism.
    fault-bindings.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicyBindings version="2.0.1"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <composite faultPolicy="MyCompositeFaultPolicy"/>
    </faultPolicyBindings>
    fault-policies.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <faultPolicy version="2.0.1" id="MyCompositeFaultPolicy"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <!-- This section describes fault conditions. Build more conditions with faultName, test and action -->
    <Conditions>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:assertFailure">
    <condition>
    <action ref="ora-terminate"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:runtimeFault">
    <condition>
    <action ref="ora-terminate"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:remoteFault">
    <condition>
    <action ref="ora-terminate"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:bindingFault">
    <condition>
    <action ref="ora-terminate"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="ora-retry">
    <retry>
    <retryCount>3</retryCount>
    <retryInterval>10800</retryInterval>
    <retryFailureAction ref="ora-human-intervention"/>
    <!--<exponentialBackoff/>-->
    </retry>
    </Action>
    <!-- This is an action will bubble up the fault-->
    <Action id="ora-rethrow-fault">
    <rethrowFault/>
    </Action>
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    <!-- This action will cause the instance to terminate-->
    <Action id="ora-terminate">
    <abort/>
    </Action>
    </Actions>
    </faultPolicy>
    </faultPolicies>
    I tried restarting the managed server, but it did not help. If you have any suggestions, please supply them.

  • Fault Management Framework

    Hi folks,
    I am studying the Fault Management Framework that comes with BPEL.
    It is a really nice feature: in a single place I can define a strategy for handling errors that occurs in the invoke activity of any BPEL process.
    I have a question about this: is there a similar tool or framework to handle in a single place errors that can occur in ANY activity of the BPEL process not only in the invoke activity.
    In other words, instead of using catchall in all of BPEL processes (and writing the same code in all BPEL processes) can I use the Fault Management Framework (or write some BPEL code) to catch errors like : selectionFailure, joinFailure or others and associate specific action with them?
    If anybody has an idea feels free to explain it!

    No.
    Marc
    http://orasoa.blogspot.com

  • 10.1.3.3 fault management framework and catchall problem

    Hi all,
    I have a BPEL process with a catchall exception block for the entire process (in the .bpel file). The errorhandling determines if action needs to be taken on a given exception and notify's tech support with an e-mail if action needs to be taken. This works fine.
    However, it would be nice if you could retry faulted instances if for instance a web service was temporarily down. Here the fault management framework comes to the rescue. I have created default policy and fault-binding files. I have set it up so that any error goes to human interaction. Apparently this worked. An instance pending manual recovery was created, and it could be retry'ed from the BPEL console.
    So here is my problem: The fault management framework apparently overwrites the catchall exception in the BPEL process, so that while a task for human interaction is created the error block is not excuted first - meaning that no e-mail notification is sent and no differentiating between exception occurs.
    If I remove the default policy and fault-binding files then the catchall is used again.
    This may be expected behaviour, but I assume that it is possible to use both a catch all block in the bpel code AND the generic fault management framework.
    Does anybody have any ideas?
    Your assistance will be much appreciated.
    Regards,
    Aagaard

    Hi Aagaard,
    The BPEL Error Hospital that Oracle introduced with SOA Suite 10.1.3.3 will prevent you from having to model the handling of Binding Faults or Runtime Faults in BPEL processes.
    Hope in the future we will also be able to specify policies for handling custom faults that may occur anywhere in the BPEL process, i.e. not only on invoke activities.
    This framework will gives us the opportunity to handle all the business and runtime faults for an “invoke” activity. With the framework we can define one policy for every bpel domain.
    In the bpel/domains/default/config/fault-policy-binding.xml , we can setup the policies we would use and which processes,partnerlinks,port types will be part of it.
    If there is already some fault-handling (catch) defined in the the bpel process, the framework will overrule this, and use a policy if possible.
    Hope that answers your question!
    Cheers
    Anirudh Pucha

  • How to use if condition in XML Publisher Desk Top

    Hi..,
    How to use if condition in XML Publisher desk Top.
    Please guide me.
    Thanks,
    Suresh.

    What kind of condition you want to use?
    You can use Condition like this:
    <?xdofx:if condition then value1
    else if condition then Value2
    else Value3
    end if?>
    Please go thru XML Publisher User Guide.
    Thanks
    Ravi
    [email protected]

  • How to use upload condition record program RV14BTCI

    Hi
    how to use upload condition record program RV14BTCI.
    kathir.

    Hi,
    To run this program we have to maintain Upload file in Application Directory,
    We have to maintain 3 levels of records in that file.. my feel you upload through BDC or LSMW.
    For your information,
    The batch input program RV14BTCI reads the parameters is necessary
    Giving sequential file and creates (depending on the data
    In the file seq) one or more batch input sessions.
    The data are seq file in the following structure expected:
    - The session a session intent (Table KOBTCI, Record 0)
    All other records until the next session, the intent
    Last session assigned to read
    - The head condition Sentence (Table KOBTCI, record 1)
    All other records until the next condition,
    Last read head appropriate rate
    This includes the corresponding condition
    Condition table
    - The key sentence of a Main (Table KOBTCI, record 2)
    It must be directly on the head set to follow
    It contains the key condition of the table
    + Detail fields
    - The season record has a subordinate clause (Table KOBTCI, record 3)
    The teams relate to the key sentence in the main
    Best Regards,
    KSK

  • How to configure test conditions from a file?

    We have a generic test setup that reads channels from a configuration file and sets up the cards appropriately.  This is all fine and good.  Next we want to specify the test conditions in the configuration file.  The test conditions can be arbitrary, like "ch1 > 3.14 for more than 50 ms and any 2 of ch2, ch3, ch4 are > 123.45 for more than 25 ms."  I REALLY don't want to invent yet another expression language.  I thought about using MathScript but then I thought, why not use a VI?  Can I reference a VI that captures all the test-specific conditions and call it programmatically on the RT PXI target?  Is this even a good idea?  Has anyone run into a similar problem?
    Thanks.

    It depends on how much string parsing you want to do and how flexable it needs to be.
    Right off teh top of my head I would say you could do something like this:
    for say "ch1 > 3.14 for more than 50 ms and any 2 of ch2, ch3, ch4 are > 123.45 for more than 25 ms." in the csv file you could have
    ch1,>,3.14,50ms,ch2,>,123.45,25ms,ch2,>,123.45,25,ms,ch3,>,123.45,25ms,ch4,>,123.45,25ms
    Then use Read Spreadsheet File.VI set to read a string.
    That will output a string array with each element containing each value that is seperated by the commas.
    Then you index the array elements and convert them to numbers as needed for input to your vi's
    Use the fields elements containg the < or > to select cases fo comparing as needed
    Message Edited by RTSLVU on 01-30-2009 02:13 PM

  • How to Use MAX condition using Query Report

    Hi SAP Abap Expert,
    Can we use the MAX condition in Query Report (SQ01/SQ02) ?
    I have created one sample query using table VBRP and VBRK then i need to use max condition to get the MAX record in VBELN.
    Please Help ???

    Hi Ashishsingh,
    According to your description, you want to know how to use MAX function in SQL Server Analysis Services MDX Query, right? In this case, please refer to the link below which describe the syntax and sample of MDX function.
    http://technet.microsoft.com/en-us/library/ms145601.aspx
    http://www.mdxpert.com/Functions/MDXFunction.aspx?f=64
    Hope this helps.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Need prelimanary activities for Solution Manager and how to use this.

    Hi
    Can anybody please inform me how to use the Solution manager and what are the prelimanary activities required,please help me step by step the configuration of Solution Manager.
    The soon reply will be appreciated
    Thanks & Regards
    Vikram GG

    Hi,
    What features you want to implement with your SOLMAN?
    For EWA, Solution Monitoring Check out these tutors.
    https://websmp107.sap-ag.de/~sapidb/011000358700006405622006E
    https://websmp107.sap-ag.de/~sapidb/011000358700006819072005E
    https://websmp107.sap-ag.de/~sapidb/011000358700005011442004E
    https://websmp107.sap-ag.de/~sapidb/011000358700004425722004E.sim
    https://websmp107.sap-ag.de/~sapidb/011000358700008968942004E.sim
    https://websmp107.sap-ag.de/~sapidb/011000358700001581382005E.sim
    https://websmp107.sap-ag.de/~sapidb/011000358700008968952004E.sim
    https://websmp107.sap-ag.de/~sapidb/011000358700001581372005E.sim
    https://websmp107.sap-ag.de/~sapidb/011000358700006936042005E.sim
    This will lead you to success in activating EWA, before these you should have your router ready and connectivity established with SAP.
    --Ragu

  • How to use "where" condition when we use update or delete in a dbadapter?

    Hi
    I want to update/delete a record in a database table based on one of its fields. Which means I have to use "where" condition to check the value of the field and only then I can decide whether or not the record can be updated/deleted.
    When I try to use the dbadapter update/delete options, I dont see any provision for writing the "where" condition.(May be I am missing something).
    I know that I can use the custom sql option and write an sql command to achieve this.
    But I would like to know if this can be done when using the update/delete option itself in the dbadapter.
    Thanks in anticipation.
    Ravi

    Hi,
    You can use the logical delete option. In that case you can supply a value for the column that indicates if a record is changed and have it picked up by the db adapter.
    Andre

  • SOA fault management framework doesn't work

    The following is my fault-policies.xml and fault-binding.xml. Both are located in the same folder as the composite.xml. I simulated a remote fault. The fault was not caught by the framework.
    I even re-started both admin server and soa managed server.
    I am using SOA 11.1.1.5
    1. fault-binding.xml:
    <?xml version="1.0" encoding="UTF-8" ?>
    <faultPolicyBindings version="2.0.1"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance">
    <composite faultPolicy="POProcessingFaults"/>
    </faultPolicyBindings>
    2. fault-policies.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <faultPolicy version="2.0.1"
    id="POProcessingFaults"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance">
    <Conditions>
    <!-- Step #1: Add your fault handler for remote fault here: -->
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:remoteFault">
    <condition>
    <action ref="ora-human-intervention"/>
    </condition>
    </faultName>
    <!-- Step #2: Add your fault handler for binding fault here: -->
    <!-- Step #3: Add your fault handler for mediator faults here: -->
    </Conditions>
    <Actions>
    <!-- Step #4: Add the Action definition for handling mediator faults using custom java here:-->
    <!-- Custom Java Handler: Logs the fault details to a log file -->
    <Action id="my-java-handler">
    <javaAction className="soatraining.faulthandling.MyFaultHandler"
    defaultAction="ora-terminate" propertySet="myProps">
    <returnValue value="OK" ref="ora-rethrow-fault"/>
    </javaAction>
    </Action>
    <!-- Retry -->
    <Action id="ora-retry">
    <retry>
    <retryCount>4</retryCount>
    <retryInterval>2</retryInterval>
    <exponentialBackoff/>
    </retry>
    </Action>
    <!-- Rethrow action -->
    <Action id="ora-rethrow-fault">
    <rethrowFault/>
    </Action>
    <!-- Human Intervention -->
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    <!-- Terminate -->
    <Action id="ora-terminate">
    <abort/>
    </Action>
    </Actions>
    <!-- Property sets used by custom Java actions -->
    <Properties>
    <!-- Property set for MyFaultHandler customer java action -->
    <propertySet name="myProps">
    <property name="logFileName">myfaulthandler.log</property>
    <property name="logFileDir">c:\temp</property>
    </propertySet>
    <!-- Step #5: Add new property set for MyFaultHandler for logging Mediator faults here:-->
    </Properties>
    </faultPolicy>
    </faultPolicies>

    Please use the below files and let me know...
    fault-policies.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <faultPolicy version="2.0.1" id="bpelFaultHandling"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Conditions>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:bindingFault">
    <condition>
    <action ref="ora-retry"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:remoteFault">
    <condition>
    <action ref="ora-retry"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id = "ora-rethrow-fault">
    <rethrowFault/>
    </Action>
    <Action id = "ora-retry">
    <retry>
    <retryCount>5</retryCount>
    <retryInterval>1</retryInterval>
    <exponentialBackoff/>
    <retryFailureAction ref = "ora-rethrow-fault"/>
    </retry>
    </Action>
    </Actions>
    </faultPolicy>
    </faultPolicies>
    fault-bindings.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicyBindings version="2.0.1"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <composite faultPolicy="bpelFaultHandling"/>
    </faultPolicyBindings>
    Write two composites A and B . A is Asynchronous and B is Synchronous. Call B from A, just throw a remotefault from B; put the above two files in composite A in the folder where the composite.xml file resides.And also keep a catchALL block at the BPEL process level for the composite A. So when you execute A, The fault policies will come into play, try the same invoke for five times and rethrow the fault which will be caught by catchALL block in composite A and do something from A, either invoke back the caller or write some error message to the file or email or something else.
    Hope this helps...
    Thanks,
    N

  • About how to use WHERE condition in JDBC

    Hello,
    I met a problem when I wrote my jdbc program.
    ResultSet rs1 = stmt1.executeQuery("select Ncategory from ncategory, whsites where whsites.Name = 'Heard and McDonald Islands'and whsites.Id=ncategory.IdWhsites");
    ncategory and whsites are my two tables in my database. I try to select some data that conform to the WHERE conditions. Actually I want to input the name of
    of whsites.Name, I defined
    String sitename = "";
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
              System.out.println("Please input the site name:");
              siteName = in.readLine();
    Then I changed the above ResultSet sentence,
    ResultSet rs1 = stmt1.executeQuery("select Ncategory from ncategory, whsites where whsites.Name = siteName and whsites.Id=ncategory.IdWhsites");
    The program can be compiled. But I found the Resultset sentence has not been executed. How can I modify the executeQuery and make it work?

    Hi,
    Try using a prepared statement as shown below
    PreparedStatement ps = connection.prepareStatement( "select Ncategory from ncategory, whsites where whsites.Name = ? and whsites.Id=ncategory.IdWhsites");
    // Bind the airline code to the query
    ps.setString(1,siteName );
    result = ps.executeQuery();
    Alternatively you could try the following too :
    ResultSet rs1 = stmt1.executeQuery("select Ncategory from ncategory, whsites where whsites.Name = '"+siteName+"' and whsites.Id=ncategory.IdWhsites");

  • Fault Management Framework is not working....

    Hi all,
    i have installed soa 10.1.3.3.0, and i am done with post installations stpes too.
    i have created a simple bple, which invokes a PL(java webservice). i stopped the webservice and intiated the bpel process so that it shud get the remoteFault.
    i am binding the defaultpolicy (given by orcle) in bple.xml . But it is not working.
    still catch block is firing. invoke is showing in red color only. which means , obusly policy file is not registered. is it? so, how can i know wheter policy file is registered or not? how to make use of plicy file? am i missing any steps???
    can anyone please help me out......
    thans in advance

    hi this my fault-binding.xml file <?xml version="1.0" encoding="UTF-8"?>
    <faultPolicyBindings version="2.0.1"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <!-- Enabling this will cause all processes in this domain to use this
    fault policy
         <process faultPolicy="DefaultPolicy"/>
         -->
    <!-- DefaultPolicy is defined in ./fault-policies/DefaultPolicy.xml -->
         <partnerLink faultPolicy="DefaultPolicy">
         <!-- Enabling this will cause all invoke faults at partner link
         name of "creditRatingService" to use fault policy with
         id id = DefaultPolicy
         <name>creditRatingService</name>
         <name>SampleService</name>     
         -->
    <!-- all invoke faults at partner link below port type use fault policy
    with id = DefaultPolicy
    The following entry covers the samples/tutorials/122.DBAdapter/InsertWithCatch sample. -->
         <portType xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/insert/">db:insert_plt</portType>
         </partnerLink>
    </faultPolicyBindings>
    i have added the one more <name> branch for <patnerlink>
    <name>SamleService</name>
    even i bind the policy file in my bple.xml also,
    this is my bpel.xml flie
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <BPELSuitcase>
    <BPELProcess id="Fault_DEMO" src="Fault_DEMO.bpel">
    <partnerLinkBindings>
    <partnerLinkBinding name="client">
    <property name="wsdlLocation">Fault_DEMO.wsdl</property>
    </partnerLinkBinding>
    <partnerLinkBinding name="SampleService">
    <property name="wsdlLocation">SampleService2.wsdl</property>
    </partnerLinkBinding>
    </partnerLinkBindings>
    </BPELProcess>
    <faultPolicyBindings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://schemas.oracle.com/bpel/faultpolicy ../../../../../../../../fault-policy-binding.xsd"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <process faultPolicy="SamplePolicy"/>
    <partnerLink faultPolicy="SamplePolicy">
    <name>SampleService</name>
    </partnerLink>
    </faultPolicyBindings>
    </BPELSuitcase>
    is there any problem in these files?
    can anyone please help me?
    thanks in advance

Maybe you are looking for