EJB bean not started
mvlach Jul 13, 2007 12:50 PMI have problem with @Stateful bean:
Iam trying to instantiate Stateful bean but the bean couldn't instantiate. When I create @Stateless bean all works. But @Stateful not working.
import javax.ejb.Local; @Local public interface Test { public void clickMe(); public void destroy(); }
@Name("testAction") @Stateful @Scope(ScopeType.SESSION) public class TestAction implements Test { @Logger Log log; @PersistenceContext(type=PersistenceContextType.EXTENDED) private EntityManager em; public void clickMe() { log.info("clicked"); } @Remove @Destroy public void destroy() {} }
Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: testAction at org.jboss.seam.Component.newInstance(Component.java:1740) at org.jboss.seam.Component.getInstance(Component.java:1643) at org.jboss.seam.Component.getInstance(Component.java:1610) at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:53) at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42) at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134) at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:73) at com.sun.el.parser.AstValue.getTarget(AstValue.java:67) at com.sun.el.parser.AstValue.invoke(AstValue.java:170) at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:286) at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68) at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69) at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63) ... 42 more Caused by: javax.naming.NameNotFoundException: TestAction not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:529) at org.jnp.server.NamingServer.getBinding(NamingServer.java:537) at org.jnp.server.NamingServer.getObject(NamingServer.java:543) at org.jnp.server.NamingServer.lookup(NamingServer.java:267) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588) at javax.naming.InitialContext.lookup(InitialContext.java:351) at org.jboss.seam.Component.instantiateSessionBean(Component.java:1107) at org.jboss.seam.Component.instantiate(Component.java:1093) at org.jboss.seam.Component.newInstance(Component.java:1736) ... 54 more
18:46:32,765 INFO [MCKernelAbstraction] installing bean: persistence.units:jar=ims.jar,unitName=ses with dependencies: 18:46:32,781 INFO [MCKernelAbstraction] AbstractDependencyMetaData@8c4b5f{dependency=ses} 18:46:32,843 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=ims,name=AttachementViewAction,service=EJB3 with dependencies: 18:46:33,203 INFO [EJBContainer] STARTED EJB: cz.bpsolutions.ims.services.attachement.AttachementViewAction ejbName: AttachementViewAction 18:46:33,234 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=ims,name=RegisterAction,service=EJB3 with dependencies: 18:46:33,234 INFO [MCKernelAbstraction] AbstractDependencyMetaData@3f5a0{dependency=persistence.units:jar=ims.jar,unitName=ses} 18:46:33,250 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=ims,name=TestAction,service=EJB3 with dependencies: 18:46:33,250 INFO [MCKernelAbstraction] AbstractDependencyMetaData@1f2f60d{dependency=persistence.units:jar=ims.jar,unitName=ses} 18:46:33,250 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=ims,name=InvoiceListAction,service=EJB3 with dependencies: 18:46:33,250 INFO [MCKernelAbstraction] AbstractDependencyMetaData@1669521{dependency=persistence.units:jar=ims.jar,unitName=ses} 18:46:33,281 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=jboss-seam,name=Dispatcher,service=EJB3 with dependencies: 18:46:33,312 INFO [EJBContainer] STARTED EJB: org.jboss.seam.core.Dispatcher ejbName: Dispatcher 18:46:33,328 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=jboss-seam,name=TransactionListener,service=EJB3 with dependencies: 18:46:33,390 INFO [EJBContainer] STARTED EJB: org.jboss.seam.core.TransactionListener ejbName: TransactionListener 18:46:33,406 INFO [Lifecycle] starting up: org.jboss.seam.ui.graphicImage.dynamicImageResource
Know somebody how to solve this ?
M.