Discussion:
Cocoon 2.2 with Java 8 and Spring Framework 4.2?
Gabriel Gruber
2015-10-23 16:05:49 UTC
Permalink
Hello Cocooners!

Are there still some people using cocoon in a production application? We
still use it in our standard product and now have the challenge to migrate
to java 1.8 and spring framework 4.2.

While this gives us a few issues to solve in terms of migrating code
relying on spring 3, we now face the challenge that we have to touch
cocoon again. As cocoon 2.2 heavily relies on spring, I wondered if anyone
of you guys has also ready tried to upgrade cocoon 2.2 to spring 4.2 (and
implicitly also to java 1.8 - also with JDK 1.8 bytecode compatibility
turned on).

While the trunk of cocoon (2.2) still uses officially spring 2.5.5 it
actually runs without problems also with latest 3.2.x of spring. But never
tried with spring 4.x so far and according to our first tries with our
product I assume there could be some more (heavy) issues, because minimum
requirements to list of supported libraries has changed quite a bit.

https://github.com/spring-projects/spring-framework/wiki/Migrating-from-earlier-versions-of-the-spring-framework

As an example the Cocoon Spring Configurator needed some small changes, as
it was not compiling against Spring 4.2. Other projects I have not tried
so far.

Is there an interest in the community to make this changes in the trunk?

Mit freundlichen Grüssen / Best regards,

Gabriel Gruber
Workflow EDV GmbH
Francesco Chicchiriccò
2015-10-26 07:34:32 UTC
Permalink
Post by Gabriel Gruber
Hello Cocooners!
Are there still some people using cocoon in a production application?
We still use it in our standard product and now have the challenge to
migrate to java 1.8 and spring framework 4.2.
While this gives us a few issues to solve in terms of migrating code
relying on spring 3, we now face the challenge that we have to touch
cocoon again. As cocoon 2.2 heavily relies on spring, I wondered if
anyone of you guys has also ready tried to upgrade cocoon 2.2 to
spring 4.2 (and implicitly also to java 1.8 - also with JDK 1.8
bytecode compatibility turned on).
While the trunk of cocoon (2.2) still uses officially spring 2.5.5 it
actually runs without problems also with latest 3.2.x of spring. But
never tried with spring 4.x so far and according to our first tries
with our product I assume there could be some more (heavy) issues,
because minimum requirements to list of supported libraries has
changed quite a bit.
https://github.com/spring-projects/spring-framework/wiki/Migrating-from-earlier-versions-of-the-spring-framework
As an example the Cocoon Spring Configurator needed some small
changes, as it was not compiling against Spring 4.2. Other projects I
have not tried so far.
Is there an interest in the community to make this changes in the trunk?
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].

Regards.

[1]
https://svn.apache.org/repos/asf/cocoon/subprojects/cocoon-spring-configurator/trunk/
[2] http://cocoon.apache.org/1273_1_1.html
--
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/
Leszek Gawron
2015-10-26 14:29:57 UTC
Permalink
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.

I had to patch:
- 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.

WDYT?
Francesco Chicchiriccò
2015-10-26 14:37:00 UTC
Permalink
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.
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/
Gabriel Gruber
2015-10-27 12:25:59 UTC
Permalink
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 Leszek Gawron
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 Leszek Gawron
WDYT?
Hum, is there anyone around with enough know-how about 2.2.?
--
Francesco Chicchiriccò
Tirasa - Open Source Excellence
http://www.tirasa.net/
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/
Javier Puerto
2015-10-27 12:37:35 UTC
Permalink
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.

Salu2.
Post by Francesco Chicchiriccò
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 Leszek Gawron
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 Leszek Gawron
WDYT?
Hum, is there anyone around with enough know-how about 2.2.?
--
Francesco Chicchiriccò
Tirasa - Open Source Excellence
http://www.tirasa.net/
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/
Francesco Chicchiriccò
2015-10-27 12:59:14 UTC
Permalink
Post by Javier Puerto
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.
Post by Javier Puerto
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
Post by Francesco Chicchiriccò
Post by Francesco Chicchiriccò
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.
Post by Francesco Chicchiriccò
- 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/
Gabriel Gruber
2015-10-27 15:30:35 UTC
Permalink
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

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()


Now I am able to start jetty with cocoon.

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.

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)

Greets,

Gabriel Gruber
Workflow EDV Gesm.b.H.
http://www.workflow.at





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/
Francesco Chicchiriccò
2015-10-27 16:41:42 UTC
Permalink
Post by Gabriel Gruber
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"?
Post by Gabriel Gruber
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.
Post by Gabriel Gruber
Now I am able to start jetty with cocoon.
Even cooler.
Post by Gabriel Gruber
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
<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?
Post by Gabriel Gruber
After a bit more playing around with the (empty) samples page I get
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)
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.
Post by Gabriel Gruber
Date: 27.10.2015 14:00
Subject: Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?
------------------------------------------------------------------------
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
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/
Gabriel Gruber
2015-10-27 16:53:02 UTC
Permalink
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/
Gabriel Gruber
2015-10-27 16:59:36 UTC
Permalink
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/
Francesco Chicchiriccò
2015-10-28 08:39:19 UTC
Permalink
Hi Gabriel,
thanks again for your patches: see

