Reputation: 29
Hi following error I have got please let me know solution
java.lang.ClassCastException: org.apache.catalina.util.DefaultAnnotationProcessor cannot be cast to org.apache.AnnotationProcessor –
Im using tomcat 6.0
Upvotes: 0
Views: 1337
Reputation: 4118
This is a known issue. This is the reason:
This was due to efforts from MYFACES-1246, proposal of annotation processing here in list (adding method), but this of course breaks compatibility of the same named interfaces.
If you have older code using org.apache.AnnotationProcessor you can make it work on Tomcat.
Solution is:
Add <Loader delegate="true"/>
into context.xml file (to Context element) in tomcat/conf directory.
This makes classloading in Tomcat sticking to J2EE spec. (I couldn't make it work with suggested approach for only 1 webapp)
This is the reference: http://mail-archives.apache.org/mod_mbox/myfaces-dev/200703.mbox/%[email protected]%3E
Upvotes: 1