[
https://issues.jboss.org/browse/SEAMTRANSACTION-7?page=com.atlassian.jira...
]
ratking commented on SEAMTRANSACTION-7:
---------------------------------------
A issue was reported to GlassFish:
http://java.net/jira/browse/GLASSFISH-17800
DefaultSeamTransaction should catch NamingException instead of
NameNotFoundException
------------------------------------------------------------------------------------
Key: SEAMTRANSACTION-7
URL:
https://issues.jboss.org/browse/SEAMTRANSACTION-7
Project: Seam Transaction
Issue Type: Bug
Affects Versions: 3.1.0.Beta4
Environment: Seam 3.1.0.beta4
GlassFish 3.1.1/3.1.2.b10
Weld 1.1.3.Final/1.1.4-SNAPSHOT(build: 2011-11-22)
JDK 1.6.0_29
Windows XP SP3
Reporter: ratking
Assignee: Stuart Douglas
When use SMPC(Seam Managed Persistence Context) within a session bean(stateless or
stateful),
NamingException was thrown from DefaultSeamTransaction line 123 and line 143.
This issue cause the sentence from line 144 to line 154 never been invoked.
DefaultSeamTransaction should catch NamingException instead of NameNotFoundException
(need modify at line 143).
When use SMPC(Seam Managed Persistence Context) within a pojo bean, no exception was
thrown.
In addition, the case that SMPC can't use within session bean should be announced in
the Seam Reference Documentation.
In other word, I found that SMPC is incompatible with SessionBean in GlassFish.
=============
Caused by: java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for
'java:comp/UserTransaction' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is
javax.naming.NameNotFoundException: Lookup of java:comp/UserTransaction not allowed for
Container managed Transaction beans]
at
org.jboss.seam.transaction.DefaultSeamTransaction.getSeamTransaction(DefaultSeamTransaction.java:123)
at
org.jboss.seam.transaction.DefaultSeamTransaction.isActive(DefaultSeamTransaction.java:52)
at
org.jboss.seam.persistence.ManagedPersistenceContextProxyHandler.joinTransaction(ManagedPersistenceContextProxyHandler.java:113)
at
org.jboss.seam.persistence.ManagedPersistenceContextProxyHandler.invoke(ManagedPersistenceContextProxyHandler.java:102)
at $Proxy832.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:44)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105)
at
org.jboss.weld.proxies.EntityManager$FullTextEntityManager$ManagedPersistenceContext$-633155436$Proxy$_$$_WeldClientProxy.createQuery(EntityManager$FullTextEntityManager$ManagedPersistenceContext$-633155436$Proxy$_$$_WeldClientProxy.java)
at com.hantsylabs.seam3sandbox.view.PostHome.getDataModel(PostHome.java:34)
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.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at
org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5382)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
at
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
at
org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:42)
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:861)
at
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at
com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5354)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5342)
at
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
... 84 more
Caused by: javax.naming.NamingException: Lookup failed for
'java:comp/UserTransaction' in
SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is
javax.naming.NameNotFoundException: Lookup of java:comp/UserTransaction not allowed for
Container managed Transaction beans]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:518)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at
org.jboss.seam.transaction.DefaultSeamTransaction.getUserTransaction(DefaultSeamTransaction.java:142)
at
org.jboss.seam.transaction.DefaultSeamTransaction.createUTTransaction(DefaultSeamTransaction.java:136)
at
org.jboss.seam.transaction.DefaultSeamTransaction.getSeamTransaction(DefaultSeamTransaction.java:113)
... 117 more
Caused by: javax.naming.NameNotFoundException: Lookup of java:comp/UserTransaction not
allowed for Container managed Transaction beans
at
com.sun.ejb.containers.BaseContainer.checkUserTransactionLookup(BaseContainer.java:838)
at com.sun.ejb.EjbInvocation.userTransactionLookupAllowed(EjbInvocation.java:427)
at
com.sun.enterprise.transaction.TransactionNamingProxy.checkUserTransactionLookupAllowed(TransactionNamingProxy.java:162)
at
com.sun.enterprise.transaction.TransactionNamingProxy.handle(TransactionNamingProxy.java:135)
at
com.sun.enterprise.naming.impl.NamedNamingObjectManager.tryNamedProxies(NamedNamingObjectManager.java:89)
at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:174)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:498)
... 123 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira