0 Replies Latest reply on Mar 11, 2003 8:00 AM by demian demian

    No such entity!

    demian demian Newbie

      Hi all,

      I have CMP entity bean Sequence with two fields - nazov, hodnota. Above this bean I have facade SequnceManager. When try test my methods for add new Sequence and then read added object with findByPrimaryKey method I get error, here is log:

      2003-03-11 14:03:06,437 DEBUG [sk.asset.ajf.util.ejb.EJBHomeFactory] looking for java:comp/env/ejb/SequenceLocal
      2003-03-11 14:03:06,468 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.Sequence] Create: pk=AJF_TEST
      2003-03-11 14:03:06,468 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.Sequence] Executing SQL: SELECT COUNT(*) FROM AJF_T_SEQUENCES WHERE nazov=?
      2003-03-11 14:03:06,515 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.Sequence] Executing SQL: INSERT INTO AJF_T_SEQUENCES (nazov, hodnota) VALUES (?, ?)
      2003-03-11 14:03:06,515 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.Sequence] Rows affected = 1
      2003-03-11 14:03:06,796 DEBUG [sk.asset.ajf.data.ejb.SequenceManagerBean] SequenceManager: getNextPK(AJF_TEST)
      2003-03-11 14:03:06,796 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.Sequence.findByPrimaryKey] Executing SQL: SELECT nazov FROM AJF_T_SEQUENCES WHERE nazov=?
      2003-03-11 14:03:06,796 ERROR [STDERR] javax.ejb.ObjectNotFoundException: No such entity!
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:46)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(JDBCStoreManager.java:541)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:336)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:301)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:636)
      2003-03-11 14:03:06,812 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2003-03-11 14:03:06,812 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2003-03-11 14:03:06,812 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2003-03-11 14:03:06,812 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1119)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:207)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:90)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:228)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:62)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:230)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      2003-03-11 14:03:06,812 ERROR [STDERR] at $Proxy19.findByPrimaryKey(Unknown Source)
      2003-03-11 14:03:06,812 ERROR [STDERR] at sk.asset.ajf.data.ejb.SequenceManagerBean.getNextPK(SequenceManagerBean.java:80)
      2003-03-11 14:03:06,812 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2003-03-11 14:03:06,812 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2003-03-11 14:03:06,812 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2003-03-11 14:03:06,812 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      2003-03-11 14:03:06,812 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      ...

      what is wrong, I found added value in database.
      Use JBoss 3.0.6 and Oracle 8i DB.

      MD