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

Similar Messages

  • 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

  • How to use the Java embedding activity in BPel

    hi all,
    How to use the java embedding activity in BPEL
    pls can u provide sample example

    1 Use [Oracle BPEL Process Manager Client Java API Reference|http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/overview-summary.html] and especially [com.collaxa.cube.engine.ext|http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/com/collaxa/cube/engine/ext/BaseBPELXExecLet.html]
    Instead of System.Out.println use addAuditTrailEntry(java.lang.String message)
    2. If you want to import a package write in code (Source View) of bpel process
    +<bpelx:exec import="package_name"/>+ for example +<bpelx:exec import="java.util.regex.Matcher"/>+
    example 1:
    String bodyAsString;
    StringBuffer myStringBuffer = new StringBuffer();
    try {
    bodyAsString = (String)getVariableData("BodyString");
    addAuditTrailEntry("bodyAsString1: "+ bodyAsString);
    Pattern pattern = Pattern.compile("goodDay");
    Matcher matcher= pattern.matcher(bodyAsString);
    while (matcher.find()) {   
    matcher.appendReplacement(myStringBuffer, "shitDay");
    matcher.appendTail(myStringBuffer);
    bodyAsString = myStringBuffer.toString();
    addAuditTrailEntry("bodyAsString2: "+ bodyAsString);
    } catch (Exception ex) {
    addAuditTrailEntry("Failed+bodyAsString",ex.getMessage());
    I put in code (Source View) the following
    <bpelx:exec import="java.util.regex.Matcher"/>
    <bpelx:exec import="java.util.regex.Pattern"/>
    example2:
    Object temp;
    try {
    temp = ((XMLElement)getVariableData("inputVariable","payload","/ns2:FiscalisMessage/ns2:Body")).getChildNodes().item(1);
    setVariableData("AdjReceipt",temp);
    addAuditTrailEntry("ok",temp.toString());
    catch (Exception ex) {
    addAuditTrailEntry("Failed :",ex);
    I put in code (Source View) the following
    <bpelx:exec import="oracle.xml.parser.v2.XMLElement"/>

  • Adding a java class code in BPEL 11g

    Hi Friends ,
    i m doing one simple example of calling a java class from bpel ,
    1. first i created a java class
    2. After that in my project i imported the jar file of the same class , and i am using JavaEmbedding
    for creating one object of that class and calling one method which return me the string result and finally i am setting the result in bpel variable.
    the application is build successfull but when i am deploying it i am getting following error
    [02:31:19 PM] Error deploying archive sca_JavaCall_rev1.0.jar to partition "OrderProcessing" on server soa_server1 [http://10.45.4.206:8006]
    [02:31:19 PM] HTTP error code returned [500]
    [02:31:19 PM] Error message from server:
    There was an error deploying the composite on soa_server1: Deployment Failed: Error occurred during deployment of component: JavaCallBPELProcess to service engine: implementation.bpel, for composite: JavaCall: ORABPEL-05250
    Error deploying BPEL suitcase.
    error while attempting to deploy the BPEL component file "/u04/FMW_HOME/user_projects/domains/Training_domain/servers/soa_server1/dc/soa_3e8c5747-aba0-49b7-91d4-56f74bec87b8"; the exception reported is: java.lang.RuntimeException: failed to compile execlets of JavaCallBPELProcess
    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).
    [02:31:19 PM] Check server log for more details.
    [02:31:19 PM] Error deploying archive sca_JavaCall_rev1.0.jar to partition "OrderProcessing" on server soa_server1 [http://10.45.4.206:8006]
    [02:31:19 PM] #### Deployment incomplete. ####
    [02:31:19 PM] Error deploying archive file:/C:/JDeveloper/mywork/Trimble/JavaCall/deploy/sca_JavaCall_rev1.0.jar
    (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
    please tell me what is the problem.

    You have to use the below value there.
    +2. After that in my project i imported the jar file of the same class ,+
    There are 2 things, if you are not going to reuse the same code, its better to use Java Embedded component.
    If you are going to reuse the same methods from the class then it make sense to import as jar file and use it.
    Thanks,
    Vijay

  • Java.lang.RuntimeException: failed to compile execlets (JAVA embeding issue in BPEL 2.0)

    HI i was trying to use java code in BPEL 2.0 by using java Embedding. while deploying the application getting the error.
    even after importing the corrsponding class
    below is the code snippet for the same :
    <import location="oracle.soa.management.facade.Locator"
         importType="http://schemas.oracle.com/bpel/extension/java"/>
         <import location="oracle.soa.management.facade.LocatorFactory"
         importType="http://schemas.oracle.com/bpel/extension/java"/>
         <import location="oracle.soa.management.facade.Component"
         importType="http://schemas.oracle.com/bpel/extension/java"/>
    <extensionActivity>
          <bpelx:exec name="Java_Embedding1" language="java">
            <![CDATA[Locator locator = LocatorFactory.createLocator();    
    String compositeRevision = (String)getVariableData("compositeRevision");  
    String compositeNameRevision = "ASG/ImportCustomerData!"+ compositeRevision; 
    Composite prowessCustomerComposite = (Composite)locator.lookupComposite(compositeNameRevision);   
    CompositeInstanceFilter filter = new CompositeInstanceFilter();    
    filter.setState(CompositeInstance.STATE_RUNNING);]]>
          </bpelx:exec>
        </extensionActivity>
    while deploying gettting below error.
    06:18:58 PM] Error deploying archive sca_ImportCutomerData_rev1.0.jar to partition "default" on server AdminServer [http://LTRTHIPIREDDY.keste.com:7001]
    [06:18:58 PM] HTTP error code returned [500]
    [06:18:58 PM] Error message from server:
    There was an error deploying the composite on AdminServer: Deployment Failed: Error occurred during deployment of component: importCustomerData_BPEL to service engine: implementation.bpel, for composite: ImportCutomerData: ORABPEL-05250
    Error deploying BPEL suitcase.
    error while attempting to deploy the BPEL component file "E:\Oracle\Middleware\user_projects\domains\Raja_domain\servers\AdminServer\dc\soa_3ca99378-812f-460f-9760-d19a15c0ef44"; the exception reported is: java.lang.RuntimeException: failed to compile execlets of importCustomerData_BPEL
    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).
    [06:18:58 PM] Check server log for more details.
    [06:18:58 PM] Error deploying archive sca_ImportCutomerData_rev1.0.jar to partition "default" on server AdminServer [http://LTRTHIPIREDDY.keste.com:7001]
    [06:18:58 PM] ####  Deployment incomplete.  ####
    [06:18:58 PM] Error deploying archive file:/C:/JDeveloper/mywork_Arbonne/CustomerInboundApp/ImportCutomerData/deploy/sca_ImportCutomerData_rev1.0.jar
    (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
    Thanks in Advance...
    rajashekar

    Hi have solved the issue by importing the  class file.
    <import location="oracle.soa.management.facade.Locator"
              importType="http://schemas.oracle.com/bpel/extension/java"/>
      <import location="oracle.soa.management.facade.LocatorFactory"
              importType="http://schemas.oracle.com/bpel/extension/java"/>
      <import location="oracle.soa.management.facade.Composite"
              importType="http://schemas.oracle.com/bpel/extension/java"/>
      <import location="java.util.List"
              importType="http://schemas.oracle.com/bpel/extension/java"/>
      <import location="oracle.soa.management.util.CompositeInstanceFilter"
              importType="http://schemas.oracle.com/bpel/extension/java"/>
      <import location="oracle.soa.management.facade.CompositeInstance"
              importType="http://schemas.oracle.com/bpel/extension/java"/>

  • Issue with java embedding activity in bpel 2.0

    Hi.
    I tried the following code inside BPEL 2.0
    <extensionActivity>
    <bpelx:exec name="MillitoDate" language="java">
    <import location="java.text.DateFormat" importType="http://schemas.oracle.com/bpel/extension/java"/>
    <import location="java.text.SimpleDateFormatt" importType="http://schemas.oracle.com/bpel/extension/java"/>
    <import location="java.util.Calendar" importType="http://schemas.oracle.com/bpel/extension/java"/>
    <import location="java.util.*" importType="http://schemas.oracle.com/bpel/extension/java"/>
    <import location="java.lang.*" importType="http://schemas.oracle.com/bpel/extension/java"/>
    <import location="java.io.**" importType="http://schemas.oracle.com/bpel/extension/java"/>
    <![CDATA[
    DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS");
    Calendar calendar = Calendar.getInstance();
    long now = 1365523483000L;
    calendar.setTimeInMillis(now);
    String s=formatter.format(calendar.getTime());
    setVariableData("outputVariable","payload","/client:processResponse/client:result",s);
    ]]>
    </bpelx:exec>
    </extensionActivity>
    But, I am getting following error while deploying "the exception reported is: java.lang.RuntimeException: failed to compile execlets of CleanupProcess". Also, i Tried adding try catch block but no succèss, thé same code is working perfectly in java project.

    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

  • Issue with Java Embedding task in BPEL

    Newbe: i have java embedded task in my bpel process which returns one variable(Written java code in editor as it is only 2 lines of code). when i tried to deploy this i am getting the following compiler error in Jdeveloper
    Error(36,39): Failed to compile bpel generated classes.
    failure to compile the generated BPEL classes for BPEL process "BPELSampleProcess" of composite "default/BpelSampleProj!1.4"
    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.
    please suggest me what are the jars needed and where to be placed.

    Try this
    Random randomGenerator = new Random();
    int randomInt = randomGenerator.nextInt(100);
    setVariableData("outputVariable","payload","/client:BPEL_Process/client:result",randomInt);
    Delete this line public class ChSam
    Edited by: KrishnaChaitanya on Nov 25, 2010 9:30 PM

  • Java Embedding Activity in BPEL

    Hi,
      I have created soa application with bpel process and created one web service. In bpel process I am using java embedding to call my customized class, say, for example, just to show "Hello World". This project is deployed on the server. But when I start to test the service on Enterprise Manager 11g, I am getting error as shown below
    java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Client received SOAP Fault from server : Correlation definition not registered. The correlation set definition for operation execute, process default/Project1!1.0*soa_fdf8d269-7a8b-4d8c-9db9-f0901bc88a8a/BPELProcess1, is not registered with the server. The correlation set was not defined in the process. Redeploy the process to the container. at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:813) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:385) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:302) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.sun.el.parser.AstValue.invoke(AstValue.java:187) at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297) at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53) at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1415) at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:103) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:97) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:957) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:427) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:207) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.emSDK.license.LicenseFilter.doFilter(LicenseFilter.java:101) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177) at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilter.java:41) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.AuditServletFilter.doFilter(AuditServletFilter.java:179) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:203) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.core.model.targetauth.EMLangPrefFilter.doFilter(EMLangPrefFilter.java:158) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.core.app.perf.PerfFilter.doFilter(PerfFilter.java:141) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:542) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460) at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256) at weblogic.work.ExecuteThread.run(ExecuteThread.java:221) Caused by: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Client received SOAP Fault from server : Correlation definition not registered. The correlation set definition for operation execute, process default/Project1!1.0*soa_fdf8d269-7a8b-4d8c-9db9-f0901bc88a8a/BPELProcess1, is not registered with the server. The correlation set was not defined in the process. Redeploy the process to the container. at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(DispatchUtil.java:362) at oracle.sysman.emSDK.webservices.wsdlparser.OperationInfoImpl.invokeWithDispatch(OperationInfoImpl.java:1004) at oracle.sysman.emas.model.wsmgt.PortName.invokeOperation(PortName.java:750) at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:807) ... 79 more Caused by: oracle.j2ee.ws.client.jaxws.JRFSOAPFaultException: Client received SOAP Fault from server : Correlation definition not registered. The correlation set definition for operation execute, process default/Project1!1.0*soa_fdf8d269-7a8b-4d8c-9db9-f0901bc88a8a/BPELProcess1, is not registered with the server. The correlation set was not defined in the process. Redeploy the process to the container. at oracle.j2ee.ws.client.jaxws.DispatchImpl.throwJAXWSSoapFaultException(DispatchImpl.java:1053) at oracle.j2ee.ws.client.jaxws.DispatchImpl.invoke(DispatchImpl.java:839) at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.synchronousInvocationWithRetry(OracleDispatchImpl.java:235) at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.invoke(OracleDispatchImpl.java:106) at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(DispatchUtil.java:358) ... 82 more
    Kindly help me to get rid of this error.
    Thanks

    Hi,
    please make sure that the initial receive (first activity) in the process has set the "createInstance" Flag. Can you check this? Can you briefly describe the process (like: receive -> assign -> switch -> branch1 -> java embedded ...)?
    Danilo

  • Problem in BPEL java embedding code

    Hi,
    I am trying assign java object value in to my Bpel variable but I am getting the following error. Can any one of you please help me to solve this problem.
    <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    -<part name="summary">
    <summary>java.lang.String
    </summary>
    </part>
    </selectionFailure>
    The below is the sample code:
    setVariableData("ServiceDetails","/client:ServiceDetails/serviceDetailsArray[1]/serviceName",nl.item(i).getNodeName());
    Regards
    Niraimathi R

    As an example:
    http://orasoa.blogspot.com/2007/01/overule-bpel-instance-name.html

  • Need Sample Java Embedding code

    Hello gurus,
    I need sample code to access DBAdapter select query output within Java activity. besically I want to loop through the records and call a custom Java API.
    thanks

    Please help

  • Problem with socket connection through Java Embedding...

    We are trying to create a simple socket connection to a socket server through BPEL PM using the Java Embedding component.
    BPEL Process : Client makes an asynchronous request. Passes an input variable. The input variable is sent to the Server Program through a socket connection through the Java embedding component.
    Server: We are running a simple Socket Server program from command prompt.
    The code below works fine as long as we do not try to receive a response from the server (Commented Code).
    If we uncomment the code and try to receive a response, it refuses to create an instance for the BPEL Process. And sometimes restarts the BPEL Server.
    Client Code:
    String msg="NONE";
    try{
    org.w3c.dom.Element input = (org.w3c.dom.Element) getVariableData("inputVariable","payload","/client:clientProcessRequest/client:input");
    msg = input.getNodeValue();
    Socket clientsoc=new Socket("ServerIP",1000);
    PrintWriter out1=new PrintWriter(clientsoc.getOutputStream());
    out1.write(msg);
    out1.flush();
    BufferedReader cin1=new BufferedReader(new InputStreamReader(clientsoc.getInputStream()));
    msg=cin1.readLine();
    setVariableData("outputVariable","payload","/client:result",new String(msg));
    clientsoc.close();
    catch(UnknownHostException e)
    System.err.println("Don't know about host: dev.");
    System.exit(1);
    catch (IOException e)
    System.err.println("Couldn't get I/O for "+ "the connection to: dev.");
    System.exit(1);
    }

    Repost

  • 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 ??

  • 11g BPEL Code Deployment Error

    Hi All,
    I have migrated a 10g bpel code to 11g. Migration got successful. While compiling got the following error.
    Failed to compile bpel generated classes. failure to compile the generated BPEL classes for BPEL process "PROCESSNAME" of composite "default/PROCESSNAME!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.
    Since we are using java embedding in the bpel code, it requires log4j.jar. So added the log4j.jar in the libraries and class path in JDev and when I compiled again, compilation got successful.
    When I try to deploy the code to the server, I am getting the following error:
    +[08:45:28 PM] Error deploying archive sca_PROCESSNAME_rev1.0.jar to partition "default" on server soa_server1 [m1-18322.wipro.com:8001]+
    +[08:45:28 PM] HTTP error code returned [500]+
    +[08:45:28 PM] Error message from server:+
    Error during deployment: Deployment Failed: Error occurred during deployment of component:PROCESSNAME to service engine: implementation.bpel, for composite: PROCESSNAME: ORABPEL-01005
    Failed to compile bpel generated classes.
    failure to compile the generated BPEL classes for BPEL process "PROCESSNAME" of composite "default/PROCESSNAME!1.0*soa_120500e8-4351-4a10-94bc-448c2eff6c16"
    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.
    +.+
    +[08:45:28 PM] Check server log for more details.+
    +[08:45:28 PM] Error deploying archive sca_PROCESSNAME_rev1.0.jar to partition "default" on server soa_server1 [m1-18322.wipro.com:8001]+
    +[08:45:28 PM] #### Deployment incomplete. ####+
    +[08:45:28 PM] Error deploying archive file:/11g code/PROCESSNAME_v1/deploy/sca_PROCESSNAME_rev1.0.jar+
    +(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)+
    I guess that it expects the log4j.jar in the server for deployment to be successful. But since the jar is not present in the server, I am getting the error.
    There was no error with 10g.
    Can anybody help me resolve this issue?
    Thanks & Regards,
    Vishwanath
    Edited by: Vishwa on Aug 12, 2010 6:13 AM

    Vishwa,
    I know it's been a while since your post, but did you ever find what the problem was with this deployment issue?

  • Java embedding on SOA composite

    Hello,
    Please I need some help with a little project i'm doing. I have a java embedding into a bpel process. This java embedding has an array of strings. What i need to do is to return this array as a response of the web service.
    Thanks
    Lore Carri

    Your webservice needs to return an array of strings , so you already need to have a variable called OutputVariable which is a array of Simple String XML Elements.
    In the Java embedding you can acccess this variable using
    (XMLElement)getVariableData("Output","payload","/");
    you can add/delete/update new nodes using standard XMLElement APIs like createTextNode etc ..
    Ajay

  • 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

Maybe you are looking for