5 Replies Latest reply on Mar 22, 2002 10:47 AM by Dain Sundstrom

    Relationship error

    John Newbie

      I create three entity beans:
      one is Comapany(primary key Company ID),
      one is Category and
      one is Product.
      relationship between Company and Category is one-many,
      Category and Product is one-many many

      I can successful to add data to company ,category and product, also I can add category to company using
      collection getCategories().add(category).

      but failed to add a product to a category.

      follwing are debug info:

      002-03-21 10:32:43,432 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.ProductEJB] Executing SQL: SELECT COUNT(*) FROM ProductEJB WHERE ProductID=?
      2002-03-21 10:32:43,462 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.ProductEJB.ProductID] Set parameter: index=1, jdbcType=VARCHAR, value=1
      2002-03-21 10:32:43,482 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.ProductEJB] Executing SQL: INSERT INTO ProductEJB (ProductID, ProductName, QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued, Category) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
      2002-03-21 10:32:43,482 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.ProductEJB.ProductID] Set parameter: index=1, jdbcType=VARCHAR, value=1
      2002-03-21 10:32:43,482 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.ProductEJB.ProductName] Set parameter: index=2, jdbcType=VARCHAR, value=TV
      2002-03-21 10:32:43,482 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.ProductEJB.QuantityPerUnit] Set parameter: index=3, jdbcType=BIGINT, value=10
      2002-03-21 10:32:43,482 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.ProductEJB.UnitPrice] Set parameter: index=4, jdbcType=DOUBLE, value=24000.12
      2002-03-21 10:32:43,482 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.ProductEJB.UnitsInStock] Set parameter: index=5, jdbcType=BIGINT, value=5
      2002-03-21 10:32:43,482 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.ProductEJB.UnitsOnOrder] Set parameter: index=6, jdbcType=BIGINT, value=6
      2002-03-21 10:32:43,482 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.ProductEJB.ReorderLevel] Set parameter: index=7, jdbcType=VARCHAR, value=10
      2002-03-21 10:32:43,482 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.ProductEJB.Discontinued] Set parameter: index=8, jdbcType=VARCHAR, value=0
      2002-03-21 10:32:43,482 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.ProductEJB.CategoryID] Set parameter: index=9, jdbcType=VARCHAR, value=NULL
      2002-03-21 10:32:43,482 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.ProductEJB] Create: Rows affected = 1
      2002-03-21 10:32:43,512 TRACE [org.jboss.ejb.plugins.EntitySynchronizationInterceptor] register, ctx=org.jboss.ejb.EntityEnterpriseContext@2f7cfe, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=myserver//1, BranchQual=]
      2002-03-21 10:32:43,522 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT: In finally
      2002-03-21 10:32:43,522 TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=create
      2002-03-21 10:32:43,522 INFO [Default] create product 11Success
      2002-03-21 10:32:43,522 TRACE [org.jboss.ejb.plugins.LogInterceptor] Start method=findByPrimaryKey
      2002-03-21 10:32:43,522 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is TransactionImpl:XidImpl [FormatId=257, GlobalId=myserver//1, BranchQual=]
      2002-03-21 10:32:43,522 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for findByPrimaryKey
      2002-03-21 10:32:43,522 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx TransactionImpl:XidImpl [FormatId=257, GlobalId=myserver//1, BranchQual=]
      2002-03-21 10:32:43,522 TRACE [org.jboss.ejb.plugins.EntityInstancePool] Get instance org.jboss.ejb.plugins.EntityInstancePool@3c1b69#true#class server.Ebean.CategoryEJB
      2002-03-21 10:32:43,522 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.CategoryEJB.findByPrimaryKey] Executing SQL: SELECT CategoryID FROM CategoryEJB WHERE CategoryID=?
      2002-03-21 10:32:43,522 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.CategoryEJB.findByPrimaryKey] Set parameter: index=1, jdbcType=VARCHAR, value=1
      2002-03-21 10:32:43,522 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.CategoryEJB.CategoryID] Get result: index=1, javaType=java.lang.String, Simple, value=1
      2002-03-21 10:32:43,532 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT: In finally
      2002-03-21 10:32:43,532 TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=findByPrimaryKey
      2002-03-21 10:32:43,532 INFO [Default] find products success...
      2002-03-21 10:32:43,532 TRACE [org.jboss.ejb.plugins.LogInterceptor] Start method=getProducts
      2002-03-21 10:32:43,532 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is TransactionImpl:XidImpl [FormatId=257, GlobalId=myserver//1, BranchQual=]
      2002-03-21 10:32:43,542 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for getProducts
      2002-03-21 10:32:43,542 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx TransactionImpl:XidImpl [FormatId=257, GlobalId=myserver//1, BranchQual=]
      2002-03-21 10:32:43,542 TRACE [org.jboss.ejb.plugins.EntityLockInterceptor] Begin invoke, key=1
      2002-03-21 10:32:43,542 TRACE [org.jboss.ejb.plugins.EntityInstancePool] Get instance org.jboss.ejb.plugins.EntityInstancePool@3c1b69#true#class server.Ebean.CategoryEJB
      2002-03-21 10:32:43,542 DEBUG [org.jboss.ejb.plugins.EntityInstancePool] The Pool for server.Ebean.CategoryEJB has been overloaded. You should change pool parameters.
      2002-03-21 10:32:43,542 TRACE [org.jboss.ejb.plugins.AbstractInstanceCache] Activated bean CategoryEJB with id = 1
      2002-03-21 10:32:43,542 TRACE [org.jboss.ejb.plugins.EntityInstanceInterceptor] Begin invoke, key=1
      2002-03-21 10:32:43,542 TRACE [org.jboss.ejb.plugins.EntitySynchronizationInterceptor] invoke called for ctx org.jboss.ejb.EntityEnterpriseContext@3b9533, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=myserver//1, BranchQual=]
      2002-03-21 10:32:43,542 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.CategoryEJB] RESET PERSISTENCE CONTEXT: id=1
      2002-03-21 10:32:43,542 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.CategoryEJB] load data: entity=CategoryEJB pk=1
      2002-03-21 10:32:43,542 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.CategoryEJB] No preload data found: entity=CategoryEJB pk=1
      2002-03-21 10:32:43,542 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.CategoryEJB] Default eager-load for entity
      2002-03-21 10:32:43,552 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.CategoryEJB] Executing SQL: SELECT CategoryName, Description, Company FROM CategoryEJB WHERE (CategoryID=?)
      2002-03-21 10:32:43,552 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.CategoryEJB.CategoryID] Set parameter: index=1, jdbcType=VARCHAR, value=1
      2002-03-21 10:32:43,552 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.CategoryEJB.CategoryName] Get result: index=1, javaType=java.lang.String, Simple, value=Electron
      2002-03-21 10:32:43,552 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.CategoryEJB.Description] Get result: index=2, javaType=java.lang.String, Simple, value=Electric products
      2002-03-21 10:32:43,552 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.CategoryEJB.CompanyID] Get result: index=3, javaType=java.lang.String, Simple, value=1
      2002-03-21 10:32:43,552 INFO [Default] Category Pk
      2002-03-21 10:32:43,552 INFO [Default] is a instance Pk[true]
      2002-03-21 10:32:43,552 TRACE [org.jboss.ejb.plugins.EntitySynchronizationInterceptor] loadEntity Exception, clear tx for ctx=org.jboss.ejb.EntityEnterpriseContext@3b9533, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=myserver//1, BranchQual=]
      2002-03-21 10:32:43,552 INFO [Default] Category Pk
      2002-03-21 10:32:43,552 INFO [Default] is a instance Pk[true]
      2002-03-21 10:32:43,552 INFO [Default] Category Pk
      2002-03-21 10:32:43,552 INFO [Default] is a instance Pk[true]
      2002-03-21 10:32:43,552 INFO [Default] Category Pk
      2002-03-21 10:32:43,552 INFO [Default] is a instance Pk[true]
      2002-03-21 10:32:43,552 INFO [Default] Category Pk
      2002-03-21 10:32:43,552 INFO [Default] is a instance Pk[true]
      2002-03-21 10:32:43,552 TRACE [org.jboss.ejb.plugins.EntityInstanceInterceptor] Ending invoke, exceptionThrown, ctx=org.jboss.ejb.EntityEnterpriseContext@3b9533
      2002-03-21 10:32:43,552 TRACE [org.jboss.ejb.plugins.EntityInstanceInterceptor] End invoke, key=1, ctx=org.jboss.ejb.EntityEnterpriseContext@3b9533
      2002-03-21 10:32:43,552 INFO [Default] Category Pk
      2002-03-21 10:32:43,552 INFO [Default] is a instance Pk[true]
      2002-03-21 10:32:43,552 INFO [Default] Category Pk
      2002-03-21 10:32:43,552 INFO [Default] is a instance Pk[true]
      2002-03-21 10:32:43,562 TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@3c1b69#org.jboss.ejb.EntityEnterpriseContext@46ee9c
      2002-03-21 10:32:43,562 TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@3c1b69#org.jboss.ejb.EntityEnterpriseContext@5b52c8
      2002-03-21 10:32:43,562 TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@3c1b69#org.jboss.ejb.EntityEnterpriseContext@17d6c1
      2002-03-21 10:32:43,562 TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@3c1b69#org.jboss.ejb.EntityEnterpriseContext@144823
      2002-03-21 10:32:43,562 TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@3c1b69#org.jboss.ejb.EntityEnterpriseContext@c02cc
      2002-03-21 10:32:43,562 TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@3c1b69#org.jboss.ejb.EntityEnterpriseContext@bbd1b
      2002-03-21 10:32:43,562 TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@3c1b69#org.jboss.ejb.EntityEnterpriseContext@2c576f
      2002-03-21 10:32:43,562 TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@3c1b69#org.jboss.ejb.EntityEnterpriseContext@207440
      2002-03-21 10:32:43,562 TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@3c1b69#org.jboss.ejb.EntityEnterpriseContext@304648
      2002-03-21 10:32:43,562 TRACE [org.jboss.ejb.plugins.EntityInstancePool] Add instance org.jboss.ejb.plugins.EntityInstancePool@3c1b69#org.jboss.ejb.EntityEnterpriseContext@565e9d
      2002-03-21 10:32:43,562 TRACE [org.jboss.ejb.plugins.EntityLockInterceptor] End invoke, key=1
      2002-03-21 10:32:43,562 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT: In finally
      2002-03-21 10:32:43,572 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackException, causedBy:
      java.lang.IllegalArgumentException: object is not an instance of declaring class
      at java.lang.reflect.Field.get(Native Method)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.getPrimaryKeyValue(JDBCAbstractCMPFieldBridge.java:126)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setForeignKey(JDBCCMRFieldBridge.java:911)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.loadInstanceResults(JDBCCMRFieldBridge.java:995)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:138)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:62)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:409)
      at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:380)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:275)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:189)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:108)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(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:475)
      at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:308)
      at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker$EntityProxy.invoke(BaseLocalContainerInvoker.java:412)
      at $Proxy20.getProducts(Unknown Source)
      at server.SBean.CompanyLEJB.createProduct(CompanyLEJB.java:272)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:642)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(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:630)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:92)
      at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:150)
      at org.jboss.proxy.ejb.GenericProxy.invoke(GenericProxy.java:182)
      at org.jboss.proxy.ejb.StatelessSessionProxy.invoke(StatelessSessionProxy.java:111)
      at $Proxy18.createProduct(Unknown Source)
      at org.apache.jsp.test$jsp._jspService(test$jsp.java:101)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
      at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
      at java.lang.Thread.run(Thread.java:484)
      2002-03-21 10:32:43,582 TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=getProducts
      2002-03-21 10:32:43,582 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT: In finally
      2002-03-21 10:32:43,602 TRACE [org.jboss.ejb.plugins.EntitySynchronizationInterceptor] afterCompletion, clear tx for ctx=org.jboss.ejb.EntityEnterpriseContext@2f7cfe, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=myserver//1, BranchQual=]
      2002-03-21 10:32:43,602 TRACE [org.jboss.ejb.plugins.EntitySynchronizationInterceptor] afterCompletion, sent notify on TxLock for ctx=org.jboss.ejb.EntityEnterpriseContext@2f7cfe
      2002-03-21 10:32:43,602 TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=createProduct
      2002-03-21 10:32:43,612 ERROR [org.jboss.web.catalina.EmbeddedCatalinaServiceSX] StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
      java.rmi.ServerException: Internal error getting primary key field member CompanyID
      Embedded Exception
      object is not an instance of declaring class; nested exception is:
      javax.ejb.EJBException: Internal error getting primary key field member CompanyID
      Embedded Exception
      object is not an instance of declaring class
      Embedded Exception
      Internal error getting primary key field member CompanyID
      Embedded Exception
      object is not an instance of declaring class; nested exception is:
      javax.ejb.EJBException: Internal error getting primary key field member CompanyID
      Embedded Exception
      object is not an instance of declaring class; nested exception is:
      javax.ejb.EJBException: Internal error getting primary key field member CompanyID
      Embedded Exception
      object is not an instance of declaring class; nested exception is:
      javax.ejb.EJBException: Internal error getting primary key field member CompanyID
      Embedded Exception
      object is not an instance of declaring class
      Embedded Exception
      Internal error getting primary key field member CompanyID
      Embedded Exception
      object is not an instance of declaring class; nested exception is:
      javax.ejb.EJBException: Internal error getting primary key field member CompanyID
      Embedded Exception
      object is not an instance of declaring class
      javax.ejb.EJBException: Internal error getting primary key field member CompanyID
      Embedded Exception
      object is not an instance of declaring class; nested exception is:
      javax.ejb.EJBException: Internal error getting primary key field member CompanyID
      Embedded Exception
      object is not an instance of declaring class
      Embedded Exception
      Internal error getting primary key field member CompanyID
      Embedded Exception
      object is not an instance of declaring class; nested exception is:
      javax.ejb.EJBException: Internal error getting primary key field member CompanyID
      Embedded Exception
      object is not an instance of declaring class