Here are some more specifics to the problem:

// CASE 1: Doing the following throws a an exception
TradingPartner tp = home.findByPrimaryKey(pk);
tp.remove();

// CASE 2: But if do this every thing is OK
TradingPartner tp = home.findByPrimaryKey(pk);
tp.getData();
tp.remove();

Here's the stack trace that I get with CASE 1:

[JAWS] Load command executing: SELECT 
DISP.TRADINGPARTNER.TPID,DISP.TRADINGPARTNER.UPDATETS,DISP.TRADINGPARTNER.UPDATEUSERID,DISP.TRADIN
[disp/TradingPartner] TRANSACTION ROLLBACK EXCEPTION:Load failed; nested 
exception is:
        java.lang.IllegalArgumentException: object is not an instance of 
declaring class; nested exception is:
        java.rmi.ServerException: Load failed; nested exception is:
        java.lang.IllegalArgumentException: object is not an instance of 
declaring class
[disp/TradingPartner] java.rmi.ServerException: Load failed; nested 
exception is:
[disp/TradingPartner]   java.lang.IllegalArgumentException: object is not an 
instance of declaring class
[disp/TradingPartner] java.lang.IllegalArgumentException: object is not an 
instance of declaring class
[disp/TradingPartner]   at java.lang.reflect.Field.get(Native Method)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getPkFieldValue(JDBCCommand.java:663)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.setPrimaryKeyParameters(JDBCCommand.java:364)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.setParameters(JDBCLoadEntityCommand.java:163)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:159)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:147)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity(JAWSPersistenceManager.java:156)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:365)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:263)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:253)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:298)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
[disp/TradingPartner]   at 
org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:349)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:480)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:335)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke(EntityProxy.java:133)
[disp/TradingPartner]   at $Proxy63.remove(Unknown Source)
[disp/TradingPartner]   at 
com.commercequest.disp.servlet.TradingPartnerServlet.doEJBDelete(Unknown 
Source)
[disp/TradingPartner]   at 
com.commercequest.disp.servlet.TradingPartnerServlet.service(Unknown Source)
.....

Regards,
Hiram

>From: "Hiram Chirino" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: RE: [JBoss-dev] Any problems vith the cache in 2.4?
>Date: Tue, 10 Jul 2001 01:10:58 -0400
>
>
>Talking about spooky cache problems, I've run into this problem:
>
>I disable the cache by using the 'NoPassivationCachePolicy' and Commit
>option 'C'.  I create a new bean instance.  Later I try to remove it but I
>fail (If you guys want, I'll get you guys a stack trace).  I am workin
>around the problem by loading the bean first by reading some of the values
>of the fields before I do the remove().  Seems to me like a cache problem
>since reading some fields makes it happy again.
>
>Anybody run into this??
>
>Regards,
>Hiram
>
>>From: "marc fleury" <[EMAIL PROTECTED]>
>>Reply-To: [EMAIL PROTECTED]
>>To: <[EMAIL PROTECTED]>
>>Subject: RE: [JBoss-dev] Any problems vith the cache in 2.4?
>>Date: Fri, 6 Jul 2001 08:28:18 -0400
>>
>>
>>
>>|-----Original Message-----
>>|From: [EMAIL PROTECTED]
>>|[mailto:[EMAIL PROTECTED]]On Behalf Of
>>|Lennart Petersson
>>|Sent: Friday, July 06, 2001 4:21 AM
>>|To: [EMAIL PROTECTED]
>>|Subject: SV: [JBoss-dev] Any problems vith the cache in 2.4?
>>|
>>|
>>|Hi! Problem 1 solved by you Vincent - that was the missing
>>|toString() method in the PK class (Should that really matter, why
>>|are JBoss using it in the cache?).
>>
>>that is not correct, we create a "safe" cache key so something is really
>>spooky
>>
>>marcf
>>
>>|
>>|Problem 2 was no problem, it was the old EJBDoclet passivate bug.
>>|The erroneous component was not regenerated with a corrected
>>|EJBDoclet (it was not my component :)
>>|
>>|So that mean that all you guys can keep on with 3.0 :-)
>>|
>>|THANKS!
>>|
>>|/Lennart
>>|
>>|----- Original Message -----
>>|From: Vincent Harcq <[EMAIL PROTECTED]>
>>|To: <[EMAIL PROTECTED]>
>>|Sent: Friday, July 06, 2001 9:05 AM
>>|Subject: RE: [JBoss-dev] Any problems vith the cache in 2.4?
>>|
>>|
>>|> Can you try this:
>>|> 1. Solution 1
>>|> Add a toString to your PK (hack entitypk.j).
>>|> Also put your Cache size very high.
>>|> And your overager periods very high as well.
>>|> 2. Solution 2.
>>|> Set your cache size to 1/1 (min/max)
>>|>
>>|> Let us know please.
>>|> Vincent.
>>|>
>>|
>>|
>>|
>>|_______________________________________________
>>|Jboss-development mailing list
>>|[EMAIL PROTECTED]
>>|http://lists.sourceforge.net/lists/listinfo/jboss-development
>>
>>
>>
>>_______________________________________________
>>Jboss-development mailing list
>>[EMAIL PROTECTED]
>>http://lists.sourceforge.net/lists/listinfo/jboss-development
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
>_______________________________________________
>Jboss-development mailing list
>[EMAIL PROTECTED]
>http://lists.sourceforge.net/lists/listinfo/jboss-development

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to