Discussion:
cocoon 2.1.x and java 8
Carlos Chávez
2015-01-07 23:12:50 UTC
Permalink
Hi all.

I'm trying to run cocoon in java 8, I found an issue with the JDT core
that did not recognize java 8, the version in cocoon is

lib/core/jdtcore-3.1.0.jar


I did tried updating that version, what I did was copy the file
org.eclipse.jdt.core_3.10.0.v20140902-0626.jar from my Eclipse Luna
Installation and it works.

I did not find a public repository to download the jtdcore jar, I
searched in maven repos and did not find any updated jar.

When I compile and run cocoon with java 8, i found the issue testing the
sample http://localhost:8888/samples/blocks/xsp/java/cacheable which it
throw a NullPointerException when it tried to compile the XPS.

With that version the exception is gone and the page is generated.

thoughts, please ?
--
Saludos.
Carlos Chávez.
AG Software, S.A.
Francesco Chicchiriccò
2015-01-15 08:19:54 UTC
Permalink
Post by Carlos Chávez
Hi all.
I'm trying to run cocoon in java 8, I found an issue with the JDT core
that did not recognize java 8, the version in cocoon is
lib/core/jdtcore-3.1.0.jar
I did tried updating that version, what I did was copy the file
org.eclipse.jdt.core_3.10.0.v20140902-0626.jar from my Eclipse Luna
Installation and it works.
I did not find a public repository to download the jtdcore jar, I
searched in maven repos and did not find any updated jar.
When I compile and run cocoon with java 8, i found the issue testing the
sample http://localhost:8888/samples/blocks/xsp/java/cacheable which it
throw a NullPointerException when it tried to compile the XPS.
With that version the exception is gone and the page is generated.
thoughts, please ?
Hi Carlos,
I tried as you explain above and got exactly the same results: only
found this updated JAR [1], but the error is the same.

However, I have found these places [2] [3] from which the version
reported above can be downloaded.
I have opened COCOON-2344 [4] and provided a patch with which the XSP
sample above is working (checked with OpenJDK 6 / 7 / 8).
I have not committed the fix because I have no mean to check if
everything is working with Java 4 / 5 and also if other XSP features are
affected.

Can anyone please double check and confirm if the proposed patch can be
committed?

Regards.

[1]
http://central.maven.org/maven2/eclipse/jdtcore/3.2.0.v_658/jdtcore-3.2.0.v_658.jar
[2]
http://repository.grepcode.com/java/eclipse.org/4.4.1/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar
[3]
http://www.aadl.info/aadl/osate/testing/update-site/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar
[4] https://issues.apache.org/jira/browse/COCOON-2344
--
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/
Carlos Chávez
2015-01-15 17:59:40 UTC
Permalink
Hi Francesco.

I downloaded that file and it works with java 8.

I found another test that is failing,
http://localhost:8888/samples/blocks/xsp/java/java5, this seems to be
related to :

"// Set the sourceCodeVersion"
"// Set the target platform"

Check the patch:

Index:
src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
===================================================================
---
workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
(revision 1652165)
+++
workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
(working copy)
@@ -215,8 +215,11 @@
}
return result;
}
- }

+ public boolean ignoreOptionalProblems() {
+ return false;
+ }
+ }

