4 Replies Latest reply on Jan 23, 2009 6:05 PM by kimba74

    Standalone JBossESB client dependencies?

    kimba74

      Hi everyone,

      I have a quick question, I'm building a standalone client that invokes services within the JBossESB (v4.3) in a synchronous fashion.

      Example:

       Service srv = new Service(srvCat, srvNam);
       ServiceInvoker invoker = new ServiceInvoker(srv);
      
       Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
       message.getBody().add(srvMsg);
      
       Message retval = invoker.deliverSync(message, 5000);
       Object response = retval.getBody().get();
      


      Now my question: Which of the JBossESB's JAR files must be in the clients classpath in order to execute the above call?

      I clearly don't want to package all JARs that come with JBossESB in my client deliverable.

      Thanks,

      Kimba

        • 1. Re: Standalone JBossESB client dependencies?
          beve

          Hi,

          take a look at the section "Configuration for a remote ServiceInvoker" on page 51 in:
          http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/docs/ProgrammersGuide.odt

          regards,

          /Daniel

          • 2. Re: Standalone JBossESB client dependencies?
            kimba74

            Awesome!!! Thanks Daniel, that's exactly what I was looking for.

            -Kimba

            "beve" wrote:
            Hi,

            take a look at the section "Configuration for a remote ServiceInvoker" on page 51 in:
            http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/docs/ProgrammersGuide.odt

            regards,

            /Daniel


            • 3. Re: Standalone JBossESB client dependencies?
              kimba74

               

              "beve" wrote:
              Hi,

              take a look at the section "Configuration for a remote ServiceInvoker" on page 51 in:
              http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/docs/ProgrammersGuide.odt

              regards,

              /Daniel


              Ok, I still seem to have a bit of an issue when running the remote ServiceInvoker. I get a

              javax.xml.registry.JAXRException: Failed to create instance of: null
               at javax.xml.registry.ConnectionFactory.newInstance(ConnectionFactory.java:75)
               at org.jboss.internal.soa.esb.services.registry.JAXRConnectionFactory.getConnection(JAXRConnectionFactory.java:102)
               at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:305)
               at org.jboss.soa.esb.listeners.RegistryUtil.getEprs(RegistryUtil.java:226)
               at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:428)
               at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:155)
               at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:136)
               at gov.usc.workshop.invoker.Main.main(Main.java:47)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:585)
               at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:290)
               at java.lang.Thread.run(Thread.java:595)
              Caused by: java.lang.NullPointerException
               at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:261)
               at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
               at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
               at javax.xml.registry.ConnectionFactory.newInstance(ConnectionFactory.java:70)
               ... 13 more


              Exception. Any ideas???

              -Kimba

              • 4. Re: Standalone JBossESB client dependencies?
                kimba74

                Nevermind, fat-fingered the ConnectionFactoryClass property

                System.setProperty("javax.xml.registry.ConnectionFactoryClass", "org.apache.ws.scout.registry.ConnectionFactoryImpl");


                "Kimba74" wrote:
                "beve" wrote:
                Hi,

                take a look at the section "Configuration for a remote ServiceInvoker" on page 51 in:
                http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/docs/ProgrammersGuide.odt

                regards,

                /Daniel


                Ok, I still seem to have a bit of an issue when running the remote ServiceInvoker. I get a

                javax.xml.registry.JAXRException: Failed to create instance of: null
                 at javax.xml.registry.ConnectionFactory.newInstance(ConnectionFactory.java:75)
                 at org.jboss.internal.soa.esb.services.registry.JAXRConnectionFactory.getConnection(JAXRConnectionFactory.java:102)
                 at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:305)
                 at org.jboss.soa.esb.listeners.RegistryUtil.getEprs(RegistryUtil.java:226)
                 at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:428)
                 at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:155)
                 at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:136)
                 at gov.usc.workshop.invoker.Main.main(Main.java:47)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:585)
                 at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:290)
                 at java.lang.Thread.run(Thread.java:595)
                Caused by: java.lang.NullPointerException
                 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:261)
                 at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
                 at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
                 at javax.xml.registry.ConnectionFactory.newInstance(ConnectionFactory.java:70)
                 ... 13 more


                Exception. Any ideas???

                -Kimba