3 Replies Latest reply on May 22, 2007 10:01 PM by jaikiran pai

    EJB3 - NameNotFoundException HELP! ITALIANO

    Andrea Ggggggg Newbie

      Ciao a tutti qesto e' l'errore che ricevo :

      2007-05-21 16:05:54,094 DEBUG [javax.faces.webapp.UIComponentTag] Exited encodeBegin
      2007-05-21 16:05:54,094 DEBUG [javax.faces.webapp.UIComponentTag] Entered encodeBegin for client-Id: form1:outputText1
      2007-05-21 16:05:54,094 DEBUG [javax.faces.webapp.UIComponentTag] Exited encodeBegin
      2007-05-21 16:05:54,094 DEBUG [javax.faces.webapp.UIComponentTag] Entered encodeEnd for client-Id: form1:outputText1
      2007-05-21 16:05:54,094 DEBUG [javax.faces.webapp.UIComponentTag] Exited encodeEnd for client-Id: form1:outputText1
      2007-05-21 16:05:54,104 DEBUG [javax.faces.webapp.UIComponentTag] Entered encodeBegin for client-Id: form1:commandLink1
      2007-05-21 16:05:54,104 DEBUG [javax.faces.webapp.UIComponentTag] Exited encodeBegin
      2007-05-21 16:05:54,104 DEBUG [javax.faces.webapp.UIComponentTag] Entered encodeChildren for client-Id: form1:commandLink1
      2007-05-21 16:05:54,104 DEBUG [javax.faces.webapp.UIComponentTag] Exited encodeChildren for client-Id: form1:commandLink1
      2007-05-21 16:05:54,104 DEBUG [javax.faces.webapp.UIComponentTag] Entered encodeEnd for client-Id: form1:commandLink1
      2007-05-21 16:05:54,104 DEBUG [javax.faces.webapp.UIComponentTag] Exited encodeEnd for client-Id: form1:commandLink1
      2007-05-21 16:05:54,124 DEBUG [javax.faces.webapp.UIComponentTag] Entered encodeBegin for client-Id: form1:dataTable1
      2007-05-21 16:05:54,134 DEBUG [javax.faces.webapp.UIComponentTag] Exited encodeBegin
      2007-05-21 16:05:54,134 DEBUG [javax.faces.webapp.UIComponentTag] Entered encodeChildren for client-Id: form1:dataTable1
      2007-05-21 16:05:54,144 ERROR [STDERR] javax.naming.NameNotFoundException: ServiceRequestFacade not bound
      2007-05-21 16:05:54,144 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
      2007-05-21 16:05:54,144 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
      2007-05-21 16:05:54,144 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
      2007-05-21 16:05:54,144 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
      2007-05-21 16:05:54,144 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
      2007-05-21 16:05:54,144 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
      2007-05-21 16:05:54,144 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:351)
      2007-05-21 16:05:54,144 ERROR [STDERR] at org.srdemo.view.util.ServiceLocator.getFacadeService(ServiceLocator.java:92)
      2007-05-21 16:05:54,144 ERROR [STDERR] at org.srdemo.view.backing.SRList.getRequestList(SRList.java:90)
      2007-05-21 16:05:54,144 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2007-05-21 16:05:54,144 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2007-05-21 16:05:54,144 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2007-05-21 16:05:54,154 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      2007-05-21 16:05:54,154 ERROR [STDERR] at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:438)
      2007-05-21 16:05:54,154 ERROR [STDERR] at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:82)
      2007-05-21 16:05:54,154 ERROR [STDERR] at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:532)
      2007-05-21 16:05:54,154 ERROR [STDERR] at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
      2007-05-21 16:05:54,154 ERROR [STDERR] at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
      2007-05-21 16:05:54,154 ERROR [STDERR] at javax.faces.component.UIData.getValue(UIData.java:1019)
      2007-05-21 16:05:54,154 ERROR [STDERR] at javax.faces.component.UIData.createDataModel(UIData.java:785)
      2007-05-21 16:05:54,154 ERROR [STDERR] at javax.faces.component.UIData.getDataModel(UIData.java:765)
      2007-05-21 16:05:54,154 ERROR [STDERR] at javax.faces.component.UIData.getRowCount(UIData.java:191)
      2007-05-21 16:05:54,154 ERROR [STDERR] at org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:210)
      2007-05-21 16:05:54,154 ERROR [STDERR] at org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:123)
      2007-05-21 16:05:54,154 ERROR [STDERR] at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
      2007-05-21 16:05:54,154 ERROR [STDERR] at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:480)
      2007-05-21 16:05:54,154 ERROR [STDERR] at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:361)
      2007-05-21 16:05:54,154 ERROR [STDERR] at org.apache.myfaces.shared_impl.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:54)
      2007-05-21 16:05:54,154 ERROR [STDERR] at org.apache.jsp.app.SRList_jsp._jspx_meth_h_dataTable_0(SRList_jsp.java:312)
      2007-05-21 16:05:54,154 ERROR [STDERR] at org.apache.jsp.app.SRList_jsp._jspx_meth_h_form_0(SRList_jsp.java:174)
      2007-05-21 16:05:54,154 ERROR [STDERR] at org.apache.jsp.app.SRList_jsp._jspx_meth_f_view_0(SRList_jsp.java:122)
      2007-05-21 16:05:54,164 ERROR [STDERR] at org.apache.jsp.app.SRList_jsp._jspService(SRList_jsp.java:81)
      2007-05-21 16:05:54,164 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      2007-05-21 16:05:54,164 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      2007-05-21 16:05:54,164 ERROR [STDERR] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
      2007-05-21 16:05:54,164 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      2007-05-21 16:05:54,164 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      2007-05-21 16:05:54,164 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      2007-05-21 16:05:54,164 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      2007-05-21 16:05:54,164 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      2007-05-21 16:05:54,164 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
      2007-05-21 16:05:54,164 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
      2007-05-21 16:05:54,164 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
      2007-05-21 16:05:54,164 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      2007-05-21 16:05:54,164 ERROR [STDERR] at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
      2007-05-21 16:05:54,164 ERROR [STDERR] at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
      2007-05-21 16:05:54,164 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
      2007-05-21 16:05:54,164 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
      2007-05-21 16:05:54,164 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      2007-05-21 16:05:54,174 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      2007-05-21 16:05:54,174 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      2007-05-21 16:05:54,174 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      2007-05-21 16:05:54,174 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      2007-05-21 16:05:54,174 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      2007-05-21 16:05:54,174 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      2007-05-21 16:05:54,174 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      2007-05-21 16:05:54,174 ERROR [STDERR] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
      2007-05-21 16:05:54,174 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      2007-05-21 16:05:54,174 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      2007-05-21 16:05:54,174 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      2007-05-21 16:05:54,174 ERROR [STDERR] at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      2007-05-21 16:05:54,174 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      2007-05-21 16:05:54,184 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      2007-05-21 16:05:54,184 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      2007-05-21 16:05:54,184 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      2007-05-21 16:05:54,184 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      2007-05-21 16:05:54,184 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      2007-05-21 16:05:54,184 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
      2007-05-21 16:05:54,184 DEBUG [javax.faces.webapp.UIComponentTag] Exited encodeChildren for client-Id: form1:dataTable1
      2007-05-21 16:05:54,184 DEBUG [javax.faces.webapp.UIComponentTag] Entered encodeEnd for client-Id: form1:dataTable1
      2007-05-21 16:05:54,184 DEBUG [javax.faces.webapp.UIComponentTag] Exited encodeEnd for client-Id: form1:dataTable1
      2007-05-21 16:05:54,184 DEBUG [javax.faces.webapp.UIComponentTag] Entered encodeBegin for client-Id: form1:commandLink2
      2007-05-21 16:05:54,184 DEBUG [javax.faces.webapp.UIComponentTag] Exited encodeBegin
      2007-05-21 16:05:54,184 DEBUG [javax.faces.webapp.UIComponentTag] Entered encodeChildren for client-Id: form1:commandLink2
      2007-05-21 16:05:54,184 DEBUG [javax.faces.webapp.UIComponentTag] Exited encodeChildren for client-Id: form1:commandLink2
      2007-05-21 16:05:54,184 DEBUG [javax.faces.webapp.UIComponentTag] Entered encodeEnd for client-Id: form1:commandLink2
      2007-05-21 16:05:54,184 DEBUG [javax.faces.webapp.UIComponentTag] Exited encodeEnd for client-Id: form1:commandLink2
      2007-05-21 16:05:54,184 DEBUG [javax.faces.webapp.UIComponentTag] Entered encodeEnd for client-Id: form1
      2007-05-21 16:05:54,184 DEBUG [javax.faces.webapp.UIComponentTag] Exited encodeEnd for client-Id: form1
      2007-05-21 16:06:27,352 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000


      e questo e' il mio JNDI:
      java:comp namespace of the jmx-console.war application:
       +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
       +- ORB (class: org.jacorb.orb.ORB)
       +- env (class: org.jnp.interfaces.NamingContext)
       | +- security (class: org.jnp.interfaces.NamingContext)
       | | +- realmMapping[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
       | | +- subject[link -> java:/jaas/jmx-console/subject] (class: javax.naming.LinkRef)
       | | +- securityMgr[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
       | | +- security-domain[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
      
      java:comp namespace of the jbossweb-tomcat55.sar/ROOT.war application:
       +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
       +- ORB (class: org.jacorb.orb.ORB)
       +- env (class: org.jnp.interfaces.NamingContext)
       | +- security (class: org.jnp.interfaces.NamingContext)
       | | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
       | | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
       | | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
       | | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)
      
      java:comp namespace of the jbossws.sar/jbossws-context.war application:
       +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
       +- ORB (class: org.jacorb.orb.ORB)
       +- env (class: org.jnp.interfaces.NamingContext)
       | +- security (class: org.jnp.interfaces.NamingContext)
       | | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
       | | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
       | | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
       | | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)
      
      java:comp namespace of the webapp.ear/webapp.war application:
       +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
       +- ORB (class: org.jacorb.orb.ORB)
       +- env (class: org.jnp.interfaces.NamingContext)
       | +- ejb (class: org.jnp.interfaces.NamingContext)
       | | +- ServiceRequestFacade[link -> ServiceRequestFacade] (class: javax.naming.LinkRef)
       | +- security (class: org.jnp.interfaces.NamingContext)
       | | +- realmMapping[link -> java:/jaas/srdemopolicy] (class: javax.naming.LinkRef)
       | | +- subject[link -> java:/jaas/srdemopolicy/subject] (class: javax.naming.LinkRef)
       | | +- securityMgr[link -> java:/jaas/srdemopolicy] (class: javax.naming.LinkRef)
       | | +- security-domain[link -> java:/jaas/srdemopolicy] (class: javax.naming.LinkRef)
      
      java:comp namespace of the jbossmq-httpil.sar/jbossmq-httpil.war application:
       +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
       +- ORB (class: org.jacorb.orb.ORB)
       +- env (class: org.jnp.interfaces.NamingContext)
       | +- security (class: org.jnp.interfaces.NamingContext)
       | | +- realmMapping[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)
       | | +- subject[link -> java:/jaas/jbossmq/subject] (class: javax.naming.LinkRef)
       | | +- securityMgr[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)
       | | +- security-domain[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)
      
      java:comp namespace of the console-mgr.sar/web-console.war application:
       +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
       +- ORB (class: org.jacorb.orb.ORB)
       +- env (class: org.jnp.interfaces.NamingContext)
       | +- security (class: org.jnp.interfaces.NamingContext)
       | | +- realmMapping[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
       | | +- subject[link -> java:/jaas/jmx-console/subject] (class: javax.naming.LinkRef)
       | | +- securityMgr[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
       | | +- security-domain[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
      
      java:comp namespace of the http-invoker.sar/invoker.war application:
       +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
       +- ORB (class: org.jacorb.orb.ORB)
       +- env (class: org.jnp.interfaces.NamingContext)
       | +- security (class: org.jnp.interfaces.NamingContext)
       | | +- realmMapping[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
       | | +- subject[link -> java:/jaas/jmx-console/subject] (class: javax.naming.LinkRef)
       | | +- securityMgr[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
       | | +- security-domain[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
      
      java: Namespace
       +- jaas (class: javax.naming.Context)
       | +- srdemopolicy (class: org.jboss.security.plugins.SecurityDomainContext)
       | +- jmx-console (class: org.jboss.security.plugins.SecurityDomainContext)
       | +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
       | +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
       +- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
       +- comp.ejb3 (class: javax.naming.Context)
       | NonContext: null
       +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
       +- JBossCorbaNaming (class: org.omg.CosNaming.NamingContextExt)
       +- DefaultDS (class: javax.sql.DataSource)
       +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
       +- TransactionManager (class: org.jboss.tm.TxManager)
       +- JBossCorbaPOA (class: org.omg.PortableServer.POA)
       +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
       +- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
       +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
       +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
       +- JBossCorbaInterfaceRepositoryPOA (class: org.omg.PortableServer.POA)
       +- Mail (class: javax.mail.Session)
       +- JBossCorbaORB (class: org.omg.CORBA.ORB)
       +- timedCacheFactory (class: javax.naming.Context)
      Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy
       +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
       +- comp (class: javax.naming.Context)
      
      Global JNDI Namespace
       +- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
       +- jmx (class: org.jnp.interfaces.NamingContext)
       | +- invoker (class: org.jnp.interfaces.NamingContext)
       | | +- RMIAdaptor (proxy: $Proxy46 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
       | +- rmi (class: org.jnp.interfaces.NamingContext)
       | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
       +- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
       +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
       +- UserTransactionSessionFactory (proxy: $Proxy12 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
       +- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
       +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
       +- invokers (class: org.jnp.interfaces.NamingContext)
       | +- ccmwe1798z (class: org.jnp.interfaces.NamingContext)
       | | +- iiop (class: org.jboss.invocation.iiop.IIOPInvoker)
       +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
       +- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
       +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
       +- queue (class: org.jnp.interfaces.NamingContext)
       | +- A (class: org.jboss.mq.SpyQueue)
       | +- testQueue (class: org.jboss.mq.SpyQueue)
       | +- ex (class: org.jboss.mq.SpyQueue)
       | +- DLQ (class: org.jboss.mq.SpyQueue)
       | +- D (class: org.jboss.mq.SpyQueue)
       | +- C (class: org.jboss.mq.SpyQueue)
       | +- B (class: org.jboss.mq.SpyQueue)
       +- topic (class: org.jnp.interfaces.NamingContext)
       | +- testDurableTopic (class: org.jboss.mq.SpyTopic)
       | +- testTopic (class: org.jboss.mq.SpyTopic)
       | +- securedTopic (class: org.jboss.mq.SpyTopic)
       +- console (class: org.jnp.interfaces.NamingContext)
       | +- PluginManager (proxy: $Proxy47 implements interface org.jboss.console.manager.PluginManagerMBean)
       +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
       +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
       +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
       +- webapp (class: org.jnp.interfaces.NamingContext)
       | +- ServiceRequestFacade (class: org.jnp.interfaces.NamingContext)
       | | +- local (proxy: $Proxy185 implements interface org.srdemo.business.ServiceRequestFacadeLocal,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBLocalObject)
       | | +- remote (proxy: $Proxy184 implements interface org.srdemo.business.ServiceRequestFacade,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)
       +- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
       +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
      
      


      Come devo fare la lookup??

      jboss-web.xml:

      <jboss-web>
       <security-domain>java:/jaas/srdemopolicy</security-domain>
       <ejb-local-ref>
       <ejb-ref-name>ejb/ServiceRequestFacade</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <local>org.srdemo.business.ServiceRequestFacadeLocal</local>
       <local-jndi-name>ServiceRequestFacade</local-jndi-name>
       </ejb-local-ref>
      </jboss-web>
      


      parte del web.xml
       <ejb-local-ref>
       <ejb-ref-name>ejb/ServiceRequestFacade</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <local-home></local-home>
       <local>org.srdemo.business.ServiceRequestFacadeLocal</local>
       <ejb-link>ServiceRequestFacade</ejb-link>
       </ejb-local-ref>
      </web-app>
      


        • 1. Re: EJB3 - NameNotFoundException HELP! ITALIANO
          jaikiran pai Master

          Can you post the code where you are doing the lookup, the org.srdemo.view.util.ServiceLocator.getFacadeService method.

          • 2. Re: EJB3 - NameNotFoundException HELP! ITALIANO
            Andrea Ggggggg Newbie

             

            package org.srdemo.view.util;
            
            import java.util.HashMap;
            import java.util.Hashtable;
            
            import javax.naming.Context;
            import javax.naming.InitialContext;
            import javax.naming.NamingException;
            
            public class ServiceLocator {
             /**
             * Singleton Instance of this class
             */
             private static ServiceLocator serviceLocator = null;
            
             /**
             * InitialContext object
             */
             InitialContext context = null;
            
             /**
             * Cache where the objects can be stored for later
             * retrieval.
             * This enhances the performance.
             */
             HashMap serviceCache = null;
            
             /**
             * Constructor to initialize the class
             *
             * @exception NamingException In case an exception is
             * generated
             */
             public ServiceLocator() throws NamingException {
             // Start the initial context
            
             /*Hashtable props = new Hashtable();
             props.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
             props.put("java.naming.provider.url", "jnp://localhost:1099");
             props.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
             context = new InitialContext(props);*/
            
            
             context = new InitialContext();
             // Initialize the HashMap to store 3 objects
             serviceCache = new HashMap(5);
             }
            
             /**
             * Returns the singleton instance
             *
             * @exception NamingException In case an exception is
             * generated
             * @return Singleton Instance
             */
             public static ServiceLocator getInstance() throws
             NamingException {
             if (serviceLocator == null) {
             // If the object is not created, then create it
             serviceLocator = new ServiceLocator();
             }
            
             // Return the singleton instance
             return serviceLocator;
             }
            
             /**
             * This is the method that returns the service
             *
             * @param jndiName JNDI Lookup needed for invoking the
             * service
             * @exception NamingException In case an exception is
             * generated
             * @return Service Object
             */
             public Object getService(String jndiName) throws
             NamingException {
             if (!serviceCache.containsKey(jndiName)) {
             // If the object is not saved in the cache, then do a
             //lookup and save it
             serviceCache.put(jndiName, context.lookup(jndiName));
             }
             // Return the required object
             return serviceCache.get(jndiName);
             }
            
             public Object getFacadeService(String jndiName)throws
             NamingException{
             if (!serviceCache.containsKey(jndiName)) {
             //lookup and save in cache
             serviceCache.put(jndiName, context.lookup(jndiName));
             }
             return serviceCache.get(jndiName);
             }
            }
            


            • 3. Re: EJB3 - NameNotFoundException HELP! ITALIANO
              jaikiran pai Master

              What's the jndiname that you are passing to the

              public Object getFacadeService(String jndiName)


              method. Going by the JNDI tree contents that you posted earlier, you should either pass java:/comp/env/ejb/ServiceRequestFacade to lookup from the java: namespace or webapp/ServiceRequestFacade/local to lookup from the global JNDI namespace