J2EE JSP-0008 无法分派 JSP 页面
我正在使用 Struts2 和 OC4J 10.1.3.3.0 在 Eclipse 中构建动态 Web 应用程序。我到处都使用 JDK 和 JRE 5,并且从命令行启动时 OC4J 运行完美。
当我尝试从 Eclipse 部署项目时,问题就出现了,它在尝试呈现 JSP 时抛出此错误:
2010-07-16 11:21:20.962 通知 J2EE JSP-0008 无法分派 JSP 页面: oracle.jsp.provider.JspCompileException:
编译错误:D:\Java\contenedor\oc4j_extended_101330\j2ee\home\application-deployments\Login2\Login2\persistence_pages\_Login.java
在 oracle.jsp.app.JspJavacCompiler.compile(JspJavacCompiler.java:304) 在 oracle.jsp.runtimev2.JspPageCompiler.attemptCompilePage(JspPageCompiler.java:731) 在 oracle.jsp.runtimev2.JspPageCompiler.compileBothModes(JspPageCompiler.java:456) 在 oracle.jsp.runtimev2.JspPageCompiler.compilePage(JspPageCompiler.java:413) 在 oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:705) 在 oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:694) 在 oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414) 在 oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594) 在 oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:856) 在 com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) 在 org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389) 在 com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623) 在 com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) 在 com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) 在 com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) 在 com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221) 在 com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122) 在 com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111) 在 oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) 在 oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239) 在 oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34) 在 oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880) 在 com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) 在java.lang.Thread.run(未知 来源)
这是启动 oc4j 时 eclipse 显示的内容:
2010-07-16 13:24:39.987 通知 Inicio de Application Deployer para Login2。 2010-07-16 13:24:39.988 通知 前环脱位 2010-07-16 13:24:39.990 通知 Inicio de Application UnDeployer para Login2。 2010-07-16 13:24:40.570 通知 删除 Web 应用程序中所有的 Web 待办事项 Login2 de todas las direcciones Web 2010-07-16 13:24:40.652 通知 Se ha 终止应用程序 UnDeployer 对 Login2。 2010-07-16 13:24:40.678 通知 初始 D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2.ear... 2010-07-16 13:24:40.680 通知自动解包 D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2.ear... 2010-07-16 13:24:40.680 通知 Unjar D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2.ear 位于 >D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2 2010-07-16 13:24:40.712 通知已完成自动解压 D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2.ear 2010-07-16 13:24:40.732 通知自动解包 D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2\Login2.war... 2010-07-16 13:24:40.732 通知 Unjar D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2\Login2.war 位于 >D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\登录2\登录2 2010-07-16 13:24:40.808 通知已完成自动解压 D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2\Login2.war 2010-07-16 13:24:40.810 通知 D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2.ear... 2010-07-16 13:24:40.811 通知 应用程序:Login2 2010-07-16 13:24:40.812 通知 Inicializando 类加载器 2010-07-16 13:24:40.812 通知 初始内容 EJB 2010-07-16 13:24:40.813 通知 Cargando 连接器 2010-07-16 13:24:40.843 通知 启动递归适配器 2010-07-16 13:24:40.844 通知 EJB 启动会话 2010-07-16 13:24:40.845 通知 确认类加载器 2010-07-16 13:24:40.846 通知 Inicio de la inicialización de Login2... 2010-07-16 13:24:40.862 通知 已完成登录 2 的初始化... 2010-07-16 13:24:40.869 通知 应用程序: Login2 2010-07-16 13:24:40.887 通知 在默认网站上启动应用程序 Web 链接... 2010-07-16 13:24:41.177 通知 已将应用程序 Web 链接到默认网站... 2010-07-16 13:24:41.178 通知 Se ha terminado Application Deployer para Login2。操作时间:1193 毫秒 16/07/2010 01:24:50 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger 信息 信息:解析配置文件[struts-default.xml] 16/07/2010 01:24:51 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger 信息 信息:无法找到名称为 struts-plugin.xml 的配置文件,正在跳过 16/07/2010 01:24:51 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger 信息 信息:解析配置文件[struts-plugin.xml] 16/07/2010 01:24:51 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger 信息 信息:解析配置文件[struts.xml] 16/07/2010 01:24:51 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger 信息 信息:从 ApplicationResources 加载全局消息
JSP 很好,它只是简单的 HTML,并且也可以在 Tomcat 中正常运行。我不明白这里发生了什么。有什么想法吗?
I'm building a dynamic web application in Eclipse using Struts2 and OC4J 10.1.3.3.0. I'm using JDK and JRE 5 everywhere, and OC4J runs perfect when started from the command line.
The problem comes when I try to deploy the project from Eclipse, it throws this error when trying to render the JSP:
2010-07-16 11:21:20.962 NOTIFICATION
J2EE JSP-0008 Unable to dispatch JSP page:
oracle.jsp.provider.JspCompileException:Compile Errors :D:\Java\contenedor\oc4j_extended_101330\j2ee\home\application-deployments\Login2\Login2\persistence_pages\_Login.java
at
oracle.jsp.app.JspJavacCompiler.compile(JspJavacCompiler.java:304)
at
oracle.jsp.runtimev2.JspPageCompiler.attemptCompilePage(JspPageCompiler.java:731)
at
oracle.jsp.runtimev2.JspPageCompiler.compileBothModes(JspPageCompiler.java:456)
at
oracle.jsp.runtimev2.JspPageCompiler.compilePage(JspPageCompiler.java:413)
at
oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:705)
at
oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:694)
at
oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414)
at
oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at
oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)
at
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
at
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at
com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at
com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at
oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at
oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at
oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at
oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Unknown
Source)
This is what eclipse shows when starting oc4j:
2010-07-16 13:24:39.987 NOTIFICATION Inicio de Application Deployer para Login2.
2010-07-16 13:24:39.988 NOTIFICATION Anular despliegue anterior
2010-07-16 13:24:39.990 NOTIFICATION Inicio de Application UnDeployer para Login2.
2010-07-16 13:24:40.570 NOTIFICATION Eliminando todos los enlaces Web para la aplicación Login2 de todas las direcciones Web
2010-07-16 13:24:40.652 NOTIFICATION Se ha terminado Application UnDeployer para Login2.
2010-07-16 13:24:40.678 NOTIFICATION Inicio de la inicialización de D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2.ear...
2010-07-16 13:24:40.680 NOTIFICATION Auto-unpacking D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2.ear...
2010-07-16 13:24:40.680 NOTIFICATION Unjar D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2.ear in >D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2
2010-07-16 13:24:40.712 NOTIFICATION Finished auto-unpacking D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2.ear
2010-07-16 13:24:40.732 NOTIFICATION Auto-unpacking D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2\Login2.war...
2010-07-16 13:24:40.732 NOTIFICATION Unjar D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2\Login2.war in >D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2\Login2
2010-07-16 13:24:40.808 NOTIFICATION Finished auto-unpacking D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2\Login2.war
2010-07-16 13:24:40.810 NOTIFICATION Fin de la inicialización de D:\Java\contenedor\oc4j_extended_101330\j2ee\home\applications\Login2.ear...
2010-07-16 13:24:40.811 NOTIFICATION Iniciando la aplicación: Login2
2010-07-16 13:24:40.812 NOTIFICATION Inicializando ClassLoaders
2010-07-16 13:24:40.812 NOTIFICATION Inicializando contenedor EJB
2010-07-16 13:24:40.813 NOTIFICATION Cargando conectores
2010-07-16 13:24:40.843 NOTIFICATION Iniciando los adaptadores de recursos
2010-07-16 13:24:40.844 NOTIFICATION Inicializando sesiones de EJB
2010-07-16 13:24:40.845 NOTIFICATION Confirmando ClassLoaders
2010-07-16 13:24:40.846 NOTIFICATION Inicio de la inicialización de Login2...
2010-07-16 13:24:40.862 NOTIFICATION Fin de la inicialización de Login2...
2010-07-16 13:24:40.869 NOTIFICATION Aplicación iniciada: Login2
2010-07-16 13:24:40.887 NOTIFICATION Inicio de enlace de aplicaciones Web a la dirección default-web-site...
2010-07-16 13:24:41.177 NOTIFICATION Fin de enlace de aplicaciones Web a la dirección default-web-site...
2010-07-16 13:24:41.178 NOTIFICATION Se ha terminado Application Deployer para Login2. Hora de la Operación: 1193 msecs
16/07/2010 01:24:50 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-default.xml]
16/07/2010 01:24:51 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Unable to locate configuration files of the name struts-plugin.xml, skipping
16/07/2010 01:24:51 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-plugin.xml]
16/07/2010 01:24:51 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts.xml]
16/07/2010 01:24:51 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Loading global messages from ApplicationResources
The JSP is fine, it's just simple HTML and also runs fine with Tomcat. I don't understand what is happening here. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题似乎是从 Eclipse 启动 oc4j 时,oc4j 在 C:\Program Files (x86)\java 中查找 java 时遇到问题。
看来“(”是一个特殊字符,eclipse或oc4j无法很好地解析。
将java移动到C:\并使用这个新路径设置oc4j可以解决问题。
It seems that the problem was that when starting oc4j from Eclipse, oc4j has problems finding java at C:\Program Files (x86)\java.
It seems that "(" is a special character that eclipse or oc4j can´t parse well.
Moving java to C:\ and setting oc4j with this new path solves the problem.