Calling messaging from webapp in same vm as messaging
chipschoch May 4, 2007 10:06 AMJBossAS 4.2.0.CR2, JBM 1.2.0.SP!
Has anyone been successful in making a JBM connection from a webapp that is running in the same VM as JBM? I have been trying every combination of jar files, class loader scoping and physical contortions that I can think of and with each permutation I get a different exception. The latest is my webapp is not specifying any scoped classloader and I am including jboss-messaging.jar and jboss-remoting.jar in my .ear file. I get the following:
java.lang.NullPointerException at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:86) at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105) at org.jboss.jms.client.delegate.ClientConnectionDelegate$createSessionDelegate_6052335267724906805.invokeNext(ClientConnectionDelegate$createSessionDelegate_6052335267724906805.java) at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:171) at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105) at org.jboss.jms.client.delegate.ClientConnectionDelegate$createSessionDelegate_6052335267724906805.invokeNext(ClientConnectionDelegate$createSessionDelegate_6052335267724906805.java) at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:71) at org.jboss.jms.client.delegate.ClientConnectionDelegate$createSessionDelegate_6052335267724906805.invokeNext(ClientConnectionDelegate$createSessionDelegate_6052335267724906805.java) at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107) at org.jboss.jms.client.delegate.ClientConnectionDelegate$createSessionDelegate_6052335267724906805.invokeNext(ClientConnectionDelegate$createSessionDelegate_6052335267724906805.java) at org.jboss.jms.client.delegate.ClientConnectionDelegate.createSessionDelegate(ClientConnectionDelegate.java) at org.jboss.jms.client.JBossConnection.createSessionInternal(JBossConnection.java:269) at org.jboss.jms.client.JBossConnection.createSession(JBossConnection.java:91) at com.eLynx.Messaging.MessageSender.initialize(MessageSender.java:164) at com.eLynx.Messaging.MessageSender.<init>(MessageSender.java:76) at com.eLynx.BPM.Process.ProcessManager.signal(ProcessManager.java:434) at com.eLynx.Controller.USign.USignWebappController.eSignSubmit(USignWebappController.java:424) 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 com.eLynx.Dispatch.XmlDispatcher.dispatch(XmlDispatcher.java:161) at com.eLynx.Dispatch.XmlDispatcher.dispatch(XmlDispatcher.java:81) at com.eLynx.Servlet.XmlWebappServlet.doPost(XmlWebappServlet.java:119) 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.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 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:228) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437) at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:447) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
Why I should get a null pointer exception when I am simply trying to create a jms session is beyond me.
I have spent the last week trying to get this in a configuration that will work and am starting to think I may have made a mistake by pushing our organization to standardize on JBoss and JBM as our core platform.