Summrizing I have this service class:
@ApplicationScoped
@Path("/hello")
public class Hello {
@Inject
@MyRandom
int randomNumber;
@CentralRepo
@SeamManaged
@RequestScoped
@javax.enterprise.inject.Produces
@PersistenceUnit(unitName = "pu")
EntityManagerFactory centralEmf;
@Inject
@CentralRepo
EntityManager em;
@SuppressWarnings("unchecked")
@GET
@Path("/all")
@Produces(MediaType.APPLICATION_XML)
public List getClichedMessage() {
return em.createQuery("select f from Form f").getResultList();
}
}
And these errors:
[EL Info]: 2011-03-09 18:36:03.901--ServerSession(12594563)--EclipseLink,
version: Eclipse Persistence Services - 2.1.2.v20101206-r8635
[EL Info]: 2011-03-09
18:36:04.277--ServerSession(12594563)--file:/C:/Users/andrea/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Prova3/WEB-INF/classes/_pu
login successful
9-mar-2011 18.36.04 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Servlet.service() for servlet MyServlet threw exception
java.lang.RuntimeException: javax.naming.NamingException: Cannot create
resource instance
at
org.jboss.seam.persistence.transaction.DefaultSeamTransaction.getSeamTransaction(DefaultSeamTransaction.java:153)
at
org.jboss.seam.persistence.transaction.DefaultSeamTransaction.isActive(DefaultSeamTransaction.java:57)
at
org.jboss.seam.persistence.ManagedPersistenceContextProxyHandler.joinTransaction(ManagedPersistenceContextProxyHandler.java:127)
at
org.jboss.seam.persistence.ManagedPersistenceContextProxyHandler.invoke(ManagedPersistenceContextProxyHandler.java:115)
at $Proxy38.createQuery(Unknown Source)
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.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)
at
org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)
at
org.jboss.weld.proxies.SMPC-org$jboss$seam$persistence$ManagedPersistenceContextExtension-servlet$MyServlet$centralEmf[@javax$enterprise$context$RequestScoped()@javax$enterprise$inject$Produces()@javax$persistence$PersistenceUnit(name=,unitName=pu)@org$jboss$seam$persistence$SeamManaged()]_$$_WeldClientProxy.createQuery(SMPC-org$jboss$seam$persistence$ManagedPersistenceContextExtension-servlet$MyServlet$centralEmf[@javax$enterprise$context$RequestScoped()@javax$enterprise$inject$Produces()@javax$persistence$PersistenceUnit(name=,unitName=pu)@org$jboss$seam$persistence$SeamManaged()]_$$_WeldClientProxy.java)
at servlet.MyServlet.doGet(MyServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.naming.NamingException: Cannot create resource instance
at
org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:113)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:152)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at
org.jboss.seam.persistence.transaction.DefaultSeamTransaction.getUserTransaction(DefaultSeamTransaction.java:177)
at
org.jboss.seam.persistence.transaction.DefaultSeamTransaction.createUTTransaction(DefaultSeamTransaction.java:169)
at
org.jboss.seam.persistence.transaction.DefaultSeamTransaction.getSeamTransaction(DefaultSeamTransaction.java:134)
... 26 more
9-mar-2011 18.36.04 org.apache.catalina.core.StandardContextValve invoke
GRAVE: Exception sending request destroyed lifecycle event to listener
instance of class org.jboss.weld.environment.servlet.Listener
java.lang.RuntimeException: javax.naming.NamingException: Cannot create
resource instance
at
org.jboss.seam.persistence.transaction.DefaultSeamTransaction.getSeamTransaction(DefaultSeamTransaction.java:153)
at
org.jboss.seam.persistence.transaction.DefaultSeamTransaction.isActive(DefaultSeamTransaction.java:57)
at
org.jboss.seam.persistence.ManagedPersistenceContextProxyHandler.closeAfterTransaction(ManagedPersistenceContextProxyHandler.java:149)
at
org.jboss.seam.persistence.ManagedPersistenceContextProxyHandler.invoke(ManagedPersistenceContextProxyHandler.java:101)
at $Proxy38.closeAfterTransaction(Unknown Source)
at
org.jboss.seam.persistence.ManagedPersistenceContextBeanLifecycle.destroy(ManagedPersistenceContextBeanLifecycle.java:146)
at
org.jboss.seam.persistence.ManagedPersistenceContextBeanLifecycle.destroy(ManagedPersistenceContextBeanLifecycle.java:47)
at org.jboss.seam.solder.bean.ImmutableBean.destroy(ImmutableBean.java:92)
at
org.jboss.weld.context.ForwardingContextual.destroy(ForwardingContextual.java:34)
at org.jboss.weld.context.AbstractContext.destroy(AbstractContext.java:155)
at org.jboss.weld.context.AbstractContext.destroy(AbstractContext.java:172)
at
org.jboss.weld.context.AbstractManagedContext.deactivate(AbstractManagedContext.java:50)
at
org.jboss.weld.context.AbstractBoundContext.deactivate(AbstractBoundContext.java:82)
at
org.jboss.weld.servlet.WeldListener.requestDestroyed(WeldListener.java:115)
at
org.jboss.weld.servlet.api.helpers.ForwardingServletListener.requestDestroyed(ForwardingServletListener.java:42)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:204)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.naming.NamingException: Cannot create resource instance
at
org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:113)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:152)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at
org.jboss.seam.persistence.transaction.DefaultSeamTransaction.getUserTransaction(DefaultSeamTransaction.java:177)
at
org.jboss.seam.persistence.transaction.DefaultSeamTransaction.createUTTransaction(DefaultSeamTransaction.java:169)
at
org.jboss.seam.persistence.transaction.DefaultSeamTransaction.getSeamTransaction(DefaultSeamTransaction.java:134)
... 23 more
9-mar-2011 18.58.17 org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
9-mar-2011 18.58.18 org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
9-mar-2011 18.58.18 org.apache.catalina.loader.WebappClassLoader
clearThreadLocalMap
GRAVE: The web application [/Prova3] created a ThreadLocal with key of type
[com.sun.xml.bind.v2.ClassFactory$1] (value
[com.sun.xml.bind.v2.ClassFactory$1_at_335297]) and a value of type
[java.util.WeakHashMap] (value [{class
javax.xml.bind.annotation.W3CDomHandler=java.lang.ref.WeakReference_at_17366cb}])
but failed to remove it when the web application was stopped. This is very
likely to create a memory leak.
9-mar-2011 18.58.19 org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Hoping someone help me!
--
View this message in context: http://jersey.576304.n2.nabble.com/Tomcat-6-Jersey-Weld-Seam-3-tp6153390p6154782.html
Sent from the Jersey mailing list archive at Nabble.com.