1 2 3 4 Previous Next 52 Replies Latest reply: Nov 30, 2012 9:58 AM by Tom Cunningham RSS

    Service Invoker Error - pls help a newbie

    Anushree Khandalkar Newbie

      Hi All,
      I have written client code for a service which has a JMS listener.
      When i run the code i get the following exception:
      Exception in thread "main" org.jboss.soa.esb.listeners.message.MessageDeliverException: Failed to deliver message [header: [ ]] to Service [JBossESB-Internal:DeadLetterService]. Check for errors.
      at org.jboss.soa.esb.client.ServiceInvoker.post(ServiceInvoker.java:414)
      at org.jboss.soa.esb.client.ServiceInvoker.deliverAsync(ServiceInvoker.java:245)
      at org.jboss.soa.esb.client.ServiceInvoker.deliverToDeadLetterService(ServiceInvoker.java:287)
      at org.jboss.soa.esb.client.ServiceInvoker.deliverAsync(ServiceInvoker.java:255)
      at org.acme.insurance.test.SendEsbMessage.main(SendEsbMessage.java:50)

      I am sure that i have added all the jars in the classpath...
      It would be really helpful if anyone can help me out on this one..
      thanks.

      Regards,
      Anushree

        • 1. Re: Service Invoker Error - pls help a newbie
          Ravisankar Challa Newbie

          In order to make it work add the following files to your classpath.

          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

          Also add jbossesb-properties.xml, jndi.properties, juddi.properties, log4j.xml(Optional)

          The Contents of these files are given below.
          In you are developing esb service invoker client in eclipse just add these files under src directory

          jbossesb-properties.xml :::
          
          <?xml version="1.0" encoding="ISO-8859-1"?>
          <esb
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
          <properties name="core">
          <property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
          <property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/><property name="org.jboss.soa.esb.persistence.connection.factory" value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/><property name="jboss.esb.invm.scope.default" value="NONE"/>
          </properties>
          <properties name="registry">
          <property name="org.jboss.soa.esb.registry.queryManagerURI"
           value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>
          <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"
           value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
          <property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
           <property name="org.jboss.soa.esb.registry.factoryClass"
           value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
           <property name="org.jboss.soa.esb.registry.user"
           value="jbossesb"/>
           <property name="org.jboss.soa.esb.registry.password"
           value="password"/>
           <!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
           <property name="org.jboss.soa.esb.scout.proxy.transportClass"
           value="org.apache.ws.scout.transport.RMITransport"/>
           </properties>
           <properties name="transports" depends="core">
           <property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
           <property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
           <property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
           <property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
           </properties>
           <properties name="connection">
           <property name="min-pool-size" value="5"/>
           <property name="max-pool=size" value="10"/>
           <property name="blocking-timeout-millis" value="5000"/>
           <property name="abandoned-connection-timeout" value="10000"/>
           <property name="abandoned-connection-time-interval" value="30000"/>
           </properties>
           <properties name="dbstore">
           <property name="org.jboss.soa.esb.persistence.db.connection.url" value="jdbc:hsqldb:hsql://localhost:9001/"/>
           <property name="org.jboss.soa.esb.persistence.db.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
           <property name="org.jboss.soa.esb.persistence.db.user" value="sa"/>
           <property name="org.jboss.soa.esb.persistence.db.pwd" value=""/>
           <property name="org.jboss.soa.esb.persistence.db.pool.initial.size" value="2"/>
           <property name="org.jboss.soa.esb.persistence.db.pool.min.size" value="2"/>
           <property name="org.jboss.soa.esb.persistence.db.pool.max.size" value="5"/>
           <!--table managed by pool to test for valid connections - created by pool automatically -->
           <property name="org.jboss.soa.esb.persistence.db.pool.test.table" value="pooltest"/>
           <!-- # of milliseconds to timeout waiting for a connection from pool -->
          <property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
          <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
           </properties>
           <properties name="messagerouting">
           <property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
           </properties>
          </esb>
          
          jndi.properties :::
          
          java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
          java.naming.provider.url=jnp://localhost:1099
          java.naming.factory.url.pkgs=org.jnp.interfaces
          
          juddi.properties :::
          
          # jUDDI Registry Properties (used by RegistryServer)
          # see http://www.juddi.org for more information
          
          # The UDDI Operator Name
          juddi.operatorName = jUDDI.org
          
          # The i18n locale default codes
          juddi.i18n.languageCode = en
          juddi.i18n.countryCode = US
          
          # The UDDI DiscoveryURL Prefix
          juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
          
          # The UDDI Operator Contact Email Address
          juddi.operatorEmailAddress = admin@juddi.org
          
          # The maximum name size and maximum number
          # of name elements allows in several of the
          # FindXxxx and SaveXxxx UDDI functions.
          juddi.maxNameLength=255
          juddi.maxNameElementsAllowed=5
          
          # The maximum number of UDDI artifacts allowed
          # per publisher. A value of '-1' indicates any
          # number of artifacts is valid (These values can be
          # overridden at the individual publisher level).
          juddi.maxBusinessesPerPublisher=25
          juddi.maxServicesPerBusiness=20
          juddi.maxBindingsPerService=10
          juddi.maxTModelsPerPublisher=100
          
          # jUDDI Authentication module to use
          juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
          
          # jUDDI DataStore module currently to use
          juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
          
          # use a dataSource (if set to false a direct
          # jdbc connection will be used.
          juddi.isUseDataSource=false
          juddi.jdbcDriver=com.mysql.jdbc.Driver
          juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
          juddi.jdbcUsername=root
          juddi.jdbcPassword=admin
          # jUDDI DataSource to use
          # juddi.dataSource=java:comp/env/jdbc/MySqlDS
          
          # jUDDI UUIDGen implementation to use
          juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
          
          # jUDDI Cryptor implementation to use
          juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
          
          # jUDDI Validator to use
          juddi.validator=org.apache.juddi.validator.DefaultValidator
          
          # jUDDI Proxy Properties (used by RegistryProxy)
          juddi.proxy.adminURL = http://localhost:8080/juddi/admin
          juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
          juddi.proxy.publishURL = http://localhost:8080/juddi/publish
          juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
          juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
          juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
          
          # JNDI settings (used by RMITransport)
          java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
          java.naming.provider.url=jnp://localhost:1099
          java.naming.factory.url.pkgs=org.jboss.naming
          
          log4j.xml :::
          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
          
          <!-- ===================================================================== -->
          <!-- -->
          <!-- Log4j Configuration -->
          <!-- -->
          <!-- ===================================================================== -->
          <!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
          
          <!--
           | For more configuration infromation and examples see the Jakarta Log4j
           | owebsite: http://jakarta.apache.org/log4j
           -->
          <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
           <!-- ============================== -->
           <!-- Append messages to the console -->
           <!-- ============================== -->
           <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
           <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
           <param name="Target" value="System.out"/>
           <param name="Threshold" value="INFO"/>
          
           <layout class="org.apache.log4j.PatternLayout">
           <!-- The default pattern: Date Priority [Category] Message\n -->
           <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
           </layout>
           </appender>
           <!-- A size based file rolling appender -->
           <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
           <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
           <param name="File" value="./listener.log"/>
           <param name="Append" value="false"/>
           <param name="MaxFileSize" value="500KB"/>
           <param name="MaxBackupIndex" value="1"/>
          
           <layout class="org.apache.log4j.PatternLayout">
           <param name="ConversionPattern" value="%d %-5p [%t][%c] %m%n"/>
           </layout>
           </appender>
           <category name="org.jboss">
           <priority value="WARN"/>
           </category>
           <category name="org.jboss.soa.esb">
           <priority value="ERROR"/>
           </category>
           <category name="org.jboss.internal.soa.esb">
           <priority value="ERROR"/>
           </category>
           <category name="org.apache">
           <priority value="ERROR"/>
           </category>
           <category name="quickstart">
           <priority value="DEBUG"/>
           </category>
           <root>
           <appender-ref ref="CONSOLE"/>
           <appender-ref ref="FILE"/>
           </root>
          
          </log4j:configuration>
          

          Note: All these files are available in quickstarts helloworld..
          In you are developing esb service invoker client in eclipse just add these files under src directory

          • 2. Re: Service Invoker Error - pls help a newbie
            Anushree Khandalkar Newbie

            Hi
            Thanks for the reply
            The problem was solved by adding the jars...

            Regards,
            Anushree

            • 3. Re: Service Invoker Error - pls help a newbie
              Valerio Borioni Newbie

              Hello, i'm using JBoss 5.1 with JBossEsb 4.7. I've deployed the quickstart helloworld with ant script, it works calling "ant runtest".

              I'm trying to get it working from a plain eclipse java application, i added all jars listed above to the classpath and i've copied jbossesb-properties.xml jndi.properties juddi.properties to the src directory (from the quickstart/helloworld folder).

              I get this exception but i can not figure out what's going wrong, any advice is appriciated.

               

              Exception in thread "main" org.jboss.soa.esb.listeners.message.MessageDeliverException: org.apache.ws.scout.transport.TransportException: java.lang.reflect.InvocationTargetException
                  at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:545)
                  at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:174)
                  at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:155)
                  at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:197)
                  at org.jboss.soa.esb.samples.quickstart.helloworld.test.SendEsbMessage.main(SendEsbMessage.java:56)
              Caused by: org.jboss.soa.esb.services.registry.RegistryException: org.apache.ws.scout.transport.TransportException: java.lang.reflect.InvocationTargetException
                  at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:348)
                  at org.jboss.internal.soa.esb.services.registry.InVMRegistryInterceptor.findEPRs(InVMRegistryInterceptor.java:85)
                  at org.jboss.soa.esb.services.registry.RegistryFactory$HeadRegistryInterceptor.findEPRs(RegistryFactory.java:229)
                  at org.jboss.soa.esb.listeners.RegistryUtil.getEprs(RegistryUtil.java:226)
                  at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:532)
                  ... 4 more
              Caused by: javax.xml.registry.JAXRException: org.apache.ws.scout.transport.TransportException: java.lang.reflect.InvocationTargetException
                  at org.apache.ws.scout.registry.BusinessQueryManagerV3Impl.findConcepts(BusinessQueryManagerV3Impl.java:516)
                  at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.getJBossESBTModel(JAXRRegistryImpl.java:653)
                  at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:307)
                  ... 8 more

              • 4. Re: Service Invoker Error - pls help a newbie
                Tom Fennelly Master
                Is your src dir on the classpath and presumably the server is running etc.... looks as though ServiceInvoker is not able to connect to the registry.
                • 5. Re: Service Invoker Error - pls help a newbie
                  Valerio Borioni Newbie

                  I get the same stack trace even if the server is not running.

                  Isnit it wrong the appearance of org.jboss.internal.soa.esb.services.registry.InVMRegistryInterceptor.findEPRs in the stacktrace?

                  • 6. Re: Service Invoker Error - pls help a newbie
                    Satya Narayana Newbie

                    Hi,

                     

                       I am also facing the same problem. If you know the solution, Could you please share how to solve this issue? I'm still working to figure out.....

                     

                     

                    Exception in thread "main" org.jboss.soa.esb.listeners.message.MessageDeliverException: org.apache.ws.scout.transport.TransportException: java.lang.reflect.InvocationTargetException

                    at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:545)

                    at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:174)

                    at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:155)

                    at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:197)

                    at org.jboss.soa.esb.samples.quickstart.helloworld.test.SendEsbMessage.main(SendEsbMessage.java:55)

                    Caused by: org.jboss.soa.esb.services.registry.RegistryException: org.apache.ws.scout.transport.TransportException: java.lang.reflect.InvocationTargetException

                    at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:348)

                    at org.jboss.internal.soa.esb.services.registry.InVMRegistryInterceptor.findEPRs(InVMRegistryInterceptor.java:85)

                    at org.jboss.soa.esb.services.registry.RegistryFactory$HeadRegistryInterceptor.findEPRs(RegistryFactory.java:229)

                    at org.jboss.soa.esb.listeners.RegistryUtil.getEprs(RegistryUtil.java:226)

                    at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:532)

                    ... 4 more

                    Caused by: javax.xml.registry.JAXRException: org.apache.ws.scout.transport.TransportException: java.lang.reflect.InvocationTargetException

                    at org.apache.ws.scout.registry.BusinessQueryManagerV3Impl.findConcepts(BusinessQueryManagerV3Impl.java:516)

                    at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.getJBossESBTModel(JAXRRegistryImpl.java:653)

                    at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:307)

                    ... 8 more

                     

                     

                     

                    Thanks and Regards,

                    Satya.

                    • 7. Re: Service Invoker Error - pls help a newbie
                      E. Hartmann Newbie

                      Hi

                      Did you solve this problem?

                      Regards,

                      Eva

                      • 8. Re: Service Invoker Error - pls help a newbie
                        Anushree Khandalkar Newbie

                        Hi,

                        The problem can be solved by including the jars from JBOSS_ESB_HOME/client and JBOSS_ESB_HOME/lib/endorsed folder. Apart from this include the jars mentioned in 2nd post of this discussion.. Include these jars in client project and try. It should work..

                         

                        Regards,

                        Anushree

                        • 9. Re: Service Invoker Error - pls help a newbie
                          Frank Bitzer Newbie

                          I have the InvocationTargetException, too:

                           

                          Exception in thread "main" org.jboss.soa.esb.listeners.message.MessageDeliverException: org.apache.ws.scout.transport.TransportException: java.lang.reflect.InvocationTargetException
                              at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:545)
                              at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:174)
                              at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:155)
                              at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:197)
                              at org.jboss.soa.esb.samples.quickstart.helloworld.client.ESBClient.main(ESBClient.java:29)
                          Caused by: org.jboss.soa.esb.services.registry.RegistryException: org.apache.ws.scout.transport.TransportException: java.lang.reflect.InvocationTargetException
                              at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:348)
                              at org.jboss.internal.soa.esb.services.registry.InVMRegistryInterceptor.findEPRs(InVMRegistryInterceptor.java:85)
                              at org.jboss.soa.esb.services.registry.RegistryFactory$HeadRegistryInterceptor.findEPRs(RegistryFactory.java:229)
                              at org.jboss.soa.esb.listeners.RegistryUtil.getEprs(RegistryUtil.java:226)
                              at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:532)
                              ... 4 more
                          Caused by: javax.xml.registry.JAXRException: org.apache.ws.scout.transport.TransportException: java.lang.reflect.InvocationTargetException
                              at org.apache.ws.scout.registry.BusinessQueryManagerV3Impl.findConcepts(BusinessQueryManagerV3Impl.java:516)
                              at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.getJBossESBTModel(JAXRRegistryImpl.java:653)
                              at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:307)
                              ... 8 more

                           

                           

                           

                          However, adding the JARs from JBOSS_ESB_HOME/client and JBOSS_ESB_HOME/lib/endorsed did not work for me. Anyone has a solution?

                           

                          Cheers,
                          Frank

                          • 10. Re: Service Invoker Error - pls help a newbie
                            Anushree Khandalkar Newbie

                            Try adding the following jars in addition to the ones you have already added.

                             

                            log4j.jar from jboss-as/client
                            jbossall-client.jar from jboss-as/client
                            trove.jar from jboss-as/client
                            commons-codec.jar from jboss-as/client
                            jbossts-common.jar from jboss-as/server/default/lib
                            commons-logging.jar from jboss-as/server/default/lib
                            javassist.jar from jboss-as/server/default/lib
                            jboss-aop-jdk50.jar from jboss-as/server/default/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar
                            scout-1.0.rc2.aop.jar in default/deploy/jbossesb.sar/lib

                            Regards,
                            Anushree
                            • 11. Re: Service Invoker Error - pls help a newbie
                              E. Hartmann Newbie

                              I've  tried, but without success !!!

                               

                              If I try to send a JMS-Message, it works. But sending ESB-Message with ServiceInvoker doesn't work:

                               

                              org.jboss.soa.esb.listeners.message.MessageDeliverException: org.apache.ws.scout.transport.TransportException: java.lang.Exception: org/apache/commons/configuration/ConfigurationException
                              

                               

                              I have in extract.txt some outputs form command prompt:

                               

                              • from classpath-part you can see all libraries (jar-files) I have in classpath
                              • sending JMS-Message works
                              • sending ESB-Message doesn't work.

                               

                              To set CLASSPATH I use the cp.bat with all required classpath-part entries.

                               

                              In the root directory I have following:

                               

                              • jbossesb-properties.xml
                              • jndi.properties
                              • juddi.properties
                              • META-INF with uddi.xml

                               

                              I hope, someone can help.

                              • 12. Re: Service Invoker Error - pls help a newbie
                                Daniel Bevenius Master

                                Hi,

                                 

                                just wanted to make sure that you have followed the section "Configuring a remote ServiceInvoker" from the ProgrammersGuide?

                                If you have followed this and it still does not work the lets us know.

                                 

                                Regards,

                                 

                                /Daniel

                                • 13. Re: Service Invoker Error - pls help a newbie
                                  E. Hartmann Newbie

                                  Hi

                                   

                                  Yes, I have followed the section "Configuring a remote ServiceInvoker" from the ProgrammersGuide. I have checked it more times, but it doesn't work.

                                   

                                  Today, I tried it once more: I copied all jar-files and other files neaded for execution. But, no success.

                                   

                                  I don't see, what is wrong and will post here my last tray from today. I hope, you can help.

                                   

                                  Thanks in advance.

                                  • 14. Re: Service Invoker Error - pls help a newbie
                                    Daniel Bevenius Master

                                    Hi,

                                     

                                    It looks an additional jar is required for this to work. Could you please add commons-collections-3.2.jar and see if that works for you. I've attached the eclipse project I used to test this. Let me know if this works for you and I'll update the documentation.

                                     

                                    Sorry about this.

                                     

                                    Regards,

                                     

                                    /Daniel

                                    1 2 3 4 Previous Next