final INameEnvironment env = new INameEnvironment() {

@@ -336,6 +339,18 @@
}
// Set the sourceCodeVersion
switch (this.compilerComplianceLevel) {
+ case 180:
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_8);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_8);
+ break;
+ case 170:
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_7);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_7);
+ break;
+ case 160:
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_6);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_6);
+ break;
case 150:
settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_5);
settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_5);
@@ -348,6 +363,15 @@
}
// Set the target platform
switch (SystemUtils.JAVA_VERSION_INT) {
+ case 180:
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_8);
+ break;
+ case 170:
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_7);
+ break;
+ case 160:
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_6);
+ break;
case 150:
settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_5);
break;
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Hi all.
I'm trying to run cocoon in java 8, I found an issue with the JDT core
that did not recognize java 8, the version in cocoon is
lib/core/jdtcore-3.1.0.jar
I did tried updating that version, what I did was copy the file
org.eclipse.jdt.core_3.10.0.v20140902-0626.jar from my Eclipse Luna
Installation and it works.
I did not find a public repository to download the jtdcore jar, I
searched in maven repos and did not find any updated jar.
When I compile and run cocoon with java 8, i found the issue testing the
sample http://localhost:8888/samples/blocks/xsp/java/cacheable which it
throw a NullPointerException when it tried to compile the XPS.
With that version the exception is gone and the page is generated.
thoughts, please ?
Hi Carlos,
I tried as you explain above and got exactly the same results: only
found this updated JAR [1], but the error is the same.
However, I have found these places [2] [3] from which the version
reported above can be downloaded.
I have opened COCOON-2344 [4] and provided a patch with which the XSP
sample above is working (checked with OpenJDK 6 / 7 / 8).
I have not committed the fix because I have no mean to check if
everything is working with Java 4 / 5 and also if other XSP features are
affected.
Can anyone please double check and confirm if the proposed patch can be
committed?
Regards.
[1]
http://central.maven.org/maven2/eclipse/jdtcore/3.2.0.v_658/jdtcore-3.2.0.v_658.jar
[2]
http://repository.grepcode.com/java/eclipse.org/4.4.1/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar
[3]
http://www.aadl.info/aadl/osate/testing/update-site/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar
[4] https://issues.apache.org/jira/browse/COCOON-2344
--
Saludos.
Carlos Chávez.
AG Software, S.A.
Francesco Chicchiriccò
2015-01-16 07:24:11 UTC
Permalink
Post by Carlos Chávez
Hi Francesco.
I downloaded that file and it works with java 8.
I found another test that is failing,
http://localhost:8888/samples/blocks/xsp/java/java5, this seems to be
"// Set the sourceCodeVersion"
"// Set the target platform"
Hi,
thanks for reporting: could you please unify my patch with your changes
and attach the resulting patch to

https://issues.apache.org/jira/browse/COCOON-2344

? Thanks.

Regards.
Post by Carlos Chávez
src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
===================================================================
---
workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
(revision 1652165)
+++
workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
(working copy)
@@ -215,8 +215,11 @@
}
return result;
}
- }
+ public boolean ignoreOptionalProblems() {
+ return false;
+ }
+ }
final INameEnvironment env = new INameEnvironment() {
@@ -336,6 +339,18 @@
}
// Set the sourceCodeVersion
switch (this.compilerComplianceLevel) {
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_8);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_8);
+ break;
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_7);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_7);
+ break;
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_6);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_6);
+ break;
settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_5);
settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_5);
@@ -348,6 +363,15 @@
}
// Set the target platform
switch (SystemUtils.JAVA_VERSION_INT) {
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_8);
+ break;
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_7);
+ break;
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_6);
+ break;
settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_5);
break;
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Hi all.
I'm trying to run cocoon in java 8, I found an issue with the JDT core
that did not recognize java 8, the version in cocoon is
lib/core/jdtcore-3.1.0.jar
I did tried updating that version, what I did was copy the file
org.eclipse.jdt.core_3.10.0.v20140902-0626.jar from my Eclipse Luna
Installation and it works.
I did not find a public repository to download the jtdcore jar, I
searched in maven repos and did not find any updated jar.
When I compile and run cocoon with java 8, i found the issue testing the
sample http://localhost:8888/samples/blocks/xsp/java/cacheable which it
throw a NullPointerException when it tried to compile the XPS.
With that version the exception is gone and the page is generated.
thoughts, please ?
Hi Carlos,
I tried as you explain above and got exactly the same results: only
found this updated JAR [1], but the error is the same.
However, I have found these places [2] [3] from which the version
reported above can be downloaded.
I have opened COCOON-2344 [4] and provided a patch with which the XSP
sample above is working (checked with OpenJDK 6 / 7 / 8).
I have not committed the fix because I have no mean to check if
everything is working with Java 4 / 5 and also if other XSP features are
affected.
Can anyone please double check and confirm if the proposed patch can be
committed?
Regards.
[1] http://central.maven.org/maven2/eclipse/jdtcore/3.2.0.v_658/jdtcore-3.2.0.v_658.jar
[2] http://repository.grepcode.com/java/eclipse.org/4.4.1/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar
[3] http://www.aadl.info/aadl/osate/testing/update-site/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar
[4] https://issues.apache.org/jira/browse/COCOON-2344
--
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/
Carlos Chávez
2015-01-30 14:09:29 UTC
Permalink
Hi Francesco.

