0 Replies Latest reply on Aug 20, 2009 9:32 AM by Rajneesh Kapur

    Standalone CXF Client sending message to jbossESB

    Rajneesh Kapur Newbie

      Hi,

      I am not sure if I should be posting this question here - so please pardon me if it does not belong here.

      I want to send a message from CXF webProject to JbossESB using ServiceInvoker. So for this I am doing the following:

      I am using CXF 2.2.3 (standalone) and have a webProject - just simple helloWorld. I receive the request fine in serviceImpl but when I send this request to JbossESB (soa-p.4.3.0) - I am getting the following exception:

      I think the problem may be that CXF client is unable to find "jbossesb-properties.xml" file. I have this file in /WEB-INF and I copied it in /WEB-INF/classes as well - still I get the following error:

      2009-08-19 20:35:23,573 [http-9090-1] DEBUG org.jboss.soa.esb.services.registry.RegistryFactory - Going to load org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl
      org.jboss.soa.esb.listeners.message.MessageDeliverException: javax.naming.NameNotFoundException: Name InquiryService is not bound in this Context
       at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:474)
       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 net.ahm.esb.ESBMessageSender.sendMessage(ESBMessageSender.java:42)
       at net.ahm.esb.ESBClient.sendAsync(ESBClient.java:70)
       at net.ahm.cxf.SendAsync.doWork(SendAsync.java:20)
       at net.ahm.services.PixResponseImpl.sendPixResponse(PixResponseImpl.java:96)
       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.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:166)
       at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:82)
       at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:55)
       at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:68)
       at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
       at java.util.concurrent.FutureTask.run(FutureTask.java:138)
       at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
       at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:98)
       at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
       at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:104)
       at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:99)
       at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:452)
       at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:196)
       at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:220)
       at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:153)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
       at org.apache.cxf.transport.servlet.AbstractCXFServlet.service(AbstractCXFServlet.java:211)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       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:191)
       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:293)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
       at java.lang.Thread.run(Thread.java:619)


      If I remove the "jbossesb-properties.xml" file from /WEB-INF and /WEB-INF/classes - then I get different exception:
      org.jboss.soa.esb.listeners.message.MessageDeliverException: Invocation exception. null
       at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:474)
       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 net.ahm.esb.ESBMessageSender.sendMessage(ESBMessageSender.java:42)
       at net.ahm.esb.ESBClient.sendAsync(ESBClient.java:70)
       at net.ahm.cxf.SendAsync.doWork(SendAsync.java:20)
       at net.ahm.services.PixResponseImpl.sendPixResponse(PixResponseImpl.java:96)
       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.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:166)
       at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:82)
       at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:55)
       at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:68)
       at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
       at java.util.concurrent.FutureTask.run(FutureTask.java:138)
       at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
       at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:98)
       at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
       at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:104)
       at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:99)
       at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:452)
       at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:196)
       at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:220)
       at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:153)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
       at org.apache.cxf.transport.servlet.AbstractCXFServlet.service(AbstractCXFServlet.java:211)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       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:191)
       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:293)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: org.jboss.soa.esb.services.registry.RegistryException: Invocation exception. null
       at org.jboss.soa.esb.services.registry.RegistryFactory.createRegistry(RegistryFactory.java:121)
       at org.jboss.soa.esb.services.registry.RegistryFactory.getRegistry(RegistryFactory.java:86)
       at org.jboss.soa.esb.listeners.RegistryUtil.getEprs(RegistryUtil.java:220)
       at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:461)
       ... 42 more
      Caused by: 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:110)
       ... 45 more


      This tells me that its probably reading/finding "jbossesb-properties.xml" this file but then maybe something else is missing? Is my thinking correct?

      have anybody else seen this error before?

      thanks a lot for help,
      rishi