One thing I forgot: it would be really nice to centralize the spring
version in a property within in the parent pom like this:
...
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring-version}</version>
<exclusions>
<exclusion>
<groupId>avalon-framework</groupId>
<artifactId>avalon-framework</artifactId>
</exclusion>
<exclusion>
<groupId>logkit</groupId>
<artifactId>logkit</artifactId>
</exclusion>
</exclusions>
</dependency>
...
<properties>
<spring-version>4.2.2.RELEASE</spring-version>
<!-- <spring-version>2.5.5</spring-version>-->
...
</properties>
Then being able to easily switch between versions.
Mit freundlichen Grüssen / Best regards,
Mag. Gabriel Gruber
Geschäftsführung
Workflow EDV Gesm.b.H.
A-1030 Wien, Dannebergplatz 6/23
phone: +43 - 1 - 7188842 22
fax: +43 - 1 - 7188842 30
mobile: +43 - 676 - 3939435
mailto:***@workflow.at
https://personalwolke.at
http://www.workflow.at
https://www.facebook.com/workflow.edv
From: Gabriel Gruber <***@workflow.at>
To: ***@cocoon.apache.org
Date: 27.10.2015 17:53
Subject: Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?
yes, I just use this:
mvn clean install -fn
Using following infrastructure on windows:
- maven 3.3.3
- JDK 1.8.0_51
The -fn (fail never) switch gives me a nice summary at the end, which
projects were successful and where there have been failures.
greets,
Gabriel
From: Francesco Chicchiriccò <***@apache.org>
To: ***@cocoon.apache.org
Date: 27.10.2015 17:42
Subject: Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?
On 27/10/2015 16:30, Gabriel Gruber wrote:
Hi Folks,
I was able to compile cocoon 2.2 with spring framework 4.2 and fix all the
obvious problems like
- Using RootBeanDefinition.setScope() instead of
RootBeanDefinition.setSingleton()
- finding the correct method calls after deprecated methods or constants
have been removed.
- forking the commons-collections MultiMap and MultiValueMap classes into
a util package of cooon-expression-language-api in order to make the
interface compatible with Java 8 maps (conflict in remove() method!)
- implement missing methods in PipelineComponentScope,
PipelineComponentInfoInitializerDecorator, CallScope, ServletScope,
MockRequestAttributes due to changes of Spring Superclasses
- implement missing method SourceResource.contentLength() due to change of
Spring Superclass
Cool.
Which commandline are you using for building Cocoon 2.2? Bare "mvn clean
install"?
However still a number of tests are failing like:
org.apache.cocoon.transformation.CIncludeTransformerTestCase.testCInclude1()
org.apache.cocoon.transformation.CIncludeTransformerTestCase.testCInclude2()
org.apache.cocoon.transformation.I18NTransformerTestCase.testI18n1()
org.apache.cocoon.transformation.I18NTransformerTestCase.testI18n2()
org.apache.cocoon.servletservice.AbsoluteServletConnectionTestCase.testURI()
org.apache.cocoon.template.jxtg.JXTemplateGeneratorTestCase.testFormatDate()
org.apache.cocoon.template.jxtg.JXTemplateGeneratorTestCase.testAttribute()
org.apache.cocoon.template.jxtg.JXTemplateGeneratorTestCase.testElementSuccess()
Ok, these needs of course to be reviewed and possibly adjusted.
Now I am able to start jetty with cocoon.
Even cooler.
When starting with Java 8 I get this error while accessing the start page
(while the page is rendered correctly)
org.apache.cocoon.ProcessingException: Reader already set. Cannot set
reader 'resource'|?at <map:read> -
file:///C:/j2ee/open-sources/cocoon/cocoon-2.2-trunk-2015/blocks/cocoon-samples-style/cocoon-samples-style-default/target/classes/COB-INF/sitemap.xmap:63:44|?at
<map:match> -
file:///C:/j2ee/open-sources/cocoon/cocoon-2.2-trunk-2015/blocks/cocoon-samples-style/cocoon-samples-style-default/target/classes/COB-INF/sitemap.xmap:62:35
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setReader(
AbstractProcessingPipeline.java:298)
at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setReader(
AbstractCachingProcessingPipeline.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at
org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(
PoolableProxyHandler.java:79)
The above exception only appears, if starting jetty with Java 8. When
using a JRE7 it will not appear.
Ok, I would say to separate problems here, e.g. first let's make
everything working with latest Spring + Java 7 and afterwards let's see
how it works with Java 8. Agree?
After a bit more playing around with the (empty) samples page I get this
error:
java.util.ConcurrentModificationException
at
java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
at java.util.ArrayList$Itr.next(ArrayList.java:851)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:360)
at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:734)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipeline(AbstractProcessingPipeline.java:471)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:416)
at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at
org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:79)
at com.sun.proxy.$Proxy17.process(Unknown Source)
at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:147)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
at
org.apache.cocoon.components.treeprocessor.sitemap.SwitchSelectNode.invoke(SwitchSelectNode.java:88)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
at
org.apache.cocoon.components.treeprocessor.sitemap.HandleErrorsNode.invoke(HandleErrorsNode.java:78)
at
org.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper.prepareErrorHandler(ErrorHandlerHelper.java:157)
at
org.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper.prepareErrorHandler(ErrorHandlerHelper.java:124)
at
org.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper.invokeErrorHandler(ErrorHandlerHelper.java:94)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:158)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:81)
at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:241)
at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:173)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:247)
at
org.apache.cocoon.servlet.RequestProcessor.process(RequestProcessor.java:347)
at
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:169)
at
org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:82)
Then I also get this exception:
2015-10-27 16:14:36.268:WARN:oejs.ServletHandler:/
java.lang.NullPointerException
at org.apache.cocoon.transformation.TraxTransformer.setConsumer(
TraxTransformer.java:396)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(
PoolableProxyHandler.java:79)
at com.sun.proxy.$Proxy17.setConsumer(Unknown Source)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.connect(
AbstractProcessingPipeline.java:389)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.connectPipeline(
AbstractProcessingPipeline.java:407)
at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.connectPipeline(
AbstractCachingProcessingPipeline.java:752)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(
AbstractProcessingPipeline.java:443)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(
PoolableProxyHandler.java:79)
at com.sun.proxy.$Proxy16.process(Unknown Source)
at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(
SerializeNode.java:147)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(
AbstractParentProcessingNode.java:78)
at
org.apache.cocoon.components.treeprocessor.sitemap.SwitchSelectNode.invoke(
SwitchSelectNode.java:88)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(
AbstractParentProcessingNode.java:78)
at
org.apache.cocoon.components.treeprocessor.sitemap.HandleErrorsNode.invoke(
HandleErrorsNode.java:78)
at
org.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper.prepareErrorHandler(
ErrorHandlerHelper.java:157)
at
org.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper.prepareErrorHandler(
ErrorHandlerHelper.java:124)
at
org.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper.invokeErrorHandler(
ErrorHandlerHelper.java:94)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(
PipelineNode.java:158)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(
AbstractParentProcessingNode.java:78)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(
PipelinesNode.java:81)
at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(
ConcreteTreeProcessor.java:241)
at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(
ConcreteTreeProcessor.java:173)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(
TreeProcessor.java:247)
at org.apache.cocoon.servlet.RequestProcessor.process(
RequestProcessor.java:347)
at org.apache.cocoon.servlet.RequestProcessor.service(
RequestProcessor.java:169)
at org.apache.cocoon.sitemap.SitemapServlet.service(
SitemapServlet.java:82)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(
AopUtils.java:302)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(
ReflectiveMethodInvocation.java:190)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:157)
at
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(
MethodInvocationProceedingJoinPoint.java:85)
at
org.apache.cocoon.jnet.URLHandlerFactoryCollector.installURLHandlers(
URLHandlerFactoryCollector.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(
AbstractAspectJAdvice.java:621)
at
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(
AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(
AspectJAroundAdvice.java:68)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:179)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(
ExposeInvocationInterceptor.java:92)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(
JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy8.service(Unknown Source)
at
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(
ServletServiceContext.java:485)
at
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(
ServletServiceContext.java:459)
at
org.apache.cocoon.servletservice.spring.ServletFactoryBean$ServiceInterceptor.invoke(
ServletFactoryBean.java:245)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(
JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy11.service(Unknown Source)
at org.apache.cocoon.servletservice.DispatcherServlet.service(
DispatcherServlet.java:106)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(
ServletHolder.java:684)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(
ServletHandler.java:1496)
at org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(
MultipartFilter.java:131)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(
ServletHandler.java:1476)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(
ServletHandler.java:499)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(
ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(
SecurityHandler.java:557)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(
SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(
ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(
ServletHandler.java:428)
at org.eclipse.jetty.server.session.SessionHandler.doScope(
SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(
ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(
ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(
AbstractHttpConnection.java:494)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(
AbstractHttpConnection.java:971)
at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(
AbstractHttpConnection.java:1033)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644
)
at org.eclipse.jetty.http.HttpParser.parseAvailable(
HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(
AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(
SelectChannelEndPoint.java:667)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(
SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(
QueuedThreadPool.java:543)
at java.lang.Thread.run(Unknown Source)
Where to go from here now?
Should I commit to some branch? Or should I comment every needed patch for
every class in the ticket? (will be up to 20 patches in summary I guess)
Please attach a single patch by running svn diff from
file:///C:/j2ee/open-sources/cocoon/cocoon-2.2-trunk-2015/
Let's try to first make this working, thanks.
Regards.
From: Francesco Chicchiriccò <***@apache.org>
To: ***@cocoon.apache.org
Date: 27.10.2015 14:00
Subject: Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?
On 27/10/2015 13:37, Javier Puerto wrote:
Hi all,
@Gabriel, sounds very interesting and the update can bring some new energy
to the project. :)
Post by Francesco ChicchiriccòHum, is there anyone around with enough know-how about 2.2.?
Sorry Francesco, I was quite busy last three months but I will have some
spare time in December so I could take a look into the changes.
Thanks Javier!
I have already set my very first question for you - see my comment in
COCOON-2347.
Regards.
2015-10-27 13:25 GMT+01:00 Gabriel Gruber <***@workflow.at>:
Hello Folks,
nice to see the project still being alive :-) I decided to make a jira
issue about our attempt to make cocoon 2.2 work with spring framework
4.2.x.
https://issues.apache.org/jira/browse/COCOON-2347
I will append comments about progress etc. there and give you an update on
the mailing list as soon as something substantial could be found out.
greets,
gabriel
Post by Francesco ChicchiriccòPost by Francesco ChicchiriccòHi Gabriel,
I do run actually few Cocoon instances in production, but that's 3.
0.0(-beta-1-SNAPSHOT...). I used to run Cocoon 2.1.X as well.
Unfortunately, I am not very confident with 2.2, but if you would
like to provide some patches against Spring Configurator [1] or any
other component to bring them to latest Spring version, I would be
happy to review and handle your contribution(s).
Please be sure to review our contribution docs[2].
I am successfully running spring 4.0.6 with cocoon 2.2 in production.
- cocoon-pipeline-impl
- cocoon-servlet-service-impl
- cocoon-sitemap-impl
anything higher in spring version fails. I do not recall the actual
problems but they were deep in cocoon internals and I was unable to
debug it properly.
I have not been commiting those to cocoon repo as I have too little
knowledge how these changes might affect cocoon overall. I could
create a branch and commit my changes for someone more experienced than
me.
Post by Francesco ChicchiriccòWDYT?
Hum, is there anyone around with enough know-how about 2.2.?
--
Francesco Chicchiriccò
Tirasa - Open Source Excellence
http://www.tirasa.net/
Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/