I try to run the Fibo-example from 1.30 Tutorial.
(JBoss 4.01, Eclipse 3.01, IDE 1.40, Jdk 1.50, WinXP)

The lookup for the Ejb-Ref in ComputeServlet.Init() raises an exeception:

        Context context = new InitialContext();
        Object ref = context.lookup("java:/comp/env/ejb/Fibo");

        bang!   

        javax.servlet.ServletException: Could not dereference object
        tutorial.web.ComputeServlet.init(ComputeServlet.java:67)
        
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
        
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
        
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:54)
        
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
        org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
        
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
        
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
        
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
        
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
        java.lang.Thread.run(Thread.java:595)   


All DD's seem to be fine (see below) and there are no errors during deployment. 
I modified the code, using
context.list() to browse "java:/comp/env/"; the entry for Fibo is present.

Is this an security-issue, missing rights for the servlet to access the ejb ?
(exceptions namespace: org.jboss.web.tomcat.security.*)

Thanks a lot
Christian




---------------------------------------------------------------------------------------


JBoss.xml:
        
                 <ejb-name>Fibo</ejb-name>
                 <jndi-name>ejb/Fibo</jndi-name>
        
        
ejb-jar.xml
        
                 <![CDATA[Description for Fibo]]>
                 <display-name>Name for Fibo</display-name>
                 <ejb-name>Fibo</ejb-name>
                 tutorial.interfaces.FiboHome
                 tutorial.interfaces.Fibo
                 <ejb-class>tutorial.ejb.FiboBean</ejb-class>
                 <session-type>Stateless</session-type>
                 <transaction-type>Container</transaction-type>
      
      
jboss-web.xml:
        <ejb-ref>
                <ejb-ref-name>ejb/Fibo</ejb-ref-name>
                <jndi-name>ejb/Fibo</jndi-name>
        </ejb-ref>
        
web.xml:        
        <ejb-ref >
              <![CDATA[Reference to the Fibo EJB]]>
              <ejb-ref-name>ejb/Fibo</ejb-ref-name>
              <ejb-ref-type>Session</ejb-ref-type>
              tutorial.interfaces.FiboHome
              tutorial.interfaces.Fibo
        </ejb-ref>      

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3863315#3863315

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3863315


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to