Web实例已经停止

我收到这个错误

Mar 22, 2011 12:36:01 AM 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. Mar 22, 2011 12:36:01 AM 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:1562) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521) at javax.xml.parsers.FactoryFinder.getProviderClass(Unknown Source) at javax.xml.parsers.FactoryFinder.newInstance(Unknown Source) at javax.xml.parsers.FactoryFinder.find(Unknown Source) at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source) at com.xmlparser.XmlParser.parseXmlFile(XmlParser.java:33) at com.xmlparser.XmlParser.(XmlParser.java:25) at com.jobs.SendRoutineMessagesJob.execute(SendRoutineMessagesJob.java:29) at org.quartz.core.JobRunShell.run(JobRunShell.java:199) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546) 

有人可以指导一下我在这里犯的错误。 我不确定是否需要粘贴源代码。

好像我正在创建已经创建的东西的实例..我删除了实例,现在它工作正常

这是因为您正在将应用程序的新实例部署到服务器,但是先前实例的某个线程或连接尝试执行您编写的某些业务逻辑。 这就是为什么,JVM的主要部分叫做ClassLoader,告诉你“非法访问:这个Web应用程序实例已经被停止”并抛出适当的exception…你可以关闭Application Server的自动部署function,这在生产环境和之后是优选的手动部署应用程序重启服务器。 或者你可以在Class级别控制Servlet生命周期:)))在“预部署”期间关闭所有连接或停止一些线程。 或者使用复杂的方法使用ManagedExecutorService控制线程。 祝你好运!!!

你在使用Netbeans吗? 我有一个类似的错误,除了它无法加载oracle.sql.lnxlib 。 就像许多海报所指出的那样,这个错误通常与Tomcat缓存应用程序的多个实例有关。 通过在Netbeans中取消部署应用程序的旧实例,同事能够为我解决问题。 为此,请转到“ 服务”选项卡>“服务器” ,然后双击Apache Tomcat或TomEE ,在打开netbeans后运行应用程序一次后,应显示Web应用程序文件夹。 如果双击它,您应该看到应用程序的实例出现。 您应该能够右键单击它们,然后单击取消部署(您可能必须右键单击它们并先点击停止)。 最后,您应该在构建和运行应用程序之前停止然后启动tomcat。

希望这可以帮助。

有关清晰,请参见附页截图