There are probably required elements that are not present. The DTD/XLS could specify elements as being required and you can get an error during validation in processing the Resource tag. You may not be able to create an empty resource element or there are attributes that are required. Try modifying your resource to something more like:
<Resource auth="Container" description="User database that can be updated and saved" name="UserDatabase" type="org.apache.catalina.UserDatabase" /> My simple guess would be that it is trying to invoce a method on a class defined in the "type" attribute. You are not providing one so it would be a null argument. I'd have to dig in code to see for sure but it may not protect against that because a resource without a class to manage it, makes no sense at all. Robert S. Harper Senior Engineer Information Access Technology, Inc. 1100 East 6600 South, Suite 300 Salt Lake City Utah USA 84121-7411 (801)265-8800 Ext. 255 FAX (801)265-8880 This e-mail is intended only for the addressee and may contain confidential and/or privileged information. Any review, retransmission, or action taken upon this information by persons other than the intended recipient is prohibited by law. If you received this communication in error, please contact us immediately at 801-265-8800. Although this e-mail and any attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that anything received or opened is virus free. No responsibility is accepted by IAT for any loss or damage in the event that such a virus or defect exists. -----Original Message----- From: Pete [mailto:[EMAIL PROTECTED] Sent: Friday, January 26, 2007 12:05 PM To: users@tomcat.apache.org Subject: XML Parse problem in a webapp context.xml Hello all, I've searched high and low before posting tried every test I could think of before posting here... This problem seems too simple to be a bug, but can't find a method of resolving it. I decided to skip the port of our application (ran fine on WAS 6 - JVM 1.5) that was that originated the problem and boiled it down to a WAR with 1 servlet that attempts to do a JNDI lookup to get a datasource. (This test web app works in WAS) Condensed details below. I hope someone can shed light on what is going on, thanks! -Pete The details: -Tomcat 6 - JVM 1.5 -WAR file created in Rational 6 -App does DB2 lookups (not even concerned about the code itsel yet) -Resources defined correctly in WEB-INF/web.xml (auto generated by Rational 6) -Added META-INF/context.xml -Added <WatchedResource>META-INF/context.xml</WatchedResource> in conf/context.xml -Automatic loading of app generates: conf/Catalina/localhost/TestWeb.xml - It looks like the parsing problem is in web.xml (from below error), but I could not find anything wrong there. I did not modify conf/web.xml and WEB-INF/web.xml is auto generated. So I started looking in TestWeb.xml and simplified it. Seems anything that I put in that file fails other than just: (no more errors in log file) <Context> </Context> These even fail: - <Context><Resource /></Context> - <Context><Resource name="test"/></Context> - Also had all details in the Context tag for the app and Resource tag as described in the documentation for DataSources (incl. DB2 datasources) I also tried putting the Resource definition in: -GlobalResources block of server.xml -The error generated is: (from catalina*.log) FINE: Processing context [/TestWeb] configuration file C:\Program Files\Apache Software Foundation\T omcat 6.0\conf\Catalina\localhost\TestWeb.xml null Jan 26, 2007 12:13:17 PM org.apache.tomcat.util.digester.Digester endElement SEVERE: End event threw exception java.lang.reflect.InvocationTargetException ... at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.jav a:899) at org.apache.catalina.startup.SetNextNamingRule.end(SetNextNamingRule.java:98) at org.apache.tomcat.util.digester.Rule.end(Rule.java:229) ... at org.apache.catalina.deploy.NamingResources.addResource(NamingResources.java: 275) ... 47 more Jan 26, 2007 12:13:17 PM org.apache.catalina.startup.ContextConfig processContextConfig SEVERE: Parse error in default web.xml java.lang.NullPointerException at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:27 26) ... ____________________________________________________________________________ ________ It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/mail/ --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]