https://issues.apache.org/jira/browse/COCOON-2347?focusedCommentId=14977966&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14977966

for an update.

May I ask you if you have already sent an ICLA to cover your contribution?

http://www.apache.org/licenses/#clas

Thanks.
Regards.
Post by Gabriel Gruber
One thing I forgot: it would be really nice to centralize the spring
...
<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
https://personalwolke.at <https://personalwolke.at/>
http://www.workflow.at <http://www.workflow.at/>
https://www.facebook.com/workflow.edv
Date: 27.10.2015 17:53
Subject: Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?
------------------------------------------------------------------------
mvn clean install -fn
- 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
Date: 27.10.2015 17:42
Subject: Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?
------------------------------------------------------------------------
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"?
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_
<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
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)
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.
Date: 27.10.2015 14:00
Subject: Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?
------------------------------------------------------------------------
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
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/
Francesco Chicchiriccò
2015-10-30 08:48:35 UTC
Permalink
Hi all,
I have applied almost all provided patches to

* https://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_2_COCOON-2347
*
https://svn.apache.org/repos/asf/cocoon/subprojects/cocoon-spring-configurator/branches/COCOON-2347
*
https://svn.apache.org/repos/asf/cocoon/subprojects/cocoon-servlet-service-impl/branches/COCOON-2347

With respect to the patches attached to COCOON-2347, I had no need to
mess with MultiMap and MultiValueMap

FYI I am building with latest JDK 1.6 from Oracle (as said, we will
handle the Java 8 compatibility later).

As you can see by yourself, when building from BRANCH_2_2_COCOON-2347,
we have the following failures - as expected:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.19:test (default-test)
on project cocoon-core: There are test failures.
[ERROR]
[ERROR] Please refer to
/home/ilgrosso/work/cocoon/2_2_COCOON-2347/core/cocoon-core/target/surefire-reports
for the individual test results.
[ERROR] -> [Help 1]
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.19:test (default-test)
on project cocoon-servlet-service-components: There are test failures.
[ERROR]
[ERROR] Please refer to
/home/ilgrosso/work/cocoon/2_2_COCOON-2347/core/cocoon-servlet-service/cocoon-servlet-service-components/target/surefire-reports
for the individual test results.
[ERROR] -> [Help 1]
[ERROR] Failed to execute goal
org.apache.cocoon:cocoon-maven-plugin:1.0.0-M3:rcl (default) on project
cocoon-it: Execution default of goal
org.apache.cocoon:cocoon-maven-plugin:1.0.0-M3:rcl failed: Can't deploy
'/home/ilgrosso/work/cocoon/2_2_COCOON-2347/core/cocoon-core/target/classes'.
/home/ilgrosso/work/cocoon/2_2_COCOON-2347/core/cocoon-core/target/classes
(Is a directory) -> [Help 2]
[ERROR] Failed to execute goal
org.apache.cocoon:cocoon-maven-plugin:1.0.0-M3:rcl (rcl) on project
cocoon-welcome: Execution rcl of goal
org.apache.cocoon:cocoon-maven-plugin:1.0.0-M3:rcl failed: Can't deploy
'/home/ilgrosso/work/cocoon/2_2_COCOON-2347/core/cocoon-core/target/classes'.
/home/ilgrosso/work/cocoon/2_2_COCOON-2347/core/cocoon-core/target/classes
(Is a directory) -> [Help 2]

This is where I am looking forward for Javier's intervention :-)
Regards.
Post by Francesco Chicchiriccò
Hi Gabriel,
thanks again for your patches: see
https://issues.apache.org/jira/browse/COCOON-2347?focusedCommentId=14977966&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14977966
for an update.
May I ask you if you have already sent an ICLA to cover your contribution?
http://www.apache.org/licenses/#clas
Thanks.
Regards.
Post by Gabriel Gruber
One thing I forgot: it would be really nice to centralize the spring
...
<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
https://personalwolke.at <https://personalwolke.at/>
http://www.workflow.at <http://www.workflow.at/>
https://www.facebook.com/workflow.edv
Date: 27.10.2015 17:53
Subject: Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?
------------------------------------------------------------------------
mvn clean install -fn
- 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
Date: 27.10.2015 17:42
Subject: Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?
------------------------------------------------------------------------
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"?
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_
<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
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)
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.
Date: 27.10.2015 14:00
Subject: Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?
------------------------------------------------------------------------
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
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/
Gabriel Gruber
2015-11-02 17:01:22 UTC
Permalink
Hi Javier and Francesco!

