1 Reply Latest reply on Jun 16, 2003 1:52 PM by stuermer_g

    ObjectNotFoundException error - Pl. Help!

    moon

      Hi All,

      I'm having problem accessing my home page when calling Stateful session bean. It is throwing the following exception given below and redirecting to Nosession.jsp page.

      How to fix this error. Can you help me to solve this problem. It is very urgent!!


      javax.ejb.ObjectNotFoundException: No such entity!
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:96)
      at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.findEntity(JAWSPersistenceManager.java:263)
      at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:336)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:301)
      at org.jboss.ejb.EntityContainer.find(EntityContainer.java:690)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1119)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:207)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:90)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
      at org.jboss.ejb.plugins.EntityCreationIntercept
      or.invokeHome(EntityCreationInterceptor.java:44)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:228)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:62)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
      at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
      at org.jboss.ejb.Container.invoke(Container.java:730)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      at org.jboss.proxy.TransactionInterceptor.invokeTransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy67.findCompanyByHostName(Unknown Source)
      at com.seatonCorp.peopleScout.servlet.ServletRequestHelper.
      getCompanyByHostName(Unknown Source)

      Thank you,
      Regards,
      moon

        • 1. Re: ObjectNotFoundException error - Pl. Help!

          -------------------------
          Copy from EJB-spec 2.0:

          The ObjectNotFoundException is a subclass of FinderException. The Container throws
          the ObjectNotFoundException from the implementation of a finder or select method to indicate
          that the requested object does not exist.
          Only single-object finder or select methods (see Subsections 10.5.6 and 10.5.7) should throw this excep-tion.
          Multi-object finder or select methods must not throw this exception. Multi-object finder or select
          methods should return an empty collection as an indication that no matching objects were found.

          ------------------------------
          So you have created a Finder called findCompanyByHostName witch doesn't return a Collection. The select on the Database return no Dataset for the (cmp)generated Select. Thats all.

          Peda