0 Replies Latest reply on May 26, 2006 3:32 AM by luca del core

    Error in bean connection

    luca del core Newbie

      I've problems with connection from a bean to another bean but only in one case.
      In the servelet I can perfectly connect to the bean with this code


      Context ct = new InitialContext();

      home =(CntrlRenAttGioHomeLocal)ct.lookup("java:comp/env/ejb/CntrlRenAttGioHomeLocal");
      homeRenAttGio = (RenAttGioHomeLocal)ct.lookup("java:comp/env/ejb/RenAttGioHomeLocal");

      but in the bean CntrlReanAttGioBean (Session Bean) when I try to connect to the bean with the code

      Context initial = new InitialContext();
      (RenAttGioHomeLocal)initial.lookup("java:comp/env/ejb/RenAttGioHomeLocal")

      I receive these errors

      09:29:53,630 ERROR [LogInterceptor] EJBException in method: public abstract java.util.Collection CntrlRenAttGio.CntrlRenAttGioLocal.leggiCommesseAttivita(java.lang.String,java.lang.String,java.lang.String,java.lang.String), causedBy:
      javax.naming.NameNotFoundException: RenAttGioHomeLocal not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:49 at org.jnp.server.NamingServer.getBinding(NamingServer.java:49 at org.jnp.server.NamingServer.getObject(NamingServer.java:50 at org.jnp.server.NamingServer.lookup(NamingServer.java:27 at org.jnp.server.NamingServer.lookup(NamingServer.java:25 at org.jnp.server.NamingServer.lookup(NamingServer.java:25 at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:61 at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:70 at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:57 at javax.naming.InitialContext.lookup(InitialContext.java:34 at CntrlRenAttGio.CntrlRenAttGioBean.leggiCommesseAttivita(CntrlRenAttGioBean.java:8 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Metho at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:2 at java.lang.reflect.Method.invoke(Method.java:32 at org.jboss.invocation.Invocation.performCall(Invocation.java:34 at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:21 at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:18 at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:5 at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:4 at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:10 at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:15 at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:6 at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:13 at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:13 at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:19 at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:12 at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:62 at org.jboss.ejb.Container.invoke(Container.java:87 at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:41 at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:8 at $Proxy204.leggiCommesseAttivita(Unknown Sourc at servlet.VisCommessPerGiorno.processRequest(VisCommessPerGiorno.java:16 at servlet.VisCommessPerGiorno.doGet(VisCommessPerGiorno.java:21 at javax.servlet.http.HttpServlet.service(HttpServlet.java:69 at javax.servlet.http.HttpServlet.service(HttpServlet.java:81 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:25 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:17 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:8 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:20 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:17 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:21 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:17 at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:3 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:15 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:5 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:14 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:74 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:52 at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:11 at java.lang.Thread.run(Thread.java:5309:29:58,016 INFO [STDOUT] javax.ejb.EJBException: null; CausedByException is:
      RenAttGioHomeLocal not bou09:29:58,016 INFO [STDOUT] at CntrlRenAttGio.CntrlRenAttGioBean.leggiCommesseAttivita(CntrlRenAttGioBean.java:133)
      09:29:58,016 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      09:29:58,016 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      09:29:58,016 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      09:29:58,016 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
      09:29:58,016 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      09:29:58,016 INFO [STDOUT] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
      09:29:58,016 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      09:29:58,016 INFO [STDOUT] at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
      09:29:58,016 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      09:29:58,016 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
      09:29:58,016 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:153)
      09:29:58,016 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
      09:29:58,016 INFO [STDOUT] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:130)
      09:29:58,026 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:139)
      09:29:58,026 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      09:29:58,026 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      09:29:58,026 INFO [STDOUT] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      09:29:58,026 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:873)
      09:29:58,026 INFO [STDOUT] at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:413)
      09:29:58,026 INFO [STDOUT] at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
      09:29:58,026 INFO [STDOUT] at $Proxy204.leggiCommesseAttivita(Unknown Source)
      09:29:58,026 INFO [STDOUT] at servlet.VisCommessPerGiorno.processRequest(VisCommessPerGiorno.java:162)
      09:29:58,026 INFO [STDOUT] at servlet.VisCommessPerGiorno.doGet(VisCommessPerGiorno.java:216)
      09:29:58,026 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      09:29:58,026 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      09:29:58,026 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      09:29:58,026 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      09:29:58,026 INFO [STDOUT] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      09:29:58,026 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      09:29:58,026 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      09:29:58,026 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      09:29:58,026 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      09:29:58,026 INFO [STDOUT] at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      09:30:42,660 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
      09:30:42,660 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      09:30:42,660 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      09:30:42,660 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      09:30:42,660 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      09:30:47,167 INFO [STDOUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      09:30:47,167 INFO [STDOUT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      09:30:47,167 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      09:30:47,167 INFO [STDOUT] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      09:30:47,167 INFO [STDOUT] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      09:30:49,660 INFO [STDOUT] at java.lang.Thread.run(Thread.java:534)
      09:30:49,660 INFO [STDOUT] javax.naming.NameNotFoundException: RenAttGioHomeLocal not bound
      09:30:49,660 INFO [STDOUT] at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
      09:30:49,660 INFO [STDOUT] at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
      09:30:49,660 INFO [STDOUT] at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
      09:30:49,660 INFO [STDOUT] at org.jnp.server.NamingServer.lookup(NamingServer.java:278)
      09:30:52,164 INFO [STDOUT] at org.jnp.server.NamingServer.lookup(NamingServer.java:252)
      09:30:52,164 INFO [STDOUT] at org.jnp.server.NamingServer.lookup(NamingServer.java:252)
      09:30:52,164 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
      09:30:52,164 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:701)
      09:30:52,164 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
      09:30:52,164 INFO [STDOUT] at javax.naming.InitialContext.lookup(InitialContext.java:347)
      09:30:55,168 INFO [STDOUT] at CntrlRenAttGio.CntrlRenAttGioBean.leggiCommesseAttivita(CntrlRenAttGioBean.java:86)
      09:30:55,168 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      09:30:55,168 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      09:30:55,168 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      09:30:55,168 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
      09:30:55,168 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      09:30:55,168 INFO [STDOUT] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
      09:30:55,168 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      09:30:55,168 INFO [STDOUT] at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
      09:30:55,168 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      09:30:55,168 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
      09:30:55,168 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:153)
      09:30:55,168 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
      09:30:55,168 INFO [STDOUT] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:130)
      09:30:55,168 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:139)
      09:30:55,168 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      09:30:55,168 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      09:30:55,168 INFO [STDOUT] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      09:30:55,168 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:873)
      09:30:55,168 INFO [STDOUT] at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:413)
      09:30:55,168 INFO [STDOUT] at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
      09:30:55,168 INFO [STDOUT] at $Proxy204.leggiCommesseAttivita(Unknown Source)
      09:30:55,168 INFO [STDOUT] at servlet.VisCommessPerGiorno.processRequest(VisCommessPerGiorno.java:162)
      09:30:55,168 INFO [STDOUT] at servlet.VisCommessPerGiorno.doGet(VisCommessPerGiorno.java:216)
      09:30:55,168 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      09:30:55,168 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      09:30:55,168 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      09:30:55,168 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      09:30:55,168 INFO [STDOUT] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      09:30:55,168 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      09:30:55,178 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      09:30:55,178 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      09:30:55,178 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      09:30:55,178 INFO [STDOUT] at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      09:30:55,178 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
      09:30:55,178 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      09:30:55,178 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      09:30:55,178 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      09:30:55,178 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      09:30:55,178 INFO [STDOUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      09:30:55,178 INFO [STDOUT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      09:30:55,178 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      09:30:55,178 INFO [STDOUT] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      09:30:55,178 INFO [STDOUT] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      09:30:55,178 INFO [STDOUT] at java.lang.Thread.run(Thread.java:534)
      09:30:55,178 INFO [STDOUT] javax.naming.NameNotFoundException: RenAttGioHomeLocal not bound
      09:30:55,178 INFO [STDOUT] at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
      09:30:55,178 INFO [STDOUT] at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
      09:30:55,178 INFO [STDOUT] at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
      09:30:55,178 INFO [STDOUT] at org.jnp.server.NamingServer.lookup(NamingServer.java:278)
      09:30:55,178 INFO [STDOUT] at org.jnp.server.NamingServer.lookup(NamingServer.java:252)
      09:30:55,178 INFO [STDOUT] at org.jnp.server.NamingServer.lookup(NamingServer.java:252)
      09:30:55,178 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
      09:30:55,178 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:701)
      09:30:55,178 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
      09:30:55,178 INFO [STDOUT] at javax.naming.InitialContext.lookup(InitialContext.java:347)
      09:30:55,178 INFO [STDOUT] at CntrlRenAttGio.CntrlRenAttGioBean.leggiCommesseAttivita(CntrlRenAttGioBean.java:86)
      09:30:55,178 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      09:30:55,178 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      09:30:55,178 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      09:30:55,178 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
      09:30:55,178 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      09:30:55,178 INFO [STDOUT] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
      09:30:55,188 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)

      How can I solve these problems? Thanks in advance...