Tomcat 8 - ClassNotFoundException:FilterConfig

时间:2017-12-02 11:16:12

标签: java tomcat azure-active-directory

我在OSX上(10.12.6)。我克隆并构建了这个Java代码示例,以便使用Azure AD进行身份验证:

https://azure.microsoft.com/en-au/resources/samples/active-directory-java-webapp-openidconnect/

我已将打包的adal4jsample.war移动到我的Tomcat安装位置:

/Users/Shared/resources/apache-tomcat-8.0.38/webapps

我的Java版本是“1.8.0_102”

当我启动Tomcat时,错误日志显示:

  

02-Dec-2017 22:00:04.582 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild:start:    org.apache.catalina.LifecycleException:无法启动组件[StandardEngine [Catalina] .StandardHost [localhost] .StandardContext [/ adal4jsample]]       在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)       在org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)       在org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)       在org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)       在org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)       在org.apache.catalina.startup.HostConfig $ DeployWar.run(HostConfig.java:1816)       at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511)       at java.util.concurrent.FutureTask.run(FutureTask.java:266)       在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)       at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)       在java.lang.Thread.run(Thread.java:745)

     

引起:java.lang.NoClassDefFoundError:FilterConfig       at java.lang.Class.getDeclaredMethods0(Native Method)       at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)       at java.lang.Class.getDeclaredMethods(Class.java:1975)       at org.apache.catalina.util.Introspection.getDeclaredMethods(Introspection.java:127)       at org.apache.catalina.startup.WebAnnotationSet.loadMethodsAnnotation(WebAnnotationSet.java:273)       在org.apache.catalina.startup.WebAnnotationSet.loadApplicationFilterAnnotations(WebAnnotationSet.java:106)       at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:64)       在org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:336)       在org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:786)       at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:307)       在org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)       在org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)       在org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5213)       在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)       ......还有10个   引起:java.lang.ClassNotFoundException:FilterConfig       在org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)       在org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)       ......还有24个

搜索显示在Tomcats包含的libs中存在FilterConfig: /Users/Shared/resources/apache-tomcat-8.0.38/lib/servlet-api.jar

有什么建议可以尝试或下一步检查吗?

编辑:我刚刚在具有相同OSX版本的不同Mac上尝试了完全相同的步骤,因此在我的环境中肯定存在一些问题。不知道如何确定问题是什么..

0 个答案:

没有答案