I uploaded the patch.
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Hi Francesco.
I downloaded that file and it works with java 8.
I found another test that is failing,
http://localhost:8888/samples/blocks/xsp/java/java5, this seems to be
"// Set the sourceCodeVersion"
"// Set the target platform"
Hi,
thanks for reporting: could you please unify my patch with your changes
and attach the resulting patch to
https://issues.apache.org/jira/browse/COCOON-2344
? Thanks.
Regards.
Post by Carlos Chávez
src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
===================================================================
---
workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
(revision 1652165)
+++
workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
(working copy)
@@ -215,8 +215,11 @@
}
return result;
}
- }
+ public boolean ignoreOptionalProblems() {
+ return false;
+ }
+ }
final INameEnvironment env = new INameEnvironment() {
@@ -336,6 +339,18 @@
}
// Set the sourceCodeVersion
switch (this.compilerComplianceLevel) {
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_8);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_8);
+ break;
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_7);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_7);
+ break;
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_6);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_6);
+ break;
settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_5);
settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_5);
@@ -348,6 +363,15 @@
}
// Set the target platform
switch (SystemUtils.JAVA_VERSION_INT) {
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_8);
+ break;
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_7);
+ break;
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_6);
+ break;
settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_5);
break;
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Hi all.
I'm trying to run cocoon in java 8, I found an issue with the JDT core
that did not recognize java 8, the version in cocoon is
lib/core/jdtcore-3.1.0.jar
I did tried updating that version, what I did was copy the file
org.eclipse.jdt.core_3.10.0.v20140902-0626.jar from my Eclipse Luna
Installation and it works.
I did not find a public repository to download the jtdcore jar, I
searched in maven repos and did not find any updated jar.
When I compile and run cocoon with java 8, i found the issue testing the
sample http://localhost:8888/samples/blocks/xsp/java/cacheable which it
throw a NullPointerException when it tried to compile the XPS.
With that version the exception is gone and the page is generated.
thoughts, please ?
Hi Carlos,
I tried as you explain above and got exactly the same results: only
found this updated JAR [1], but the error is the same.
However, I have found these places [2] [3] from which the version
reported above can be downloaded.
I have opened COCOON-2344 [4] and provided a patch with which the XSP
sample above is working (checked with OpenJDK 6 / 7 / 8).
I have not committed the fix because I have no mean to check if
everything is working with Java 4 / 5 and also if other XSP features are
affected.
Can anyone please double check and confirm if the proposed patch can be
committed?
Regards.
[1]
http://central.maven.org/maven2/eclipse/jdtcore/3.2.0.v_658/jdtcore-3.2.0.v_658.jar
[2]
http://repository.grepcode.com/java/eclipse.org/4.4.1/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar
[3]
http://www.aadl.info/aadl/osate/testing/update-site/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar
[4] https://issues.apache.org/jira/browse/COCOON-2344
--
Saludos.
Carlos Chávez.
AG Software, S.A.
Francesco Chicchiriccò
2015-01-31 05:24:03 UTC
Permalink
Post by Carlos Chávez
Hi Francesco.
I uploaded the patch.
Hi Carlo,
patch applied (and issue closed), thanks.

