我是tomee和java web应用程序的新手。我在运行我的应用程序时遇到了这个错误。
HTTP Status 500 - Servlet.init() for servlet com.imajinair.santapp.SantappApplication threw exception
type Exception report
message Servlet.init() for servlet com.imajinair.santapp.SantappApplication threw exception
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet com.imajinair.santapp.SantappApplication threw exception
org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
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)
我正在使用Netbeans,请使用drop rwa tomee 1.7.2
编辑帖子: 感谢Prince Mani Gupta提出的建议。 现在我有问题,我的实体经理是空的。 这是我的代码:
@PersistenceContext(unitName = "imajinair.com_Santapp_war_1.0-BetaPU")
private EntityManager em;