Version 4

    A number of folks have reported an issue when running the jBPM BPEL examples in Sun JDK 1.5.0_07 and later versions. They get stack traces like the following:

     

    javax.naming.NamingException: Cannot unmarshall service ref meta data,
    cause: java.io.InvalidClassException: javax.xml.namespace.QName;
    local class incompatible: stream classdesc serialVersionUID = 4418622981026545151,
    local class serialVersionUID = -9120448754896609940
    at org.jboss.ws.jaxrpc.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:127)
    at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
    at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
    at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
    at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:135)
    at $Proxy1.lookup(Unknown Source)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at org.jbpm.bpel.tutorial.hello.HelloTest.setUp(HelloTest.java:56)

     

    This anomaly is due to a change in the serialVersionUID of the javax.xml.namespace.QName class fixed in JDK 1.5.0_07. Older JDK 1.5 builds do not exhibit. See the related forum topic for details.

     

    The solution is simple: to read the manual The jBPM BPEL user guide describes the endorsed standards override mechanism for replacing the implementation of the XML APIs in JDK 1.5.0 with more recent versions of Xerces and Xalan.

     

    The JAR files with which we want to override the classes provided in the JDK are located in ${jboss.home}/lib/endorsed. The override mechanism can be employed in one of two ways:

     

    • Place the JAR files in the default endorsed standards location

      1. Copy the JAR files from ${jboss.home}/lib/endorsed to ${java.home}/jre/lib/endorsed

    • Set the system property java.endorsed.dirs

      1. Edit file ${jbpm.bpel.home}/examples/common/ws-build.xml

      2. Locate the target run-test

      3. Add the following element to the junit task: <sysproperty key="java.endorsed.dirs" value="${jboss.home}/lib/endorsed" />