Skip to main content

Grizzly/Comet GlassFish 3.0.1. Cannot access an EJB

2 replies [Last post]
ljoyeux
Offline
Joined: 2010-04-23
Points: 0

Hi all,

I upgraded to the latest version of GlassFish 3.0.1, and now I have a problem. Basically, in the CometHandler.onInterrupt(), I perform a call to an EJB, and Glassfish is throwing an exception:

javax.ejb.EJBException
at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5119)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5017)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4805)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2004)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1955)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:198)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:84)

With GlassFish 3.0 version, no problem.

So is there a bug in GlassFish 3.0.1 ? Or is it possible to perform a call to an EJB from CometHandler.onInterrupt() and how to do it ?

Regards,
Laurent

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mvatkina
Offline
Joined: 2005-04-04
Points: 0

Is there a nested exception or another exception before this one in the server.log?

thanks,
-marina

ljoyeux
Offline
Joined: 2010-04-23
Points: 0

Hi Marina,

Here is the complete trace of the exception extracted from the logs:

[#|2010-06-21T18:34:41.836+0200|WARNING|oracle-glassfish3.0.1|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=22;_ThreadName=Thread-1;|A system exception occurred during an invocation on EJB DummyEjb method public java.lang.String com.test.DummyEjb.getMessage(
)
javax.ejb.EJBException
at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5119)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5017)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4805)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2004)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1955)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:198)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:84)
at $Proxy207.getMessage(Unknown Source)
at com.test.CometTestHandler.onInterrupt(CometTestHandler.java:67)
at com.sun.grizzly.comet.CometEngine.interrupt0(CometEngine.java:423)
at com.sun.grizzly.comet.CometTask.run(CometTask.java:119)
at com.sun.grizzly.TCPSelectorHandler$RunnableOperation.run(TCPSelectorHandler.java:1591)
at com.sun.grizzly.TCPSelectorHandler.processPendingQueue(TCPSelectorHandler.java:454)
at com.sun.grizzly.TCPSelectorHandler.processPendingOperations(TCPSelectorHandler.java:443)
at com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:381)
at com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler.preSelect(MonitorableSelectorHandler.java:85)
at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:183)
at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:130)
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:637)
Caused by: java.lang.IllegalStateException: Singleton not set for java.net.URLClassLoader@4ca9cde2 at org.glassfish.weld.ACLSingletonProvider$ACLSingleton.get(ACLSingletonProvider.java:107)
at org.jboss.weld.Container.instance(Container.java:58)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:45)
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.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:858)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:139)
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.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:858)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5264)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:190)
... 15 more
|#]

To be more precise about the exception, in my comethandler implementation, I can obtain a reference to the ejb (local or remote), but I cannot perform any method call on it.

Best,
Laurent