Error in setDataVariable in Java Embedding

Hi All,
I am trying to write a simple java embedding----
Here is the code.
try{                            
String firstName = ((oracle.xml.parser.v2.XMLElement)getVariableData("inputVariable","payload","/client:JavaEmbeddingBpelProcessRequest/client:input")).getFirstChild().getNodeValue();
addAuditTrailEntry("Inputvalue is"+firstName);
String sConcatString ="Hello!!!"+firstName;
addAuditTrailEntry("OutputString is"+sConcatString);
setVariableData("outputVariable","payload","/client:JavaEmbeddingBpelProcessResponse/client:result",sConcatString);
addAuditTrailEntry("ENDING.....");
catch (Exception e)
e.printStackTrace();
All the Audit trails come in the screen except the last one, just before where i m trying to assign to the result variable.
I get some thing like this in the console:-
Error in <assign> expression :<to> value is empty at line"".The XPath expression:"" returns zero node,when applied to the document shown below.
oracle.xml.parser.v2.XMLElement@64d196
This is a simple code i was trying. This code i found in the threads only, but for me this isnt working.
Can anyone please help me to fix this prob.??
I appreciate all the time n help for this.

Here it comes:::
<schema attributeFormDefault="unqualified"
     elementFormDefault="qualified"
     targetNamespace="http://xmlns.oracle.com/JavaEmbeddingBpel"
     xmlns="http://www.w3.org/2001/XMLSchema">
     <element name="JavaEmbeddingBpelProcessRequest">
          <complexType>
               <sequence>
                    <element name="input" type="string"/>
               </sequence>
          </complexType>
     </element>
     <element name="JavaEmbeddingBpelProcessResponse">
          <complexType>
               <sequence>
                    <element name="result" type="string"/>
               </sequence>
          </complexType>
     </element>
</schema>

Similar Messages

  • Java Embedding Activity Problem

    Hi,
    Can any one please suggest me i am getting an error message while using java embedding activity.I am getting the error message in server logs.
    Caused by: java.lang.NullPointerException
         at oracle.xml.binxml.BinXMLEncoderImpl.writeElementAttr(BinXMLEncoderImpl.java:2091)
         at oracle.xml.binxml.BinXMLEncoderImpl.startElement(BinXMLEncoderImpl.java:1007)
         at oracle.xml.binxml.BinXMLInfosetWriter.save(BinXMLInfosetWriter.java:206)
         at oracle.xml.parser.v2.XMLElement.writeNodeInfo(XMLElement.java:2959)
         at oracle.xml.parser.v2.XMLNode.writeChildNodes(XMLNode.java:3056)
         at oracle.xml.parser.v2.XMLElement.writeNodeInfo(XMLElement.java:2962)
         at oracle.xml.parser.v2.XMLNode.writeChildNodes(XMLNode.java:3056)
    oracle.fabric.common.FabricInvocationException: java.lang.NullPointerException
         at oracle.integration.platform.instance.InstanceManagerImpl.persistReferenceInstanceBean(InstanceManagerImpl.java:1153)
         at oracle.integration.platform.blocks.adapter.AbstractAdapterBindingComponent.createAndPersistBindingInstance(AbstractAdapterBindingComponent.java:504)
         at oracle.integration.platform.blocks.adapter.AdapterReference.createAndPersistBindingInstance(AdapterReference.java:356)
         at oracle.integration.platform.blocks.adapter.AdapterReference.post(AdapterReference.java:273)
    Thanks,
    Srinivas.

    Use System.out.println() in between your java statements and check the value in the logs. Alternatively, you can use addAuditTrailEntry(), that works similarly as System.out.println() but this prints on Activity itself on BPELConsole.

  • Invocation error in Java Embedding activity of BPEL process in 10g

    Hi,
    I am facing an issue as below in Java embedding activity of BPEL process in 10g...
    Could not invoke: "GTM servlet URL" with verb: POST and context: null
    and the code in java embedding activity is as below...
    // create a new rest invoker stub
    RestInvocation invocation = new RestInvocation();
    org.w3c.dom.Element callOtm_process_InputVariable = (org.w3c.dom.Element)getVariableData("Variable_GTMTransmission");
    // get the result el - so we can derive the namespace needed
    org.w3c.dom.Element callOtm_process_OutputVariable = (org.w3c.dom.Element)getVariableData("Variable_GTMTransmissionAck");
    String GTMURL = "GTM servlet URL";
    try
    callOtm_process_OutputVariable = invocation.invoke
    (callOtm_process_InputVariable, "GET", GTMURL, null,
    callOtm_process_OutputVariable.getNamespaceURI());
    setVariableData("Variable_GTMTransmissionAck", callOtm_process_OutputVariable);
    } finally
    addAuditTrailEntry(invocation.getAuditAsString());
    If anybody is aware of this error, please help me to resolve this issue.
    Thanks in advance.

    Try copy the code from java embedding and paste it to eclipse and run it from there. you will find the exact issue.
    Thanks

  • Getting error while calling external Jars in BPEL by using Java embedding activity in soa 12c

    Hi,
    I am trying to use an external Jars for the business logic implementation. Here I need to pass XML as input and
    and I expect the "Password " field has to be return.
    Following are the steps I have followed:
    1) Created a java project with sample class and added the external jars into the project "Libraries &Classpath".
    2) Created a jar file out of it.
    3) Created a BPEL project with Java Embedding.
    4)Wrote the java code in java embedding activity.
    4) Added the above created jar file to the BPEL project's lib/jar  and added in SCA-INF/lib project folder as well.
    5) Imported the package with the class as in the jar (e.g <bpelx:exec
    import="pkg.testInterface"/>)
    6) Deploy the BPEL project.
    while deploying the SOA build is sucessful but my depoyment is incomplete.
    error:
    advices will be great....
    Regards,
    Dilip

    Hi,
    Can you confirm if the BPEL Version is 1.1 or 2.0.
    If you are using BPEL 2.0 you need to import the required jar/class file as:
    <import importtype="http://schemas.oracle.com/bpel/extension/java" location="pkg.testInterface"/>
    For BPEL 1.1 the syntax to import other jar/class file is:
    <bpelx:exec import="pkg.testInterface"/>
    If you import the classes in the correct format you will not face any deployment error.

  • Java embedding error

    Hello all
    I'm using bpel 10.1.3.1.0, and I'm experiencing the following problem: I'm am not able to use the JAVA EMBEDDING in a process which polls for records using the db adapter.
    Steps to reproduce the problem:
    - I create a very simple bpel process which poll for records in a table.
    - I deploy it, write manually a record in the polled table and the process start.
    - I can see the record picked up through the visual flow in the console
    - everything looks ok and the process ends correctly
    - now I add a java embedding activities just after the receive
    - getting the data through getVariableData() and replacing the special characters and then again setting into the same variable.
    - redeploy, write a record in the polled table and the process start.
    - but the process ends in error with the following message "XMLDOMException has been thrown. invalid namespace for prefix xmlns". This is the only output from the instance. Even polling and other tasks are not executing with JAVA EMBEDDING activity.
    Below is the snippet...
    *<bpelx:exec name="Java_Embedding_encode_special_chars" language="java"*
    version="1.4">
    *<![CDATA[java.lang.String temp = (String) getVariableData("niku_xog_project_write_xml_as_string");*         
    *System.out.println("===================================String before manipulation: " + temp);*         
    *temp = temp.replaceAll("&", "&amp;amp;").replaceAll("\"", "&quot;quot;");*          
    *System.out.println("==================================String after manipulation: " + temp);*         
    *setVariableData("niku_xog_project_write_xml_as_string", temp);]]>*
    *</bpelx:exec>*
    I am not using any import statement because the same snippet is working in another project having no polling. According to other thread it is bug 5664594. But I am not able to download this patch from metalink because of not having the credentials. If it can fix the problem then can anybody give me another link for downloading this patch other than metalink?

    Brian,
    Thanks for the reply. For your questions:
    1. A firewall between your process and the rest of the cluster.
    I run Weblogic and Coherence server on the same development laptop, so no firewall here.
    2. Mis/different configuration between your process and the cluster.
    I did not use any customized configuration files, all configs are straight from coherence.jar.
    3. A classloader issue leading to the wrong cache configuration being picked up.
    Since I use the same jar in Coherence server and weblogic server, and confgurations are from the jar, so they are the same.
    4. Using different and incompatible versions of Coherence between your process and the cluster.
    See answer to 3.
    I do not see the process from BPEL join the coherence server from the server console.
    I am wondering if Weblogic server block coherence multicast messages, if that's the case, what other choices I can have to communicate to coherence server? is Coherence-extend the right direction to explore?
    Thanks
    George

  • How to use Java Embedding activity, getting error

    Below is a simple code where in I am just assigning input variable to output variable(of type long), using java embedding activity, and I am getting error in Java Embedding Activity step.
    <bpelx:exec name="Java_Embedding_1" language="java" version="1.4">
    <![CDATA[ 
    Element inputValue1 = (Element)getVariableData("inputVariable", "payload","/client:Pooja_BP1ProcessRequest/client:input1");   
    String arg1=inputValue1.getNodeValue(); 
    setVariableData("outputVariable", "payload","/client:Pooja_BP1ProcessResponse/client:result", new Long(arg1));]]>
    </bpelx:exec>
    Runtime Error:
    <runtimeFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>java.lang.*NumberFormatException*</code>
    </part><part name="summary"><summary>null</summary>
    </part><part name="detail"><detail>[Ljava.lang.StackTraceElement;@1c50684</detail>
    </part></runtimeFault>
    Could anyone please point out the mistake?

    No, that's not working. Throwing below error.
    faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure}
    messageType: {}
    parts: {{summary=<summary>XPath query string returns zero node.
    According to BPEL4WS spec 1.1 section 14.3, The assign activity &amp;lt;to&amp;gt; part query should not return zero node.
    Please check the BPEL source at line number "" and verify the &amp;lt;to&amp;gt; part xpath query.
    My output varaible is of type long and there i m creating a Long object using it's constructor which takes in a string, Long(String s)
    Actually, I m not just priniting the input, but i need to perform some calculations also on the inputs, like
    Element inputValue1 = (Element)getVariableData("inputVariable", "payload","/client:Pooja_BP1ProcessRequest/client:input1");  
    Element inputValue2 = (Element)getVariableData("inputVariable", "payload","/client:Pooja_BP1ProcessRequest/client:input2");  
    long arg1=Long.parseLong(inputValue1.getNodeValue());  
    long arg2=Long.parseLong(inputValue2.getNodeValue());  
    long arg3 = arg1+arg2; 
    setVariableData("outputVariable", "payload","/client:Pooja_BP1ProcessResponse/client:result", new Long(arg3));                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Java embedding code in BPEL 2.0 giving deployment errors

    Hello,
    I am using Jdeveloper and SOA 6 11.1.1.0.6 version. BPEL 2.0
    When i use simple sysout in the java embedding it is deploying fine but when using XMLElement api in the java embedding it s giving deployment error.
    Please suggest me how to make it work.
    Please see the error message below:
    Error deploying archive sca_FetchAttachments_rev1.1.jar to partition "default" on server soa_server1 [http://XXX.XXX.com:8001]
    [01:04:09 PM] HTTP error code returned [500]
    [01:04:09 PM] Error message from server:
    There was an error deploying the composite on soa_server1: Error occurred during deployment of component: FetchAttachments to service engine: implementation.bpel, for composite: FetchAttachments: ORABPEL-05250

    Hello Rolando Carrasco,
    Thank for responding my question. I figure out the issue. It is because we need to import the java API's what we are using in the java embedding.
    Thank you,
    Raj

  • Getting  Error: SCAC-50012 while using Java Embeding Activity

    Hi,
    I am using Jdeveloper 11.1.1.4.0 . I am using a Java Embedding Activity in my BPEL and when i compile the project, i got one error------Error: SCAC-50012
    The code i am using in Java Embedding activity is
    java.lang.String TraceLogMessage = null;
         java.lang.Boolean tracelogenabled;
    java.lang.String title = (java.lang.String)getVariableData("Title");
    java.lang.String instanceID = (java.lang.String)getVariableData("InstanceID");
    java.lang.String serviceName = (java.lang.String)getVariableData("ServiceName");
    tracelogenabled = oracle.apps.aia.core.eh.logging.AIALogger.isTraceLoggingEnabled("INFO","http://xmlns.oracle.com/ExecuteSalesOrderFulfillmentDeviceUpdateEBF");
    setVariableData("TraceLogEnabled", tracelogenabled);
    if (tracelogenabled.booleanValue())
    TraceLogMessage = "Starting " + serviceName + " Instance: " + instanceID + title; ;
    oracle.apps.aia.core.eh.logging.AIALogger.logTraceMessage("INFO", null ,TraceLogMessage);
    i have imported the following in bpel but there is no luck........
    <bpelx:exec import="java.util.logging.Logger"/>
    <bpelx:exec import="java.util.logging.Level"/>
    <bpelx:exec import="oracle.fabric.logging.LogFormatter"/>
    <bpelx:exec import="org.w3c.dom.*"/>
    <bpelx:exec import="oracle.xml.parser.v2.XMLElement"/>
    <bpelx:exec import="java.util.*"/>
    <bpelx:exec import="java.lang.*"/>
    <bpelx:exec import="java.math.*"/>
    <bpelx:exec import="java.io.*"/>
    <bpelx:exec import="oracle.soa.common.util.Base64Decoder"/>
    Please help me with this......
    Thanks&Regards,
    suman

    Hi Lara,
    Thanks for the responce.......
    I checked the scac log file it contains the following code.
    ---------------------------------------------- scac logfile ----------------------------------------------------
    Mar 15, 2012 5:32:18 PM com.collaxa.cube.CubeLogger info
    INFO: validating "BPELProcess1.bpel" ...
    oracle.jrf.UnknownPlatformException: JRF is unable to determine the current application server platform.
         at oracle.jrf.ServerPlatformSupportFactory.getInstance(ServerPlatformSupportFactory.java:79)
         at oracle.integration.platform.blocks.WLSPlatformConfigurationProvider.<clinit>(WLSPlatformConfigurationProvider.java:44)
         at oracle.integration.platform.blocks.FabricConfigManager.<clinit>(FabricConfigManager.java:154)
         at oracle.integration.platform.blocks.xpath.FabricXPathFunctionResolver.loadXpathFunctions(FabricXPathFunctionResolver.java:282)
         at oracle.integration.platform.blocks.xpath.FabricXPathFunctionResolver.loadXPathConfigFile(FabricXPathFunctionResolver.java:156)
         at oracle.integration.platform.blocks.xpath.FabricXPathFunctionResolver.init(FabricXPathFunctionResolver.java:49)
         at com.collaxa.cube.xml.xpath.BPELXPathFunctionNameResolver.loadFabricXpathFunctions(BPELXPathFunctionNameResolver.java:57)
         at com.collaxa.cube.xml.xpath.BPELXPathFunctionNameResolver.<init>(BPELXPathFunctionNameResolver.java:48)
         at com.collaxa.cube.xml.xpath.BPELXPathFunctionNameResolver.<clinit>(BPELXPathFunctionNameResolver.java:44)
         at com.collaxa.cube.lang.compiler.bpel.XPathExprValidatorVisitor.<init>(XPathExprValidatorVisitor.java:122)
         at com.collaxa.cube.lang.compiler.bpel.AssignValidator.<init>(AssignValidator.java:89)
         at com.collaxa.cube.lang.compiler.bpel.BpelParser.<init>(BpelParser.java:452)
         at com.collaxa.cube.lang.compiler.bpel.BPELValidator.validate(BPELValidator.java:60)
         at com.collaxa.cube.lang.compiler.BPEL1Processor.validate(BPEL1Processor.java:329)
         at com.collaxa.cube.lang.compiler.BPEL1Processor.process(BPEL1Processor.java:153)
         at com.collaxa.cube.lang.compiler.CubeParserHelper.compile(CubeParserHelper.java:47)
         at oracle.fabric.bpel.bpelc.BPELComponentValidator.validate(BPELComponentValidator.java:40)
         at oracle.soa.scac.ValidateComposite.validateComponentTypeServicesReferences(ValidateComposite.java:1117)
         at oracle.soa.scac.ValidateComposite.doValidation(ValidateComposite.java:500)
         at oracle.soa.scac.ValidateComposite.run(ValidateComposite.java:150)
         at oracle.soa.scac.ValidateComposite.main(ValidateComposite.java:135)
    Mar 15, 2012 5:32:23 PM CubeProcessGenerator compile
    WARNING: classpath is: D:\Oracle\Middleware\jdeveloper\jdev\extensions\oracle.sca.modeler.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;D:\Oracle\Middleware\oracle_common\modules\oracle.fabriccommon_11.1.1\fabric-common.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.mediator_11.1.1\mediator_client.jar;D:\Oracle\Middleware\oracle_common\modules\oracle.mds_11.1.1\mdsrt.jar;;C:\JDeveloper\mywork\sampleApplication\JavaEmbed\SCA-INF\classes;C:\JDeveloper\mywork\sampleApplication\JavaEmbed\SCA-INF\classes;C:\JDeveloper\mywork\sampleApplication\JavaEmbed\SCA-INF\gen-classes;D:\Oracle\Middleware\oracle_common\modules\commonj.sdo_2.1.0.jar;D:\Oracle\Middleware\oracle_common\modules\oracle.fabriccommon_11.1.1\fabric-common.jar;D:\Oracle\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xmlparserv2.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\bpel1-1-xbeans.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel-common.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\bpel_coherence_config.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel-exts.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\thirdparty.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\bpm-analytics.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel-thirdparty.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\wsif-binding.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel-validator.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\monitor-rt-xbean.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\oracle.soa.bpmn.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\user-patch.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.thirdparty.jar;D:\Oracle\Middleware\jdeveloper\uddi\lib\oracle.soa.uddi.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\bpm-infra.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\testfwk-xbeans.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-ext.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\soa-infra-scheduler.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\xmlunit-1.1.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\soa-infra-tools.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\soa-xpath-exts.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\oracle-soa-client-api.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.wls.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-client.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime-ext-was.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime-ext-wls.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\oracle.soa.fabric.jar;D:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.ext_11.1.1\classes;D:\Oracle\Middleware\oracle_common\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar
    Please help me how can i solve this issue.
    Thanks&Regards,
    Suman

  • BPEL: invalid namespace error with DB adapter polling and java embedding

    Hello
    I'm using bpel 10.1.3.1.0, and I'm experiencing the following problem: I'm am not able to use the SetTitle() function in a process which polls for records using the db adapter.
    Steps to reproduce the problem:
    - I create a very simple bpel process which poll for records in a table.
    - I deploy it, write manually a record in the polled table and the process start.
    - I can see the record picked up through the visual flow in the console
    - everything looks ok and the process ends correctly
    - now I add a java embedding activities just after the receive
    - I set the instance title like this: setTitle("Go");
    - redeploy, write a record in the polled table and the process start.
    - but the process ends in error with the following message "XMLDOMException has been thrown. invalid namespace for prefix xmlns"
    And there is no way to make it work. Consider:
    If I put the same java embedding activity in another process, for example a simple asynchronous process which just copy the input to the output, and I run from the console, the instance title is set as I want ("Go")
    If I remove the three lines from the polling process
    <bpelx:exec name="Java_Embedding_1" language="java" version="1.3">
    <![CDATA[setTitle("Go");]]>
    </bpelx:exec>
    then the process is executed correctly again. I add them again and then namespace error.
    Whatever statement I put in the java embedding activity (for example a string concatenation or even just a comment I have the same result: invalid namespace for prefix xmlns.
    Does anybody has a suggestion to evercome the problem? I need to set the title because its a mess to find out which instance processed a specific record.
    Thanks by
    Paolo

    I made a lot of further tests, and I can say the problem is related only to the database adapter polling mechanism.
    If I create an asynchronous process, with any kind of database activity (for example select) I can set the title normally.
    If I create a process which start with database table polling, then I cannot use the java embedding.
    try this:
    - create BPEL empty project
    - drop a database adapter service and follow the wizard:
    - select a connection (I tried both oracle or sqlserver connection)
    - select "poll for new or changed record"
    - select any table empty or with few record inside (1 or 2)
    - press next 4 times
    - chose delete record after read (press next)
    - chose order by "no ordering" in polling options (press next 2 times)
    - now drop a receive activity on the process, and connect with the polling partner link
    - drop a java embedding and write any valid java statement
    - deploy; if the table is empty, write a recod in the table
    - the process is instantiated, but the it fails in the --> receive <-- activity with "invalid namespace" error

  • Java Embedding Weird XML Node Error

    Ok, I am going crazy. I have a java embedding node that takes a date string in, changes it to a different format and creates another date that contains the current time. if I run this in java to code run ok and there are no issues. At the end of the java I print out the string and they are exactly what I want. The thing that is going on is when I set the 2 string BPEL variables in the java embedding, when I try to reference them the 2nd time,I get a weird node object error. I get through the first pass ok. when I try to reference Test1 or Test2 on the 2nd pass I get the error below. Its like when I set the variable currentDB2UpdateDate and currentDB2CurrTimeDate it does something to them. Instead of setting it to just the string it seems to set it to some kind of object.
    I have 3 steps here. Assign -> Java Embedding -> Assign.
    Assign 1 => Initialize 2 String variables to X.
    <code>
    <assign name="Assign_2">
    <copy>
    <from expression="string('X')"/>
    <to variable="currentDB2UpdateDate"/>
    </copy>
    <copy>
    <from expression="string('X')"/>
    <to variable="currentDB2CurrTimeDate"/>
    </copy>
    </assign>
    </code>
    Java Embedding =>
    <code>
    String currentFileDate = (String)getVariableData("currentFileDate");
    String currentDate = "";
    try
    SimpleDateFormat sdfSource = new SimpleDateFormat("MM/dd/yyyy");
    Date date = sdfSource.parse(currentFileDate);
    SimpleDateFormat sdfDestination = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
    currentFileDate = sdfDestination.format(date);
    catch(ParseException pe)
    System.out.println("Parse Exception : " + pe);
    try
    Calendar cal = Calendar.getInstance();
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
    currentDate = sdf.format(cal.getTime());
    catch(Exception pe)
    System.out.println("Parse Exception : " + pe);
    System.out.println("currentFileDate : " + currentFileDate.toString());
    System.out.println("currentDate : " + currentDate.toString());
    setVariableData("currentDB2UpdateDate",currentFileDate);
    setVariableData("currentDB2CurrTimeDate",currentDate);
    </code>
    Assign 3 =>
    <code>
    <assign name="Assign_1">
    <copy>
    <from variable="currentDB2UpdateDate"/>
    <to variable="Test1"/>
    </copy>
    <copy>
    <from variable="currentDB2CurrTimeDate"/>
    <to variable="Test2"/>
    </copy>
    </assign>
    </code>
    <code>
    <bpelFault><faultType>0</faultType><selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"><part name="summary"><summary>Invalid to part type.
    When performing the assign operation, the to node 2010-07-17 12:00:00 is invalid.
    The node named in the error message was either null or an empty node set, and it was not an instance of org.w3c.Element.
    Verify the node value at line number 819 is not null and is an instance of org.w3c.Element.
    </summary></part></selectionFailure></bpelFault>
    </code>
    The 2nd pass to this throws the following error when trying to set Test1 and Test2 again... Its like it is setting the variable to an object and not just the string. I tried using toString() in the setVariable too and it didn't work. I don't get it.
    Edited by: 806312 on Dec 1, 2010 8:13 AM
    Edited by: 806312 on Dec 1, 2010 8:26 AM

    I am also facing a similar issue.There is selection failure in assignment to local variable of BPEL .
    PFB the logs :
    parts: {{
    summary=&amp;lt;summary&amp;gt;Invalid to part type.
    When performing the assign operation, the to node false is invalid.
    The node named in the error message was either null or an empty node set, and it was not an instance of org.w3c.Element.
    Verify the node value at line number 3577 is not null and is an instance of org.w3c.Element.
    &amp;lt;/summary&amp;gt;}
    Here is the code:
    <copy>
    <from expression="xpath20:add-dayTimeDuration-to-dateTime($calculatednpexectime,'P200YT')"/>
    <to variable="calculatednpexectime"/>
    </copy>
    It seems as if Oracle is not accepting the date format .
    Is there some issue with local variables of new version of BPEL ??

  • Coherence in SOA BPEL Java Embedding error

    I am trying to use Coherence to cache message in SOA BPEL process.
    The BPEL process is deployed into WebLogic 10.3.2 on SOA 11g platform.
    Withing the BPEL, I use Java Embedding, try to cache a meesage on another coherence instance (Running as a server from
    a different JVM). But I am getting "Storage is not configured" exception after the "Jave Embedding invoked" message.
    Here is my code:
    System.out.println("Jave Embedding invoked");
    try{
    //set localstorage to false, use remote Coherence server
    System.setProperty("tangosol.coherence.distributed.localstorage", "false");
    System.setProperty("tangosol.coherence.log.level", "3");
    catch(Exception e) {
    e.printStackTrace();
    CacheFactory.ensureCluster();
    NamedCache myCache = CacheFactory.getCache("mycache");
    // put key, value pair into the cache.
    myCache.put("Name","Test");
    System.out.println("Value in cache is " + myCache.get("Name"));
    I use the same code in JDeveloper, and see the message is put on the remote cache server. But when I invoke it through BPEL, I don't even see the new coherence member join the cluster.
    I use the default cache-server.cmd from Coherence package to start the server.
    Anyone has similar experience to share?
    Thanks
    George

    Brian,
    Thanks for the reply. For your questions:
    1. A firewall between your process and the rest of the cluster.
    I run Weblogic and Coherence server on the same development laptop, so no firewall here.
    2. Mis/different configuration between your process and the cluster.
    I did not use any customized configuration files, all configs are straight from coherence.jar.
    3. A classloader issue leading to the wrong cache configuration being picked up.
    Since I use the same jar in Coherence server and weblogic server, and confgurations are from the jar, so they are the same.
    4. Using different and incompatible versions of Coherence between your process and the cluster.
    See answer to 3.
    I do not see the process from BPEL join the coherence server from the server console.
    I am wondering if Weblogic server block coherence multicast messages, if that's the case, what other choices I can have to communicate to coherence server? is Coherence-extend the right direction to explore?
    Thanks
    George

  • Could not type cast in java embedding

    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    org.xml.sax.InputSource in = (org.xml.sax.InputSource) getVariableData("Invoke_1_getRoutingAndFrameJumpers_OutputVariable","getRoutingAndFrameJumpersResponse");
    Document doc = db.parse(in);
    In the above code I am trying to type cast the variable getRoutingAndFrameJumpersResponse into org.xml.sax.InputSource so that i can parse.
    I am not getting any error during compilation
    but I am unable to type cast some run time error is coming in the line were I am type casting but I am not able to see the runtime error.
    How can I see the runtime error in java embedding, how to type cast a variable into xml so that I can parse it.

    Hi Arun,
    Could you try using the bpelx:rename extension in an assign activity enables a BPEL process to rename an element through use of XSD type casting.
    <bpel:assign>
    <bpelx:rename elementTo="QName1"? typeCastTo="QName2"?>
    <bpelx:target variable="ncname" part="ncname"? query="xpath_str" />
    </bpelx:rename>
    </bpel:assign>
    Cheers
    A

  • Using Java Embedding Unzip Code and a Trigger File in a BPEL Process

    Hello,
    Thanks in advance to anyone that contributes with any insight.  It is much appreciated.  Having said that I will get to the crux of my problem.
    I am currently using Oracle 11g.  I have created a SOA composite application that incorporates BPEL and Java.  I have the code needed to unzip and extract compressed folders.  However, when this was first built out using BPEL it automatically created a web service in the "exposed service" lane and not a file adapter which I believe is needed in order to trigger the process via a start.txt file for example.  Based on what I know ... this web service automatically connecting to the BPEL process was simply due to the order of operations, etc.  So by creating a 'read' file adapter first and then creating the BPEL process and selecting the template "Define Service Later", it does not automatcially connect the web service to the BPEL process and it will allow me to connect a file adapter to this BPEL process instead ... great.  When opening up the BPEL file I then connect a recieve component to this file adapter and configure appropriately.
    Essentially, my objective in setting up a trigger to start this unzip process is due to the BPEL process before that outputs or writes the .zip folder to the same directory that I want to poll and/or trigger via a start.txt file.  I can get this process to work with a webservice connecting to the BPEL process and by using a Java Embedded in BPEL file, which in turns calls the package/ class that has the java code needed to unzip.
    For some reason whenever I try to use a file adapter instead of the native web service that gets created (as mentioned above) it doesn't work.  It seems to build or compile just fine however, I am getting errors when I try to deploy.
    Note:  The Java code contains all the paths where the zip file is to be taken from and extracted to.  So because this is in the code I don't need the file adapter to handle this.  I just want to use the file adapter so that I can trigger the process via start.txt or something of that nature.
    Thanks to anyone that has any suggestions.
    Kind Regards,
    Kevin
    Errors when attempting to deploy are as follows:
    [04:12:54 PM] Error deploying archive sca_Job2_UnZip_rev1.0.jar to partition "default" on server soa_server1 [http://WN017A.homedepot.com:8001]
    [04:12:54 PM] HTTP error code returned [500]
    [04:12:54 PM] Error message from server:
    There was an error deploying the composite on soa_server1: Deployment Failed: Error occurred during deployment of component: BPELProcess1 to service engine: implementation.bpel, for composite: Job2_UnZip: ORABPEL-05250
    Error deploying BPEL suitcase.
    error while attempting to deploy the BPEL component file "H:\Oracle\Middleware\user_projects\domains\Dev_Acorde\servers\soa_server1\dc\soa_d78eb301-314c-422a-a748-bcfe7d0906e8"; the exception reported is: java.lang.RuntimeException: failed to compile execlets of BPELProcess1
    This error contained an exception thrown by the underlying deployment module.
    Verify the exception trace in the log (with logging level set to debug mode).
    [04:12:54 PM] Check server log for more details.
    [04:12:54 PM] Error deploying archive sca_Job2_UnZip_rev1.0.jar to partition "default" on server soa_server1 [http://WN017A.homedepot.com:8001]
    [04:12:54 PM] ####  Deployment incomplete.  ####
    [04:12:54 PM] Error deploying archive file:/C:/JDeveloper/mywork/Job2_UnZip/Job2_UnZip/deploy/sca_Job2_UnZip_rev1.0.jar
    (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)

    Just wanted to provide a screenshot of the BPEL file as supporting documentation to better illustrate my issue.
    Thanks so much,
    Kevin

  • Java Embedding bug in SOA Suite 11g BPEL??

    I am beginning to wonder if there is a 'bug' in the SOA Suite 11g, BPEL, Java Embedding activity? Need some help as soon as possible – does the Java Embedding activity work in SOA Suite 11g?
    Have tried the following on Jdev 11.1.1.1 and Jdev 11.1.1.3 – get the same error message (see below for error message).
    Thanks for any help - Casey
    I created a simple composite app by:
    1.     Created a Composite with BPEL Process
    2.     Created a BPEL variable by the name of Variable and a Simple Type of string      ({http://www.w3.org/2001/XMLSchema}string)
    3.     Added an Assign activity (Assign_1) and assigned the value of “Test Var” to the variable Variable using a Copy operation.
    4.     Then, after the assign activity, added a Java Embedding activity (Java_Embedding_1) with Java Version set to 1.5 and the following code:
    +try{+*
    String var;*
    var=(String)getVariableData(Variable);*
    System.out.println(var);*
    +}  // end try+
    +catch(Exception ex){+*
    System.out.println(ex.getMessage());*
    +}// end catch+
    Compiled and got the following error message:
    Error(23,34): Failed to compile bpel generated classes.*
    failure to compile the generated BPEL classes for BPEL process "BPELProcess1" of composite "default/Project1!1.0"*
    The class path setting is incorrect.*
    Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.*
    Code for the BPEL component is:
    +<?xml version = "1.0" encoding = "UTF-8" ?>+
    +<!--+
    +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+
    Oracle JDeveloper BPEL Designer
    Created: Tue Nov 09 13:01:49 CST 2010
    Author:
    Purpose: Asynchronous BPEL Process
    +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+
    -->
    +<process name="BPELProcess1"+
    targetNamespace="http://xmlns.oracle.com/TestgetVariable_jws/Project1/BPELProcess1"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:client="http://xmlns.oracle.com/TestgetVariable_jws/Project1/BPELProcess1"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/file/TestgetVariable/Project1/FileW"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    +<!--+
    +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+
    PARTNERLINKS
    List of services participating in this BPEL process
    +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+
    -->
    +<partnerLinks>+
    +<!--+
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    +<partnerLink name="bpelprocess1_client" partnerLinkType="client:BPELProcess1" myRole="BPELProcess1Provider" partnerRole="BPELProcess1Requester"/>+
    +</partnerLinks>+
    +<!--+
    +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+
    VARIABLES
    List of messages and XML documents used within this BPEL process
    +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+
    -->
    +<variables>+
    +<!-- Reference to the message passed as input during initiation -->+
    +<variable name="inputVariable" messageType="client:BPELProcess1RequestMessage"/>+
    +<!-- Reference to the message that will be sent back to the requester during callback -->+
    +<variable name="outputVariable" messageType="client:BPELProcess1ResponseMessage"/>+
    +<variable name="Variable" type="xsd:string"/>+
    +</variables>+
    +<!--+
    +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+
    ORCHESTRATION LOGIC
    Set of activities coordinating the flow of messages across the
    services integrated within this business process
    +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+
    -->
    +<sequence name="main">+
    +<!-- Receive input from requestor. (Note: This maps to operation defined in BPELProcess1.wsdl) -->+
    +<receive name="receiveInput" partnerLink="bpelprocess1_client" portType="client:BPELProcess1" operation="process" variable="inputVariable" createInstance="yes"/>+
    +<!--+
    Asynchronous callback to the requester. (Note: the callback location and correlation id is transparently handled using WS-addressing.)
    -->
    +<assign name="Assign_1">+
    +<copy>+
    +<from expression='"test var"'/>+
    +<to variable="Variable"/>+
    +</copy>+
    +</assign>+
    +<bpelx:exec name="Java_Embedding_1" version="1.5" language="java">+
    +<![CDATA[/*Write your java code below e.g.+
    +     System.out.println("Hello, World");+
    +*/+
    +try{+
      +String var;+
      +var=(String)getVariableData(Variable);+
      +System.out.println(var);+
    +} // end try+
    +catch(Exception ex){+
    System.out.println(ex.getMessage());
    +}// end catch]]>+
    +</bpelx:exec>+
    +<invoke name="callbackClient" partnerLink="bpelprocess1_client" portType="client:BPELProcess1Callback" operation="processResponse" inputVariable="outputVariable"/>+
    +</sequence>+
    +</process>+

    Java Embedding bug in SOA Suite 11g BPEL??

  • Reading Opaque data from jms queue  and decoded  in java embedding

    Hi ,
    Objective:Fetch text message from queue and print it from java embedding in BPEL
    I am fetching text message from a jms queue using JMS adapter in BPEL.Then converting the opaque data(Base64 binary)to string using java embedding.My build got successful but I am getting runtime error at the time of deployment.
    I have added fabric-runtime.jar file into SCA-INF\lib folder as well as project library directory.
    <extensionActivity>
    <bpelx:exec name="Java_Embedding1" version="1.5" language="java">
    <bpelx:exec import="java.io.*"/>
    <bpelx:exec import="oracle.soa.common.util.Base64Decoder"/>
    <![CDATA[//Write your java code below e.g.        
         System.out.println("Hello, World");       
    //   String input = ((Element)getVariableData("Receive1_Consume_Message_InputVariable")).getTextContent();              
      // String inputName = (String)getVariableData("input");     
      String input = (String)getVariableData("Receive1_Consume_Message_InputVariable");            
    //Receive1_Consume_Message_InputVariable.opaque          
          System.out.println("input:"+input);          
          addAuditTrailEntry(input);           
          Base64Decoder Decoder = new Base64Decoder();             
         try {            
          String decoded = Base64Decoder.decode(input);            
          setVariableData("Variable_opaque_decoded",decoded);            
          addAuditTrailEntry(decoded);           
    catch(UnsupportedEncodingException uee)
    uee.printStackTrace();
    }]]>
    </bpelx:exec>
    </extensionActivity>
    Error:
    Error deploying archive sca_JMSToDBInsert_rev1.0.jar to partition "default" on server AdminServer [http://localhost:7001]
    HTTP error code returned [500]
    Error message from server:
    There was an error deploying the composite on AdminServer: Error occurred during deployment of component: BPELProcess1 to service engine: implementation.bpel, for composite: JMSToDBInsert: ORABPEL-05250
    Error deploying BPEL suitcase.
    error while attempting to deploy the BPEL component file "C:\Oracle\Middleware\user_projects\domains\soa_domain\servers\AdminServer\dc\soa_0fb06e23-bac3-4753-aae9-0fc4b54b4dd1"; the exception reported is: java.lang.RuntimeException: failed to compile execlets of BPELProcess1
    This error contained an exception thrown by the underlying deployment module.
    Verify the exception trace in the log (with logging level set to debug mode).
    Check server log for more details.
    Error deploying archive sca_JMSToDBInsert_rev1.0.jar to partition "default" on server AdminServer [http://localhost:7001]
    #### Deployment incomplete. ####
    Error deploying archive file:/C:/SOA Suite/SOA_POC/Client2JMSapps/Client2JMSapps/JMSToDBInsert/deploy/sca_JMSToDBInsert_rev1.0.jar
    (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
    Could you guys please help me regarding this?
    Thanks & Regards,
    Souvik
    Edited by: Souvik Pal on Apr 16, 2012 9:40 PM

    You probably want to try the SOA Suite forum for OSB questions.
    SOA Suite
    There is an excellent book also:
    http://jeffdavies.org/
    The documentation goes over the fundamentals, but the book will be better for step by step examples.

Maybe you are looking for

  • ICal print in weekly view doesn't begin from monday but tuesday

    Hello, I faced a problem while trying to print a weekly view of my calendars. Even though I have adjusted the calendar in the setting so that the week starts from monday, every time I try to print a weekly view of my calendars, the weekly view is is

  • How to provide space and new line to the text in AI Script

    how to provide space and new line to the text in AI Script

  • Need Sun Java Studio Enterprise 8 developer

    Hello, I have been an avid Java developer and reader. Thought I can get quality developers from this forum only. We need someone who has experience in developing in Sun Java Studio Enterprise 8.0 for our client in South Bay, CA. The position is for 6

  • Connecting Macbook Pro to PC

    Yeah, so I've always had trouble with understanding networking and I wanted to be able to connect my new macbook pro to my pc. This is mainly because my pc has the ability to connect to component and s-video electronics such as my dated video camera.

  • Create characteristc with multiple units of measure

    Hello Friends, I want to create characteristic (CT04) which has multiple units of measure.  At present  a  Characteristic is created with a single unit of Measure. I have to create characeristic and assign it in MIC. MIC specifications are customer d