[
https://issues.jboss.org/browse/SEAMPERSIST-60?page=com.atlassian.jira.pl...
]
Timo Nolte commented on SEAMPERSIST-60:
---------------------------------------
Same Problem.
DefaultSeamTransaction using the comp namespace for JNDI lookup
causes failure in AS7 when transaction fails
------------------------------------------------------------------------------------------------------------
Key: SEAMPERSIST-60
URL:
https://issues.jboss.org/browse/SEAMPERSIST-60
Project: Seam Persistence
Issue Type: Bug
Affects Versions: 3.0.0.Final
Environment: 3.0.1.SNAPSHOT
Reporter: Andrew Wheeler
When closing a transaction the DefaultSeamTransaction.getUserTransaction() looks up the
transaction using the comp namespace. This fails when using AS7. This only appears to
occur when the transaction is rolled back with a persistence error from the datasource; in
this case a not null constraint was violated. I guess regardless of the cause it is
looking up the transaction from java:comp which seems to no longer be supported. The
application will persist fine under normal circumstances when using 3.0.1.SNAPSHOT.
Error stack is as follows:
ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host]]
(http--127.0.0.1-8080-7) Exception sending request destroyed lifecycle event to listener
instance of class org.jboss.weld.servlet.WeldListener: java.lang.RuntimeException:
javax.naming.NamingException: Failed to get context with name comp
at
org.jboss.seam.transaction.DefaultSeamTransaction.getSeamTransaction(DefaultSeamTransaction.java:123)
[seam-persistence-3.0.1-SNAPSHOT.jar:]
at
org.jboss.seam.transaction.DefaultSeamTransaction.isActive(DefaultSeamTransaction.java:52)
[seam-persistence-3.0.1-SNAPSHOT.jar:]
at
org.jboss.seam.persistence.ManagedPersistenceContextProxyHandler.closeAfterTransaction(ManagedPersistenceContextProxyHandler.java:130)
[seam-persistence-3.0.1-SNAPSHOT.jar:]
at
org.jboss.seam.persistence.ManagedPersistenceContextProxyHandler.invoke(ManagedPersistenceContextProxyHandler.java:91)
[seam-persistence-3.0.1-SNAPSHOT.jar:]
at $Proxy325.closeAfterTransaction(Unknown Source) at
org.jboss.seam.persistence.ManagedPersistenceContextBeanLifecycle.destroy(ManagedPersistenceContextBeanLifecycle.java:125)
[seam-persistence-3.0.1-SNAPSHOT.jar:]
at
org.jboss.seam.persistence.ManagedPersistenceContextBeanLifecycle.destroy(ManagedPersistenceContextBeanLifecycle.java:45)
[seam-persistence-3.0.1-SNAPSHOT.jar:]
at org.jboss.seam.solder.bean.ImmutableBean.destroy(ImmutableBean.java:92)
[seam-solder-3.0.0.Final.jar:]
at org.jboss.weld.context.ForwardingContextual.destroy(ForwardingContextual.java:34)
[weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.context.AbstractContext.destroy(AbstractContext.java:156)
[weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.context.AbstractContext.destroy(AbstractContext.java:173)
[weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at
org.jboss.weld.context.AbstractConversationContext.deactivate(AbstractConversationContext.java:218)
[weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.jboss.weld.servlet.WeldListener.requestDestroyed(WeldListener.java:125)
[weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
[jbossweb-7.0.0.CR4.jar:7.0.0.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[jbossweb-7.0.0.CR4.jar:7.0.0.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[jbossweb-7.0.0.CR4.jar:7.0.0.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
[jbossweb-7.0.0.CR4.jar:7.0.0.Final]
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:893)
[jbossweb-7.0.0.CR4.jar:7.0.0.Final]
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:626)
[jbossweb-7.0.0.CR4.jar:7.0.0.Final]
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2054)
[jbossweb-7.0.0.CR4.jar:7.0.0.Final]
at java.lang.Thread.run(Thread.java:636) [:1.6.0_20]
Caused by: javax.naming.NamingException: Failed to get context with name comp
at
org.jboss.as.naming.context.NamespaceObjectFactory.getObjectInstance(NamespaceObjectFactory.java:71)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:300) [:1.6.0_20]
at javax.naming.spi.NamingManager.getContext(NamingManager.java:439) [:1.6.0_20]
at javax.naming.spi.ContinuationContext.getTargetContext(ContinuationContext.java:55)
[:1.6.0_20]
at javax.naming.spi.NamingManager.getContinuationContext(NamingManager.java:787)
[:1.6.0_20]
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:175)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:207)
at javax.naming.InitialContext.lookup(InitialContext.java:409) [:1.6.0_20]
at
org.jboss.seam.transaction.DefaultSeamTransaction.getUserTransaction(DefaultSeamTransaction.java:142)
[seam-persistence-3.0.1-SNAPSHOT.jar:]
at
org.jboss.seam.transaction.DefaultSeamTransaction.createUTTransaction(DefaultSeamTransaction.java:136)
[seam-persistence-3.0.1-SNAPSHOT.jar:]
at
org.jboss.seam.transaction.DefaultSeamTransaction.getSeamTransaction(DefaultSeamTransaction.java:113)
[seam-persistence-3.0.1-SNAPSHOT.jar:]
... 20 more
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira