4 Replies Latest reply on Jan 6, 2002 8:12 PM by davycheung

    Error message on Jboss_Tomcat startup. Plz help!

    davycheung

      I got Jboss-Tomcat started and those examples run fine. However, the following error message occurs and I have not idea what they mean for. Please help.

      [14:38:40,352,EmbeddedCatalinaServiceSX] Failed to setup web application ENC
      javax.naming.NamingException: ejb-ref: ejb/Account, expected jndi-name in jboss-web.xml
      at org.jboss.web.AbstractWebContainer.linkEjbRefs(AbstractWebContainer.java:428)
      at org.jboss.web.AbstractWebContainer.parseWebAppDescriptors(AbstractWebContainer.java:339)
      at org.jboss.web.AbstractWebContainer$DescriptorParser.parseWebAppDescriptors(AbstractWebContainer.java:471)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.contextInit(EmbeddedCatalinaServiceSX.java:484)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.access$100(EmbeddedCatalinaServiceSX.java:74)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX$1.lifecycleEvent(EmbeddedCatalinaServiceSX.java:420)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3334)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.createWebContext(EmbeddedCatalinaServiceSX.java:428)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.performDeploy(EmbeddedCatalinaServiceSX.java:282)
      at org.jboss.web.AbstractWebContainer.deploy(AbstractWebContainer.java:191)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:505)
      at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:459)
      at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:190)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:395)
      at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:233)
      at org.jboss.deployment.AutoDeployer.startService(AutoDeployer.java:371)
      at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:103)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:967)
      at $Proxy0.start(Unknown Source)
      at org.jboss.util.ServiceControl.start(ServiceControl.java:79)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.Main.(Main.java:208)
      at org.jboss.Main$1.run(Main.java:110)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.Main.main(Main.java:106)


      Thanks in advance!
      Davy

        • 1. Re: Error message on Jboss_Tomcat startup. Plz help!

          Can you post your jboss-web.xml.
          It looks like you have done the following

          <ejb-ref>
          <ejb-ref-name>ejb/Account</ejb-ref-name>
          </ejb-ref>

          when you should have

          <ejb-ref>
          <ejb-ref-name>ejb/Account</ejb-ref-name>
          <jndi-name>???????</jndi-name>
          </ejb-ref>

          Have a look at

          http://www.jboss.org/online-manual/HTML/ch07s22.html

          By the way, you don't need to restart the server
          when you change a bean. Just replace it in the
          deploy directory and wait a few seconds.

          Regards,
          Adrian

          • 2. Re: Error message on Jboss_Tomcat startup. Plz help!
            davycheung

            Thanks warjort.

            I had checked the jar file and saw the jboss-web.xml is missed. The following is the ejb reference part that i extract from web.xml. What should I change when i need to create a jboss-web.xml.


            <!-- EJB Reference -->
            <ejb-ref>
            Example EJB Reference
            <ejb-ref-name>ejb/Account</ejb-ref-name>
            <ejb-ref-type>Entity</ejb-ref-type>
            com.mycompany.mypackage.AccountHome
            com.mycompany.mypackage.Account
            </ejb-ref>

            <!-- Local EJB Reference -->
            <ejb-local-ref>
            Example Local EJB Reference
            <ejb-ref-name>ejb/ProcessOrder</ejb-ref-name>
            <ejb-ref-type>Session</ejb-ref-type>
            <local-home>com.mycompany.mypackage.ProcessOrderHome</local-home>
            com.mycompany.mypackage.ProcessOrder
            </ejb-local-ref>


            Many thanks!

            Davy

            • 3. Re: Error message on Jboss_Tomcat startup. Plz help!

              If you don't have jboss-web.xml that's ok.

              In web.xml you need to add either <ejb-link> for beans
              in the same application or <jndi-name> for beans in
              other applications.

              See the link above.

              If you are still struggling try the web forum.
              This error shouldn't stop the server installing.

              If you post in the correct forum it is easier for
              other people to search for similar problems :-)

              Regards,
              Adrian

              • 4. Re: Error message on Jboss_Tomcat startup. Plz help!
                davycheung

                Thanks a lot.