HTTP 状态 500 - 无法在 Eclipse 中加载应用程序类错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24066419/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
HTTP Status 500 - Failed to load application class error in Eclipse
提问by poovannan
I am creating Vaadin 6 application using eclipse Kepler. Tomcat Server is main page running (localhost:8080). But when I run an application, I get HTTP Status 500 - Failed to load application class error.
我正在使用 eclipse Kepler 创建 Vaadin 6 应用程序。Tomcat 服务器是主页面运行(本地主机:8080)。但是当我运行应用程序时,我收到 HTTP 状态 500 - 无法加载应用程序类错误。
type Exception report
message Failed to load application class: com.example.secondone.SecondoneApplication
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Failed to load application class: com.example.secondone.SecondoneApplication
com.vaadin.terminal.gwt.server.ApplicationServlet.init(ApplicationServlet.java:71)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:906)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:929)
java.lang.Thread.run(Thread.java:761)
I'm using Vaadin 6.8.13 and have installed the plugins and added the jar to WEB-INF --> lib folder.
我正在使用 Vaadin 6.8.13 并安装了插件并将 jar 添加到 WEB-INF --> lib 文件夹。
I'm not able to figure out the exact cause of this error. Please help me out.
我无法找出此错误的确切原因。请帮帮我。
回答by jupenur
These types of errors are usually caused by issues in the project configuration. Make sure you haven't made any typos in your web.xmland systematically check your project structure for any mistakes. Could it be, for example, that your application class is actually named SecondOneApplicationinstead of SecondoneApplication?
这些类型的错误通常是由项目配置中的问题引起的。确保您没有在您web.xml的项目中犯任何错别字,并系统地检查您的项目结构是否有任何错误。例如,您的应用程序类是否实际上被命名SecondOneApplication为SecondoneApplication?
回答by Paulo Linhares - Packapps
Its application is trying to run this class is:
它的应用程序试图运行这个类是:
com.example.secondone.SecondoneApplication
But she is not lying. Somewhere in your configuration files you must is by setting this package. Try other variations like:
但她没有说谎。您必须在配置文件中的某处设置此包。尝试其他变体,例如:
secondone.SecondoneApplication
Or just :
要不就 :
SecondoneApplication
If you were using Hobernate, it would be in the archives:
如果您使用的是 Hobernate,它将在档案中:
hibernate.cfg.xml
and its mapping:
及其映射:
secondoneapplication.hbm.xml

