1 Reply Latest reply on Mar 6, 2007 9:23 AM by Wolfgang Knauf

    Problem while deploying some demo EJB

    Ramzy Jelassi Newbie

      Hi ,

      i tried to deploy and test a sample application that i retrieved from this link: http://www.laliluna.de/ejb-3-struts-tutorial-jboss.html

      while i am attempting to access the welcome page at:
      http://localhost:8080/EJBStrutsWeb/welcome.do
      i can easily display the welcome page but when i try to test some EJB functionalities i have this error stack and i don't find the reason at all ;(

      [STDOUT] 10:53:30,696 ERROR [[action]] Servlet.service() for servlet action threw exception
      java.lang.RuntimeException: javax.naming.NameNotFoundException: BookDaoImp not bound
       at de.laliluna.library.struts.action.CreateSampleDataAction.execute(CreateSampleDataAction.java:52)
       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
       at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Unknown Source)
      Caused by: javax.naming.NameNotFoundException: BookDaoImp not bound
       at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
       at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
       at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
       at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
       at sun.rmi.transport.Transport$1.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at sun.rmi.transport.Transport.serviceCall(Unknown Source)
       at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
       at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
       at java.lang.Thread.run(Unknown Source)
       at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
       at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
       at sun.rmi.server.UnicastRef.invoke(Unknown Source)
       at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
       at javax.naming.InitialContext.lookup(Unknown Source)
       at de.laliluna.library.struts.action.CreateSampleDataAction.execute(CreateSampleDataAction.java:47)
       ... 24 more
      
      


      i am using MyEclipse5 and jboss-4.0.4.GA , i even tried with jboss-4.0.5.GA and even jboss-5.0.0.Beta1 but still have the same error , can anyone please try to help me i am really desperated

        • 1. Re: Problem while deploying some demo EJB
          Wolfgang Knauf Master

          Hi !

          I think that the remote/local JNDI names in BookDaoImp are wrong.
          JBoss EJB3 builds a default JNDI name as "EARName/EJBName/local" or "EARName/EJBName/remote". The earname part of the name is missing.

          Take a look at the jndiview in your JMX console, this will tell you to which name the bean is bound.

          I suspect something like "EJBStruts/BookDaoImp/remote".

          Hope this helps

          Wolfgang