1 Reply Latest reply on Sep 29, 2004 4:05 PM by sal ingrilli

    ERROR: object is not an instance of declaring class

    annapurna Newbie

      Hi,

      I have an entity bean which worked in jboss3.2.5. I moved to jboss-3.2.6RC1 for different reasons, now I am not able to do a create on my entity beans . Rest of the methods work fine. My entity bean is a CMP bean. Please see below for more info. Any help is greatly appreciated.

      Here is the code I am using

      CompanyHome agentHome = (CompanyHome) PortableRemoteObject.narrow(
      ctx.lookup("/Company"), CompanyHome.class);
      CompanyData pd = new CompanyData();
      pd.setCompanyName("checking");
      pd.setModDetails("Adding a new project");
      agentHome.create(pd);

      I am getting the following error

      java.lang.IllegalArgumentException: object is not an instance of declaring class
      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.plugins.cmp.jdbc.keygen.JDBCInformixCreateCommand.executeInsert(JDBCInformixCreateCommand.java:86)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCAbstractCreateCommand.java:286)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:137)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:582)
      at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:203)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)