This discussion is archived
9 Replies Latest reply: Sep 20, 2012 11:02 PM by Rohith puchalapalli RSS

invoking a BPEL process from java

860740 Newbie
Currently Being Moderated
Hello,

I tried invoking a BPEL process from java. I got the following error:
Error deserializing
return value: java.io.InvalidClassException:
javax.xml.namespace.QName, local class incompatible:
classdesc stream serialVersionUID = ..., local class serialVersionUID = ...

Thank you for helping me.
  • 1. Re: invoking a BPEL process from java
    860740 Newbie
    Currently Being Moderated
    Any help please.

    Edited by: 857737 on 14 sept. 2012 04:05
  • 2. Re: invoking a BPEL process from java
    Rohith puchalapalli Explorer
    Currently Being Moderated
    Does the stack tell you which class is invalid?
    Do you get this in the webservice proxy for BPEL?

    Does the program work locally and not when deployed on the server? If so, check if both have the same versions of the required jars in the classpath.
  • 3. Re: invoking a BPEL process from java
    860740 Newbie
    Currently Being Moderated
    Hello,

    Here is the code I use:

    Properties props = new Properties();
    Locator locator = null;
    props.put("orabpel.platform", "ias_10g" );
    props.put("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory" );
    props.put("java.naming.provider.url","opmn:ormi://host:port/orabpel" );
    props.put("java.naming.security.principal", "adminuser" );
    props.put("java.naming.security.credentials", "mdp" );

    String securityCredentials = "adminuser";
    String selectedDomain = "default";

    locator = new Locator(selectedDomain,securityCredentials,props);
    IBPELProcessHandle procs[] = locator.listProcesses();

    The error is:
    Exception in thread "main" java.rmi.UnmarshalException: Error deserializing return-value: java.io.InvalidClassException: com.oracle.bpel.client.BPELProcessHandle; local class incompatible: stream classdesc serialVersionUID = 5429682712928177644, local class serialVersionUID = 8176841433835717563
    at com.oracle.bpel.client.util.ExceptionUtils.handleServerException(ExceptionUtils.java:82)
    at com.oracle.bpel.client.Locator.listProcesses(Locator.java:309)


    Thanks for help.

    Edited by: 857737 on 14 sept. 2012 10:00
  • 4. Re: invoking a BPEL process from java
    Rohith puchalapalli Explorer
    Currently Being Moderated
    This basically means you are using a different version of the class (com.oracle.bpel.client.BPELProcessHandle) in your code. Is can be because you are have a different version of jars in your classpath.

    Can you copy the jars that you use your classpath from SOA installation where BPEL Process runs and use them with your application.

    Orabpel.jar, orabpel-common.jar or any other bpel jars you use.


    Any reason why you are not calling the process as a webservice using a JAX RPC/WS client?
  • 5. Re: invoking a BPEL process from java
    860740 Newbie
    Currently Being Moderated
    I copied the jars but I get the following error:
    Exception in thread "main" java.lang.Exception: Echec de la création du bean "ejb/collaxa/system/FinderBean" ; exception signalée : "javax.naming.NamingException: Unable to instantiate proxy object: com.evermind.util.RMIProperties.getRmiClientRecoveryTimeout()I; nested exception is:
         java.lang.NoSuchMethodError: com.evermind.util.RMIProperties.getRmiClientRecoveryTimeout()I [Root exception is java.lang.NoSuchMethodError: com.evermind.util.RMIProperties.getRmiClientRecoveryTimeout()I] @ com.evermind.server.rmi.RMIClientContext.lookup#63".

    But when I use old jars, it works well for this code!!!

    try {
    auth = ServerAuthFactory.authenticate(securityCredentials, null, props);
    } catch (ServerException e) {
    // TODO
    }
    Server srv = new Server(auth);
    BPELDomainStatus domainList[]=null;
    try {
    domainList = srv.getAllDomainStatus();
    } catch (ServerException e) {
    // TODO
    }
    for (int i=0; i<domainList.length; i++ ) {
    System.out.println( "Domain ID="+domainList.getDomainId() );
    }

    Thanks for help.

    Edited by: 857737 on 17 sept. 2012 10:59
  • 6. Re: invoking a BPEL process from java
    Rohith puchalapalli Explorer
    Currently Being Moderated
    Can you list all jars in your class path


    BPEL can be called as a webservice, any reason why you are not calling it as a web service?

    Edited by: Rohith puchalapalli on Sep 18, 2012 5:02 AM
  • 7. Re: invoking a BPEL process from java
    860740 Newbie
    Currently Being Moderated
    The jars are:

    <BPEL_HOME>/bpel/lib/bpm-infra.jar
    <BPEL_HOME>/bpel/lib/orabpel-common.jar
    <BPEL_HOME>/bpel/lib/orabpel-thirdparty.jar

    <BPEL_HOME>/j2ee/home/jazncore.jar
    <BPEL_HOME>/j2ee/home/oc4jclient.jar

    <BPEL_HOME>/lib/xml.jar
    <BPEL_HOME>/lib/xmlparserv2.jar

    <BPEL_HOME>/webservices/lib/orasaaj.jar
    <BPEL_HOME>/webservices/lib/soap.jar

    <BPEL_HOME>/bpel/system/services/config [FOLDER]

    <BPEL_HOME>/bpel/system/services/lib/bpm-services.jar

    <BPEL_HOME>/bpel/system/services/schema [FOLDER]

    &

    <BPEL_HOME>/bpel/lib/olite40.jar

    <BPEL_HOME>/jdbc/lib/ojdbc14.jar

    <BPEL_HOME>/bpel/lib/orabpel.jar

    wsclient_extended.jar (This is Downloaded from Oracle's site..!)

    How to calling it as a web service?
  • 8. Re: invoking a BPEL process from java
    860740 Newbie
    Currently Being Moderated
    Any help please.
  • 9. Re: invoking a BPEL process from java
    Rohith puchalapalli Explorer
    Currently Being Moderated
    Looks like it is a problem because of JVM version mismatch between the server and client as documented in oracle support
    So the Jars might also mismatch.

    https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_afrLoop=464940809064982&recommended=true&type=DOCUMENT&id=735128.1&_afrWindowMode=0&_adf.ctrl-state=ih7w7jvak_61

    if the link doesnt work, search for 735128.1 in support.oracle.com

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points