Please help! Load failed
banigreyling Jan 9, 2002 9:05 AMWhen I try to delete a record from the database, I do a lookup (findByPrimaryKey) and then call remoteInterface.remove(). This should work, but I get the following stack trace. Surely I am just missing something! Can someone give me a couple of things I can try to resolve this error in my code.
[GenesisUserAccount] Activated bean GenesisUserAccount with id = GenesisUserAccount: PIETSAK , W10825
[JAWS] Load command executing: SELECT dbo.GenesisUserAccount.userId,dbo.GenesisUserAccount.account
No,dbo.GenesngType,dbo.GenesisUserAccount.authorisedDate,dbo.GenesisUser
Account.corporateAccount,dbo.GenesisUserAccount.acsUserAccount.requestedDate FROM dbo.GenesisUserAccount
WHERE userId=? AND accountNo=?
[GenesisUserAccount] 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
[GenesisUserAccount] java.rmi.ServerException: Load failed; nested exception is:
[GenesisUserAccount] java.lang.IllegalArgumentException: object is not an instance of declaring class
[GenesisUserAccount] java.lang.IllegalArgumentException: object is not an instance of declaring class
[GenesisUserAccount] at java.lang.reflect.Field.get(Native Method)
[GenesisUserAccount] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getPkFieldValue(JDBCCommand.java:663)
[GenesisUserAccount] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.setPrimaryKeyParameters(JDBCCommand.jav
[GenesisUserAccount] at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.setParameters(JDBCLoadEntityC
[GenesisUserAccount] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:159)
[GenesisUserAccount] at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand
[GenesisUserAccount] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity(JAWSPersistenceManager
[GenesisUserAccount] at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:3
[GenesisUserAccount] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronization)
[GenesisUserAccount] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.ja
[GenesisUserAccount] at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:271)
[GenesisUserAccount] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:265)
[GenesisUserAccount] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:61
[GenesisUserAccount] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:197)
[GenesisUserAccount] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)
[GenesisUserAccount] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
[GenesisUserAccount] at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:427)
[GenesisUserAccount] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.
[GenesisUserAccount] at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.jav
[GenesisUserAccount] at org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke(EntityProxy.java:133)
[GenesisUserAccount] at $Proxy74.remove(Unknown Source)
The piece of code where the problem starts
GenesisUserAccountRemote genesisUserAccountRemote = genesisUserAcctHome.
findByPrimaryKey(
new GenesisUserAccountPK(
accountApplication.UserId,accountApplication.AccountNo));
genesisUserAccountRemote.remove(); <--- This line throws exception
I am running JBoss 2.4.3 against SQL Server2000