I am having some problems loading embedded OpenEJB 3.1.2 in a shared Tomcat 5.5 environment that contains legacy webapps written to servlet spec 2.3 under Tomcat 4. These webapps contain no EJBs and have no need for OpenEJB support. On Tomcat startup, errors such as the following are written to the Tomcat log related to different webapps.
org.apache.openejb.OpenEJBException: Cannot unmarshall the web.xml file: jndi:/localhost/anOldWebapp/WEB-INF/web.xml: unexpected element (uri:"http://java.sun.com/xml/ns/javaee", local:"taglib"). Expected elements are <{http://java.sun.com/xml/ns/javaee}display-name>,<{http://java.sun.com/xml/ns/javaee}session-config>,<{http://java.sun.com/xml/ns/javaee}post-construct>,<{http://java.sun.com/xml/ns/javaee}distributable>,<{http://java.sun.com/xml/ns/javaee}security-role>,<{http://java.sun.com/xml/ns/javaee}security-constraint>,<{http://java.sun.com/xml/ns/javaee}ejb-ref>,<{http://java.sun.com/xml/ns/javaee}servlet-mapping>,<{http://java.sun.com/xml/ns/javaee}jsp-config>,<{http://java.sun.com/xml/ns/javaee}filter>,<{http://java.sun.com/xml/ns/javaee}context-param>,<{http://java.sun.com/xml/ns/javaee}listener>,<{http://java.sun.com/xml/ns/javaee}login-config>,<{http://java.sun.com/xml/ns/javaee}icon>,<{http://java.sun.com/xml/ns/javaee}resource-ref>,<{http://java.sun.com/xml/ns/javaee}mime-mapping>,<{http://java.sun.com/xml/ns/javaee}ejb-local-ref>,<{http://java.sun.com/xml/ns/javaee}welcome-file-list>,<{http://java.sun.com/xml/ns/javaee}message-destination-ref>,<{http://java.sun.com/xml/ns/javaee}message-destination>,<{http://java.sun.com/xml/ns/javaee}servlet>,<{http://java.sun.com/xml/ns/javaee}env-entry>,<{http://java.sun.com/xml/ns/javaee}description>,<{http://java.sun.com/xml/ns/javaee}service-ref>,<{http://java.sun.com/xml/ns/javaee}persistence-context-ref>,<{http://java.sun.com/xml/ns/javaee}locale-encoding-mapping-list>,<{http://java.sun.com/xml/ns/javaee}resource-env-ref>,<{http://java.sun.com/xml/ns/javaee}persistence-unit-ref>,<{http://java.sun.com/xml/ns/javaee}filter-mapping>,<{http://java.sun.com/xml/ns/javaee}pre-destroy>,<{http://java.sun.com/xml/ns/javaee}error-page> at org.apache.openejb.config.ReadDescriptors.readWebApp(ReadDescriptors.java:494) at org.apache.openejb.tomcat.catalina.TomcatWebAppBuilder.createWebModule(TomcatWebAppBuilder.java:624) at org.apache.openejb.tomcat.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:541) at org.apache.openejb.tomcat.catalina.TomcatWebAppBuilder.start(TomcatWebAppBuilder.java:242) at org.apache.openejb.tomcat.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:58) at ... It appears that OpenEJB is unable to parse the web.xml syntax of this older webapp, which references DTD "http://java.sun.com/dtd/web-app_2_3.dtd" rather than the more current JEE schemas. Putting aside the point that the old webapps should really be upgraded, is it possible to configure OpenEJB to ignore them altogether, or to target only those (newer) webapps that require it? In any shared runtime environment, it is necessary to play nice with existing applications. I would think that ignoring them might also improve the performance of Tomcat startup, especially when there are many such webapps active in the environment. Alternatively, is there another non-intrusive way to avoid raising the above errors? Thx in advance, Fred -- View this message in context: http://n4.nabble.com/How-can-OpenEJB-ignore-old-webapps-in-Tomcat-tp1051311p1051311.html Sent from the OpenEJB User mailing list archive at Nabble.com.
