Bugs item #707014, was opened at 2003-03-20 19:22
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=707014&group_id=22866
Category: JBossCMP
Group: v3.2
Status: Open
Resolution: Accepted
Priority: 5
Submitted By: Simone (milasx)
Assigned to: Alexey Loubyansky (loubyansky)
Summary: JDBCOptimisticLocking NullPointerException on remove
Initial Comment:
I am using 3.2.0 RC3 and have a an entity bean with a
one to many relation with another entity bean. Both
uses Optimistic Locking with modified strategy. They
are tagged for cascade delete and when I do a remove on
the ParentBean I get the following error:
2003-03-20 15:07:25,997 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.MDSVector]
Add finder results: entity=MDSVector results=[11377836,
11377837, 11377838, 11377839, 11377840, 11377841,
11377842, 11377843, 11377844, 11377845, 11377846,
11377847, 11377848, 11377849, 11377850, 11377851,
11377852, 11377853, 11377854, 11377855, 11377856,
11377857, 11377858, 11377859, 11377860, 11377861,
11377862, 11377863, 11377864, 11377865, 11377866,
11377867, 11377868, 11377869, 11377870, 11377871,
11377872, 11377873, 11377874, 11377875, 11377876,
11377877, 11377878, 11377879, 11377880, 11377881,
11377882, 11377883, 11377884, 11377885, 11377886,
11377887, 11377888, 11377889, 11377890, 11377891,
11377892, 11377893, 11377894, 11377895, 11377896,
11377897, 11377898, 11377899, 11377900, 11377901,
11377902, 11377903, 11377904, 11377905]
readahead=[JDBCReadAheadMetaData : strategy=on-load,
pageSize=1000, eagerLoadGroup=*]
2003-03-20 15:07:25,997 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.MDSVector]
Removing dereferenced results: [11377836, 11377837,
11377838, 11377839, 11377840, 11377841, 11377842,
11377843, 11377844, 11377845, 11377846, 11377847,
11377848, 11377849, 11377850, 11377851, 11377852,
11377853, 11377854, 11377855, 11377856, 11377857,
11377858, 11377859, 11377860, 11377861, 11377862,
11377863, 11377864, 11377865, 11377866, 11377867,
11377868, 11377869, 11377870, 11377871, 11377872,
11377873, 11377874, 11377875, 11377876, 11377877,
11377878, 11377879, 11377880, 11377881, 11377882,
11377883, 11377884, 11377885, 11377886, 11377887,
11377888, 11377889, 11377890, 11377891, 11377892,
11377893, 11377894, 11377895, 11377896, 11377897,
11377898, 11377899, 11377900, 11377901, 11377902,
11377903, 11377904, 11377905]
2003-03-20 15:07:26,012 TRACE
[org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor]
invokerBInding is null in ProxyFactoryFinder
2003-03-20 15:07:26,012 TRACE
[org.jboss.ejb.plugins.LogInterceptor] Start method=<no
method>
2003-03-20 15:07:26,012 TRACE
[org.jboss.ejb.plugins.TxInterceptorCMT] Current
transaction in MI is TransactionImpl:XidImpl
[FormatId=257, GlobalId=dblon34056//10, BranchQual=]
2003-03-20 15:07:26,012 TRACE
[org.jboss.ejb.plugins.TxInterceptorCMT] TX_SUPPORTS
for <no method>
2003-03-20 15:07:26,012 TRACE
[org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in
with tx TransactionImpl:XidImpl [FormatId=257,
GlobalId=dblon34056//10, BranchQual=]
2003-03-20 15:07:26,012 TRACE
[org.jboss.ejb.plugins.EntityLockInterceptor] Begin
invoke, key=11377836
2003-03-20 15:07:26,012 TRACE
[org.jboss.ejb.plugins.EntityInstancePool] Get instance
[EMAIL PROTECTED]
com.db.jbozz.ejb.entity.mds.MDSVectorCMP
2003-03-20 15:07:26,012 TRACE
[org.jboss.ejb.plugins.EntityLockInterceptor] End
invoke, key=11377836
2003-03-20 15:07:26,012 ERROR
[org.jboss.ejb.plugins.LogInterceptor]
TransactionRolledbackLocalException, causedBy:
java.lang.NullPointerException
at
org.jboss.ejb.plugins.lock.JDBCOptimisticLock.schedule(JDBCOptimisticLock.java:643)
at
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:103)
at
org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:69)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:108)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:273)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:154)
at
org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:483)
at org.jboss.ejb.Container.invoke(Container.java:652)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.invokeRemoveRelation(JDBCCMRFieldBridge.java:866)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.destroyRelationLinks(JDBCCMRFieldBridge.java:761)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.destroyRelationLinks(JDBCCMRFieldBridge.java:739)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setInstanceValue(JDBCCMRFieldBridge.java:653)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCRemoveEntityCommand.removeFromRelations(JDBCRemoveEntityCommand.java:134)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCRemoveEntityCommand.execute(JDBCRemoveEntityCommand.java:69)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.removeEntity(JDBCStoreManager.java:757)
at
org.jboss.ejb.plugins.CMPPersistenceManager.removeEntity(CMPPersistenceManager.java:518)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.removeEntity(CachedConnectionInterceptor.java:431)
at
org.jboss.ejb.EntityContainer.remove(EntityContainer.java:497)
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:324)
at
org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1032)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:95)
at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:303)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
at
org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:91)
----------------------------------------------------------------------
>Comment By: Alexey Loubyansky (loubyansky)
Date: 2003-03-24 21:36
Message:
Logged In: YES
user_id=543482
Just commited the changes. Could you retry please with
current CVS version?
thanks,
alex
----------------------------------------------------------------------
Comment By: Simone (milasx)
Date: 2003-03-24 19:48
Message:
Logged In: YES
user_id=698828
Hi Alex,
Thanks for looking into it. Currently with RC4 and
optimistic locking (modified and Timestamp starategies
tested) the error is as follow:
2003-03-24 17:28:46,191 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.MDSVector]
RESET PERSISTENCE CONTEXT: id=11392832
2003-03-24 17:28:46,191 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.MDSVector]
load data: entity=MDSVector pk=11392832
2003-03-24 17:28:46,191 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.MDSVector] No
preload data found: entity=MDSVector pk=11392832
2003-03-24 17:28:46,191 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.MDSVector]
Default eager-load for entity: readahead=null
2003-03-24 17:28:46,191 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.MDSVector]
Executing SQL: SELECT MV_ADDITIONAL_INFO, MV_ID, MV_SEQ_NO,
MV_SPREAD, MV_VALUE, MV_VALUE_TYPE, MV_MDS_ID FROM
MDS_VECTOR WHERE (MV_KEY=?)
2003-03-24 17:28:46,191 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.MDSVector.mVKey]
Set parameter: index=1, jdbcType=NUMERIC, value=11392832
2003-03-24 17:28:46,191 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.MDSVector.additionalInfo]
Get result: index=1, javaType=java.lang.String, Simple,
value=null
2003-03-24 17:28:46,191 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.MDSVector.iD]
Get result: index=2, javaType=java.lang.String, Simple,
value=null
2003-03-24 17:28:46,191 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.MDSVector.seqNo]
Get result: index=3, javaType=java.lang.Short, Simple,
value=null
2003-03-24 17:28:46,191 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.MDSVector.spread]
Get result: index=4, javaType=java.lang.Double, Simple,
value=0.0
2003-03-24 17:28:46,191 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.MDSVector.value]
Get result: index=5, javaType=java.lang.Double, Simple,
value=2.0
2003-03-24 17:28:46,191 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.MDSVector.valueType]
Get result: index=6, javaType=java.lang.String, Simple,
value=C
2003-03-24 17:28:46,191 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.MDSVector.mDSId]
Get result: index=7, javaType=java.lang.Long, Simple,
value=2276558
2003-03-24 17:28:46,191 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.MDSVector]
Remove relation: field=mDSKeyVector id=11392832
relatedId=2276558
2003-03-24 17:28:46,191 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.MDSVector]
Executing SQL: UPDATE MDS_VECTOR SET MV_MDS_ID=? WHERE
MV_KEY=? AND MV_MDS_ID=?
2003-03-24 17:28:46,191 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.MDSVector.mDSId]
Set parameter: index=1, jdbcType=NUMERIC, value=NULL
2003-03-24 17:28:46,191 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.MDSVector.mVKey]
Set parameter: index=2, jdbcType=NUMERIC, value=11392832
2003-03-24 17:28:46,191 TRACE
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.MDSVector.mDSId]
Set parameter: index=3, jdbcType=NUMERIC, value=NULL
Thanks!
Simone
----------------------------------------------------------------------
Comment By: Alexey Loubyansky (loubyansky)
Date: 2003-03-24 19:04
Message:
Logged In: YES
user_id=543482
Unfortunately, I found the stacktrace not corresponding to the
current source code. But I did see the problem with CMR
fields with foreign key fields (like in your case).
I don't know, though, the reason for NPE.
I fixed the problem I've found. As soon as I am able, I'll
commit the fix.
Thanks,
alex
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=707014&group_id=22866
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development