Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?

2015-11-03 Thread Javier Puerto
Hi Gabriel,

2015-11-02 18:01 GMT+01:00 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.


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

We could try but AFAIK, 4.0.x version is discontinued too.


> - 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.


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

+1


>
> Thanks in advance


Thanks to you for providing the patch.


>
>
> Gabriel
>
> *Workflow EDV Gesm.b.H.*
> https://personalwolke.at
> http://www.workflow.at
> https://www.facebook.com/workflow.edv
>


Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?

2015-11-02 Thread 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.

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


Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?

2015-10-30 Thread Francesco Chicchiriccò

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.

On 28/10/2015 09:39, Francesco Chicchiriccò wrote:

Hi Gabriel,
thanks again for your patches: see

https://issues.apache.org/jira/browse/COCOON-2347?focusedCommentId=14977966=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.

On 27/10/2015 17:59, Gabriel Gruber wrote:
One thing I forgot: it would be really nice to centralize the spring 
version in a property within in the parent pom like this:


...

org.springframework
spring-_aop_
${spring-version}


_avalon_-framework
_avalon_-framework


_logkit_
_logkit_



...



4.2.2.RELEASE


...



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:gabriel.gru...@workflow.at
https://personalwolke.at <https://personalwolke.at/>
http://www.workflow.at <http://www.workflow.at/>
https://www.facebook.com/workflow.edv




From: Gabriel Gruber <gabriel.gru...@workflow.at>
To: dev@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ò <ilgro...@apache.org>
To: dev@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

Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?

2015-10-28 Thread Francesco Chicchiriccò

On 27/10/2015 17:52, Javier Puerto wrote:


2015-10-27 13:59 GMT+01:00 Francesco Chicchiriccò >:


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. :)

> 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=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14977966

for an update on this.

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


> Francesco Chicchiriccò > wrote on 26.10.2015 15:37:00:

>> 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?
>
> 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/



Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?

2015-10-28 Thread Francesco Chicchiriccò

Hi Gabriel,
thanks again for your patches: see

https://issues.apache.org/jira/browse/COCOON-2347?focusedCommentId=14977966=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.

On 27/10/2015 17:59, Gabriel Gruber wrote:
One thing I forgot: it would be really nice to centralize the spring 
version in a property within in the parent pom like this:


...

org.springframework
spring-_aop_
${spring-version}


_avalon_-framework
_avalon_-framework


_logkit_
_logkit_



...



4.2.2.RELEASE


...



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:gabriel.gru...@workflow.at
https://personalwolke.at <https://personalwolke.at/>
http://www.workflow.at <http://www.workflow.at/>
https://www.facebook.com/workflow.edv




From: Gabriel Gruber <gabriel.gru...@workflow.at>
To: dev@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ò <ilgro...@apache.org>
To: dev@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  - 
_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: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 separa

Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?

2015-10-27 Thread Francesco Chicchiriccò

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. :)


> 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


> Francesco Chicchiriccò > wrote on 26.10.2015 15:37:00:

>> 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?
>
> 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/



Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?

2015-10-27 Thread Francesco Chicchiriccò
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. :)


> 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 
<_Gabriel.Gruber@workflow.at_ <mailto:gabriel.gru...@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


> Francesco Chicchiriccò <_ilgrosso@apache.org_ 
<mailto:ilgro...@apache.org>> wrote on 26.10.2015 15:37:00:


>> 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?
>
> 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/



Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?

2015-10-27 Thread Gabriel Gruber
)
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ò <ilgro...@apache.org>
To: dev@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. :)

> 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 <gabriel.gru...@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 


> Francesco Chicchiriccò <ilgro...@apache.org> wrote on 26.10.2015 
15:37:00:

>> 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? 
> 
> 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/



Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?

2015-10-27 Thread Gabriel Gruber
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ò <ilgro...@apache.org>
To: dev@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  - 
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: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.proces

Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?

2015-10-27 Thread Gabriel Gruber
One thing I forgot: it would be really nice to centralize the spring 
version in a property within in the parent pom like this:

...
  
org.springframework
spring-aop
${spring-version}

  
avalon-framework
avalon-framework
  
  
logkit
logkit
  

  
...


 
4.2.2.RELEASE

 
...



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:gabriel.gru...@workflow.at
https://personalwolke.at
http://www.workflow.at
https://www.facebook.com/workflow.edv




From:   Gabriel Gruber <gabriel.gru...@workflow.at>
To: dev@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ò <ilgro...@apache.org> 
To:dev@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  - 
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: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$I

Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?

2015-10-27 Thread Javier Puerto
2015-10-27 13:59 GMT+01:00 Francesco Chicchiriccò :

> 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. :)
>
> > 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.


>
> 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
>>
>>
>> > Francesco Chicchiriccò < ilgro...@apache.org>
>> wrote on 26.10.2015 15:37:00:
>>
>> >> 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?
>> >
>> > Hum, is there anyone around with enough know-how about 2.2.?
>>
> --
> Francesco Chicchiriccò
>
> Tirasa - Open Source Excellencehttp://www.tirasa.net/
>
> Involved at The Apache Software Foundation:
> member, Syncope PMC chair, Cocoon PMC, Olingo 
> PMChttp://people.apache.org/~ilgrosso/
>
>


Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?

2015-10-26 Thread Francesco Chicchiriccò

On 23/10/2015 18:05, Gabriel Gruber wrote:

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/



Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?

2015-10-26 Thread Leszek Gawron
>
>
> 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?


Re: Cocoon 2.2 with Java 8 and Spring Framework 4.2?

2015-10-26 Thread Francesco Chicchiriccò

On 26/10/2015 15:29, Leszek Gawron wrote:



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?


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/