1 Reply Latest reply on Sep 5, 2005 7:32 AM by Jochen Froelke

    Fibo Tutorial NamingException

    Jochen Froelke Newbie

      Hello,

      I'm sorry that I have to annoy the people here with my problem with the tutorial, but I work now about 3 Days on this point. I get all the time this execption during the deployment.

      13:27:02,343 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-4.0.2/server/default/deploy/FiboApp.ear
      13:27:02,625 INFO [EjbModule] Deploying ejb/Fibo
      13:27:02,765 INFO [EJBDeployer] Deployed: file:/C:/jboss-4.0.2/server/default/tmp/deploy/tmp36902FiboApp.ear-contents/FiboEJB.jar
      13:27:02,812 INFO [TomcatDeployer] deploy, ctxPath=/fibo, warUrl=file:/C:/jboss-4.0.2/server/default/tmp/deploy/tmp36902FiboApp.ear-contents/FiboWeb-exp.war/
      13:27:02,812 ERROR [WebModule] Starting failed jboss.web.deployment:id=-1665134653,war=FiboWeb.war
      org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: ejb-ref: ejb/Fibo, no ejb-link in web.xml and no jndi-name in jboss-web.xml)
       at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:366)
      ...
      



      My files look like this here:
      jboss.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">
      
      <jboss>
      
       <enterprise-beans>
      
       <!--
       To add beans that you have deployment descriptor info for, add
       a file to your XDoclet merge directory called jboss-beans.xml that contains
       the <session></session>, <entity></entity> and <message-driven></message-driven>
       markup for those beans.
       -->
      
       <session>
       <ejb-name>Fibo</ejb-name>
       <jndi-name>ejb/Fibo</jndi-name>
      
       </session>
      
       </enterprise-beans>
      
       <resource-managers>
       </resource-managers>
      
      </jboss>
      


      ejb-jar.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
      
      <ejb-jar >
      
       <description>[CDATA[No Description.]]</description>
       <display-name>Generated by XDoclet</display-name>
      
       <enterprise-beans>
      
       <!-- Session Beans -->
       <session >
       <description>[CDATA[Description for Fibo]]</description>
       <display-name>Name for Fibo</display-name>
      
       <ejb-name>Fibo</ejb-name>
      
       <home>tutorial.interfaces.FiboHome</home>
       <remote>tutorial.interfaces.Fibo</remote>
       <ejb-class>tutorial.ejb.FiboBean</ejb-class>
       <session-type>Stateless</session-type>
       <transaction-type>Container</transaction-type>
      
       </session>
      
       <!--
       To add session beans that you have deployment descriptor info for, add
       a file to your XDoclet merge directory called session-beans.xml that contains
       the <session></session> markup for those beans.
       -->
      
       <!-- Entity Beans -->
       <!--
       To add entity beans that you have deployment descriptor info for, add
       a file to your XDoclet merge directory called entity-beans.xml that contains
       the <entity></entity> markup for those beans.
       -->
      
       <!-- Message Driven Beans -->
       <!--
       To add message driven beans that you have deployment descriptor info for, add
       a file to your XDoclet merge directory called message-driven-beans.xml that contains
       the <message-driven></message-driven> markup for those beans.
       -->
      
       </enterprise-beans>
      
       <!-- Relationships -->
      
       <!-- Assembly Descriptor -->
       <assembly-descriptor >
       <!--
       To add additional assembly descriptor info here, add a file to your
       XDoclet merge directory called assembly-descriptor.xml that contains
       the <assembly-descriptor></assembly-descriptor> markup.
       -->
      
       <!-- finder permissions -->
      
       <!-- transactions -->
      
       <!-- finder transactions -->
       </assembly-descriptor>
      
      </ejb-jar>
      


      jboss-web.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
      
      <jboss-web>
      
       <!-- Resource Environment References -->
       <!--
       For additional resouce-env-ref tags add a merge file called jbossweb-resource-env-ref.xml
       -->
      
       <!-- Resource references -->
       <!--
       For additional resouce-ref tags add a merge file called jbossweb-resource-ref.xml
       -->
      
       <!-- EJB References -->
       <!--
       For additional ejb-ref tags add a merge file called jbossweb-ejb-ref.xml
       -->
       <ejb-ref>
       <ejb-ref-name>ejb/Fibo</ejb-ref-name>
       <jndi-name>ejb/Fibo</jndi-name>
       </ejb-ref>
      
       <!-- EJB Local References -->
      
      </jboss-web>
      


      web.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
      
      <web-app >
       <distributable/>
      
       <!--
       To use non XDoclet filters, create a filters.xml file that
       contains the additional filters (eg Sitemesh) and place it in your
       project's merge dir. Don't include filter-mappings in this file,
       include them in a file called filter-mappings.xml and put that in
       the same directory.
       -->
      
       <!--
       To use non XDoclet filter-mappings, create a filter-mappings.xml file that
       contains the additional filter-mappings and place it in your
       project's merge dir.
       -->
      
       <!--
       To use non XDoclet listeners, create a listeners.xml file that
       contains the additional listeners and place it in your
       project's merge dir.
       -->
      
       <!--
       To use non XDoclet servlets, create a servlets.xml file that
       contains the additional servlets (eg Struts) and place it in your
       project's merge dir. Don't include servlet-mappings in this file,
       include them in a file called servlet-mappings.xml and put that in
       the same directory.
       -->
      
       <servlet>
       <servlet-name>Compute</servlet-name>
       <display-name>Computation Servlet</display-name>
       <description>[CDATA[Servlet that compute Fibonacci suite]]</description>
       <servlet-class>tutorial.web.ComputeServlet</servlet-class>
      
       </servlet>
      
       <servlet-mapping>
       <servlet-name>Compute</servlet-name>
       <url-pattern>/Compute</url-pattern>
       </servlet-mapping>
      
       <!--
       To specify mime mappings, create a file named mime-mappings.xml, put it in your project's mergedir.
       Organize mime-mappings.xml following this DTD slice:
      
       <!ELEMENT mime-mapping (extension, mime-type)>
       -->
      
       <!--
       To specify error pages, create a file named error-pages.xml, put it in your project's mergedir.
       Organize error-pages.xml following this DTD slice:
      
       <!ELEMENT error-page ((error-code | exception-type), location)>
       -->
      
       <!--
       To add taglibs by xml, create a file called taglibs.xml and place it
       in your merge dir.
       -->
      
       <!--
       To set up security settings for your web app, create a file named web-security.xml, put it in your project's mergedir.
       Organize web-security.xml following this DTD slice:
      
       <!ELEMENT security-constraint (display-name?, web-resource-collection+, auth-constraint?, user-data-constraint?)>
       <!ELEMENT web-resource-collection (web-resource-name, description?, url-pattern*, http-method*)>
       <!ELEMENT web-resource-name (#PCDATA)>
       <!ELEMENT url-pattern (#PCDATA)>
       <!ELEMENT http-method (#PCDATA)>
       <!ELEMENT user-data-constraint (description?, transport-guarantee)>
       <!ELEMENT transport-guarantee (#PCDATA)>
      
       <!ELEMENT login-config (auth-method?, realm-name?, form-login-config?)>
       <!ELEMENT auth-method (#PCDATA)>
       <!ELEMENT realm-name (#PCDATA)>
       <!ELEMENT form-login-config (form-login-page, form-error-page)>
       <!ELEMENT form-login-page (#PCDATA)>
       <!ELEMENT form-error-page (#PCDATA)>
       -->
      
       <ejb-ref >
       <description>[CDATA[Reference to the Fibo EJB]]</description>
       <ejb-ref-name>ejb/Fibo</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <home>tutorial.interfaces.FiboHome</home>
       <remote>tutorial.interfaces.Fibo</remote>
       </ejb-ref>
      
      </web-app>
      


      Can anyone give me an advice?

      Cheers Dussel