Web实例已经停止

i_r*_*aqz 7 java tomcat java-ee

我收到这个错误

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.<init>(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)
Run Code Online (Sandbox Code Playgroud)

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

Mus*_*usa 9

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


i_r*_*aqz 7

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


Col*_*ent 5

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

希望这可以帮助。

为清楚起见,请参阅附加的屏幕截图

在此处输入图片说明