Return-Path: X-Original-To: apmail-cocoon-dev-archive@www.apache.org Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 12BABCB8A for ; Fri, 16 Jan 2015 07:24:15 +0000 (UTC) Received: (qmail 250 invoked by uid 500); 16 Jan 2015 07:24:16 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 182 invoked by uid 500); 16 Jan 2015 07:24:16 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 172 invoked by uid 99); 16 Jan 2015 07:24:16 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jan 2015 07:24:16 +0000 Received: from [192.168.0.6] (rovere.tirasa.net [78.134.5.44]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id D7F311A003F for ; Fri, 16 Jan 2015 07:24:15 +0000 (UTC) Message-ID: <54B8BC9B.8070704@apache.org> Date: Fri, 16 Jan 2015 08:24:11 +0100 From: =?UTF-8?B?RnJhbmNlc2NvIENoaWNjaGlyaWNjw7I=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: cocoon 2.1.x and java 8 References: <54ADBD72.4020305@agssa.net> <54B7782A.3050704@apache.org> <54B8000C.5030606@agssa.net> In-Reply-To: <54B8000C.5030606@agssa.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 15/01/2015 18:59, Carlos Chávez wrote: > 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: 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. > 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; > > > On 15/01/15 02:19, Francesco Chicchiriccò wrote: >> On 08/01/2015 00:12, Carlos Chávez wrote: >>> 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/