用IDEA+maven 打war包部署到tomcat服务器

09-Jul-2017 20:34:18.729 严重 [main] org.apache.catalina.core.StandardContext.filterStart Exception starting filter [jfinal]

 java.lang.RuntimeException: Can not create instance of class: com.hanlin.change.common.DemoConfig

at com.jfinal.core.JFinalFilter.createJFinalConfig(JFinalFilter.java:102)

at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:47)

at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:283)

at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:264)

at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)

at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4481)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5121)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:740)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:716)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)

at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)

at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1850)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)

at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:762)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1578)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)

at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)

at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:964)

at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)

at java.util.concurrent.FutureTask.run(Unknown Source)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)

at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.startup.Catalina.start(Catalina.java:657)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)

Caused by: java.lang.ClassNotFoundException: com.hanlin.change.common.DemoConfig

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1269)

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1104)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at com.jfinal.core.JFinalFilter.createJFinalConfig(JFinalFilter.java:100)

... 45 more


出现这个错误,不知道是什么原因,难道是我的配置问题吗


评论区

JFinal

2017-07-09 21:25

查看一下 com.hanlin.change.common.DemoConfig 这个路径是不是对,如果是对的,那么 eclipse 的 default output folder 配置有误

热门反馈

扫码入社