Hello,

I am trying to develop a web application in Java, using NetBeans 6.5.1.
NetBeans installed Tomcat 6.0.18.
I am using java 1.6 update 11.

In my application I have a thread that loops and reads a configuration file
and
if it finds any changes in configuration it takes some action.

The configuration file is in XML form and it is being accessed (read/write)
using java.util.Properties class.

When the thread starts, an object of the Properties class is created with
the
following code:

Properties props = new Properties();
File file = new File("a file");
if (file.exists()) {
    try {
        props.loadFromXML(new FileInputStream(file));
    } catch (Exception e) {
    System.out.println(e.getMessage());
    }



At the moment that props.loadFromXML method is called I get the following
output on the console:



May 3, 2009 11:18:43 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
May 3, 2009 11:18:43 PM
com.sun.xml.ws.transport.http.servlet.WSServletDelegate
destroy
INFO: WSSERVLET15: JAX-WS servlet destroyed
May 3, 2009 11:18:43 PM
com.sun.xml.ws.transport.http.servlet.WSServletContextListener
contextDestroyed
INFO: WSSERVLET13: JAX-WS context listener destroyed


Context Initialized......


May 3, 2009 11:18:47 PM org.apache.catalina.loader.WebappClassLoader
findResourceInternal
INFO: Illegal access: this web application instance has been stopped
already.
Could not load META-INF/services/javax.xml.parsers.DocumentBuilderFactory.
The
eventual following stack trace is caused by an error thrown for debugging
purposes as well as to attempt to terminate the thread which caused the
illegal
access, and has no functional impact.
May 3, 2009 11:18:47 PM org.apache.catalina.loader.WebappClassLoader
loadClass
INFO: Illegal access: this web application instance has been stopped
already.
Could not load
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.  The
eventual following stack trace is caused by an error thrown for debugging
purposes as well as to attempt to terminate the thread which caused the
illegal
access, and has no functional impact.
java.lang.IllegalStateException
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
        at
javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:111)
        at
javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:146)
        at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:233)
        at
javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:123)
        at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:75)
        at java.util.XMLUtils.load(XMLUtils.java:57)
        at java.util.Properties.loadFromXML(Properties.java:852)

May 3, 2009 11:18:47 PM org.apache.catalina.loader.WebappClassLoader
loadClass
INFO: Illegal access: this web application instance has been stopped
already.
Could not load
com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration.

The eventual following stack trace is caused by an error thrown for
debugging
purposes as well as to attempt to terminate the thread which caused the
illegal
access, and has no functional impact.
java.lang.IllegalStateException
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
        at
com.sun.org.apache.xerces.internal.parsers.ObjectFactory.findProviderClass(ObjectFactory.java:393)
        at
com.sun.org.apache.xerces.internal.parsers.ObjectFactory.newInstance(ObjectFactory.java:348)
        at
com.sun.org.apache.xerces.internal.parsers.ObjectFactory.createObject(ObjectFactory.java:154)
        at
com.sun.org.apache.xerces.internal.parsers.ObjectFactory.createObject(ObjectFactory.java:97)
        at
com.sun.org.apache.xerces.internal.parsers.DOMParser.<init>(DOMParser.java:125)
        at
com.sun.org.apache.xerces.internal.parsers.DOMParser.<init>(DOMParser.java:109)
        at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.<init>(DocumentBuilderImpl.java:115)
        at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(DocumentBuilderFactoryImpl.java:72)
        at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:81)
        at java.util.XMLUtils.load(XMLUtils.java:57)
        at java.util.Properties.loadFromXML(Properties.java:852)

May 3, 2009 11:18:47 PM org.apache.catalina.loader.WebappClassLoader
loadClass
INFO: Illegal access: this web application instance has been stopped
already.
Could not load
com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl.
 The eventual following stack trace is caused by an error thrown for
debugging
purposes as well as to attempt to terminate the thread which caused the
illegal
access, and has no functional impact.
java.lang.IllegalStateException
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
        at
com.sun.org.apache.xerces.internal.impl.dv.ObjectFactory.findProviderClass(ObjectFactory.java:395)
        at
com.sun.org.apache.xerces.internal.impl.dv.ObjectFactory.newInstance(ObjectFactory.java:350)
        at
com.sun.org.apache.xerces.internal.impl.dv.DTDDVFactory.getInstance(DTDDVFactory.java:59)
        at
com.sun.org.apache.xerces.internal.impl.dv.DTDDVFactory.getInstance(DTDDVFactory.java:44)
        at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.<init>(XML11Configuration.java:538)
        at
com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration.<init>(XIncludeAwareParserConfiguration.java:125)
        at
com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration.<init>(XIncludeAwareParserConfiguration.java:86)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at
com.sun.org.apache.xerces.internal.parsers.ObjectFactory.newInstance(ObjectFactory.java:349)
        at
com.sun.org.apache.xerces.internal.parsers.ObjectFactory.createObject(ObjectFactory.java:154)
        at
com.sun.org.apache.xerces.internal.parsers.ObjectFactory.createObject(ObjectFactory.java:97)
        at
com.sun.org.apache.xerces.internal.parsers.DOMParser.<init>(DOMParser.java:125)
        at
com.sun.org.apache.xerces.internal.parsers.DOMParser.<init>(DOMParser.java:109)
        at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.<init>(DocumentBuilderImpl.java:115)
        at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(DocumentBuilderFactoryImpl.java:72)
        at java.util.XMLUtils.getLoadingDoc(XMLUtils.java:81)
        at java.util.XMLUtils.load(XMLUtils.java:57)
        at java.util.Properties.loadFromXML(Properties.java:852)







In the lib directory of tomcat both javax.xml.parsers and xerces jar files
exists.




Thanks in advanced.

Reply via email to