0 Replies Latest reply on Oct 23, 2002 1:51 PM by Marlon Oliveira

    NoSuchObjectException

    Marlon Oliveira Newbie

      Hi,

      I'm using JBoss 3.0.3, CMP2 and Struts 1.1b2. I'm trying to resolve this following situation:
      When my application (EJB) raise a exception, for example, 'Entity with primary key a already exists', any method called after that throws NoSuchObjectException in Statefull Session Bean.

      Thanks,
      Marlon

      Console Stacks

      17:12:33,686 ERROR [LogInterceptor] EJBException:
      javax.ejb.EJBException: Entity with primary key a already exists
      at imovel_fabia.ContainerSession.createUso(ContainerSession.java:1717)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:817)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:266)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:203)
      at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:380)
      at org.jboss.ejb.Container.invoke(Container.java:720)
      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.invoke(TransactionInterceptor.java:73)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
      at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:117)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy151.createUso(Unknown Source)
      at web.actions.CadastrarUsoAction.executeInclusao(CadastrarUsoAction.java:177)
      at web.actions.CadastrarUsoAction.executeCadastro(CadastrarUsoAction.java:157)
      at web.actions.CadastrarUsoAction.execute(CadastrarUsoAction.java:131)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:344)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:313)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:554)
      at org.mortbay.jetty.servlet.WebApplicationHandler.handle(WebApplicationHandler.java:199)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1572)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1522)
      at org.mortbay.http.HttpServer.service(HttpServer.java:795)
      at org.jboss.jetty.Jetty.service(Jetty.java:531)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:784)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:941)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:799)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:186)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:322)
      at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:716)
      at java.lang.Thread.run(Thread.java:536)
      17:12:40,221 ERROR [STDERR] 22/10/2002 17:12:40 org.apache.struts.action.RequestProcessor process
      INFO: Processing a 'GET' for path '/recuperarUsos'
      17:12:41,924 INFO [STDOUT] TRACE: ContainerSession.ejbPassivate
      17:12:41,978 ERROR [STDERR] 22/10/2002 17:12:41 org.apache.struts.action.RequestProcessor process
      INFO: Processing a 'GET' for path '/abrirNovoUso'
      17:12:47,156 ERROR [STDERR] 22/10/2002 17:12:47 org.apache.struts.action.RequestProcessor process
      INFO: Processing a 'GET' for path '/cadastrarUso'
      17:12:47,161 ERROR [AbstractInstanceCache] Activation failure
      javax.ejb.EJBException: Could not activate; CausedByException is:
      /java/jboss-3.0.2/server/default/db/sessions/ContainerEJB/1035304138424.ser (No such file or directory)
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:239)
      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:83)
      at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:177)
      at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:212)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:203)
      at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:380)
      at org.jboss.ejb.Container.invoke(Container.java:720)
      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.invoke(TransactionInterceptor.java:73)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
      at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:117)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy151.createUso(Unknown Source)
      at web.actions.CadastrarUsoAction.executeInclusao(CadastrarUsoAction.java:177)
      at web.actions.CadastrarUsoAction.executeCadastro(CadastrarUsoAction.java:157)
      at web.actions.CadastrarUsoAction.execute(CadastrarUsoAction.java:131)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:344)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:313)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:554)
      at org.mortbay.jetty.servlet.WebApplicationHandler.handle(WebApplicationHandler.java:199)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1572)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1522)
      at org.mortbay.http.HttpServer.service(HttpServer.java:795)
      at org.jboss.jetty.Jetty.service(Jetty.java:531)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:784)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:941)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:799)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:186)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:322)
      at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:716)
      at java.lang.Thread.run(Thread.java:536)
      java.io.FileNotFoundException: /java/jboss-3.0.2/server/default/db/sessions/ContainerEJB/1035304138424.ser (No such file or directory)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.(FileInputStream.java:103)
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:221)
      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:83)
      at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:177)
      at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:212)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:203)
      at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:380)
      at org.jboss.ejb.Container.invoke(Container.java:720)
      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.invoke(TransactionInterceptor.java:73)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
      at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:117)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy151.createUso(Unknown Source)
      at web.actions.CadastrarUsoAction.executeInclusao(CadastrarUsoAction.java:177)
      at web.actions.CadastrarUsoAction.executeCadastro(CadastrarUsoAction.java:157)
      at web.actions.CadastrarUsoAction.execute(CadastrarUsoAction.java:131)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:344)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:313)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:554)
      at org.mortbay.jetty.servlet.WebApplicationHandler.handle(WebApplicationHandler.java:199)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1572)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1522)
      at org.mortbay.http.HttpServer.service(HttpServer.java:795)
      at org.jboss.jetty.Jetty.service(Jetty.java:531)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:784)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:941)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:799)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:186)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:322)
      at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:716)
      at java.lang.Thread.run(Thread.java:536)