users@glassfish.java.net

Embedded Glassfish V3 MDB deployment problem

From: <glassfish_at_javadesktop.org>
Date: Tue, 16 Mar 2010 20:57:25 PDT

Hello everyone,

I am getting a java.lang.AssertionError while deploying an MDB in glassfish. Any suggestions or pointers would be really helpful.

The exception is thrown at:
com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectConnection.checkState(IMQDirectConnection.java:488)

I have a very simple mdb:
[i]@MessageDriven(mappedName = "jms/RegistrationQueue")[/i]
public class EmailQueueReceiver implements MessageListener {
   // onMessage implementation
}

And I'm loading up glassfish ejb container using the Java EE 6 api.

            Map serverProperties = new HashMap();
            serverProperties.put("org.glassfish.ejb.embedded.glassfish.installation.root", "C:\\glassfish3\\glassfish");
            EJBContainer container = EJBContainer.createEJBContainer(serverProperties);

The above line ends up in error with this stacktrace:


SEVERE: Exception while loading the app
java.lang.RuntimeException: EJB Container initialization error
        at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:219)
        at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:197)
        at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:63)
        at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
        at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
        at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214)
        at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:144)
        at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:128)
        at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:120)
        at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:102)
        at au.com.paycorp.skeletor.framework.service.AbstractEntityServiceTest.setUpContainer(AbstractEntityServiceTest.java:71)
        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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:515)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1031)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:888)
Caused by: java.lang.AssertionError
        at com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectConnection.checkState(IMQDirectConnection.java:488)
        at com.sun.messaging.jmq.jmsserver.service.imq.IMQConnection.startConnection(IMQConnection.java:494)
        at com.sun.messaging.jmq.jmsserver.data.protocol.ProtocolImpl.resumeConnection(ProtocolImpl.java:469)
        at com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService.startConnection(IMQDirectService.java:660)
        at com.sun.messaging.jms.ra.DirectConnection.start(DirectConnection.java:443)
        at com.sun.messaging.jms.ra.EndpointConsumer.createDirectMessageConsumer(EndpointConsumer.java:828)
        at com.sun.messaging.jms.ra.EndpointConsumer._init(EndpointConsumer.java:312)
        at com.sun.messaging.jms.ra.EndpointConsumer.<init>(EndpointConsumer.java:222)
        at com.sun.messaging.jms.ra.ResourceAdapter.endpointActivation(ResourceAdapter.java:429)
        at com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:216)
        at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:199)
        at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:115)
        at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:207)
        ... 25 more
Mar 17, 2010 2:10:12 PM org.glassfish.ejb.embedded.EJBContainerProviderImpl createEJBContainer
INFO: [EJBContainerProviderImpl] Cleaning up on failure ...
Mar 17, 2010 2:10:12 PM com.sun.messaging.jms.ra.ResourceAdapter stop
INFO: MQJMSRA_RA1101: SJSMQ JMSRA stopping...
Mar 17, 2010 2:10:12 PM com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl sendStopToResourceAdapter
INFO: ra.stop-successful
Mar 17, 2010 2:10:16 PM com.sun.enterprise.connectors.ActiveOutboundResourceAdapter stopResourceAdapter
SEVERE: rardeployment.stop_warning
[b]java.lang.AssertionError
        at com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectConnection.checkState(IMQDirectConnection.java:488)[/b]
        at com.sun.messaging.jmq.jmsserver.service.imq.IMQConnection.stopConnection(IMQConnection.java:511)
        at com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService.stopService(IMQDirectService.java:207)
        at com.sun.messaging.jmq.jmsserver.service.ServiceInfo.stop(ServiceManager.java:674)
        at com.sun.messaging.jmq.jmsserver.service.ServiceManager.stopService(ServiceManager.java:317)
        at com.sun.messaging.jmq.jmsserver.service.ServiceManager.stopAllActiveServices(ServiceManager.java:440)
        at com.sun.messaging.jmq.jmsserver.BrokerStateHandler$ShutdownRunnable.shutdown(BrokerStateHandler.java:502)
        at com.sun.messaging.jmq.jmsserver.BrokerStateHandler.initiateShutdown(BrokerStateHandler.java:262)
        at com.sun.messaging.jmq.jmsserver.Broker.destroyBroker(Broker.java:261)
        at com.sun.messaging.jmq.jmsserver.Broker.destroyBroker(Broker.java:252)
        at com.sun.messaging.jmq.jmsserver.BrokerProcess.stop(BrokerProcess.java:233)
        at com.sun.messaging.jmq.jmsclient.runtime.impl.BrokerInstanceImpl.stop(BrokerInstanceImpl.java:160)
        at com.sun.messaging.jms.ra.EmbeddedBrokerRunner.stop(EmbeddedBrokerRunner.java:290)
        at com.sun.messaging.jms.ra.LifecycleManagedBroker.stop(LifecycleManagedBroker.java:373)
        at com.sun.messaging.jms.ra.ResourceAdapter.stop(ResourceAdapter.java:393)
        at com.sun.enterprise.connectors.ActiveOutboundResourceAdapter.stopResourceAdapter(ActiveOutboundResourceAdapter.java:217)
        at com.sun.enterprise.connectors.ActiveOutboundResourceAdapter.destroy(ActiveOutboundResourceAdapter.java:210)
        at com.sun.enterprise.connectors.inbound.ActiveInboundResourceAdapterImpl.destroy(ActiveInboundResourceAdapterImpl.java:101)
        at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl$RAShutdownTask.run(ResourceAdapterAdminServiceImpl.java:576)
        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 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Mar 17, 2010 2:10:16 PM com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl sendStopToResourceAdapter
INFO: ra.stop-successful
[Message sent by forum member 'razib' (razib.shahriar_at_live.com)]

http://forums.java.net/jive/thread.jspa?messageID=392292