web.xml parsing problem with jboss/catalina versus jboss/jet
attila1 Mar 25, 2002 11:21 AMHi ,
I'm trying to deploy a simple app called hello-planet (the same one that comes with orion) on jboss and running with the following parsing problem with web.xml only when I run jboss/catalina. If I run jboss/jetty, it gets deployed without any problem . Does anyone have any idea why I'm getting the parsing problem with jboss/catalina ? Are my deployment descriptor files (jboss-web.xml and web.xml) correct ? Thanks all for any feedback.
[INFO,Default] org.xml.sax.SAXParseException: Element "web-app" does not allow "resource-ref" here.
[ERROR,EmbeddedCatalinaServiceSX] ContextConfig[/hello-planet] Parse error in application web.xml
Here's my web.xml :
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<display-name>Orion Primer Web Application</display-name>
<servlet-name>hello.web.HelloServlet</servlet-name>
Servlet that calls the Hello bean
<servlet-class>hello.web.HelloServlet</servlet-class>
<ejb-ref>
<ejb-ref-name>ejb/HelloHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
hello.ejb.HelloHome
hello.ejb.Hello
</ejb-ref>
<resource-ref>
<res-ref-name>Queue</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
Here's my jboss-web.xml :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.2//EN" "http://www.jboss.org/j2ee/dtd/jboss-web.dtd">
<jboss-web>
<!-- Resource references -->
<resource-ref>
<res-ref-name>Queue</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<display-name>Orion Primer Web Application</display-name>
<servlet-name>hello.web.HelloServlet</servlet-name>
Servlet that calls the Hello bean
<servlet-class>hello.web.HelloServlet</servlet-class>
<!-- EJB References -->
<!-- <ejb-ref>
<ejb-ref-name>Account</ejb-ref-name>
<jndi-name>ejb/bank/Account</jndi-name>
</ejb-ref>
-->
<ejb-ref>
<ejb-ref-name>ejb/HelloHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
hello.ejb.HelloHome
hello.ejb.Hello
<jndi-name>ejb/Hello</jndi-name>
</ejb-ref>
<servlet-mapping>
<servlet-name>hello.web.HelloServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</jboss-web>