1 2 3 Previous Next 34 Replies Latest reply on Nov 29, 2008 1:14 AM by Vishal

    What are the required JARs for ESB

    Vishal Novice

      HI

      I want to place a message on ESB from a servlet, the servlet is running on tomcat , what JARS i will need to be imported ?

      please help

      Vishal

        • 1. Re: What are the required JARs for ESB
          Daniel Bevenius Master

          Hi,

          these jar should be added if you for example want to invoke the helloworld quickstart:

          jbossesb-config-model-1.0.1.jar
          jbossesb-rosetta.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
          uddi-client-2.0rc5.jar
          jboss-messaging-client.jar
          boss-remoting.jar
          commons-codec-1.3.jar
          wstx-asl-3.2.0.jar
          xercesImpl-2.8.0.jar

          You might not need to include all of them as some might be supplied by your servlet container.

          Regards,

          /Daniel



          • 3. Re: What are the required JARs for ESB
            Vishal Novice

            After adding all above said jars i m still getting following exception when i run the servlet

            code is as follows

             Message esbMessage = MessageFactory.getInstance().getMessage();
             Call call = new Call();
             call.setMessageID(new URI(UUID.randomUUID().toString()));
             esbMessage.getHeader().setCall(call);
            
             FESMessage fesm = new FESMessage();
             fesm.setMessageType("google");
             esbMessage.getBody().add(fesm);
            
             new ServiceInvoker("MessageRouterService", "RouterListener").deliverAsync(esbMessage);
            
            


            plugin autheticated from session
            log4j:WARN No appenders could be found for logger (org.jboss.soa.esb.services.registry.RegistryFactory).
            log4j:WARN Please initialize the log4j system properly.
            java.lang.NullPointerException
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:247)
            at org.jboss.soa.esb.util.ClassUtil.forName(ClassUtil.java:65)
            at org.jboss.soa.esb.services.registry.RegistryFactory.createRegistry(RegistryFactory.java:69)
            at org.jboss.soa.esb.services.registry.RegistryFactory.getRegistry(RegistryFactory.java:56)
            at org.jboss.soa.esb.listeners.RegistryUtil.getEprs(RegistryUtil.java:220)
            at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:428)
            at org.jboss.soa.esb.client.ServiceInvoker.(ServiceInvoker.java:155)
            at org.jboss.soa.esb.client.ServiceInvoker.(ServiceInvoker.java:136)
            at org.jboss.soa.esb.client.ServiceInvoker.(ServiceInvoker.java:178)
            at com.nativetung.frontendserver.servlet.submitText.sendMessageToEsb(submitText.java:148)
            at com.nativetung.frontendserver.servlet.submitText.processRequest(submitText.java:97)
            at com.nativetung.frontendserver.servlet.submitText.doPost(submitText.java:172)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Thread.java:619)
            org.jboss.soa.esb.listeners.message.MessageDeliverException: Invocation exception. null


            • 4. Re: What are the required JARs for ESB
              Daniel Bevenius Master

              Hi,

              Can you double check that you have the 'javax.xml.registry.ConnectionFactoryClass' property set like this:

              public static void main(String[] args)
              {
               System.setProperty("javax.xml.registry.ConnectionFactoryClass", "org.apache.ws.scout.registry.ConnectionFactoryImpl");
               try
               {
               final Message message = MessageFactory.getInstance().getMessage();
               message.getBody().add("Sample payload");
               new ServiceInvoker("FirstServiceESB", "SimpleListener").deliverAsync(message);
               }
               catch (final MessageDeliverException e)
               {
               e.printStackTrace();
               }
               }


              not sure if you have added this already (might just not have included it in your previous post).

              Regards,

              /Daniel

              • 5. Re: What are the required JARs for ESB
                Vishal Novice

                yes i have added that but now i m getting this exception

                java.lang.NullPointerException
                at java.lang.Class.forName0(Native Method)
                at java.lang.Class.forName(Class.java:247)
                at org.jboss.soa.esb.util.ClassUtil.forName(ClassUtil.java:65)
                at org.jboss.soa.esb.services.registry.RegistryFactory.createRegistry(RegistryFactory.java:69)
                at org.jboss.soa.esb.services.registry.RegistryFactory.getRegistry(RegistryFactory.java:56)
                at org.jboss.soa.esb.listeners.RegistryUtil.getEprs(RegistryUtil.java:220)
                at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:428)
                at org.jboss.soa.esb.client.ServiceInvoker.(ServiceInvoker.java:155)
                at org.jboss.soa.esb.client.ServiceInvoker.(ServiceInvoker.java:136)
                at org.jboss.soa.esb.client.ServiceInvoker.(ServiceInvoker.java:178)
                at com.nativetung.frontendserver.servlet.submitText.sendMessageToEsb(submitText.java:148)
                at com.nativetung.frontendserver.servlet.submitText.processRequest(submitText.java:97)
                at com.nativetung.frontendserver.servlet.submitText.doPost(submitText.java:172)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                at java.lang.Thread.run(Thread.java:619)
                org.jboss.soa.esb.listeners.message.MessageDeliverException: Invocation exception. null

                • 6. Re: What are the required JARs for ESB
                  Daniel Bevenius Master

                  Do you have a jbossesb-properties.xml file available on the classpath as well?

                  • 7. Re: What are the required JARs for ESB
                    Vishal Novice

                    no ! can i put with a servlet based application ?

                    • 8. Re: What are the required JARs for ESB
                      Daniel Bevenius Master

                       

                      can i put with a servlet based application ?

                      Yes, try putting it in WEB-INF/classes.

                      • 9. Re: What are the required JARs for ESB
                        Vishal Novice

                        ok now it is not throwing any exception but i can see any activity on ESB side assuming that message has been put successfully,

                        what i want to do is i want to place an object on ESB from servlet this is a serializable object based on one of the filed the routing will take place
                        now it seems that nothing is happening , same code mentioned above works fine from console based application.

                        • 10. Re: What are the required JARs for ESB
                          Vishal Novice

                          also i m getting this message

                          log4j:WARN No appenders could be found for logger (org.jboss.soa.esb.services.registry.RegistryFactory).
                          log4j:WARN Please initialize the log4j system properly.

                          when i run it from netbeans IDE and when i run it from directly tomcat console this doesnt appear

                          • 11. Re: What are the required JARs for ESB
                            Vishal Novice

                            ok some how i could resolve the problem but now this is the new exception that is being thrown , i think it is not able to find registry inquiry service is ther any config file related to this ?

                            javax.naming.NameNotFoundException: Name InquiryService is not bound in this Context
                            at org.apache.ws.scout.transport.RMITransport.send(RMITransport.java:91)
                            at org.apache.ws.scout.registry.RegistryImpl.execute(RegistryImpl.java:271)
                            at org.apache.ws.scout.registry.RegistryImpl.findTModel(RegistryImpl.java:793)
                            at org.apache.ws.scout.registry.BusinessQueryManagerImpl.findClassificationSchemeByName(BusinessQueryManagerImpl.java:440)
                            at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findService(JAXRRegistryImpl.java:469)
                            at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:307)
                            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.(ServiceInvoker.java:155)
                            at org.jboss.soa.esb.client.ServiceInvoker.(ServiceInvoker.java:136)
                            at org.jboss.soa.esb.client.ServiceInvoker.(ServiceInvoker.java:178)
                            at com.nativetung.frontendserver.servlet.submitText.sendMessageToEsb(submitText.java:148)
                            at com.nativetung.frontendserver.servlet.submitText.processRequest(submitText.java:97)
                            at com.nativetung.frontendserver.servlet.submitText.doPost(submitText.java:172)
                            at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
                            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
                            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
                            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
                            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                            at java.lang.Thread.run(Thread.java:619)
                            Caused by: javax.naming.NameNotFoundException: Name InquiryService is not bound in this Context

                            • 12. Re: What are the required JARs for ESB
                              Daniel Bevenius Master

                               

                              log4j:WARN No appenders could be found for logger (org.jboss.soa.esb.services.registry.RegistryFactory).
                              log4j:WARN Please initialize the log4j system properly.

                              Log4j is not configured: http://logging.apache.org/log4j/1.2/index.html

                              ok some how i could resolve the problem

                              Which problem are you referring to here? What was the problem and what did you do to fix it?

                              I'm not sure why you are getting the NameNotFoundException and I've sort of lost track of what you want here.
                              Is your goal to invoke a service from a Servlet?
                              If so then start simple, try invoking the helloworld quickstart and make sure you can call it. Then move on and try your real service.
                              I can provide you with an example if you'd like.

                              Regards,

                              /Daniel







                              • 13. Re: What are the required JARs for ESB
                                Vishal Novice

                                thanks for reply and sorry for confusion

                                here i explain , i have a servlet and i have en esb configured for messagefiltering, which is based on messagefilter example from quickstart from console based application my esb seems to be working correct, now i want to do the same with servlet now i want to place an object in an ESB Message and want to send it to ESB so that esb works accordingly
                                now so far i m able to execute the servlet properly but when it executes it generates the above mentioned exception, what can be reason ? and your example is welcome !

                                • 14. Re: What are the required JARs for ESB
                                  Daniel Bevenius Master

                                  Hi,

                                  can you send me an email and I'll send you a reply with the attached .war file.
                                  If you deploy it and deploy the helloworld quickstart you should be able to invoke the esb service by accessing http://localhost:8080/test/EsbServlet

                                  Regards,

                                  /Daniel

                                  1 2 3 Previous Next