0 Replies Latest reply: Apr 30, 2009 5:03 PM by 807581 RSS

    Help Needed, problem reading a configuration file in XML form

    807581
      Hello,

      I am using NetBeans 6.5.1 with Apache Tomcat 6.0.18.
      I am trying to develop a web application and in my source files I have a thread that loops every second and reads the contents of a configuration file which is in XML form using java.util.Properties.
      As soon as I call props.loadFromXML(new FileInputStream(file)); I get several exceptions that I don't know what they mean nor I know how to resolve them.
      I would apreciate any help you guys can provide.

      Here is what I get in NetBeans:_

      Apr 30, 2009 8:56:53 PM com.sun.xml.ws.transport.http.servlet.WSServletDelegate destroy
      INFO: WSSERVLET15: JAX-WS servlet destroyed
      Apr 30, 2009 8:56:53 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextDestroyed
      INFO: WSSERVLET13: JAX-WS context listener destroyed
      Apr 30, 2009 8:56:53 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.
      Apr 30, 2009 8:56:53 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)




      And following the above I get:_

      Apr 30, 2009 8:56:53 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)





      Thanks in advanced.