Regards.
Post by Carlos Chávez
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Hi Francesco.
I downloaded that file and it works with java 8.
I found another test that is failing,
http://localhost:8888/samples/blocks/xsp/java/java5, this seems to be
"// Set the sourceCodeVersion"
"// Set the target platform"
Hi,
thanks for reporting: could you please unify my patch with your changes
and attach the resulting patch to
https://issues.apache.org/jira/browse/COCOON-2344
? Thanks.
Regards.
Post by Carlos Chávez
src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
===================================================================
---
workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
(revision 1652165)
+++
workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
(working copy)
@@ -215,8 +215,11 @@
}
return result;
}
- }
+ public boolean ignoreOptionalProblems() {
+ return false;
+ }
+ }
final INameEnvironment env = new INameEnvironment() {
@@ -336,6 +339,18 @@
}
// Set the sourceCodeVersion
switch (this.compilerComplianceLevel) {
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_8);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_8);
+ break;
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_7);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_7);
+ break;
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_6);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_6);
+ break;
settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_5);
settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_5);
@@ -348,6 +363,15 @@
}
// Set the target platform
switch (SystemUtils.JAVA_VERSION_INT) {
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_8);
+ break;
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_7);
+ break;
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_6);
+ break;
settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_5);
break;
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Hi all.
I'm trying to run cocoon in java 8, I found an issue with the JDT core
that did not recognize java 8, the version in cocoon is
lib/core/jdtcore-3.1.0.jar
I did tried updating that version, what I did was copy the file
org.eclipse.jdt.core_3.10.0.v20140902-0626.jar from my Eclipse Luna
Installation and it works.
I did not find a public repository to download the jtdcore jar, I
searched in maven repos and did not find any updated jar.
When I compile and run cocoon with java 8, i found the issue testing the
sample http://localhost:8888/samples/blocks/xsp/java/cacheable which it
throw a NullPointerException when it tried to compile the XPS.
With that version the exception is gone and the page is generated.
thoughts, please ?
Hi Carlos,
I tried as you explain above and got exactly the same results: only
found this updated JAR [1], but the error is the same.
However, I have found these places [2] [3] from which the version
reported above can be downloaded.
I have opened COCOON-2344 [4] and provided a patch with which the XSP
sample above is working (checked with OpenJDK 6 / 7 / 8).
I have not committed the fix because I have no mean to check if
everything is working with Java 4 / 5 and also if other XSP features are
affected.
Can anyone please double check and confirm if the proposed patch can be
committed?
Regards.
[1]
http://central.maven.org/maven2/eclipse/jdtcore/3.2.0.v_658/jdtcore-3.2.0.v_658.jar
[2]
http://repository.grepcode.com/java/eclipse.org/4.4.1/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar
[3]
http://www.aadl.info/aadl/osate/testing/update-site/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar
[4] https://issues.apache.org/jira/browse/COCOON-2344
Francesco Chicchiriccò
2015-01-31 06:19:28 UTC
Permalink
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Hi Francesco.
I uploaded the patch.
Hi Carlos,
patch applied (and issue closed), thanks.
It seems there is a problem; see
https://builds.apache.org/job/Cocoon%202.1.X/98/console

bad class file: /home/jenkins/jenkins-slave/workspace/Cocoon
2.1.X/BRANCH_2_1_X/lib/core/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar(org/eclipse/jdt/core/compiler/IProblem.class)
class file has wrong version 50.0, should be 48.0

This means that the JAR above does not work with JDK 1.4, which is
currently a pre-requisite for Cocoon 2.1.X - can you find a compatible
version of that JAR?

Alternatively I will need to revert the patch...

Regards.
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Hi Francesco.
I downloaded that file and it works with java 8.
I found another test that is failing,
http://localhost:8888/samples/blocks/xsp/java/java5, this seems to be
"// Set the sourceCodeVersion"
"// Set the target platform"
Hi,
thanks for reporting: could you please unify my patch with your changes
and attach the resulting patch to
https://issues.apache.org/jira/browse/COCOON-2344
? Thanks.
Regards.
Post by Carlos Chávez
src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
===================================================================
---
workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
(revision 1652165)
+++
workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
(working copy)
@@ -215,8 +215,11 @@
}
return result;
}
- }
+ public boolean ignoreOptionalProblems() {
+ return false;
+ }
+ }
final INameEnvironment env = new INameEnvironment() {
@@ -336,6 +339,18 @@
}
// Set the sourceCodeVersion
switch (this.compilerComplianceLevel) {
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_8);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_8);
+ break;
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_7);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_7);
+ break;
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_6);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_6);
+ break;
settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_5);
settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_5);
@@ -348,6 +363,15 @@
}
// Set the target platform
switch (SystemUtils.JAVA_VERSION_INT) {
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_8);
+ break;
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_7);
+ break;
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_6);
+ break;
settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_5);
break;
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Hi all.
I'm trying to run cocoon in java 8, I found an issue with the JDT core
that did not recognize java 8, the version in cocoon is
lib/core/jdtcore-3.1.0.jar
I did tried updating that version, what I did was copy the file
org.eclipse.jdt.core_3.10.0.v20140902-0626.jar from my Eclipse Luna
Installation and it works.
I did not find a public repository to download the jtdcore jar, I
searched in maven repos and did not find any updated jar.
When I compile and run cocoon with java 8, i found the issue testing the
sample http://localhost:8888/samples/blocks/xsp/java/cacheable which it
throw a NullPointerException when it tried to compile the XPS.
With that version the exception is gone and the page is generated.
thoughts, please ?
Hi Carlos,
I tried as you explain above and got exactly the same results: only
found this updated JAR [1], but the error is the same.
However, I have found these places [2] [3] from which the version
reported above can be downloaded.
I have opened COCOON-2344 [4] and provided a patch with which the XSP
sample above is working (checked with OpenJDK 6 / 7 / 8).
I have not committed the fix because I have no mean to check if
everything is working with Java 4 / 5 and also if other XSP features are
affected.
Can anyone please double check and confirm if the proposed patch can be
committed?
Regards.
[1]
http://central.maven.org/maven2/eclipse/jdtcore/3.2.0.v_658/jdtcore-3.2.0.v_658.jar
[2]
http://repository.grepcode.com/java/eclipse.org/4.4.1/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar
[3]
http://www.aadl.info/aadl/osate/testing/update-site/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar
[4] https://issues.apache.org/jira/browse/COCOON-2344
--
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/
Carlos Chávez
2015-02-02 03:27:56 UTC
Permalink
Let me see what can I do.

