IntelliJ java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener

时间:2018-10-20 13:52:37

标签: spring maven intellij-idea glassfish

我使用了IntelliJ。开始我的简单程序(Spring,JSF,Maven)后,我得到了下一个异常(GlassFish日志):

[2018-10-20T16:13:57.147+0300] [glassfish 5.0] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=43
_ThreadName=admin-listener(4)] [timeMillis: 1540041237147] [levelValue: 900] [[   java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener 
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException:java.lang.IllegalArgumentException: java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:921)    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:900)  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:684)    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2044)    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1690)    at com.sun.enterprise.web.WebApplication.start(WebApplication.java:107)     at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)

我通过以下方法解决了我的问题:Progect Structure> Artifact>右面板Avalible Elements并双击Maven:...之类的库将其添加到lib文件夹中。 但是我不明白为什么在外部库中找不到类?

0 个答案:

没有答案
相关问题