Version 7

    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:

     

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

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

     

      • Locate the run-test target.

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