users@glassfish.java.net

Re: javax.ejb.CreateException: Could not create stateless EJB

From: <glassfish_at_javadesktop.org>
Date: Thu, 28 Jan 2010 23:10:13 PST

Thaks for your interesting.

Here is the stacktrace,

GRAVE: EJB5070: Exception creating stateless session bean : [CustomerSessionBean]
ADVERTENCIA: A system exception occurred during an invocation on EJB CustomerSessionBean method public java.util.List com.customerapp.ejb.CustomerSessionBean.retrieve()
javax.ejb.EJBException: javax.ejb.EJBException: javax.ejb.CreateException: Could not create stateless EJB
        at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:448)
        at com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:2418)
        at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1811)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:188)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:84)
        at $Proxy140.retrieve(Unknown Source)
        at com.customerapp.ejb.__EJB31_Generated__CustomerSessionBean__Intf____Bean__.retrieve(Unknown Source)
        at com.customerapp.web.CustomerMBean.getCustomers(CustomerMBean.java:61)
        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 javax.el.BeanELResolver.getValue(BeanELResolver.java:302)
        at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
        at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
        at com.sun.el.parser.AstValue.getValue(AstValue.java:116)
        at com.sun.el.parser.AstValue.getValue(AstValue.java:163)
        at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:219)
        at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:102)
        at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:190)
        at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:178)
        at javax.faces.component.UIData.getValue(UIData.java:554)
        at javax.faces.component.UIData.getDataModel(UIData.java:1248)
        at javax.faces.component.UIData.getRowCount(UIData.java:339)
        at org.primefaces.component.datatable.DataTableRenderer.encodeConfig(DataTableRenderer.java:254)
        at org.primefaces.component.datatable.DataTableRenderer.encodeScript(DataTableRenderer.java:140)
        at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:121)
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:878)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1620)
        at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:848)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1613)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616)
        at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:380)
        at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)
        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:619)
Caused by: javax.ejb.EJBException: javax.ejb.CreateException: Could not create stateless EJB
        at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:718)
        at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:200)
        at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:443)
        ... 63 more
Caused by: javax.ejb.CreateException: Could not create stateless EJB
        at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:526)
        at com.sun.ejb.containers.StatelessSessionContainer.access$000(StatelessSessionContainer.java:90)
        at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:716)
        ... 65 more
Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Unresolved Message-Destination-Ref jms/NotificationQueue_at_java.lang.String_at_null into class com.customerapp.ejb.CustomerSessionBean
        at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:614)
        at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:384)
        at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:168)
        at com.sun.ejb.containers.BaseContainer.injectEjbInstance(BaseContainer.java:1622)
        at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:486)
        ... 67 more
Caused by: java.lang.IllegalArgumentException: Can not set javax.jms.Queue field com.customerapp.ejb.CustomerSessionBean.notificationQueue to com.sun.enterprise.naming.impl.SerialContext
        at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
        at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
        at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
        at java.lang.reflect.Field.set(Field.java:657)
        at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:565)
        ... 71 more

It is estrange because this is what GF shows me on start up,

INFO: Portable JNDI names for EJB CustomerSessionBean : [java:global/CustomerApp-web/CustomerSessionBean, java:global/CustomerApp-web/CustomerSessionBean!com.customerapp.ejb.CustomerSessionBean]

And both does not work.

Thanks,
Jose
[Message sent by forum member 'josealvarezdelara' (dakhla.0563_at_hotmail.com)]

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