Problem with Context
hmrizin Mar 22, 2007 12:06 PMHi,
I am having problems with the javax.naming.InitialContext that the JBossESB refers to. In one of my action classes i am creating a new Context and setting it to refer to Oracle 10g Server for EJB lookup.
After the action class returns I am trying to perform Static Router Action. But now the ESB tries to retrieve the registry information with the Context information that I set for the Oracle 10g Server.
I even tried resetting the Context back in the Action class once my EJB lookup is over. But I am still getting the same error.
The following is the jboss-esb.xml that i am using.
I am having two services, Service #1 and Service#2.
The Service #1 has four actions and Service #2 has only one action.
The execution goes like this.
Service #1 Action #1 : No Change in context
Service #1 Action #2 : Static Router Works Fine
Service #1 Action #3 : Context changed. EJB lookup done. Context restored.
Service #1 Action #4 : Static Router throws error
<?xml version = "1.0" encoding = "UTF-8"?> <jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.xsd" parameterReloadSecs="5"> <providers> <jms-provider name="JBossMQ" connection-factory="ConnectionFactory" jndi-context-factory="org.jnp.interfaces.NamingContextFactory" jndi-URL="localhost"> <jms-bus busid="ESBRequestGw"> <jms-message-filter dest-type="QUEUE" dest-name="queue/ESBRequestGwQ" /> </jms-bus> <jms-bus busid="ESBRequestEsb"> <jms-message-filter dest-type="QUEUE" dest-name="queue/ESBRequestEsbQ" /> </jms-bus> <jms-bus busid="ESBResponseBusGw"> <jms-message-filter dest-type="QUEUE" dest-name="queue/ESBResponseGwQ" /> </jms-bus> <jms-bus busid="ESBResponseBusEsb"> <jms-message-filter dest-type="QUEUE" dest-name="queue/ESBResponseEsbQ" /> </jms-bus> </jms-provider> </providers> <services> <!-- SERVICE #1--> <service category="ESupplyOMSEndPoint" name="ESupplyOMSService" description="ESupply OMS Service"> <listeners> <jms-listener name="ESBRequestGw" busidref="ESBRequestGw" maxThreads="1" is-gateway="true"/> <jms-listener name="ESBRequestEsb" busidref="ESBRequestEsb" maxThreads="1"/> </listeners> <actions> <!-- SERVICE #1 ACTION #1 --> <action name="processSOAction" class="fs.proto.esupply.service.ESupplyProcessSOAction" process="processSO"> <property name="exceptionMethod" value="exceptionHandler"/> </action> <!-- SERVICE #1 ACTION #2 --> <action name="routeToNotifyEndPoint" class="org.jboss.soa.esb.actions.StaticRouter"> <property name="destinations"> <route-to service-category="NotifyEndPoint" service-name="NotifyService" /> </property> </action> <!-- SERVICE #1 ACTION #3 --> <action name="uploadSOAction" class="fsproto.esb.elog.service.ELogUploadSOAction" process="uploadSO"> <property name="exceptionMethod" value="exceptionHandler"/> </action> <!-- SERVICE #1 ACTION #4 --> <action name="routeToNotifyEndPoint" class="org.jboss.soa.esb.actions.StaticRouter"> <property name="destinations"> <route-to service-category="NotifyEndPoint" service-name="NotifyService" /> </property> </action> </actions> </service> <!-- SERVICE #2 --> <service category="NotifyEndPoint" name="NotifyService" description="Notify Service"> <listeners> <jms-listener name="ESBResponseBusEsb" busidref="ESBResponseBusEsb" maxThreads="1" /> <jms-listener name="ESBResponseBusGw" busidref="ESBResponseBusGw" maxThreads="1" is-gateway="true"/> </listeners> <actions> <!-- SERVICE #2 ACTION #1 --> <action name="replyJMSClient" class="fs.proto.esb.service.ReplyJMSClient" process="replyClient"> <property name="destination" value="ESBResponseGwQ" /> <property name="exceptionMethod" value="exceptionHandler"/> </action> </actions> </service> </services> </jbossesb>
The Error message is
2007-03-22 21:02:48,663 ERROR [pool-4-thread-1][org.jboss.soa.esb.services.routing.MessageRouter] Could not obtain an EPR from the Registry. Message is not routed. javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'com.foursoft.elog.salesorder.ejb.sls.SalesManager' found for the ejb-ref ejb/EJB_com.foursoft.elog.salesorder.ejb.sls.SalesManagerBean org.jboss.soa.esb.services.registry.RegistryException: javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'com.foursoft.elog.salesorder.ejb.sls.SalesManager' found for the ejb-ref ejb/EJB_com.foursoft.elog.salesorder.ejb.sls.SalesManagerBean at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:332) at org.jboss.soa.esb.services.routing.MessageRouter.deliverMessages(MessageRouter.java:103) at org.jboss.soa.esb.actions.StaticRouter.process(StaticRouter.java:66) 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:585) at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.run(ActionProcessingPipeline.java:90) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Caused by: javax.xml.registry.JAXRException: javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'com.foursoft.elog.salesorder.ejb.sls.SalesManager' found for the ejb-ref ejb/EJB_com.foursoft.elog.salesorder.ejb.sls.SalesManagerBean at org.apache.ws.scout.registry.BusinessQueryManagerImpl.findServices(BusinessQueryManagerImpl.java:663) at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findService(JAXRRegistryImpl.java:440) at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:317) ... 10 more 2007-03-22 21:02:48,679 ERROR [pool-4-thread-1][org.jboss.soa.esb.listeners.message.ActionProcessingPipeline] Process method threw Exception java.lang.reflect.InvocationTargetException 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:585) at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.run(ActionProcessingPipeline.java:90) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Caused by: org.jboss.soa.esb.addressing.MalformedEPRException: org.jboss.soa.esb.services.routing.MessageRouterException: Message Could not be delivered due to issues with the Registry. javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'com.foursoft.elog.salesorder.ejb.sls.SalesManager' found for the ejb-ref ejb/EJB_com.foursoft.elog.salesorder.ejb.sls.SalesManagerBean at org.jboss.soa.esb.actions.StaticRouter.process(StaticRouter.java:71) ... 8 more Caused by: org.jboss.soa.esb.services.routing.MessageRouterException: Message Could not be delivered due to issues with the Registry. javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'com.foursoft.elog.salesorder.ejb.sls.SalesManager' found for the ejb-ref ejb/EJB_com.foursoft.elog.salesorder.ejb.sls.SalesManagerBean at org.jboss.soa.esb.services.routing.MessageRouter.deliverMessages(MessageRouter.java:160) at org.jboss.soa.esb.actions.StaticRouter.process(StaticRouter.java:66) ... 8 more Caused by: org.jboss.soa.esb.services.registry.RegistryException: javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'com.foursoft.elog.salesorder.ejb.sls.SalesManager' found for the ejb-ref ejb/EJB_com.foursoft.elog.salesorder.ejb.sls.SalesManagerBean at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:332) at org.jboss.soa.esb.services.routing.MessageRouter.deliverMessages(MessageRouter.java:103) ... 9 more Caused by: javax.xml.registry.JAXRException: javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'com.foursoft.elog.salesorder.ejb.sls.SalesManager' found for the ejb-ref ejb/EJB_com.foursoft.elog.salesorder.ejb.sls.SalesManagerBean at org.apache.ws.scout.registry.BusinessQueryManagerImpl.findServices(BusinessQueryManagerImpl.java:663) at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findService(JAXRRegistryImpl.java:440) at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:317) ... 10 more
Thanks in Advance
Hmrizin