activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicpillinger <...@nicpillinger.com>
Subject Error creating connection from ejb
Date Sun, 18 Mar 2007 16:53:52 GMT

Hi,
I've got the latest RA deployed and running an embedded broker in glassfish
(v2 beta). Its working in that I can connect from outside the app server and
send messages/receive them from outside. I can also receive them on my mdbs
in the appserver. However if I try to create a connection inside an ejb in
the app server in order to send a message to my Topic I get the following
error:


RAR7099: The mcf being used to allocate the connection and the MCF in the
pool are not equal.
RAR5117 : Failed to obtain/create connection. Reason : null
javax.jms.JMSException: Error in allocating a connection. Cause: null
        at
org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:100)
        at
org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:66)
        at test.NewWebService.NewSessionBean(NewWebService.java:51)
        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
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1051)
        at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:165)
        at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2846)
        at
com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3930)
        at
com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:176)
        at $Proxy101.NewSessionBean(Unknown Source)
        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
com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java:68)
        at
com.sun.enterprise.webservice.EjbInvokerImpl.invoke(EjbInvokerImpl.java:75)
        at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:132)
        at
com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:241)
        at
com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:75)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
        at
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:70)
        at
com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:133)
        at
com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:79)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
        at
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:70)
        at
com.sun.xml.ws.mex.server.MetadataServerPipe.process(MetadataServerPipe.java:97)
        at
com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:191)
        at
com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:113)
        at
com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:79)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
        at
com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:208)
        at
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:374)
        at
com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:175)
        at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)
        at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:100)
        at
com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:74)
        at
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:187)
        at
com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:116)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at
com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:101)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:74)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:207)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
        at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:249)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
        at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
        at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:248)
        at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:199)
        at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:328)
        at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
        at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)

The code I'm using to test this is a simple webservice ejb, the connection
factory is injected like so:

 @Resource(mappedName = "jms/ConnectionFactoryMQ")
    private ConnectionFactory jmsCF;

the error happens when I call 

Connection connection = jmsCF.createConnection();

Any help gratefully received!
thanks
Nic
-- 
View this message in context: http://www.nabble.com/Error-creating-connection-from-ejb-tf3422999s2354.html#a9540446
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message