org.apache.catalina.core.DefaultInstanceManager无法强制转换为org.apache.tomcat.InstanceManager

时间:2014-10-10 01:26:19

标签: myfaces tomcat8

将MyFaces 2.2.5的应用程序从tomcat7迁移到tomcat8

我有这个错误

Caused by: java.lang.ClassCastException: 
       org.apache.catalina.core.DefaultInstanceManager cannot be cast to 
            org.apache.tomcat.InstanceManager
    at org.apache.myfaces.spi.impl.Tomcat7AnnotationInjectionProvider.initManager(Tomcat7AnnotationInjectionProvider.java:183)
    at org.apache.myfaces.spi.impl.Tomcat7AnnotationInjectionProvider.postConstruct(Tomcat7AnnotationInjectionProvider.java:85)

我检查了tomcat8的DefaultInstanceManager类,它有效地实现了org.apache.tomcat.InstanceManager接口,所以它可能是一个安全类加载器问题

知道如何解决这个问题吗?

1 个答案:

答案 0 :(得分:0)

<Context>
.....

    <Loader delegate="true" /> 

</Context>