-
1. Re: NoSuchEntityException - Transaction problem? (Migration 4.0.5.GA to 7.1.2.Final)
mac2009 Jul 5, 2012 6:05 AM (in response to mac2009)Strange....discussion editor hang up...
Back to topic:
Do you need more information?
-
2. Re: NoSuchEntityException - Transaction problem? (Migration 4.0.5.GA to 7.1.2.Final)
jaikiran Jul 5, 2012 9:29 AM (in response to mac2009)Please post the entire exception stacktrace.
-
3. Re: NoSuchEntityException - Transaction problem? (Migration 4.0.5.GA to 7.1.2.Final)
mac2009 Jul 11, 2012 4:33 AM (in response to jaikiran)Well, changed logging to debug level. Stacktrace is very long. I hope this part gives you an idea
16:33:39,839 DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (http-localhost/127.0.0.1:8080-2) MdtdbDS: returnConnection(1bdaff2, false) [8/18]
16:33:39,932 DEBUG [org.jboss.as.cmp.jdbc.JDBCCreateEntityCommand.OBToken] (http-localhost/127.0.0.1:8080-2) Executing SQL: SELECT COUNT(*) FROM OBTOKEN WHERE token=?
16:33:39,932 DEBUG [org.jboss.as.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.OBToken#token] (http-localhost/127.0.0.1:8080-2) param: i=1, type=VARCHAR, value=1341498819932-NBMANEG1XP-1
16:33:40,010 DEBUG [org.jboss.as.cmp.jdbc.JDBCCreateEntityCommand.OBToken] (http-localhost/127.0.0.1:8080-2) Executing SQL: INSERT INTO OBTOKEN (token, stammNr, personNr, login, userid, sessionStart, sessionTimeout, sessionEnd, system, sessionIdTomcat) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
16:33:40,010 DEBUG [org.jboss.as.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.OBToken#token] (http-localhost/127.0.0.1:8080-2) param: i=1, type=VARCHAR, value=1341498819932-NBMANEG1XP-1
16:33:40,056 DEBUG [org.jboss.as.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.OBToken#stammNr] (http-localhost/127.0.0.1:8080-2) param: i=2, type=BIGINT, value=1111111
16:33:40,056 DEBUG [org.jboss.as.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.OBToken#personNr] (http-localhost/127.0.0.1:8080-2) param: i=3, type=BIGINT, value=1111111
16:33:40,056 DEBUG [org.jboss.as.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.OBToken#login] (http-localhost/127.0.0.1:8080-2) param: i=4, type=VARCHAR, value=1111111A
16:33:40,056 DEBUG [org.jboss.as.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.OBToken#userid] (http-localhost/127.0.0.1:8080-2) param: i=5, type=VARCHAR, value=1111111A
16:33:40,056 DEBUG [org.jboss.as.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.OBToken#sessionStart] (http-localhost/127.0.0.1:8080-2) param: i=6, type=TIMESTAMP, value=2012-07-05 16:33:39.932
16:33:40,056 DEBUG [org.jboss.as.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.OBToken#sessionTimeout] (http-localhost/127.0.0.1:8080-2) param: i=7, type=TIMESTAMP, value=2012-07-05 18:13:39.932
16:33:40,056 DEBUG [org.jboss.as.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.OBToken#sessionEnd] (http-localhost/127.0.0.1:8080-2) param: i=8, type=TIMESTAMP, value=NULL
16:33:40,056 DEBUG [org.jboss.as.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.OBToken#system] (http-localhost/127.0.0.1:8080-2) param: i=9, type=VARCHAR, value=html
16:33:40,056 DEBUG [org.jboss.as.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.OBToken#sessionIdTomcat] (http-localhost/127.0.0.1:8080-2) param: i=10, type=VARCHAR, value=G3yx7KrefZiTlTmw8Pa5CtBu
16:33:48,531 DEBUG [org.jboss.as.cmp.jdbc.JDBCLoadEntityCommand.OBToken] (http-localhost/127.0.0.1:8080-2) Executing SQL: SELECT stammNr, personNr, login, userid, sessionStart, sessionTimeout, sessionEnd, system, sessionIdTomcat FROM OBTOKEN WHERE (token=?)
16:33:48,531 DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (http-localhost/127.0.0.1:8080-2) MdtdbDS: getConnection(null, WrappedConnectionRequestInfo@de38[userName=dtinst]) [8/19]
16:33:48,546 DEBUG [org.jboss.as.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.OBToken#token] (http-localhost/127.0.0.1:8080-2) param: i=1, type=VARCHAR, value=1341498819932-NBMANEG1XP-1
16:33:48,780 DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (http-localhost/127.0.0.1:8080-2) MdtdbDS: returnConnection(1bdaff2, false) [8/18]
16:33:48,780 ERROR [org.jboss.as.ejb3.invocation] (http-localhost/127.0.0.1:8080-2) JBAS014134: EJB Invocation failed on component OBToken for method public abstract com.customer.myapp.cmp.interfaces.OBTokenData com.direkt1822.joba.cmp.interfaces.OBTokenLocal.getData(): javax.ejb.NoSuchEntityException: JBAS010748: Entity nicht gefunden: primaryKey=1341498819932-NBMANEG1XP-1
at org.jboss.as.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:216) [jboss-as-cmp-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.as.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:84) [jboss-as-cmp-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.as.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:453) [jboss-as-cmp-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.as.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:438) [jboss-as-cmp-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.as.cmp.component.interceptors.CmpEntityBeanSynchronizationInterceptor.processInvocation(CmpEntityBeanSynchronizationInterceptor.java:53) [jboss-as-cmp-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.as.ejb3.component.entity.interceptors.EntityBeanAssociatingInterceptor.processInvocation(EntityBeanAssociatingInterceptor.java:79) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:227) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:327) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:191) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:42) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.as.ejb3.component.interceptors.EjbExceptionTransformingInterceptorFactories$2.processInvocation(EjbExceptionTransformingInterceptorFactories.java:89) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:176) [jboss-as-ee-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.as.ejb3.component.entity.interceptors.EntityBeanPrimaryKeyInterceptor.processInvocation(EntityBeanPrimaryKeyInterceptor.java:52) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at com.customer.myapp.cmp.interfaces.OBTokenLocal$$$view366.getData(Unknown Source) [joba-ejb-4.3.0-SNAPSHOT.jar:]
at com.customer.myapp.authob.util.SessionUtil.newSession(SessionUtil.java:59) [joba-ejb-4.3.0-SNAPSHOT.jar:]
-
4. Re: NoSuchEntityException - Transaction problem? (Migration 4.0.5.GA to 7.1.2.Final)
mac2009 Jul 5, 2012 10:50 AM (in response to mac2009)Just by the way, this sounds similiar
https://community.jboss.org/message/728546#728546 "EJB 2.1 BMP with CMT and RequiresNew in JBoss AS 7.1.0 Final"
I tried his solution but it doesn't change/fix my problem.
-
5. Re: NoSuchEntityException - Transaction problem? (Migration 4.0.5.GA to 7.1.2.Final)
mac2009 Jul 5, 2012 11:24 AM (in response to mac2009)Additional info, don't know if important or not. In jboss.xml (which is ignored) we had
<container-configurations>
<container-configuration extends="Clustered CMP 2.x EntityBean">
<container-name>Clustered CMP 2.x EntityBean (shared)</container-name>
<commit-option>C</commit-option>
</container-configuration>
</container-configurations>
How to migrate this or not necessary for JBoss 7?
-
6. Re: NoSuchEntityException - Transaction problem? (Migration 4.0.5.GA to 7.1.2.Final)
mac2009 Jul 6, 2012 11:39 AM (in response to mac2009)Hello jaikiran and all the others,
any idea?
This is a migration show stopper.
Maybe someone can post an example of how to configure Entity Beans (EJB 2.1) for JBoss 7.1
or tell me a link where I can find these infos.
Points I am thinking about?
- any additional configuration required in standalone-full.xml for transaction handling?
- what about jboss.xml? Just rename to jboss-ejb3.xml?
- how does <ejb-local-ref> (ejb-jar.xml) should look like?
- ...
Thanks a lot for any hint.
Carsten
-
7. Re: NoSuchEntityException - Transaction problem? (Migration 4.0.5.GA to 7.1.2.Final)
jaikiran Jul 8, 2012 3:30 AM (in response to mac2009)Would you be able to attach a sample application which reproduces this issue and explain a bit on how to run that application?
-
8. Re: NoSuchEntityException - Transaction problem? (Migration 4.0.5.GA to 7.1.2.Final)
mac2009 Jul 9, 2012 9:50 AM (in response to jaikiran)Hello Jaikiran,
thats quite difficult, due to size of application and security reasons (customer data).
But maybe not necessary as I found out its a problem of container configuration in ejb-jar.xml.
In my initial post to this discussion:
In ejb-jar.xml the container transaction looks like
<container-transaction >
<method >
<ejb-name>OBToken</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>RequiresNew</trans-attribute>
</container-transaction>
This is generated by xdoclet with the class level tag @ejb.transaction type="RequiresNew".
But obviously JBoss 7 don't like the <method-name>*</method-name> or prefers to get method level transaction configuration like this
<container-transaction >
<method >
<ejb-name>OBToken</ejb-name>
<method-intf>LocalHome</method-intf>
<method-name>create</method-name>
<method-params>
<method-param>java.lang.Long</method-param>
<method-param>java.lang.Long</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</method>
<trans-attribute>RequiresNew</trans-attribute>
</container-transaction>
Generated with xdoclet method level tag @ejb.transaction type="RequiresNew".
Using this transaction configuration problem is solved.
So, is this an issue?
At least a workaround is found and afterwards the same as
"EJB 2.1 BMP with CMT and RequiresNew in JBoss AS 7.1.0 Final" https://community.jboss.org/message/728546#728546
(maybe I put something wrong when tried this the first time).
Cheers
Carsten
-
9. Re: NoSuchEntityException - Transaction problem? (Migration 4.0.5.GA to 7.1.2.Final)
jaikiran Jul 9, 2012 10:03 AM (in response to mac2009)That workaround shouldn't be necessary. If this is still reproducible against latest upstream then please file a JIRA under EJB component.
-
10. Re: NoSuchEntityException - Transaction problem? (Migration 4.0.5.GA to 7.1.2.Final)
mac2009 Jul 11, 2012 4:31 AM (in response to jaikiran)Hello Jaikiran,
its still reproducable. Will file a JIRA issue.
10:27:46,399 ERROR [org.jboss.as.ejb3.invocation] (http-localhost/127.0.0.1:8080-1) JBAS014134: EJB Invocation failed on component OBToken for method public abstract java.lang.String com.customer.myapp.cmp.interfaces.OBTokenLocal.getToken(): javax.ejb.NoSuchEntityException: JBAS010748: Entity nicht gefunden: primaryKey=1341995266055-NBMANEG1XP-1
at org.jboss.as.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:216) [jboss-as-cmp-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
at org.jboss.as.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:84) [jboss-as-cmp-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
at org.jboss.as.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:453) [jboss-as-cmp-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
at org.jboss.as.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:438) [jboss-as-cmp-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
at org.jboss.as.cmp.component.CmpEntityBeanComponentInstance.reload(CmpEntityBeanComponentInstance.java:107) [jboss-as-cmp-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
at org.jboss.as.cmp.component.interceptors.CmpEntityBeanSynchronizationInterceptor.processInvocation(CmpEntityBeanSynchronizationInterceptor.java:56) [jboss-as-cmp-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]