4 Replies Latest reply on Feb 8, 2008 9:41 PM by Colin Fergus

    JBoss 5.0.0 Beta3 Messaging Client

    Colin Fergus Newbie

      I would like to make a JavaSE client send messages to an out-of-the-box instance of JBoss 5.0.0 Beta3. All of my attempts have been thwarted by classpath problems.

      Ideally, I'd like to get a maven pom.xml file to include everything I need, but I'd be happy with links to the required jar files. (Note: I've already seen http://labs.jboss.com/file-access/default/members/jbossmessaging/freezone/docs/userguide-1.4.0.SP2/html/installation.html , but it lacks the version information I need)

      For reference, here's my pom.xml right now:

       <dependency>
       <artifactId>jboss-remoting</artifactId>
       <groupId>jboss.remoting</groupId>
       <version>2.2.2.SP4</version>
       <scope>system</scope>
       <systemPath>C:/Development/jboss-remoting.jar</systemPath>
       </dependency>
      
       <!-- Taken from the jboss-messaging-1.4.1Beta1 download -->
       <dependency>
       <artifactId>jboss-messaging-client</artifactId>
       <groupId>jboss.messaging</groupId>
       <version>1.4.1.Beta1</version>
       <scope>system</scope>
       <systemPath>C:/Development/jboss-messaging-client.jar</systemPath>
       </dependency>
      
       <!-- Taken from jboss 5.0.0beta3 installation -->
       <dependency>
       <artifactId>jbossall-client</artifactId>
       <groupId>jboss</groupId>
       <version>3.2.3</version>
       <scope>system</scope>
       <systemPath>C:/Development/jbossall-client.jar</systemPath>
       </dependency>
      
       <dependency>
       <artifactId>jboss-aop</artifactId>
       <groupId>org.jboss.aop</groupId>
       <version>2.0.0.CR3</version>
       <scope>runtime</scope>
       </dependency>
      


      Also note that transitive dependencies bring in trove-2.1.1.jar, javassist-3.6.0.GA.jar, and others.
      The error I'm getting is:

      Unable to setup messaging environment
      org.jboss.jms.exception.MessagingJMSException: Failed to invoke
      at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:271)
      at ...
      Caused by: java.lang.IllegalArgumentException: Invalid remoting configuration - do not specify clientMaxPoolSize use JBM_clientMaxPoolSize instead
      ...

        • 1. Re: JBoss 5.0.0 Beta3 Messaging Client
          Tim Fox Master

          Sorry - I don't know anything about Maven, we don't use it.

          JBM should work out of the box with JBosss 5 beta 3 - it's the default JMS provider.

          What classpath are you using that doesn't work?

          • 2. Re: JBoss 5.0.0 Beta3 Messaging Client
            Colin Fergus Newbie

            For this context, maven is like ant. Difference being that it will try to contact a maven repository on the internet and download the dependencies if they don't exist locally. I am telling maven to look locally.

            My classpath is:

            ${messaging_home}\jboss-messaging-client.jar
            ${jboss5_home}\server\default\lib\jboss-remoting.jar
            ${jboss5_home}\client\jbossall-client.jar
            ${jboss5_home}\server\default\lib\log4j.jar
            ${jboss5_home}\lib\javassist.jar
            ${jboss5_home}\lib\jboss-aop-jdk50.jar
            ${jboss5_home}\lib\trove.jar


            I'm using a build.xml from the messaging 1.4.1.Beta1 download as a template, but there are some inconsistencies with jboss5. The code below is taken from jboss-messaging-1.4.1.Beta1\examples\topic\build.xml:

            ${jboss.home}/server/${jboss.configuration}/lib/javassist.jar


            The above file does not exist in the /server/default/lib directory

            ${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar


            The above folder (jboss-aop...) does not exist in the deploy directory due to the "deployer" folder structure of jboss5.

            ${jboss.home}/server/${jboss.configuration}/deploy/jboss-aop-jdk50.deployer/trove.jar


            Same as previous entry.

            As a result, I scavenged for these files elsewhere in jboss5. With the classpath described at top, I get the following:

            java.lang.NoClassDefFoundError: org/jboss/metadata/spi/signature/Signature


            I expect this is a classpath issue related to version mismatch. But if what's rolled in with jboss5 isn't sufficient, I don't know where next to look.

            Any thoughts on what jars should (not) be included? I would be very happy to see code similar to the jboss-messaging examples, but verified to work with jboss5 beta3. Anybody know of such code?

            Thanks for your help in this matter.

            • 3. Re: JBoss 5.0.0 Beta3 Messaging Client
              Tim Fox Master

               

               <version>3.2.3</version>
              


              You're taking jboss-all-client from JBoss 3.2.3??

              The classpath you quote should certainly work, you're probably just pulling in wrong versions of those files though.

              To verify this, take Maven out of the picture and _manually_ get those jars from the distro. You should find that that works fine.

              • 4. Re: JBoss 5.0.0 Beta3 Messaging Client
                Colin Fergus Newbie

                Problem resolved.
                It would not work while using jboss-messaging-client version 1.4.1.Beta3. The boot of jboss indicates that it's using jboss-messaging version 1.4.0.SP1. I downloaded 1.4.0.SP1 version and used the messaging-client from this, and it now works as expected.

                Should these versions be compatible with one another or not? That is; should a 1.4.0 server support 1.4.1+ clients (and vice versa)? I can't say for certain that they don't, but in my case they did not.

                Thank you for your prompt response to my issue. Your team is doing a great service to the community.