[ 
https://issues.apache.org/jira/browse/COCOON3-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13176054#comment-13176054
 ] 

Igor Malinin commented on COCOON3-85:
-------------------------------------

I explained some time ago the roots of the problem on cocoon-dev mailing list 
(http://old.nabble.com/Jetty-7---%22can't-determine-modifiers-of-missing-type-org.eclipse.jetty.webapp.WebAppContext$Context%22-error-td32314839.html),
 and those are in no way Jetty problem, but the Cocoon!

Jetty is OSGi container and it isolates class loaders. This is perfectly legal 
and is not in any violation of Servlet specs. C3 defines a BeanFactory for 
ServletContext and then tries to apply AspectJ pointcuts over it, but AspectJ 
optimizer fails because it cannot see the Jetty's implementation of 
ServletContext. Before Spring 3.1 it was possible to workaround it by using old 
AspectJ versions (they are without optimizer), but with Spring 3.1 - it doesn't 
help. As more and more containers are switching to OSGi (or other similar 
component isolation models) you can expect Cocoon to fail on more and more 
containers...

Jetty 6 is so ancient already that pointing to it for new developments is just 
irrelevant... It works there only by accident. You can claim that AspectJ is 
the problem, but they declared it clearly that they will not fix it, at leas 
soon, as this requires serious redesign of its optimizer.
                
> cocoon-spring-configurator doesn't work with Spring 3.1
> -------------------------------------------------------
>
>                 Key: COCOON3-85
>                 URL: https://issues.apache.org/jira/browse/COCOON3-85
>             Project: Cocoon 3
>          Issue Type: Bug
>          Components: cocoon-servlet
>    Affects Versions: 3.0.0-beta-1
>            Reporter: Igor Malinin
>            Priority: Critical
>         Attachments: java.patch
>
>
> There are several issues that prevent Cocoon 3 to work with Spring 3.1
> One issue I reported already in mailing list when Jetty7 + recent AspectJ was 
> failing, not the same issue is deeper and ServletContextFactoryBean doesn't 
> work at all with Spring 3.1.
> Note that ServletContext is already in the Spring web-app context, although 
> with another name ('servletContext'). This is available starting from Spring 
> 3.0. Making an alias 'javax.servlet.ServletContext' -> 'servletContext' 
> solves problem partially, but still fails on XMLSitemapServlet initialization 
> (as it uses static field in ServletContextFactoryBean).
> I will attach a patch (a little bit dirty, but not more than the current 
> implementation). But it assumes at least Spring 3.0.
> As Cocoon 3 project is moved to Java 1.6, it is probably also worth to have 
> as a dependency at leas 3.0 version of Spring Framework (for Java5 generics 
> etc.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to