Hi. I am trying to use EJB embedded and I got most of it to work, except for one thing. Some EJB modules I am trying to use have MDB, and embedded container creation fails with the following message:
[code]
Jul 6, 2010 10:21:01 AM com.sun.logging.LogDomains$1 log
SEVERE:
com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Failed to read the connector deployment descriptors
at com.sun.enterprise.connectors.util.ConnectorDDTransformUtils.getConnectorDescriptor(ConnectorDDTransformUtils.java:206)
at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:311)
at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:328)
at com.sun.enterprise.connectors.service.ConnectorService.loadDeferredResourceAdapter(ConnectorService.java:164)
at com.sun.enterprise.connectors.ConnectorRuntime.loadDeferredResourceAdapter(ConnectorRuntime.java:1085)
at com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.getActiveResourceAdapter(ConnectorMessageBeanClient.java:282)
at com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:180)
at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:200)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:116)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:220)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:220)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:76)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:176)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:229)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:359)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:203)
at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:196)
at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:135)
at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:122)
at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:116)
at com.test.EmbeddedEJBTest.main(EmbeddedEJBTest.java:34)
Caused by: java.io.FileNotFoundException: /home/rafal/EclipseWorkspaces/Workspace/GlassFishTest/glassfish/lib/install/applications/jmsra
at com.sun.enterprise.deploy.shared.FileArchive.open(FileArchive.java:85)
at com.sun.enterprise.connectors.util.ConnectorDDTransformUtils.getConnectorDescriptor(ConnectorDDTransformUtils.java:185)
... 20 more
Jul 6, 2010 10:21:01 AM com.sun.logging.LogDomains$1 log
SEVERE: containers.mdb.create_container_exception
Jul 6, 2010 10:21:01 AM com.sun.logging.LogDomains$1 log
[/code]
The glassfish home that I set is similar to the one described here:
http://ctpjava.blogspot.com/2009/10/unit-testing-ejbs-and-jpa-with.html. So, I copied the missing catalogue (jmsra) and this time it fails with a different message:
[code]
INFO: MQJMSRA_RA1101: SJSMQ JMS Resource Adapter starting: REMOTE
Jul 6, 2010 10:25:07 AM com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
WARNING: [C4003]: Error occurred on connection creation [localhost:7676]. - cause: java.net.ConnectException: Connection refused
[/code]
The ConnectException is repeated several times and then it fails.
As EJB embedded is supposed to support only EJB 3.1 Lite, and this doesn't support JMS, one solution is to simply package the MDBs in a separate jar / module.
But maybe there is a simpler way, like some GF property or some way to say that I want to have all JMS stuff ignored?
[Message sent by forum member 'szczyp']
http://forums.java.net/jive/thread.jspa?messageID=476841