12 Replies Latest reply on Apr 2, 2007 9:21 PM by ldimaggio

    Problem running Hello World quickstart - jbossesb-4.2MR1

    ldimaggio

      Hey everyone,

      I think that I'm close to getting this work work - but I'm missing something basic - can anyone suggest what's wrong?


      Many thanks,
      Len DiMaggio
      ldimaggi@redhat.com

      So far, I've:

      1) Installed jbossesb-4.2 (from src: jbossesb-4.2MR1-src.zip) into /opt/jbossesb-4.2

      2) Installed jboss-4.0.5.GA (from src: jboss-4.0.5.GA-src.tar.gz) into /opt/jboss-4.0.5.GA-src, built server

      3) Created /opt/jbossesb-4.2/product/install/deployment.properties and set:
      org.jboss.esb.dist.lib=../build/jbossesb/lib

      4) In /opt/jbossesb-4.2/product, ran ant dist

      5) Verifed that ESB standalone started up - /opt/jbossesb-4.2/product/build/jbossesb-server-4.2.MR1/bin/run.sh -c default then shut it down

      6) Started jboss-4.0.5.GA - /opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/bin/run.sh -c default

      7) Copied jbossesb.sar to jboss-4.0.5.GA
      cp -pR /opt/jbossesb-4.2/product/build/jbossesb/lib/jbossesb.sar /opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/server/default/deploy/

      8) Modified /opt/jbossesb-4.2/product/samples/quickstarts/quickstarts.properties and set:
      esb.product.lib.dir=../../../../product/build/jbossesb/lib/
      jbosshome.dir=/opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/

      9) Copied /opt/jbossesb-4.2/product/samples/quickstarts/esb-quickstart-jbmq-service.xml to /opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/server/default/deploy/ - no errors - saw this in the server log:

      12:00:10,402 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=juddiDB' to JNDI name 'java:juddiDB'
      12:00:10,406 INFO [DatabaseInitializer] Initializing java:/juddiDB from listed sql files
      12:00:10,558 INFO [JuddiRMIService] starting juddi RMI service
      12:00:11,782 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=JBossESBDS' to JNDI name 'java:JBossESBDS'
      12:00:11,784 INFO [DatabaseInitializer] Initializing java:/JBossESBDS from listed sql files

      10) Ran ant in /opt/jbossesb-4.2/product/samples/quickstarts/helloworld - saw these results - and Quickstart_helloworld.esb in opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/server/default/deploy

      Buildfile: build.xml

      clean:
      [delete] Deleting directory /opt/jbossesb-4.2/product/samples/quickstarts/helloworld/build

      compile:
      [mkdir] Created dir: /opt/jbossesb-4.2/product/samples/quickstarts/helloworld/build/classes
      [javac] Compiling 3 source files to /opt/jbossesb-4.2/product/samples/quickstarts/helloworld/build/classes

      runtest:
      [echo] Runs Test JMS Sender
      [java] Connection Started

      BUILD SUCCESSFUL

      11) Saw same results with ant runtest

      12) Tried ant deploy - saw these errors in server log:

      13:05:48,318 ERROR [MainDeployer] Could not create deployment: file:/opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/server/default/tmp/deploy/tmp30414Quickstart_helloworld.esb-contents/jbm-queue-service.xml
      org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jboss.jms.server.destination.QueueService; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.jms.server.destination.QueueService)

      14) Tried to clear up class not found by - thrashing, basically:
      cp -p /opt/jbossesb-4.2/product/build/jbossesb/lib/ext/jboss-messaging-client.jar /opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/server/default/lib
      cp -p /opt/jbossesb-4.2/product/build/jbossesb/lib/ext/jboss-jmx.jar /opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/server/default/lib
      cp -p /opt/jbossesb-4.2/product/build/jbossesb/lib/ext/jbossall-client.jar /opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/server/default/lib

      15) Hit this exception:

      Deployment FAILED reason: no protocol: xmdesc/Queue-xmbean.xml; - nested throwable: (java.net.MalformedURLException: no protocol: xmdesc/Queue-xmbean.xml)

      16) Out of ideas - Do I need the JBoss Messaging Server to run the samples?

        • 1. Re: Problem running Hello World quickstart - jbossesb-4.2MR1
          kurtstam

          Yes by default we use JBM (packaged up in the esb-server). JBossAS still comes with JBossMQ by default. So either you install JBM on it. Or you change the queue-service.xml over to use JBossMQ. We did provide both in the quickstart directory.

          Thanks for your detailed description, this makes it really easy to debug :).

          --Kurt

          • 2. Re: Problem running Hello World quickstart - jbossesb-4.2MR1
            ldimaggio

            Thanks for the rapid response!

            Er - excuse my complete lack of JMS experience - so, I copy /opt/jbossesb-4.2/product/samples/quickstarts/helloworld_action/jbm-queue-service.xml to where?

            • 3. Re: Problem running Hello World quickstart - jbossesb-4.2MR1
              kurtstam

              You can copy is to the jboss-messaging.sar, or if jboss-messaging is not scaoped you can package it up in the .esb archive.

              If you want to use JBossMQ then look for the right queue definition in samples/quickstarts/esb-quickstart-jbmq-service.xml.

              Does that help?

              • 4. Re: Problem running Hello World quickstart - jbossesb-4.2MR1
                ldimaggio

                Sort of - I've edited jbm-queue-service.xml to reference this queue defintiion:

                -----------------------------------
                <?xml version="1.0" encoding="UTF-8"?>

                <mbean code="org.jboss.mq.server.jmx.Queue"
                name="jboss.messaging.destination:service=Queue,name=quickstart_helloworld_Request"
                xmbean-dd="xmdesc/Queue-xmbean.xml">
                <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer


                -----------------------------------

                But - I'm still missing something on the server side:
                org.jboss.deployment.DeploymentInfo@bb28bb70 { url=file:/opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/server/default/deploy/Quickstart_helloworld.esb }
                deployer: org.jboss.soa.esb.listeners.config.JBoss4ESBDeployer@30f369
                status: Deployment FAILED reason: no protocol: xmdesc/Queue-xmbean.xml; - nested throwable: (java.net.MalformedURLException: no protocol: xmdesc/Queue-xmbean.xml)

                I'll try installing JBoss Messaging into JBossAS - thanks!


                • 5. Re: Problem running Hello World quickstart - jbossesb-4.2MR1
                  kurtstam

                  yep, that should fix that error, so it can bring up that Queue. do that following the instructions on: http://labs.jboss.com/file-access/default/members/jbossmessaging/freezone/docs/userguide-1.2.0.GA/html/installation.html#install4

                  or use esb-server.

                  Note that the by default the quickstart already package up the right jbm-queue-service.xml in it's .esb archive. Which will only work in the esb-server. In the appserver you need to deploy that to the jboss-messaging.sar, since JBM is a scoped deployment. I think this will all get easier in JBossAS4.2.

                  Good luck!

                  • 6. Re: Problem running Hello World quickstart - jbossesb-4.2MR1
                    ldimaggio

                    Hey Kurt - one last question - any idea how to get around this incompatible version exception? I tried cleaning and rebuilding everything - but no luck...

                    Thanks for all the help last night and today - I'll probably try the ESB standalone server for a bit now... ;-)


                    17) Installed the JBoss Messaging server (jboss-messaging-1.0.1.SP4-src) - installed into JBossAS per http://labs.jboss.com/file-access/default/members/jbossmessaging/freezone/docs/userguide-1.2.0.GA/html/installation.html#install4

                    18) Modified /opt/jbossesb-4.2/product/samples/quickstarts/helloworld/jbm-queue-service.xml to reference org.jboss.mq.server.jmx.Queue

                    19) Running ant in /opt/jbossesb-4.2/product/samples/quickstarts/helloworld fails with:

                    Buildfile: build.xml

                    clean:
                    [delete] Deleting directory /opt/jbossesb-4.2/product/samples/quickstarts/helloworld/build

                    compile:
                    [mkdir] Created dir: /opt/jbossesb-4.2/product/samples/quickstarts/helloworld/build/classes
                    [javac] Compiling 3 source files to /opt/jbossesb-4.2/product/samples/quickstarts/helloworld/build/classes

                    runtest:
                    [echo] Runs Test JMS Sender
                    [java] Exception in thread "main" javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.jms.client.delegate.DelegateSupport; local class incompatible: stream classdesc serialVersionUID = 8005108339439737469, local class serialVersionUID = -1723908125830723356]
                    [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:723)
                    [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
                    [java] at javax.naming.InitialContext.lookup(InitialContext.java:351)
                    [java] at quickstart.helloworld.test.SendJMSMessage.setupConnection(Unknown Source)
                    [java] at quickstart.helloworld.test.SendJMSMessage.main(Unknown Source)
                    [java] Caused by: java.io.InvalidClassException: org.jboss.jms.client.delegate.DelegateSupport; local class incompatible: stream classdesc serialVersionUID = 8005108339439737469, local class serialVersionUID = -1723908125830723356
                    [java] at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:546)
                    [java] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
                    [java] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
                    [java] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
                    [java] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
                    [java] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
                    [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
                    [java] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
                    [java] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
                    [java] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
                    [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
                    [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
                    [java] at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
                    [java] at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
                    [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:653)
                    [java] ... 4 more

                    BUILD FAILED
                    /opt/jbossesb-4.2/product/samples/quickstarts/helloworld/build.xml:8: Java returned: 1

                    Total time: 2 seconds

                    • 7. Re: Problem running Hello World quickstart - jbossesb-4.2MR1
                      kurtstam

                      Yeah make sure the jboss-messaging-client.jars are one and the same.

                      • 8. Re: Problem running Hello World quickstart - jbossesb-4.2MR1
                        ldimaggio

                        It must be another file causing the mismatch:

                        [ldimaggi@ldimaggi bin]$ find /opt -name jboss-messaging-client.jar -ls7302660 5556 -rw-rw-r-- 1 ldimaggi ldimaggi 5669076 Mar 30 15:47 /opt/jbossesb-4.2/qa/lib/ext/jboss-messaging-client.jar
                        7302488 5556 -rw-rw-r-- 1 ldimaggi ldimaggi 5669076 Mar 30 15:47 /opt/jbossesb-4.2/product/lib/ext/jms/jbossmessaging/jboss-messaging-client.jar
                        7302444 5556 -rw-rw-r-- 1 ldimaggi ldimaggi 5669076 Mar 30 15:47 /opt/jbossesb-4.2/product/lib/ext/jboss-messaging-client.jar
                        7468442 5556 -rw-rw-r-- 1 ldimaggi ldimaggi 5669076 Mar 30 15:47 /opt/jbossesb-4.2/product/build/jbossesb-server-4.2.MR1/client/jboss-messaging-client.jar
                        7466434 5556 -rw-rw-r-- 1 ldimaggi ldimaggi 5669076 Mar 30 15:47 /opt/jbossesb-4.2/product/build/jbossesb/lib/ext/jboss-messaging-client.jar

                        • 9. Re: Problem running Hello World quickstart - jbossesb-4.2MR1
                          kconner

                          You are using two incompatible versions of jboss-messaging, 1.0.1SP4 and 1.2.0GA. These contain different versions of the classes and hence serialise with different serial version uids.

                          You need to replace the client jars in ESB with your 1.0.1SP4 equivalent (this is not a tested combination) or install 1.2.0GA.

                          The messaging team have just released 1.2.0.SP1. If you choose to install this then you should also update the client jars in ESB in case there are differences in serialisation.

                          • 10. Re: Problem running Hello World quickstart - jbossesb-4.2MR1
                            kconner

                            I should add that the best way to try the examples is via the standalone server. At its core this server *is* jboss, just with an esb specific profile.

                            • 11. Re: Problem running Hello World quickstart - jbossesb-4.2MR1
                              kconner

                              Len. You have created a JIRA issue for this, http://jira.jboss.com/jira/browse/JBESB-494. I am going to close this as it is not a bug.

                              If you disagree, please reopen it and I will address your concerns.

                              Thanks.

                              • 12. Re: Problem running Hello World quickstart - jbossesb-4.2MR1
                                ldimaggio

                                Thanks everyone - 'got it working:

                                1) Installed jbossesb-4.2 (from src: jbossesb-4.2MR1-src.zip) into /opt/jbossesb-4.2

                                2) Installed jboss-4.0.5.GA (from src: jboss-4.0.5.GA-src.tar.gz) into /opt/jboss-4.0.5.GA-src, built server

                                3) Created /opt/jbossesb-4.2/product/install/deployment.properties and set:
                                org.jboss.esb.dist.lib=../build/jbossesb/lib

                                4) In /opt/jbossesb-4.2/product, ran ant dist

                                5) Verifed that ESB standalone started up - /opt/jbossesb-4.2/product/build/jbossesb-server-4.2.MR1/bin/run.sh -c default then shut it down

                                6) Started jboss-4.0.5.GA - /opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/bin/run.sh -c default

                                7) Installed jboss-messaging (from jboss-messaging-1.2.0.SP1-src.zip) into /opt/jboss-messaging/jboss-messaging-1.2.0.sp1-src per http://labs.jboss.com/file-access/default/members/jbossmessaging/freezone/docs/userguide-1.2.0.GA/html/installation.html#install4

                                /opt/apache-ant-1.7.0/bin/ant -f release-admin.xml

                                8) Modified /opt/jbossesb-4.2/product/samples/quickstarts/quickstarts.properties and set:
                                esb.product.lib.dir=../../../../product/build/jbossesb/lib/
                                jbosshome.dir=/opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/

                                9) Copied /opt/jbossesb-4.2/product/samples/quickstarts/esb-quickstart-jbm-service.xml to /opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/server/messaging/deploy/

                                10) Copied /opt/jbossesb-4.2/product/samples/quickstarts/helloworld/build/Quickstart_helloworld.esb to /opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/server/messaging/deploy/

                                11) Copied jbossesb.sar to jboss-4.0.5.GA
                                cp -pR /opt/jbossesb-4.2/product/build/jbossesb/lib/jbossesb.sar /opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/server/messaging/deploy/

                                cp -pR /opt/jbossesb-4.2/product/build/jbossesb/lib/jbossesb.sar /opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/server/messaging/deploy/;
                                cp /opt/jbossesb-4.2/product/samples/quickstarts/esb-quickstart-jbm-service.xml /opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/server/messaging/deploy/;
                                cp /opt/jbossesb-4.2/product/samples/quickstarts/helloworld/build/Quickstart_helloworld.esb /opt/jboss-4.0.5.GA-src/build/output/jboss-4.0.5.GA/server/messaging/deploy/

                                12) Edited /opt/jbossesb-4.2/product/samples/quickstarts/helloworld/base-build.xml
                                [ldimaggi@ldimaggi helloworld]$ diff base-build.xml base-build.xml.orig
                                < <!-- Required for JMS Client Code. -->
                                > <!-- Required for JMS Client Code. -->
                                <
                                >

                                12) ant runtest