1 Reply Latest reply on Sep 18, 2002 8:50 AM by alexis bergue

    No Such Entity Error

    Atelier-Soft Newbie

      Hello,

      I am getting the following error when trying to deploy
      an ejb jar with an entity bean connecting upto a mysql database. We are using the my-sql.2.0.6 driver. Does that give us a problem or is some configuration settings wrong. Thanks so much for answering.

      thanks,

      18:12:03,845 ERROR [STDERR] javax.ejb.ObjectNotFoundException: No such entity!

      18:12:03,845 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:46)

      18:12:03,845 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(JDBCStoreManager.java:464)

      18:12:03,845 ERROR [STDERR] at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:336)

      18:12:03,865 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:301)

      18:12:03,865 ERROR [STDERR] at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:634)

      18:12:03,865 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)

      18:12:03,865 ERROR [STDERR] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1116)

      18:12:03,966 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)

      18:12:03,966 ERROR [STDERR] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:257)

      18:12:03,966 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)

      18:12:03,966 ERROR [STDERR] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:134)

      18:12:04,046 ERROR [STDERR] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)

      18:12:04,046 ERROR [STDERR] at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)

      18:12:04,046 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)

      18:12:04,046 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)

      18:12:04,136 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)

      18:12:04,136 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:104)

      18:12:04,136 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)

      18:12:04,136 ERROR [STDERR] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)

      18:12:04,216 ERROR [STDERR] at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:227)

      18:12:04,216 ERROR [STDERR] at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)

      18:12:04,216 ERROR [STDERR] at $Proxy23.findByPrimaryKey(Unknown Source)

      18:12:04,216 ERROR [STDERR] at mysqljbosstest.DomainDirectorBean.getDomainDetails(DomainDirectorBean.java:38)

      18:12:04,276 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)

      18:12:04,276 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:664)

      18:12:04,276 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)

      18:12:04,276 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)

      18:12:04,346 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)

      18:12:04,346 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)

      18:12:04,346 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)

      18:12:04,346 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:129)

      18:12:04,396 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)

      18:12:04,396 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)

      18:12:04,396 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:705)

      18:12:04,396 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)

      18:12:04,396 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:362)

      18:12:04,436 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)

      18:12:04,436 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)

      18:12:04,436 ERROR [STDERR] at sun.rmi.transport.Transport$1.run(Transport.java:152)

      18:12:04,436 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)

      18:12:04,436 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(Transport.java:148)

      18:12:04,466 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)

      18:12:04,466 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:706)

      18:12:04,466 ERROR [STDERR] at java.lang.Thread.run(Thread.java:484)

        • 1. Re: No Such Entity Error
          alexis bergue Newbie

          Hi,

          Did you fix this issue?

          I encounters the same problem. And this is very curious. I can access to my Datasourse with the following code into a Session Bean:

          DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/myDS");
          Connection con = ds.getConnection();
          PreparedStatement stmt = con.prepareStatement("SELECT * FROM user");
          ResultSet rs = stmt.executeQuery();
          if(rs.next())
          {
          str = rs.getString("email");
          }
          stmt.close();
          con.close();

          But when I try to get the same data using an Entity Bean via the same Datasource, I have this error.

          More curious: I have this issue only on my 2 Linux box(running RH 7.1 and JBoss/Jetty 3.0.2). But it's working fine on Win XP workstation.

          Quid.

          Alexis