Francesco Chicchiriccò Escribio :-)
Post by Francesco Chicchiriccò
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Hi Francesco.
I uploaded the patch.
Hi Carlos,
patch applied (and issue closed), thanks.
It seems there is a problem; see
https://builds.apache.org/job/Cocoon%202.1.X/98/console
bad class file: /home/jenkins/jenkins-slave/workspace/Cocoon
2.1.X/BRANCH_2_1_X/lib/core/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar(org/eclipse/jdt/core/compiler/IProblem.class)
class file has wrong version 50.0, should be 48.0
This means that the JAR above does not work with JDK 1.4, which is
currently a pre-requisite for Cocoon 2.1.X - can you find a compatible
version of that JAR?
Alternatively I will need to revert the patch...
Regards.
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Hi Francesco.
I downloaded that file and it works with java 8.
I found another test that is failing,
http://localhost:8888/samples/blocks/xsp/java/java5, this seems to be
"// Set the sourceCodeVersion"
"// Set the target platform"
Hi,
thanks for reporting: could you please unify my patch with your changes
and attach the resulting patch to
https://issues.apache.org/jira/browse/COCOON-2344
? Thanks.
Regards.
Post by Carlos Chávez
src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
===================================================================
---
workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
(revision 1652165)
+++
workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
(working copy)
@@ -215,8 +215,11 @@
}
return result;
}
- }
+ public boolean ignoreOptionalProblems() {
+ return false;
+ }
+ }
final INameEnvironment env = new INameEnvironment() {
@@ -336,6 +339,18 @@
}
// Set the sourceCodeVersion
switch (this.compilerComplianceLevel) {
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_8);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_8);
+ break;
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_7);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_7);
+ break;
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_6);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_6);
+ break;
settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_5);
settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_5);
@@ -348,6 +363,15 @@
}
// Set the target platform
switch (SystemUtils.JAVA_VERSION_INT) {
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_8);
+ break;
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_7);
+ break;
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_6);
+ break;
settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_5);
break;
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Hi all.
I'm trying to run cocoon in java 8, I found an issue with the JDT core
that did not recognize java 8, the version in cocoon is
lib/core/jdtcore-3.1.0.jar
I did tried updating that version, what I did was copy the file
org.eclipse.jdt.core_3.10.0.v20140902-0626.jar from my Eclipse Luna
Installation and it works.
I did not find a public repository to download the jtdcore jar, I
searched in maven repos and did not find any updated jar.
When I compile and run cocoon with java 8, i found the issue
testing
the
sample http://localhost:8888/samples/blocks/xsp/java/cacheable which it
throw a NullPointerException when it tried to compile the XPS.
With that version the exception is gone and the page is generated.
thoughts, please ?
Hi Carlos,
I tried as you explain above and got exactly the same results: only
found this updated JAR [1], but the error is the same.
However, I have found these places [2] [3] from which the version
reported above can be downloaded.
I have opened COCOON-2344 [4] and provided a patch with which the XSP
sample above is working (checked with OpenJDK 6 / 7 / 8).
I have not committed the fix because I have no mean to check if
everything is working with Java 4 / 5 and also if other XSP features are
affected.
Can anyone please double check and confirm if the proposed patch can be
committed?
Regards.
[1]
http://central.maven.org/maven2/eclipse/jdtcore/3.2.0.v_658/jdtcore-3.2.0.v_658.jar
[2]
http://repository.grepcode.com/java/eclipse.org/4.4.1/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar
[3]
http://www.aadl.info/aadl/osate/testing/update-site/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar
[4] https://issues.apache.org/jira/browse/COCOON-2344
--
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-02-02 09:30:30 UTC
Permalink
Hi,
I've just committed an updated fix which relies on
org.eclipse.jdt.core-3.9.1.v20130905-0837 which seems to be the latest
version retaining compatibility with Java 1.4.

