Bugs item #537990, was opened at 2002-04-01 14:50
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=537990&group_id=22866
Category: JBossCMP
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Dan Bunker (danbunker)
Assigned to: Dain Sundstrom (dsundstrom)
Summary: Nested CMRs Fail
Initial Comment:
When performing a one level CMR, the CMP engine
succeeds. However, if you start relating more than
one table in a nested fashion the CMP engine produces
errors. The test that I ran performed a master -->
detail1 --> detail2 relationship. I can submit these
files if they are needed. The test produced the
following stack trace. I have added additional
debugging code the CMP classes for clarity.
2002-04-01 12:44:20,265 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQue
ry.MEntity.findByPrimaryKey] Executing SQL: SELECT
field1 FROM coM WHERE field1=?
2002-04-01 12:44:20,312 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.MEntity.field1] PrimaryKey:
dms.framework.tests.MEntityPK@35135a, value: 1
2002-04-01 12:44:20,312 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.MEntity.field1] Meta Data: Column Name: field1
2002-04-01 12:44:20,312 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.MEntity.field1] Meta Data: Field Name: field1
2002-04-01 12:44:20,312 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.MEntity.field1] Meta Data: Field Type: int
2002-04-01 12:44:20,312 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.MEntity.field1] Meta Data: PK Field name: field1
2002-04-01 12:44:20,312 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.MEntity.field1] Meta Data: PK Field type: int
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.MEntity] Object PK:
dms.framework.tests.MEntityPK@35135a
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.MEntity] Key Fields:
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge@2fbf49]
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.MEntity] Related Key Fields:
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge@377d92]
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.MEntity] Preload Fields: []
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.MEntity] Relation Table: coD1
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.MEntity] Related Table: coD1
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.MEntity] Key Count: 1
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.MEntity] Do Join: false
2002-04-01 12:44:20,343 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.MEntity] Executing SQL: SELECT field1 FROM coD1 WHERE
(detail1=?)
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D1Entity.field1] PrimaryKey:
dms.framework.tests.D1EntityPK@6bf551, value: 1
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D1Entity.field1] Meta Data: Column Name: field1
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D1Entity.field1] Meta Data: Field Name: field1
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D1Entity.field1] Meta Data: Field Type: int
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D1Entity.field1] Meta Data: PK Field name: field1
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D1Entity.field1] Meta Data: PK Field type: int
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D1Entity.field1] PrimaryKey:
dms.framework.tests.D1EntityPK@2aa392, value: 2
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D1Entity.field1] Meta Data: Column Name: field1
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D1Entity.field1] Meta Data: Field Name: field1
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D1Entity.field1] Meta Data: Field Type: int
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D1Entity.field1] Meta Data: PK Field name: field1
2002-04-01 12:44:20,343 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D1Entity.field1] Meta Data: PK Field type: int
2002-04-01 12:44:20,375 INFO
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.D1Entity] Object PK:
dms.framework.tests.D1EntityPK@6bf551
2002-04-01 12:44:20,375 INFO
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.D1Entity] Key Fields:
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge@591a4d]
2002-04-01 12:44:20,375 INFO
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.D1Entity] Related Key Fields:
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge@4dd63c]
2002-04-01 12:44:20,375 INFO
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.D1Entity] Preload Fields: []
2002-04-01 12:44:20,375 INFO
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.D1Entity] Relation Table: coD2
2002-04-01 12:44:20,375 INFO
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.D1Entity] Related Table: coD2
2002-04-01 12:44:20,375 INFO
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.D1Entity] Key Count: 2
2002-04-01 12:44:20,375 INFO
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.D1Entity] Do Join: false
2002-04-01 12:44:20,375 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand
.D1Entity] Executing SQL: SELECT field1 FROM coD2
WHERE (detail2=?) OR (detail2=?)
2002-04-01 12:44:20,390 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D2Entity.field1] PrimaryKey:
dms.framework.tests.D2EntityPK@4e50a9, value: 1
2002-04-01 12:44:20,390 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D2Entity.field1] Meta Data: Column Name: detail2
2002-04-01 12:44:20,390 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D2Entity.field1] Meta Data: Field Name: field1
2002-04-01 12:44:20,390 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D2Entity.field1] Meta Data: Field Type: int
2002-04-01 12:44:20,390 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D2Entity.field1] Meta Data: PK Field name: field1
2002-04-01 12:44:20,390 INFO
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBr
idge.D2Entity.field1] Meta Data: PK Field type: int
2002-04-01 12:44:20,390 ERROR
[org.jboss.ejb.plugins.LogInterceptor]
TransactionRolledbackException, causedBy:
java.lang.IllegalArgumentException: object is not an
instance of declaring class
at java.lang.reflect.Field.set(Native Method)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFi
eldBridge.setPrimaryKeyValue
(JDBCAbstractCMPFieldBridge.java:166)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFi
eldBridge.loadPrimaryKeyResults
(JDBCAbstractCMPFieldBridge.java:290)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand.
execute(JDBCLoadRelationCommand.java:120)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadRel
ation(JDBCStoreManager.java:472)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridg
e.load(JDBCCMRFieldBridge.java:846)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridg
e.getInstanceValue(JDBCCMRFieldBridge.java:528)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridg
e.getValue(JDBCCMRFieldBridge.java:502)
at
org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocation
Handler.invoke(EntityBridgeInvocationHandler.java:123)
at org.jboss.proxy.compiler.Runtime.invoke
(Runtime.java:55)
at
dms.framework.tests.D1EntityBean$Proxy.getD2s
(<generated>)
at java.lang.reflect.Method.invoke(Native
Method)
at
org.jboss.ejb.EntityContainer$ContainerInterceptor.invo
ke(EntityContainer.java:1135)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.
invoke(JDBCRelationInterceptor.java:184)
at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.
invoke(EntitySynchronizationInterceptor.java:300)
at
org.jboss.resource.connectionmanager.CachedConnectionIn
terceptor.invoke(CachedConnectionInterceptor.java:147)
at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke
(EntityInstanceInterceptor.java:187)
at
org.jboss.ejb.plugins.EntityLockInterceptor.invoke
(EntityLockInterceptor.java:107)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext
(AbstractTxInterceptor.java:96)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransacti
ons(TxInterceptorCMT.java:167)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke
(TxInterceptorCMT.java:61)
at
org.jboss.ejb.plugins.SecurityInterceptor.invoke
(SecurityInterceptor.java:127)
at org.jboss.ejb.plugins.LogInterceptor.invoke
(LogInterceptor.java:166)
at org.jboss.ejb.EntityContainer.invoke
(EntityContainer.java:474)
at
org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.i
nvoke(BaseLocalContainerInvoker.java:307)
at
org.jboss.ejb.plugins.local.BaseLocalContainerInvoker$E
ntityProxy.invoke(BaseLocalContainerInvoker.java:407)
at $Proxy192.getD2s(Unknown Source)
at
dms.framework.tests.MasterDetailSessionBean.getM
(MasterDetailSessionBean.java:51)
at java.lang.reflect.Method.invoke(Native
Method)
at
org.jboss.ejb.StatelessSessionContainer$ContainerInterc
eptor.invoke(StatelessSessionContainer.java:648)
at
org.jboss.resource.connectionmanager.CachedConnectionIn
terceptor.invoke(CachedConnectionInterceptor.java:147)
at
org.jboss.ejb.plugins.StatelessSessionInstanceIntercept
or.invoke(StatelessSessionInstanceInterceptor.java:77)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext
(AbstractTxInterceptor.java:96)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransacti
ons(TxInterceptorCMT.java:167)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke
(TxInterceptorCMT.java:61)
at
org.jboss.ejb.plugins.SecurityInterceptor.invoke
(SecurityInterceptor.java:127)
at org.jboss.ejb.plugins.LogInterceptor.invoke
(LogInterceptor.java:166)
at
org.jboss.ejb.StatelessSessionContainer.invoke
(StatelessSessionContainer.java:308)
at org.jboss.ejb.Container.invoke
(Container.java:681)
at org.jboss.mx.server.MBeanServerImpl.invoke
(MBeanServerImpl.java:441)
at
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke
(JRMPInvoker.java:364)
at java.lang.reflect.Method.invoke(Native
Method)
at sun.rmi.server.UnicastServerRef.dispatch
(UnicastServerRef.java:241)
at sun.rmi.transport.Transport$1.run
(Transport.java:152)
at java.security.AccessController.doPrivileged
(Native Method)
at sun.rmi.transport.Transport.serviceCall
(Transport.java:148)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages
(TCPTransport.java:465)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.ru
n(TCPTransport.java:706)
at java.lang.Thread.run(Thread.java:484)
----------------------------------------------------------------------
Comment By: Leon Doud (ldoud)
Date: 2002-04-11 13:03
Message:
Logged In: YES
user_id=489493
The fix for "536502 CMR Cascade
Delete Fails" appears to have fixed this problem. I can no
longer recreate the error.
----------------------------------------------------------------------
Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-04-11 11:43
Message:
Logged In: YES
user_id=251431
Can you guys check the fix for bug "536502 CMR Cascade
Delete Fails" fixes this? If not, can you tell me the
sequence that recreates this bug.
----------------------------------------------------------------------
Comment By: Leon Doud (ldoud)
Date: 2002-04-10 15:29
Message:
Logged In: YES
user_id=489493
I'm receiving the same error (IllegalArgumentException)
when removing CMRs that are nested.
JDK 1.3 - CVS Head April 1st - Windows 2000
----------------------------------------------------------------------
Comment By: Dan Bunker (danbunker)
Date: 2002-04-10 09:48
Message:
Logged In: YES
user_id=502651
I'm using the cvs head as of april 5th, 2002. I still get
an IllegalArgumentException. I don't see any tests in the
testsuite that test this type of behavior. They are only
one level deep - entity A to B.
----------------------------------------------------------------------
Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-04-09 22:25
Message:
Logged In: YES
user_id=251431
Are you using the beta of CVS? I think I fixes this a
couple of weeks ago, but it is only available in cvs.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=537990&group_id=22866
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development