6 Replies Latest reply on May 31, 2006 8:20 AM by Alice Tiong

    javax.ejb.ObjectNotFoundException: No such entity!

    Julien Martin Expert

      Hello,

      I use jboss 4.0.0rc1 and mysql 4.0.12 max and I get the following error when tying to do a simple findbyprimarykey.

      20:29:16,312 INFO [STDOUT] ------containsResults------->true
      20:29:18,140 INFO [STDOUT] javax.ejb.ObjectNotFoundException: No such entity!
      20:29:18,140 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.execute(JDBCFindByPrimaryKeyQuery.java:133)
      20:29:18,156 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:43)
      20:29:18,171 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(JDBCStoreManager.java:582)
      20:29:18,187 INFO [STDOUT] at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:310)
      20:29:18,203 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:300)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.EntityContainer.findSingleObject(EntityContainer.java:1084)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:674)
      20:29:18,203 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      20:29:18,203 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      20:29:18,203 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      20:29:18,203 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
      20:29:18,203 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1111)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:194)
      20:29:18,203 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:214)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:113)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:41)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:316)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:129)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:106)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:516)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:893)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:312)
      20:29:18,203 INFO [STDOUT] at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:118)
      20:29:18,203 INFO [STDOUT] at $Proxy98.findByPrimaryKey(Unknown Source)
      20:29:18,203 INFO [STDOUT] at com.softwareag.test_guide.sessionFacadeEJB.PGSessionFacadeBean.getEstablishmentFromId(PGSessionFacadeBean.java:37)
      20:29:18,218 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      20:29:18,218 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      20:29:18,218 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      20:29:18,218 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
      20:29:18,218 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      20:29:18,218 INFO [STDOUT] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
      20:29:18,218 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      20:29:18,218 INFO [STDOUT] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
      20:29:18,218 INFO [STDOUT] at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
      20:29:18,218 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      20:29:18,218 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
      20:29:18,218 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:316)
      20:29:18,218 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149)
      20:29:18,218 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)
      20:29:18,218 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      20:29:18,218 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      20:29:18,218 INFO [STDOUT] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:625)
      20:29:18,218 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:871)
      20:29:18,218 INFO [STDOUT] at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:394)
      20:29:18,218 INFO [STDOUT] at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:82)
      20:29:18,218 INFO [STDOUT] at $Proxy90.getEstablishmentFromId(Unknown Source)
      20:29:18,218 INFO [STDOUT] at com.softwareag.test_guide.web.temp.PGBusinessDelegate.getEstablishmentFromId(PGBusinessDelegate.java:23)
      20:29:18,218 INFO [STDOUT] at com.softwareag.test_guide.web.tags.PGSetEstablishmentTag.doStartTag(PGSetEstablishmentTag.java:27)
      20:29:18,218 INFO [STDOUT] at org.apache.jsp.displayItem_jsp._jspService(displayItem_jsp.java:91)
      20:29:18,218 INFO [STDOUT] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
      20:29:18,218 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      20:29:18,218 INFO [STDOUT] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
      20:29:18,218 INFO [STDOUT] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
      20:29:18,218 INFO [STDOUT] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
      20:29:18,218 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
      20:29:18,218 INFO [STDOUT] at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
      20:29:18,218 INFO [STDOUT] at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
      20:29:18,218 INFO [STDOUT] at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
      20:29:18,218 INFO [STDOUT] at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      20:29:18,218 INFO [STDOUT] at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
      20:29:18,218 INFO [STDOUT] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      20:29:18,218 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:146)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      20:29:18,218 INFO [STDOUT] at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:122)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      20:29:18,218 INFO [STDOUT] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      20:29:18,218 INFO [STDOUT] at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
      20:29:18,218 INFO [STDOUT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
      20:29:18,218 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
      20:29:18,218 INFO [STDOUT] at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
      20:29:18,218 INFO [STDOUT] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
      20:29:18,218 INFO [STDOUT] at java.lang.Thread.run(Thread.java:534)
      


      I turned on the logging for cmp and the generated sql seems fine:

      2004-08-16 20:29:18,125 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.EstablishmentEJB#findByPrimaryKey] Executing SQL: SELECT t0_EstablishmentEJB.id FROM ESTABLISHMENTEJB t0_EstablishmentEJB WHERE t0_EstablishmentEJB.id=?
      2004-08-16 20:29:18,125 TRACE [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.EstablishmentEJB#findByPrimaryKey] Set parameter: index=1, jdbcType=INTEGER, value=164
      


      Apparently I am not the only one with this problem. Is this a bug?

      All my sources are available here:

      http://www.parispano.org/ejb_tier/

      Any hint or help appreciated,

      Julien.

        • 1. Re: javax.ejb.ObjectNotFoundException: No such entity!
          Alexey Loubyansky Master

          You want to say the row is in the db? JDBC says it's not.

          • 2. javax.ejb.ObjectNotFoundException: No such entity!
            Julien Martin Expert

            Hello,
            Thanks for the reply. Yes I know for sure the row is in the table. This is why I don't understand this error. Other users have encountered the same problem but I can't establish how to solve it from the posts on the forums. Note that I am migrating from jOnas to jboss and it works with jonas. Have you any idea?
            Julien.

            • 3. Re: javax.ejb.ObjectNotFoundException: No such entity!
              Alexey Loubyansky Master

              Can you try to write a simple JDBC test that executes the same statement using the same DataSource inside the JBoss and see if it sees the row?

              • 4. Re: javax.ejb.ObjectNotFoundException: No such entity!
                Julien Martin Expert

                Hello Loubyansky,

                First of all thanks for taking the time to respond. I tried the following test as you suggested:

                1. I try to access the record through a ejbhome findByPrimaryKey
                2. I try to access the record through plain jdbc

                Here is the code:

                <%@ page import ="javax.ejb.*" %>
                <%@ page import ="javax.naming.*" %>
                <%@ page import ="java.util.*" %>
                <%@ page import ="java.rmi.*" %>
                <%@ page import ="com.softwareag.test_guide.establishmentEJB.*" %>
                
                
                <%@ page import ="javax.sql.*" %>
                <%@ page import ="java.sql.*" %>
                
                
                <%
                
                try{
                Properties p = new Properties();
                p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
                p.put(Context.PROVIDER_URL,"127.0.0.1:1099");
                p.put(Context.SECURITY_PRINCIPAL,"sa");
                p.put(Context.SECURITY_CREDENTIALS,"");
                Context context = new InitialContext(p);
                PGEstablishmentLocalHome home = (PGEstablishmentLocalHome) context.lookup("PGEstablishmentHome_L");
                PGEstablishmentLocal establishment = home.findByPrimaryKey(new Integer(12));
                out.println(establishment.getId());
                }
                catch(FinderException e){
                e.printStackTrace();
                }
                
                %>
                
                <% System.out.println("-----------------------");%>
                
                <%
                try{
                Properties p = new Properties();
                p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
                p.put(Context.PROVIDER_URL,"127.0.0.1:1099");
                Context context = new InitialContext(p);
                DataSource ds = (DataSource) context.lookup("java:/test_guia");
                Connection con = ds.getConnection();
                Statement st = con.createStatement();
                ResultSet rs = st.executeQuery("select db_establishment_id from establishments where db_establishment_id = 12");
                rs.next();
                out.println(rs.getInt(1));
                con.close();
                }
                catch(SQLException e){
                e.printStackTrace();
                }
                %>
                


                The first section (access record from ejb home) throws the same exception ie:
                1:30:46,937 INFO [EARDeployer] Started J2EE application: file:/D:/system/jboss-4.0.0/server/default/deploy/test_guide.ear
                1:31:46,703 INFO [STDOUT] javax.ejb.ObjectNotFoundException: No such entity!
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.execute(JDBCFindByPrimaryKeyQuery.java:133)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:43)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(JDBCStoreManager.java:582)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:310)
                1:31:46,703 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:300)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.EntityContainer.findSingleObject(EntityContainer.java:1084)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:674)
                1:31:46,703 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                1:31:46,703 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                1:31:46,703 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                1:31:46,703 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
                1:31:46,703 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1111)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:194)
                1:31:46,703 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:214)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:113)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:41)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:316)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:129)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:106)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:516)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:893)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:312)
                1:31:46,703 INFO [STDOUT] at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:118)
                1:31:46,703 INFO [STDOUT] at $Proxy542.findByPrimaryKey(Unknown Source)
                1:31:46,703 INFO [STDOUT] at org.apache.jsp.TestsJboss_jsp._jspService(TestsJboss_jsp.java:70)
                1:31:46,703 INFO [STDOUT] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
                1:31:46,703 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                1:31:46,703 INFO [STDOUT] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
                1:31:46,703 INFO [STDOUT] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
                1:31:46,703 INFO [STDOUT] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
                1:31:46,718 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                1:31:46,718 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:146)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
                1:31:46,718 INFO [STDOUT] at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:122)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                1:31:46,718 INFO [STDOUT] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
                1:31:46,718 INFO [STDOUT] at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
                1:31:46,718 INFO [STDOUT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
                1:31:46,718 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
                1:31:46,718 INFO [STDOUT] at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
                1:31:46,718 INFO [STDOUT] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
                1:31:46,718 INFO [STDOUT] at java.lang.Thread.run(Thread.java:534)
                


                The second attempt (plain jdbc) works fine without throwing any exception. That's odd. Have you got any idea as to what is going on?

                Julien Martin.

                • 5. javax.ejb.ObjectNotFoundException: No such entity!
                  Julien Martin Expert

                  Sorted!
                  I have just realized that I had an error in my ant script. One of the jboss DDs was just not included in the jar....
                  Julien.

                  • 6. Re: javax.ejb.ObjectNotFoundException: No such entity!
                    Alice Tiong Newbie

                    Hi, balteo. I'm having the problem too. Can you explain in more details how do u fix it?