Thanks for applying the patches and setting up the jenkins builds.
The testcase fails and the exceptions reported by javier are the exact
same ones I also discovered on my place. So I guess, we need now some
strategy in order to solve the problems.

Questions which might lead to solution:
- is cocoon really working if we only upgrade to latest 4.0.x version or
spring, as it was stated by Leszek
- if yes, what are the fundamental differences between the 4.0.x and the
4.2.x spring lines, which make it incompatible with spring
- Why is the AbstractProcessingPipeline getting a NPE when trying to setup
a reader? What could be the problem in the setup which is connected to new
behavior of Spring? Maybee the way the components (f.i. the reader) are
instantiated by spring?

Would be nice if someone of the original committers of C2.2 could comment
on this!

WDYT?

Thanks in advance

Gabriel

Workflow EDV Gesm.b.H.
https://personalwolke.at
http://www.workflow.at
https://www.facebook.com/workflow.edv
Javier Puerto
2015-11-03 09:39:40 UTC
Permalink
Hi Gabriel,
Post by Gabriel Gruber
Hi Javier and Francesco!
Thanks for applying the patches and setting up the jenkins builds.
The testcase fails and the exceptions reported by javier are the exact
same ones I also discovered on my place. So I guess, we need now some
strategy in order to solve the problems.
- is cocoon really working if we only upgrade to latest 4.0.x version or
spring, as it was stated by Leszek
We could try but AFAIK, 4.0.x version is discontinued too.
Post by Gabriel Gruber
- if yes, what are the fundamental differences between the 4.0.x and the
4.2.x spring lines, which make it incompatible with spring
- Why is the AbstractProcessingPipeline getting a NPE when trying to setup
a reader? What could be the problem in the setup which is connected to new
behavior of Spring? Maybee the way the components (f.i. the reader) are
instantiated by spring?
The Cocoon 2.2 is an hybrid between Spring and Avalon framework, indeed
there's a bridge class. The Spring configurator seems to work fine but,
when the Sitemap is built, the beans are been overlapping each others. If I
remember correctly there's a class that takes care of holding the Pipeline
configuration defining a new Pipeline Scope for Spring. I think that this
is a good point to start investigating because looks like these isolation
has been broken.

Sorry but I got a woke up with a cold at Sunday so I was not able to
continue investigating, I will continue this week when I can get some time
but if anybody can take a look, I think that the problem could come from my
previous explanation.
Post by Gabriel Gruber
Would be nice if someone of the original committers of C2.2 could comment
on this!
WDYT?
+1
Post by Gabriel Gruber
Thanks in advance
Thanks to you for providing the patch.
Post by Gabriel Gruber
Gabriel
*Workflow EDV Gesm.b.H.*
https://personalwolke.at
http://www.workflow.at
https://www.facebook.com/workflow.edv
Javier Puerto
2015-10-27 16:52:09 UTC
Permalink
Post by Javier Puerto
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.
No problem. To reply the question I will need to check it with the code as
I don't remember ATM. I could take a look into the issue at Friday
afternoon or weekend.
Post by Javier Puerto
Regards.
Post by Francesco Chicchiriccò
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 Leszek Gawron
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 Leszek Gawron
WDYT?
Hum, is there anyone around with enough know-how about 2.2.?
--
Francesco Chicchiriccò
Tirasa - Open Source Excellencehttp://www.tirasa.net/
member, Syncope PMC chair, Cocoon PMC, Olingo PMChttp://people.apache.org/~ilgrosso/
Francesco Chicchiriccò
2015-10-28 08:35:28 UTC
Permalink
Post by Francesco Chicchiriccò
Post by Javier Puerto
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.
No problem. To reply the question I will need to check it with the
code as I don't remember ATM. I could take a look into the issue at
Friday afternoon or weekend.
Great: see my last comment

https://issues.apache.org/jira/browse/COCOON-2347?focusedCommentId=14977966&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14977966

for an update on this.

Regards.
Post by Francesco Chicchiriccò
Post by Javier Puerto
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.
Post by Francesco Chicchiriccò
Post by Francesco Chicchiriccò
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
Post by Francesco Chicchiriccò
Post by Francesco Chicchiriccò
other component to bring them to latest Spring version, I
would be
Post by Francesco Chicchiriccò
Post by Francesco Chicchiriccò
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.
Post by Francesco Chicchiriccò
- cocoon-pipeline-impl
- cocoon-servlet-service-impl
- cocoon-sitemap-impl
anything higher in spring version fails. I do not recall the
actual
Post by Francesco Chicchiriccò
problems but they were deep in cocoon internals and I was
unable to
Post by Francesco Chicchiriccò
debug it properly.
I have not been commiting those to cocoon repo as I have too
little
Post by Francesco Chicchiriccò
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/
Loading...