JSP 文件无法编译 - JSPTranslator.CouldNotLoadClass
我有 6 个 JSP 应用程序在 Windows Server 2003 机器上运行,其中包含带有 Updater 7 的 JRun 4 和 Java 1.6.0_14。 我的所有应用程序都工作正常,除了其中 1 个以及我在 JRun 中创建的任何新应用程序。 我只是找不到配置或权限的差异在哪里。
每当我尝试访问无法正常工作的应用程序上的 JSP 文件时,都会收到以下错误。
java.lang.ClassNotFoundException: jrun__jsp__navigation__cm_doc2ejsp1a
at jrun.jsp.JSPClassLoader.findClass(JSPClassLoader.java:135)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at jrun.jsp.JSPEngine.loadClass(JSPEngine.java:657)
at jrun.jsp.JSPEngine.loadClass(JSPEngine.java:646)
at jrun.jsp.JSPEngine.loadServlet(JSPEngine.java:874)
at jrun.jsp.JSPEngine.getServlet(JSPEngine.java:728)
at jrun.jsp.JSPServlet.service(JSPServlet.java:115)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
javax.servlet.ServletException: JSPTranslator.CouldNotLoadClass/jsp/navigation/cm_doc.jsp
at jrun.jsp.JSPEngine.loadServlet(JSPEngine.java:880)
at jrun.jsp.JSPEngine.getServlet(JSPEngine.java:728)
at jrun.jsp.JSPServlet.service(JSPServlet.java:115)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
我知道该错误意味着 JSP 文件无法编译到 WEB-INF/jsp 文件夹中,但我不明白为什么。 所有其他网站都工作正常。 另外,我在尝试调试此应用程序时创建的任何新 JRun 应用程序也存在同样的问题。 我们最近将 JVM 从 1.4.2.18 更新到了 1.6.0.14,但它并不是最近的,而且其他站点正在运行的事实让我感到困惑。 我不知道,我很茫然。 为了完整性,我将发布我的 jrun-web.xml 文件,如果有任何可能有帮助的特定日志,请告诉我。 感谢您提供的任何帮助或建议。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jrun-web-app PUBLIC "-//Macromedia, Inc.//DTD jrun-web 4.0//EN" "http://jrun.macromedia.com/dtds/jrun-web.dtd">
<jrun-web-app>
<session-config>
<persistence-config>
<active>true</active>
</persistence-config>
<replication-config>
<active>false</active>
</replication-config>
</session-config>
<context-root>/</context-root>
<compile>false</compile>
<reload>false</reload>
<uri-character-encoding>UTF-8</uri-character-encoding>
<virtual-mapping>
<resource-path>/*</resource-path>
<system-path>D:\WebApps\RegAbbrev\</system-path>
</virtual-mapping>
<enable-jrun-web-services>true</enable-jrun-web-services>
<virtual-mapping>
<resource-path>/</resource-path>
<system-path />
</virtual-mapping>
</jrun-web-app>
I have 6 JSP applications running on a Windows Server 2003 box with JRun 4 with Updater 7 and the Java 1.6.0_14. All of my applications are working just fine except for 1 of them and any new ones I create in JRun. I just cannot find where the difference in configuration or permissions is.
Whenever I attempt to access a JSP file on the app that isn't working I get the following error.
java.lang.ClassNotFoundException: jrun__jsp__navigation__cm_doc2ejsp1a
at jrun.jsp.JSPClassLoader.findClass(JSPClassLoader.java:135)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at jrun.jsp.JSPEngine.loadClass(JSPEngine.java:657)
at jrun.jsp.JSPEngine.loadClass(JSPEngine.java:646)
at jrun.jsp.JSPEngine.loadServlet(JSPEngine.java:874)
at jrun.jsp.JSPEngine.getServlet(JSPEngine.java:728)
at jrun.jsp.JSPServlet.service(JSPServlet.java:115)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
javax.servlet.ServletException: JSPTranslator.CouldNotLoadClass/jsp/navigation/cm_doc.jsp
at jrun.jsp.JSPEngine.loadServlet(JSPEngine.java:880)
at jrun.jsp.JSPEngine.getServlet(JSPEngine.java:728)
at jrun.jsp.JSPServlet.service(JSPServlet.java:115)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
I understand that the error means that the JSP file could not be compiled into the WEB-INF/jsp folder, but I cannot figure out why. All the other sites are working fine. Also, have the same issue for any new JRun applications I create while trying to debug this. We had recently updated the JVM from 1.4.2.18 to 1.6.0.14, but it wasn't that recent, and the fact that the other sites are working baffles me. I don't know, I'm at a loss. I'll post my jrun-web.xml file for completeness, and if any specific logs that might help, just let me know. Thanks for any help or suggestions you can provide.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jrun-web-app PUBLIC "-//Macromedia, Inc.//DTD jrun-web 4.0//EN" "http://jrun.macromedia.com/dtds/jrun-web.dtd">
<jrun-web-app>
<session-config>
<persistence-config>
<active>true</active>
</persistence-config>
<replication-config>
<active>false</active>
</replication-config>
</session-config>
<context-root>/</context-root>
<compile>false</compile>
<reload>false</reload>
<uri-character-encoding>UTF-8</uri-character-encoding>
<virtual-mapping>
<resource-path>/*</resource-path>
<system-path>D:\WebApps\RegAbbrev\</system-path>
</virtual-mapping>
<enable-jrun-web-services>true</enable-jrun-web-services>
<virtual-mapping>
<resource-path>/</resource-path>
<system-path />
</virtual-mapping>
</jrun-web-app>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不知何故,问题最终出在实际的代码文件或它们所在的目录上。我不知道这些文件可能发生了什么,因为它是每个 JSP 页面,而不仅仅是那些可能以某种方式损坏的页面。 但我拿了该应用程序最新版本的另一个副本,将其放入一个新文件夹中,将 IIS 和 JRun 都指向它,然后,它就可以工作了。 还是一脸茫然。
The problem somehow ended up being the actual code files or the directory they were housed in. I have no idea as to what could have happened to the files since it was every JSP page and not just ones that may have gotten corrupted somehow. But I took another copy of the app's most recent release, put it into a new folder, pointed both IIS and JRun to it, and bamn, it works. Still baffled.
我建议停止 Jrun 并清除 {ServerInstance}/Server-Inf/temp 目录。
临时目录是 Jrun 许多问题的根源,因为它通常无法正确清除临时文件。
I recommend stopping Jrun and clearing out the {ServerInstance}/Server-Inf/temp directory.
The temp directory is the source of many problems with Jrun as it often doesn't clear the temp files out properly.