0 Replies Latest reply on Jan 4, 2006 12:48 PM by Teresa Canales

    Failed to parse WEB-INF/jboss-web.xml

    Teresa Canales Newbie

      Hi,

      I am getting the following warning using Jboss 4.0.2:

      When I run the application and try to use the ejb it works (don't know why). I checked my application and found that I am using the same name and jndi in all the descriptors. Why would I get this warning? What am I missing?

      12:11:30,656 WARN [Tomcat5] Failed to parse descriptors for war(file:/C:/Teresa/Downloads/Jboss/jboss-4.0.2/server/default/deploy/MyEar.ear/MyWebProject.war/)
      org.jboss.deployment.DeploymentException: Failed to parse WEB-INF/jboss-web.xml; - nested throwable: (org.jboss.deployment.DeploymentException: resource-ref ejb/HelloWorld found in jboss-web.xml but not in web.xml) at org.jboss.web.AbstractWebContainer.parseMetaData(AbstractWebContainer.java:689)
      at org.jboss.web.AbstractWebContainer.init(AbstractWebContainer.java:328)
      at org.jboss.deployment.MainDeployer.init(MainDeployer.java:828)
      at org.jboss.deployment.MainDeployer.init(MainDeployer.java:848)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:765)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
      at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy8.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:325)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)

      jboss-web.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss-web PUBLIC
       "-//JBoss//DTD Web Application 2.4//EN"
       "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
      <jboss-web>
       <resource-ref>
       <res-ref-name>jdbc/MySqlDS</res-ref-name>
       <!-- <res-type>javax.sql.DataSource</res-type> -->
       <jndi-name>java:MySqlDS</jndi-name>
       </resource-ref>
       <resource-ref>
       <res-ref-name>ejb/HelloWorld</res-ref-name>
       <jndi-name>ejb/HelloWorld</jndi-name>
       </resource-ref>
      </jboss-web>
      


      web.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
       http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
      
       <servlet>
       <description>
       This is the description of my J2EE component
       </description>
       <display-name>
       This is the display name of my J2EE component
       </display-name>
       <servlet-name>SecondServlet</servlet-name>
       <servlet-class>com.test.servlets.SecondServlet</servlet-class>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>SecondServlet</servlet-name>
       <url-pattern>/servlet/SecondServlet</url-pattern>
       </servlet-mapping>
      
       <!-- JDBC DataSources (java:comp/env/jdbc) -->
       <resource-ref>
       <description>The default DS</description>
       <res-ref-name>jdbc/MySqlDS</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
       </resource-ref>
       <ejb-ref>
       <description>The Hello World Ejb</description>
       <ejb-ref-name>ejb/HelloWorld</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <home>HelloWorldHome</home>
       <remote>HelloWorld</remote>
       <ejb-link>HelloWorldEJB</ejb-link>
       </ejb-ref>
      
      </web-app>
      


      jboss.xml
      <!DOCTYPE jboss PUBLIC
       "-//JBoss//DTD JBOSS 4.0//EN"
       "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
      <jboss>
       <enterprise-beans>
       <session>
       <ejb-name>HelloWorldEJB</ejb-name>
       <jndi-name>ejb/HelloWorld</jndi-name>
       </session>
       </enterprise-beans>
      </jboss>
      


      Any help is appreciated. Thanks.