Servlets java.lang.RuntimeException:org.eclipse.core.runtime.adapter.EclipseStarter位于org.eclipse.equinox.servletbridge.FrameworkLauncher.start
我第一次尝试运行部署在tomcat服务器上的RAP示例应用程序,当我在浏览器中调用该应用程序时,出现以下错误:Servlets java.lang.RuntimeException:org.eclipse.core.runtime.adapter.EclipseStarter位于org.eclipse.equinox.servletbridge.FrameworkLauncher.start,servlets,equinox,eclipse-rap,Servlets,Equinox,Eclipse Rap,我第一次尝试运行部署在tomcat服务器上的RAP示例应用程序,当我在浏览器中调用该应用程序时,出现以下错误: type Exception report message Servlet.init() for servlet equinoxbridgeservlet threw exception description The server encountered an internal error that prevented it from fulfilling this reque
type Exception report
message Servlet.init() for servlet equinoxbridgeservlet threw exception
description The server encountered an internal error that prevented it from
fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet
equinoxbridgeservlet threw exception
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)
root cause
java.lang.RuntimeException: org.eclipse.core.runtime.adaptor.EclipseStarter
org.eclipse.equinox.servletbridge.FrameworkLauncher.start(FrameworkLauncher.java:420)
org.eclipse.equinox.servletbridge.BridgeServlet.init(BridgeServlet.java:97)
javax.servlet.GenericServlet.init(GenericServlet.java:158)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.56 logs.
web.xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app id="WebApp">
<servlet id="bridge">
<servlet-name>equinoxbridgeservlet</servlet-name>
<display-name>Equinox Bridge Servlet</display-name>
<description>Equinox Bridge Servlet</description>
<servlet-class>org.eclipse.equinox.servletbridge.BridgeServlet</servlet-class>
<!-- Framework Controls could be useful for testing purpose, but
we disable it per default -->
<init-param>
<param-name>enableFrameworkControls</param-name>
<param-value>false</param-value>
</init-param>
<!-- Enable multi-language support for the extension registry -->
<!-- the OSGi console is useful for trouble shooting but will fill up your
appserver log quickly, so deactivate on production use. Uncomment
the -console parameter to enabled OSGi console access. -->
<init-param>
<param-name>commandline</param-name>
<param-value>-registryMultiLanguage<!-- -console --></param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>equinoxbridgeservlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
在web.xml中添加以下行:
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
org.springframework.web.context.ContextLoaderListener
向我们展示日志中的完整异常堆栈跟踪。经过一些小的调整后,我不得不编译一个用于工作的程序(这对我来说是一项非常新的任务),但我在本地服务器和实时服务器上都收到了此错误。因此,我尝试使用上面的示例(来自eclipse主页)来排除编程错误。由于我也有同样的例外,我想我有一个配置问题:在我工作的公司,我们的应用程序到目前为止一直是从另一台pc(和另一名员工…)编译和上传的。在我重新安装Eclipse之后,我设法导出了项目!我仍然不知道发生了什么,可能是捆绑包/目标之间的冲突
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>