当我运行我的Web应用程序时,我得到以下错误如何解决这个问题

时间:2011-09-19 06:39:23

标签: java tomcat

当我运行我的网络应用程序时,我得到以下错误如何解决这个问题。那就是:

java.lang.Exception: Myapp Web Application Starting
        at com.mycom.Myapp .manager.SystemServlet.contextInitialized(SystemServlet.java:31)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
        at org.apache.catalina.core.StandardService.start(StandardService.java:525)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
11078 [main] WARN  org.hibernate.cache.EhCacheProvider:86  - Could not find configuration [org.hibernate.cache.UpdateTimestampsCache]; using defaults.
101969 [main] WARN  org.hibernate.cache.EhCacheProvider:86  - Could not find configuration [org.hibernate.cache.StandardQueryCache]; using defaults.
103625 [main] WARN  org.hibernate.util.JDBCExceptionReporter:77  - SQL Error: 0, SQLState: 42703
103625 [main] ERROR org.hibernate.util.JDBCExceptionReporter:78  - ERROR: column this_.id does not exist
Sep 19, 2011 12:05:18 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Sep 19, 2011 12:05:18 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
103703 [main] FATAL com.mycom.Myapp utils.Utils:167  - Exception: Stopping Trackut Web Application Trackut Web Application Stopping
java.lang.Exception: Trackut Web Application Stopping
        at com.mycom.Myapp .manager.SystemServlet.contextDestroyed(SystemServlet.java:20)
        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4245)
        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4886)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4750)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
        at org.apache.catalina.core.StandardService.start(StandardService.java:525)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

2 个答案:

答案 0 :(得分:1)

来自堆栈跟踪的这一行看起来最有趣:

103625 [main] ERROR org.hibernate.util.JDBCExceptionReporter:78  
    - ERROR: column this_.id does not exist

我的猜测是你的一个hibernate @Entity类声明了一个名为id的列,但是没有这样的列(可能该列实际上被称为table_id等)。

答案 1 :(得分:0)

从您的日志中,不清楚您是否在com.mycom.Myapp .manager.SystemServlet.contextInitialized()中抛出异常,或者您只是记录异常以查看正在发生的事情。如果你在那里抛出一个错误(即Tomcat可以看到的错误),启动将失败。只需注释掉异常,看看是否会导致您的问题。