1 Reply Latest reply on Mar 3, 2011 7:54 AM by Tom Fennelly

    Custom Gateway Listener does not work

    Alexander Eitner Newbie

      Hello,

       

      i am working with JBoss ESB 4.x and try to configure a custom HTTP Gateway Listener like described in this post:

       

      http://community.jboss.org/wiki/WritingCustomListenersforJBossESB4x

       

       

      This is part of my jboss-esb.xml

       

          <providers>

              <bus-provider name="CustomRestProvider">

                  <bus busid="custom-bus">

                         <property name="gatewayClass" value="de.mycompany.jbossesb.web.HttpGatewayListener" />

                      <property name="http_host" value="127.0.0.1" />

                      <property name="http_port" value="9000" />             

                      <property name="http_context" value="/myapp" />

                  </bus>

              </bus-provider>

          </providers> 

       

          <listener name="custom-listener" busidref="custom-bus" is-gateway="true">

              <property name="gatewayClass" value="de.mycompany.jbossesb.web.HttpGatewayListener" />

              <property name="composer-class" value="de.mycompany.dlsrest.composer.DlsMessageComposer" />

           </listener>

       

      with HttpGatewayListener extending AbstractManagedLifecycle.

       

      However, while deploying i get following exception:

       

      15:59:33,934 ERROR [] [[/myapp]] StandardWrapper.Throwable

      java.lang.IllegalArgumentException: null 'xml' arg in method call.

              at org.jboss.internal.soa.esb.assertion.AssertArgument.isNotNull(AssertArgument.java:43)

              at org.jboss.internal.soa.esb.addressing.helpers.EPRHelper.fromXMLString(EPRHelper.java:132)

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

              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:597)

              at org.jboss.internal.soa.esb.services.registry.RegistryService$1.invoke(RegistryService.java:61)

              at $Proxy36.findEPRs(Unknown Source)

              at org.jboss.internal.soa.esb.services.registry.CachingRegistryInterceptor.getEPRs(CachingRegistryInterceptor.java:157)

              at org.jboss.internal.soa.esb.services.registry.CachingRegistryInterceptor.findEPRs(CachingRegistryInterceptor.java:94)

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

              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:461)

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

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

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

              at org.jboss.soa.esb.listeners.message.UncomposedMessageDeliveryAdapter.<init>(UncomposedMessageDeliveryAdapter.java:66)

              at org.jboss.soa.esb.listeners.message.UncomposedMessageDeliveryAdapter.getGatewayDeliveryAdapter(UncomposedMessageDeliveryAdapter.j

      ava:164)

              at de.mycompany.jbossesb.web.HttpDispatchServlet.init(HttpDispatchServlet.java:58)

              at javax.servlet.GenericServlet.init(GenericServlet.java:212)

              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)

              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)

              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4071)

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4375)

              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)

              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)

              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)

              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:597)

              at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)

              at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)

              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

              at de.mycompany.jbossesb.web.HttpServerDelegate.addContext(HttpServerDelegate.java:194)

              at de.mycompany.jbossesb.web.HttpServerDelegate.addContext(HttpServerDelegate.java:189)

              at de.mycompany.jbossesb.web.HttpGatewayListener.startHttpServer(HttpGatewayListener.java:324)

              at de.mycompany.jbossesb.web.HttpGatewayListener.doStart(HttpGatewayListener.java:228)

              at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.start(AbstractManagedLifecycle.java:174)

              at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.startInstances(ManagedLifecycleController.java:132)

              at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.start(ManagedLifecycleController.java:63)

              at de.mycompany.JBoss4SCIDeployment.startService(JBoss4SCIDeployment.java:94)

              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)

              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)

              at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)

              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)

              at $Proxy0.start(Unknown Source)

       

      Even when debugging, i don't see any problem when the endpoint is registered. Do you have any ideas what i could try or look for?

       

      Thx in advance!