myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Bohmann <bernd.bohm...@atanion.com>
Subject Re: Error in 1.2
Date Tue, 13 Mar 2007 23:18:54 GMT
Hello,

should be fixed on 1.2 branch, now.

Regards

Bernd

Zdeněk Sochor wrote:
> Hi,
>  this problem is not easy to solve - some1 commited "patch" to refactor 
> AnnotationProcessor interface to NOW wrong package.
> 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:
> 
> 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)
> 
> More info on classloader:
> http://tomcat.apache.org/tomcat-6.0-doc/config/loader.html
> 
> When using new code from trunk, it needs quite a lot changes to make it 
> work in Tomcat (i can provide patch if wanted).
> 
> Regards,
>  Zdenek
> 
> Cagatay Civici napsal(a):
> 
>> Yes,
>>
>> Already tried with removing the duplicate class but that time faced 
>> with a NPE in
>>
>> org.apache.myfaces.config.annotation.TomcatAnnotationProcessor's 
>> getAnnotationPrcessor
>>
>> Cagatay
>>
>> On 3/13/07, *Mathias Brökelmann* <mbroekelmann@googlemail.com 
>> <mailto:mbroekelmann@googlemail.com>> wrote:
>>
>>     I think the reason is that myfaces 1.2 contains its own
>>     org.apache.AnnotationProcessor class which is loaded by a different
>>     classloader than the AnnotationProcessor in tomcat.
>>
>>     2007/3/13, Cagatay Civici < cagatay.civici@gmail.com
>>     <mailto:cagatay.civici@gmail.com>>:
>>     > Hi,
>>     >
>>     > I'm trying to run the 1.2's test-webapp with tomcat 6.0.10 but
>>     keep getting
>>     > this error;
>>     >
>>     > org.apache.jasper.JasperException:
>>     > java.lang.ClassCastException:
>>     > org.apache.catalina.util.DefaultAnnotationProcessor
>>     >  cannot be cast to org.apache.AnnotationProcessor
>>     >
>>     
>> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java

>>
>>     :532)
>>     >
>>     
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java 
>>
>>     > :366)
>>     >
>>     
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>>     > org.apache.jasper.servlet.JspServlet.service (JspServlet.java:266)
>>     > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>     >
>>     >
>>     >
>>     >
>>     > root cause java.lang.ClassCastException:
>>     > org.apache.catalina.util.DefaultAnnotationProcessor cannot
>>     > be cast to org.apache.AnnotationProcessor
>>     >  org.apache.jsp.index_jsp._jspInit(index_jsp.java:23)
>>     >
>>     > org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
>>     > org.apache.jasper.servlet.JspServletWrapper.getServlet
>>     (JspServletWrapper.java:157)
>>     >
>>     
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java 
>>
>>     > :320)
>>     >
>>     
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>>     > org.apache.jasper.servlet.JspServlet.service (JspServlet.java:266)
>>     > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>     >
>>     >
>>     > When I remove the org.apache.AnnotationProcessor from impl jar,
>>     the page
>>     > runs but fails on
>>     > org.apache.myfaces.config.annotation.TomcatAnnotationProcessor's
>>     > getAnnotationPrcessor with a NPE.
>>     >
>>     > Any ideas?
>>     >
>>     >
>>     > Cagatay
>>     >
>>     >
>>
>>
>>     --
>>     Mathias
>>
>>
> 
> 

Mime
View raw message