tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pete <pwkp...@yahoo.com>
Subject XML Parse problem in a webapp context.xml
Date Fri, 26 Jan 2007 19:05:19 GMT
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.java: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:2726)
...







 
____________________________________________________________________________________
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message