I had to change the patch a bit, but the result is succeeding with both
the URLs below and Java 8.

Regards.
Post by Carlos Chávez
Let me see what can I do.
Francesco Chicchiriccò Escribio :-)
Post by Francesco Chicchiriccò
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Hi Francesco.
I uploaded the patch.
Hi Carlos,
patch applied (and issue closed), thanks.
It seems there is a problem; see
https://builds.apache.org/job/Cocoon%202.1.X/98/console
bad class file: /home/jenkins/jenkins-slave/workspace/Cocoon
2.1.X/BRANCH_2_1_X/lib/core/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar(org/eclipse/jdt/core/compiler/IProblem.class)
class file has wrong version 50.0, should be 48.0
This means that the JAR above does not work with JDK 1.4, which is
currently a pre-requisite for Cocoon 2.1.X - can you find a compatible
version of that JAR?
Alternatively I will need to revert the patch...
Regards.
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Hi Francesco.
I downloaded that file and it works with java 8.
I found another test that is failing,
http://localhost:8888/samples/blocks/xsp/java/java5, this seems to be
"// Set the sourceCodeVersion"
"// Set the target platform"
Hi,
thanks for reporting: could you please unify my patch with your changes
and attach the resulting patch to
https://issues.apache.org/jira/browse/COCOON-2344
? Thanks.
Regards.
Post by Carlos Chávez
src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
===================================================================
---
workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
(revision 1652165)
+++
workspace/cocoon-BRANCH_2_1_X/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/EclipseJavaCompiler.java
(working copy)
@@ -215,8 +215,11 @@
}
return result;
}
- }
+ public boolean ignoreOptionalProblems() {
+ return false;
+ }
+ }
final INameEnvironment env = new INameEnvironment() {
@@ -336,6 +339,18 @@
}
// Set the sourceCodeVersion
switch (this.compilerComplianceLevel) {
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_8);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_8);
+ break;
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_7);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_7);
+ break;
+ settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_6);
+ settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_6);
+ break;
settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_5);
settings.put(CompilerOptions.OPTION_Compliance,
CompilerOptions.VERSION_1_5);
@@ -348,6 +363,15 @@
}
// Set the target platform
switch (SystemUtils.JAVA_VERSION_INT) {
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_8);
+ break;
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_7);
+ break;
+ settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_6);
+ break;
settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_5);
break;
Post by Francesco Chicchiriccò
Post by Carlos Chávez
Hi all.
I'm trying to run cocoon in java 8, I found an issue with the JDT core
that did not recognize java 8, the version in cocoon is
lib/core/jdtcore-3.1.0.jar
I did tried updating that version, what I did was copy the file
org.eclipse.jdt.core_3.10.0.v20140902-0626.jar from my Eclipse Luna
Installation and it works.
I did not find a public repository to download the jtdcore jar, I
searched in maven repos and did not find any updated jar.
When I compile and run cocoon with java 8, i found the issue
testing
the
sample http://localhost:8888/samples/blocks/xsp/java/cacheable which it
throw a NullPointerException when it tried to compile the XPS.
With that version the exception is gone and the page is generated.
thoughts, please ?
Hi Carlos,
I tried as you explain above and got exactly the same results: only
found this updated JAR [1], but the error is the same.
However, I have found these places [2] [3] from which the version
reported above can be downloaded.
I have opened COCOON-2344 [4] and provided a patch with which the XSP
sample above is working (checked with OpenJDK 6 / 7 / 8).
I have not committed the fix because I have no mean to check if
everything is working with Java 4 / 5 and also if other XSP features are
affected.
Can anyone please double check and confirm if the proposed patch can be
committed?
Regards.
[1]
http://central.maven.org/maven2/eclipse/jdtcore/3.2.0.v_658/jdtcore-3.2.0.v_658.jar
[2]
http://repository.grepcode.com/java/eclipse.org/4.4.1/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar
[3]
http://www.aadl.info/aadl/osate/testing/update-site/plugins/org.eclipse.jdt.core_3.10.0.v20140902-0626.jar
[4] https://issues.apache.org/jira/browse/COCOON-2344
--
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/
Wicket und Cocoon
2015-02-09 07:32:31 UTC
Permalink
i am evaluating to transfer my applications to Google Cloud.
Is it a good idea and is there already some experience with it.

