1 2 Previous Next 17 Replies Latest reply on Jul 4, 2007 4:23 AM by alpinorthoffice

    JBPM-BPEL 1.1-beta1 and JBOSS AS 4.0.4 helloworldservice tes

    asaksena

      Hi! I have the latest downloads of JBPM AS and bpel extension and docs. I'm following the helloworldclass service test as outlined in the tutorial.
      The bpel process and ear files deploy successfully according to JBOSS AS server logs.

      However, junit test fails on the initialcontext lookup:
      HelloWorldService service = (HelloWorldService) ctx.lookup("java:comp/env/" + serviceRefName);

      Message is:
      [junit] Cannot unmarshall service ref meta data, cause: java.io.InvalidClass
      Exception: javax.xml.namespace.QName; local class incompatible: stream classdesc
      serialVersionUID = 4418622981026545151, local class serialVersionUID = -9120448
      754896609940

      Any suggestions?

        • 1. Re: JBPM-BPEL 1.1-beta1 and JBOSS AS 4.0.4 helloworldservice
          aguizar

          Your client is using a QName class file that differs from that used by the server. This class resides in the lib/jboss/namespace.jar archive of the jBPM BPEL distribution. I copied it from the lib subdirectory of my JBoss 4.0.4.GA distribution.

          I guess your distribution has a different library because you used the installer or any other reason. You should be able to fix the problem by copying the library from the aforementioned location.

          • 2. Re: JBPM-BPEL 1.1-beta1 and JBOSS AS 4.0.4 helloworldservice
            koen.aers

            Alex,

            Are you sure this is the only thing to do? I am struggling with the same issue here and it does not go away by replacing the namespace.jar...
            Asaksena, did this work for you?

            Regards,
            Koen

            • 3. Re: JBPM-BPEL 1.1-beta1 and JBOSS AS 4.0.4 helloworldservice
              aguizar

              Hey Koen,

              I just reorganized the BPEL project structure and noticed the actual QName class used by JBoss comes from lib/endorsed/xml-apis.jar. Section 4.1.4 of the manual guides you through replacing the default implementations of the XML APIs. However, the JDK 1.5 subsection says that only the TrAX implementation has issues. This is true, except for the binary incompatibility above.

              To solve the incompatibility, add the following entry to the process deployment template:

              <path id="servicegen.classpath">
               ...
               <!-- uncomment to replace the TrAX implementation in Java SE 1.5.0 -->
               <pathelement location="${jbpm.bpel.home}/lib/xalan/xalan-2.6.0.jar"/>
               <!-- replace the JAXP implementation -->
               <pathelement location="${jbpm.bpel.home}/lib/xerces/xml-apis.jar"/>
               <pathelement location="${jbpm.bpel.home}/lib/xerces/xercesImpl.jar"/>
              </path>


              • 4. Re: JBPM-BPEL 1.1-beta1 and JBOSS AS 4.0.4 helloworldservice
                aguizar

                I will change the manual to say both the JAXP and TrAX implementations have to be replaced.

                • 5. Re: JBPM-BPEL 1.1-beta1 and JBOSS AS 4.0.4 helloworldservice
                  koen.aers

                  Thanks Alex

                  • 6. Re: JBPM-BPEL 1.1-beta1 and JBOSS AS 4.0.4 helloworldservice
                    asaksena

                    Hello Koen, Alejandro:

                    Thanks for the feedback and the update to the doc. I will try these changes. (To answer the question, the first change didn't work.. then I was sidetracked with some other trial downloads).

                    Appreciate it! Thanks!

                    Anju

                    • 7. Re: JBPM-BPEL 1.1-beta1 and JBOSS AS 4.0.4 helloworldservice
                      koen.aers

                      Well, it still didn't work for me... I am using jdk 1.5.0_07. What are the exact steps I should do? Do I have to copy this XML stuff in a lib/endorsed folder?

                      Regards,
                      Koen

                      • 8. Re: JBPM-BPEL 1.1-beta1 and JBOSS AS 4.0.4 helloworldservice
                        aguizar

                        OK, I took a deeper look at this issue. I started with a clean JDK 1.5.0 and a fresh copy of jBPM BPEL 1.1-beta1. I was able to execute all targets but run-tests. Then I realized two things:

                        a) The Xalan path element in servicegen.classpath is outdated. It should be:

                        <path id="servicegen.classpath">
                         ...
                         <pathelement location="${jbpm.bpel.home}/lib/xalan/xalan.jar"/>
                        </path>

                        This points to a Xalan 2.7.0 library.

                        b) The test.classpath is not affected by the settings in servicegen.classpath :) My bad. Here is the correct setting:
                        <path id="test.classpath">
                         ...
                         <pathelement location="${jbpm.bpel.home}/lib/xerces/xercesImpl.jar" />
                        </path>

                        I'm seeing this working as I write this post :) Sorry for the inconvenience guys.

                        • 9. Re: JBPM-BPEL 1.1-beta1 and JBOSS AS 4.0.4 helloworldservice
                          asaksena

                          On a related issue, the SAR file for jbpm-bpel.sar doesn't build correctly after doing an ant clean followed by ant build.service.404. The original builds a SAR file 1428KB. build after an ant clean creates smaller SAR file that has deployment issues.

                          ant clean cleans out 2 files that come with the download: jbpm-bpel-1.1.-beta1.jar and jbpm-bpel.war and these files don't rebuild with subsequent builds..

                          • 10. Re: JBPM-BPEL 1.1-beta1 and JBOSS AS 4.0.4 helloworldservice
                            aguizar

                            If you run ant -p, it will show you the documented targets:

                            build build bpel and webapp libraries
                             build.service.402 build service archive for JBoss 4.0.2
                             build.service.403 build service archive for JBoss 4.0.3
                             build.service.404 build service archive for JBoss 4.0.4
                             clean remove all generated files
                             compile compile all source files
                             dist build bpel distribution
                             javadoc generate jbpm bpel api documentation
                             report.coverage generate coverage report
                             test execute all tests
                             test.coverage execute the tests and measure the coverage

                            If you found the clean target then finding the build target to build bpel and webapp libraries ought to be easy. Plus, it is the main target :)

                            The reason why build.service.XXX does not depend on build is that, in order to build the .jar and .war files, the source files have to be compiled. I do not want folks to recompile the distribution libraries unless they need to change something.

                            • 11. Re: JBPM-BPEL 1.1-beta1 and JBOSS AS 4.0.4 helloworldservice
                              koen.aers

                              Still no luck :-(

                              I have reinstalled everything from scratch:
                              - java sdk 1.5.0_07 (no other java's on my machine)
                              - jboss as 4.0.4 GA
                              - jbpm bpel 1.1-beta1

                              Then I applied the suggested changes.

                              But alas, the problem while running the tests for the hello tutorial persists...

                              One more question though... Do I add the xercesImpl.jar pathelement to the test.classpath? Or do I replace the xml-api.jar with it?
                              I did the first. I also assumed I did not have to copy files around to the endorsed lib folder of the Java runtime. Is this correct?

                              Regards,
                              Koen

                              • 12. Re: JBPM-BPEL 1.1-beta1 and JBOSS AS 4.0.4 helloworldservice
                                asaksena

                                The build note is about the jbpm-bpel.sar

                                If you take a look at the build folder under the jbpm-bpel-1.1-beta root folder immediately after extracting the files from the download, 2 files are extracted: jbpm-bpel.war and jbpm-bpel-1.1-beta.jar

                                First run ant.build.service.404 and the jbpm-bpel.sar built is 1428KB.
                                Then run ant clean
                                Then run ant build.service.404
                                The new jbpm-bpel.sar file in the build folder is about 1,047 KB and creates deployment errors and the 2 files jbpm-bpel.war and jbpm-bpel-1.1-beta.jar are no longer in the folder.

                                • 13. Re: JBPM-BPEL 1.1-beta1 and JBOSS AS 4.0.4 helloworldservice
                                  aguizar

                                  OK, I'll reinstall everything and see what's going on.

                                  • 14. Re: JBPM-BPEL 1.1-beta1 and JBOSS AS 4.0.4 helloworldservice
                                    aguizar

                                    I was using JDK 1.5.0_05. I upgraded to JDK 1.5.0_07 and I hit the IncompatibleClassException. It looks like they changed the behavior at some release after JDK 1.5.0_05. A note in the javax.xml.namespace.QName source code explains:

                                    * Due to a historical defect, QName was released with multiple
                                    * serialVersionUID values even though its serialization was the
                                    * same.
                                    *
                                    * To workaround this issue, serialVersionUID is set with either
                                    * a default value or a compatibility value. To use the
                                    * compatiblity value, set the system property:
                                    *
                                    * com.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0
                                    .

                                    Running the tests with the aforementioned system property set fixes the incompatibility problem:

                                    - Set the ANT_OPTS environment property to -Dcom.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0 so that the ant batch file/shell script passes the system property to the JVM.

                                    - Execute target run-test. You will notice JBossWS requires some Xerces class not included in the JDK, so you still need Xerces on the classpath.

                                    - Replace BPEL_HOME/doc/examples/process.template.xml with the file attached to the jBPM BPEL beta 1 addendum wiki page.

                                    - Execute run-test again. It should work this time.

                                    Alternatively, you can use the endorsed standards override mechanism. Endorsing seems easier than the above procedure. I will recommend endorsing in future BPEL releases.

                                    1 2 Previous Next