10 Replies Latest reply on Jan 27, 2009 7:39 AM by beve

    pls help me : how can i run example without ant build ?



      hi

      i want run example via console for example java org. ...

      thanks

        • 1. Re: pls help me : how can i run example without ant build ?
          beve

          Hi,

          please don't post the same question multiple times. Once is enough.

          Now, as mentioned in earlier posts take a look at this document http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/docs/ProgrammersGuide.odt
          "Chapter 6" contains a section about writing a client. This can be found on page 50.

          If your client is a remote client, like a standalone client run from the command line, or from within you IDE, or from a remote server, the section "Configuration for a remote ServiceInvoker" on page 51 describes what jars are required and also has a example that will invoke the helloworld quickstart.

          Please take a look and read through the documentation.

          regards,

          /Daniel

          • 2. Re: pls help me : how can i run example without ant build ?


            sorry,

            i tired and confused
            because it document not clearly and
            dont have example A to Z description


            sorry

            • 3. Re: pls help me : how can i run example without ant build ?
              beve

              Step 1. So, you need to setup up you classpath with with the jars and the configuration file mentioned in the doc:

              jbossesb-rosetta.jar
              jbossesb-config-model-1.0.1.jar
              jbossts-common.jar
              log4j-1.2.14.jar
               stax-1.2.0.jar
               stax-api-1.0.1.jar
               jbossall-client.jar
               scout-1.0rc2.aop.jar
               xbean-2.2.0.jar
               commons-logging-1.1.jar
              jboss-aop-jdk50-1.5.6.GA.jar
               javassist-3.6.0.GA.jar
               trove.jar
               juddi-client-2.0rc5.jar
               jboss-messaging-client.jar
               jboss-remoting.jar
               commons-codec-1.3.jar
               wstx-asl-3.2.0.jar
               xercesImpl-2.8.0.jar
              
              The following configuration file is also required to be available on the classpath:
              jbossesb-properties.xml


              Step 2. Copy the following sample client from the document and compile it.(change the package name if that makes it easier for you)
              package org.jboss.esb.client;
              import org.jboss.soa.esb.client.ServiceInvoker;
              import org.jboss.soa.esb.listeners.message.MessageDeliverException;
              import org.jboss.soa.esb.message.Message;
              import org.jboss.soa.esb.message.format.MessageFactory;
              
              public class EsbClient
              {
               public static void main(String[] args)
               {
               System.setProperty("javax.xml.registry.ConnectionFactoryClass",
               "org.apache.ws.scout.registry.ConnectionFactoryImpl");
               try
               {
               Message message = MessageFactory.getInstance().getMessage();
               message.getBody().add("Sample payload");
               ServiceInvoker invoker = new ServiceInvoker("FirstServiceESB", "SimpleListener");
               invoker.deliverAsync(message);
               }
               catch (final MessageDeliverException e)
               {
               e.printStackTrace();
               }
               }
              }


              Step 3. Start your JBossESB server and deploy the helloworld quickstart.
              Step 4. Run the EsbClient.
              Step 5. Check the server console and verify that the helloworld quickstart was invoked.

              Does that make it clearer?

              regards,

              /Daniel

              • 4. Re: pls help me : how can i run example without ant build ?

                hi daniel

                thanks for very much ...

                best regard

                • 5. Re: pls help me : how can i run example without ant build ?



                  hi daniel

                  i thank buttom up my heart,

                  • 6. Re: pls help me : how can i run example without ant build ?
                    logoff

                    hi all!

                    I have the same problem, but with the JBoss AS server + JBoss ESB, instead standalone JBoss ESB server. For this reason I cannot run helloworld examples and others.

                    How can I test my stubs with my scenario?

                    PD: Running the code over I have:

                    Exception in thread "main" java.lang.NoClassDefFoundError: com/arjuna/common/util/propertyservice/PropertyManager
                     at org.jboss.internal.soa.esb.message.format.MessageFactoryImpl.reset(MessageFactoryImpl.java:63)
                     at org.jboss.internal.soa.esb.message.format.MessageFactoryImpl.<init>(MessageFactoryImpl.java:50)
                     at org.jboss.soa.esb.message.format.MessageFactory.<clinit>(MessageFactory.java:90)
                     at tester.ServiceTester.main(ServiceTester.java:13)


                    • 7. Re: pls help me : how can i run example without ant build ?
                      marklittle

                      You are missing jbossts-common.jar from your classpath.

                      • 8. Re: pls help me : how can i run example without ant build ?

                        thank's

                        • 9. Re: pls help me : how can i run example without ant build ?
                          marklittle

                          No problem. In future try using jar to locate your missing classes in relevant jars. For example,

                          jar -tvf foo | grep bar

                          • 10. Re: pls help me : how can i run example without ant build ?
                            beve

                            And it is also listed in the docs:

                            Now, as mentioned in earlier posts take a look at this document http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/docs/ProgrammersGuide.odt
                            "Chapter 6" contains a section about writing a client. This can be found on page 50.


                            and in my last post :
                            Step 1 . So, you need to setup up you classpath with with the jars and the configuration file mentioned in the doc:
                            Code:

                            jbossesb-rosetta.jar
                            jbossesb-config-model-1.0.1.jar
                            jbossts-common.jar
                            log4j-1.2.14.jar
                            stax-1.2.0.jar
                            stax-api-1.0.1.jar
                            jbossall-client.jar
                            scout-1.0rc2.aop.jar
                            xbean-2.2.0.jar
                            commons-logging-1.1.jar
                            jboss-aop-jdk50-1.5.6.GA.jar
                            javassist-3.6.0.GA.jar
                            trove.jar
                            juddi-client-2.0rc5.jar
                            jboss-messaging-client.jar
                            jboss-remoting.jar
                            commons-codec-1.3.jar
                            wstx-asl-3.2.0.jar
                            xercesImpl-2.8.0.jar