Allocate exception for servlet

Technorati 标签:

 

部署应用tes,启动tomcat,浏览器打开应用程序url,错误信息如下:

 

严重: Allocate exception for servlet user
javax.servlet.ServletException: Error instantiating servlet class com.dc.tes.ui.
server.UserService
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:1138)
        at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.jav
a:808)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:129)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
        at java.lang.Thread.run(Unknown Source)

 

问题原因,使用ant打包common.jar,ant没有把common工程下的xml文件打到jar包中,包括hibernate的配置文件,base.xml文件等,使用eclipse打jar包,替换common重启,问题解决。

你可能感兴趣的:(exception)