Regards
Heiner
Jos Snellings
2015-02-09 07:37:30 UTC
Permalink
Hi,

I remember having done some exploratory tests.
They date back to 2010 so things might be different.

I can confirm that there were problems at the time (cocoon was a nogo).
The root cause seemed to be that certain basic classes are forbidden in
AppEngine. AppEngine does not
want you to take control on a very low level.

Cheers,
Jos

On Mon, Feb 9, 2015 at 8:32 AM, Wicket und Cocoon <
Post by Wicket und Cocoon
i am evaluating to transfer my applications to Google Cloud.
Is it a good idea and is there already some experience with it.
Regards
Heiner
--
Confucius said way too much ...
Wicket und Cocoon
2015-02-09 07:58:07 UTC
Permalink
what is a good place to upload a cocoon application?
Post by Jos Snellings
Hi,
I remember having done some exploratory tests.
They date back to 2010 so things might be different.
I can confirm that there were problems at the time (cocoon was a nogo).
The root cause seemed to be that certain basic classes are forbidden
in AppEngine. AppEngine does not
want you to take control on a very low level.
Cheers,
Jos
On Mon, Feb 9, 2015 at 8:32 AM, Wicket und Cocoon
i am evaluating to transfer my applications to Google Cloud.
Is it a good idea and is there already some experience with it.
Regards
Heiner
--
Confucius said way too much ...
Jos Snellings
2015-02-09 09:21:57 UTC
Permalink
- A dedicated server with single ip address :-)
- (no personal experience) but amazon cloud, or any provider who offers
virtual machines.
that would deliver you the necessary freedom to run servlets of your own
choice




On Mon, Feb 9, 2015 at 8:58 AM, Wicket und Cocoon <
Post by Wicket und Cocoon
what is a good place to upload a cocoon application?
Hi,
I remember having done some exploratory tests.
They date back to 2010 so things might be different.
I can confirm that there were problems at the time (cocoon was a nogo).
The root cause seemed to be that certain basic classes are forbidden in
AppEngine. AppEngine does not
want you to take control on a very low level.
Cheers,
Jos
On Mon, Feb 9, 2015 at 8:32 AM, Wicket und Cocoon <
Post by Wicket und Cocoon
i am evaluating to transfer my applications to Google Cloud.
Is it a good idea and is there already some experience with it.
Regards
Heiner
--
Confucius said way too much ...
--
Confucius said way too much ...
Patrick Refondini
2015-02-09 14:11:14 UTC
Permalink
For Linux based VMs, nearly a decade ago I was advised by Bertrand
Delacretaz to try out: https://www.bytemark.co.uk/
I have used Debian and Ubuntu based VMs. They also offer CentOS.
Its very reliable and there technical service is quick and helpful.
Post by Jos Snellings
- A dedicated server with single ip address :-)
- (no personal experience) but amazon cloud, or any provider who offers
virtual machines.
that would deliver you the necessary freedom to run servlets of your
own choice
On Mon, Feb 9, 2015 at 8:58 AM, Wicket und Cocoon
what is a good place to upload a cocoon application?
Post by Jos Snellings
Hi,
I remember having done some exploratory tests.
They date back to 2010 so things might be different.
I can confirm that there were problems at the time (cocoon was a nogo).
The root cause seemed to be that certain basic classes are
forbidden in AppEngine. AppEngine does not
want you to take control on a very low level.
Cheers,
Jos
On Mon, Feb 9, 2015 at 8:32 AM, Wicket und Cocoon
i am evaluating to transfer my applications to Google Cloud.
Is it a good idea and is there already some experience with it.
Regards
Heiner
--
Confucius said way too much ...
--
Confucius said way too much ...
Loading...