X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.25a (ClamAV 0.103.6/26745) X-Junk-Score: 0 [] X-KAS-Score: 0 [] Return-Path: Received: from mail-qt1-f177.google.com ([209.85.160.177] verified) by selbstdenker.ag (CommuniGate Pro SMTP 6.3.14) with ESMTPS id 29049445 for webobjects-dev@wocommunity.org; Fri, 09 Dec 2022 20:00:29 +0100 Received-SPF: pass receiver=post.selbstdenker.com; client-ip=209.85.160.177; envelope-from=recurve@cocoanutstech.com Received: by mail-qt1-f177.google.com with SMTP id h16so4310195qtu.2 for ; Fri, 09 Dec 2022 11:00:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chatnbike.com; s=chatnbike; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VnScCRjCMavJPu7n8pxoWBWsPLntXp0IsSssy87V47E=; b=fMye1czKSrNt4y7v6CnbRhvOq9SxDGXXgmNVxFbE9mPIr46iHlE1Usr+bDbmjRRiyx nmORKUMIhAI6MMrA0y3uZbAahlf/oarrsZ7dTBwxpSkn2evFUt1bhVw4ca9R1jS5/XqT BhsNwTU+W188DFKemo9AukLrPcKu0OJX8cnVU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VnScCRjCMavJPu7n8pxoWBWsPLntXp0IsSssy87V47E=; b=AAsSdMRBstaCQHayfSyLoL9eRxIC9XT6na/AGQkbjN9IRyGa2lRYVlP4BFycsQV9nY Y0m5p4YRTW4+o3o4wyz6J4iiBzW+lExDF3ea9xNcYaWnziRcxlqdVjsY6a7S0WthMtSt OAs00pPCFQQTLfm/sWSVEMVxqGMUX1kRBQao+gqDlCGh9OA0iRKUAelx/WgrgwzGxrPV gtP58sRtm2NE/UU7HqcE7FxGuIGBR0hYQ3FDY5jrTou5AaNoMCTea8un5lQQzvMGQMCF LuaGZ/QkZUibJ7OeS5AeCAEAqgSkKhAGhH7isH9WXa6xMMSRbO9a60MQE2Ate7nFSswt n9RQ== X-Gm-Message-State: ANoB5pl+vqc/+QilE3W9IflhE3+bog3mqdC3FOTafocz1uJ58aAK88Zu cqPyOhakCVBY5dIK3PAFNuYQoRp/+SY4KSvDvtI= X-Google-Smtp-Source: AA0mqf6VxY1h7XonuopWtSEZHDzcfLN48Ttu2TTGy6Fna5+GIFz/54ds9iwKuyJWQJOpr1XL1ecS1g== X-Received: by 2002:ac8:1012:0:b0:3a5:25d5:ee2d with SMTP id z18-20020ac81012000000b003a525d5ee2dmr8233436qti.26.1670612407214; Fri, 09 Dec 2022 11:00:07 -0800 (PST) Return-Path: Received: from smtpclient.apple (pool-173-79-19-72.washdc.fios.verizon.net. [173.79.19.72]) by smtp.gmail.com with ESMTPSA id k6-20020ac84786000000b003a7ee9613a6sm1387666qtq.25.2022.12.09.11.00.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Dec 2022 11:00:06 -0800 (PST) Content-Type: multipart/alternative; boundary="Apple-Mail=_D9E96F4B-B611-48D9-939A-FF7C30EBD10D" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: [WO-DEV] When add-exports ALL-UNNAMED is not enough (Java 17) From: Aaron Rosenzweig In-Reply-To: Date: Fri, 9 Dec 2022 14:00:06 -0500 Cc: tim@triptera.com.au Message-Id: <3C318CF7-81EF-4ACA-86C4-5E12B9F5EC05@chatnbike.com> References: To: WebObjects & WOnder Development X-Mailer: Apple Mail (2.3696.120.41.1.1) --Apple-Mail=_D9E96F4B-B611-48D9-939A-FF7C30EBD10D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Thanks Tim, your comment is helping connect the dots in my brain but = I=E2=80=99m not fully up to speed yet.=20 Would it be a correct to say that anyone wanting to target Java 17 = compatibility mode compilation, should wait until WOnder reaches the v8 = milestone?=20 I don=E2=80=99t see any =E2=80=9Cmodule-info.java=E2=80=9D declarations = anywhere, is that what=E2=80=99s coming with the WOnder v8 release?=20 Are you sure you are compiling your WOnder frameworks with Java 17 = compatibility mode using Maven? When I look at the pom.xml it has a = JavaXML dependency which includes conflicts with the =E2=80=9Cjava.xml=E2=80= =9D named module in Java 17. I don=E2=80=99t see how this could work = unless it is compiling for Java 1.8 compatibility mode.=20 Look at this file: = https://github.com/wocommunity/wonder/blob/master/Frameworks/Core/ERExtens= ions/.settings/org.eclipse.jdt.core.prefs = Lines 14, 16, and 107 are forcing eclipse to build with Java 1.8 = compliance If we remove that, and go for Java 17 compliance, it won=E2=80=99t work. = So Tim, I think your own app may be in Java 17 compliance mode but the = frameworks are not built that way.=20 > On Dec 7, 2022, at 7:23 PM, D Tim Cummings = wrote: >=20 > I am using Java 17 compatibility mode in eclipse 2022-09 and I use = Java 17 in my deployment environments. >=20 > All my projects are maven based so I think that makes it easier. I = don't have to build Wonder frameworks. However, I did try recently = building Wonder frameworks in Java 17 using maven and did need to = comment out ERProfiling and ERXiss in Frameworks/Misc/pom.xml to get the = build to complete. I don't use those two frameworks so this was not a = problem for me. >=20 > During the discussion on = https://github.com/wocommunity/wonder/pull/998 regarding updating = wotaskd and JavaMonitor for Java 17 it was decided that Wonder 7.4 would = stay compatible with Java 8 when it is released and the next version of = Wonder (8?) would target Java 17 as the supported baseline. >=20 > Tim >=20 > On 8/12/22 08:42, Aaron Rosenzweig wrote: >> Hi WOrriors, >>=20 >> I=E2=80=99m upgrading to Java 17 from Java 1.8 and have run into = snags in my local Eclipse workspace. Perhaps you=E2=80=99ve struggled = with this too? >>=20 >> In general, this VM argument is helpful but not enough: --add-exports = java.base/sun.security.action=3DALL-UNNAMED >>=20 >> The issue has to do with changes from Java 1.8 and java modules. >>=20 >> I can use 1.8 compatibility mode with my workspace (from Java 17 VM) = and there are no errors and no problems. >>=20 >> When I change to Java 17 compatibility mode, it falls apart. >>=20 >> My java apps are ok, but many of the WOnder frameworks don=E2=80=99t = build anymore. >>=20 >> For example ERAttachment. I have this error: The package org.xml.sax = is accessible from more than one module: , java.xml >>=20 >> To me that means that it is available in a system module = =E2=80=9Cjava.xml=E2=80=9D and also in some old jar file=E2=80=A6 two = places. >>=20 >> I clicked on ERAttachment (in WO Explorer pane) and then right click = to do "build path" and then "configure build path." I then went to the = last tab "Module Dependencies" clicked "java.xml" and then clicked = "remove." It gave me warnings that other things use it but I did it = anyway. Now the errors are gone for org.xml.sax.Attributes and similar = imports. Yay! >>=20 >> I=E2=80=99m not done yet but I did similar things as follows: >> =E2=80=A2 ERAttachment - remove java.xml >> =E2=80=A2 ERRest - remove java.xml >> =E2=80=A2 ERChangeNotificationJMS - remove java.naming >> =E2=80=A2 ExcelGenerator - remove java.xml >> =E2=80=A2 ERPDFGeneration - remove java.xml >> =E2=80=A2 ERSelenium - remove java.xml >> =E2=80=A2 ERXiss - remove java.xml >> =E2=80=A2 DRGrouping - remove java.xml >> =E2=80=A2 ERJaxWS - remove java.xml >> =E2=80=A2 ERProfiling - lost cause? jdk.internal.loader is = inaccessible so I closed the project in my workspace (and am not = currently using it). >>=20 >> I=E2=80=99m still coming to grips with all this but I have following = unresolved and possibly incorrectly stated questions: >>=20 >> 1) Do most of us run with 1.8 compatibility in newer JVMs and leave = it at that? >>=20 >> 2) Do some of us run with newer VM compatibility modes (to access new = features of Java) but then use =E2=80=9CALL-UNNAMED=E2=80=9D hacks along = with removing system module hacks like I was talking about above? >>=20 >> 3) Do some of us use pre-built jars of Wonder and not build from = source in our Eclipse projects to get around some of these issues? But = if so, that means it=E2=80=99s not as nice to just dive into the source = code and quickly trace / change things as we are working... >>=20 >> 4) Should we consider putting WOnder frameworks into module friendly = configurations? Or is that not possible because we need to support Java = 1.8 too? >>=20 >> 5) What is the best way to use Java 17 VM along with any new java = syntax / functionality while still using WOnder frameworks? >>=20 >> Thanks to all for reading this far :-) >> =E2=80=94 Aaron >> ############################################################# >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to = >> To switch to the INDEX mode, E-mail to = >> Send administrative queries to = >>=20 >=20 > ############################################################# > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to = > To switch to the INDEX mode, E-mail to = > Send administrative queries to = >=20 --Apple-Mail=_D9E96F4B-B611-48D9-939A-FF7C30EBD10D Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Thanks Tim, your comment is helping connect the dots in my = brain but I=E2=80=99m not fully up to speed yet. 

Would it be a correct to say that = anyone wanting to target Java 17 compatibility mode compilation, should = wait until WOnder reaches the v8 milestone? 
I don=E2=80=99t see any = =E2=80=9Cmodule-info.java=E2=80=9D declarations anywhere, is that = what=E2=80=99s coming with the WOnder v8 release? 

Are you sure you are = compiling your WOnder frameworks with Java 17 compatibility mode using = Maven? When I look at the pom.xml it has a JavaXML dependency which = includes conflicts with the =E2=80=9Cjava.xml=E2=80=9D named module in = Java 17. I don=E2=80=99t see how this could work unless it is compiling = for Java 1.8 compatibility mode. 

Lines 14, 16, and 107 are forcing eclipse to build with Java = 1.8 compliance

If we remove that, and go for Java 17 compliance, it won=E2=80=99= t work. So Tim, I think your own app may be in Java 17 compliance mode = but the frameworks are not built that way. 



On Dec 7, 2022, at 7:23 PM, D Tim Cummings <tim@triptera.com.au>= wrote:

I am using Java 17 compatibility mode in eclipse 2022-09 and = I use Java 17 in my deployment environments.

All my projects are maven based so I think that makes it = easier. I don't have to build Wonder frameworks. However, I did try = recently building Wonder frameworks in Java 17 using maven and did need = to comment out ERProfiling and ERXiss in Frameworks/Misc/pom.xml to get = the build to complete. I don't use those two frameworks so this was not = a problem for me.

During the discussion on = https://github.com/wocommunity/wonder/pull/998 regarding = updating wotaskd and JavaMonitor for Java 17 it was decided that Wonder = 7.4 would stay compatible with Java 8 when it is released and the next = version of Wonder (8?) would target Java 17 as the supported = baseline.

Tim

On= 8/12/22 08:42, Aaron Rosenzweig wrote:
Hi WOrriors,

I=E2=80= =99m upgrading to Java 17 from Java 1.8 and have run into snags in my = local Eclipse workspace. Perhaps you=E2=80=99ve struggled with this = too?

In general, this VM argument is = helpful but not enough: --add-exports = java.base/sun.security.action=3DALL-UNNAMED

The issue has to do with changes from Java 1.8 and java = modules.

I can use 1.8 compatibility mode = with my workspace (from Java 17 VM) and there are no errors and no = problems.

When I change to Java 17 = compatibility mode, it falls apart.

My java = apps are ok, but many of the WOnder frameworks don=E2=80=99t build = anymore.

For example ERAttachment. I have = this error: The package org.xml.sax is accessible from more than one = module: <unnamed>, java.xml

To me = that means that it is available in a system module =E2=80=9Cjava.xml=E2=80= =9D and also in some old jar file=E2=80=A6 two places.

I clicked on ERAttachment (in WO Explorer pane) and then = right click to do "build path" and then "configure build path." I then = went to the last tab "Module Dependencies" clicked "java.xml" and then = clicked "remove." It gave me warnings that other things use it but I did = it anyway. Now the errors are gone for org.xml.sax.Attributes and = similar imports. Yay!

I=E2=80=99m not done = yet but I did similar things as follows:
=E2=80=A2 = ERAttachment - remove java.xml
=E2=80=A2 = ERRest - remove java.xml
=E2=80=A2 ERChangeNotificationJMS = - remove java.naming
=E2=80=A2 ExcelGenerator - remove = java.xml
=E2=80=A2 ERPDFGeneration - = remove java.xml
=E2=80=A2 ERSelenium - remove = java.xml
=E2=80=A2 ERXiss - remove = java.xml
=E2=80=A2 DRGrouping - remove = java.xml
=E2=80=A2 ERJaxWS - remove = java.xml
=E2=80=A2 ERProfiling - lost = cause? jdk.internal.loader is inaccessible so I closed the project in my = workspace (and am not currently using it).

I=E2=80=99m still coming to grips with all this but I have = following unresolved and possibly incorrectly stated questions:

1) Do most of us run with 1.8 compatibility in = newer JVMs and leave it at that?

2) Do some = of us run with newer VM compatibility modes (to access new features of = Java) but then use =E2=80=9CALL-UNNAMED=E2=80=9D hacks along with = removing system module hacks like I was talking about above?

3) Do some of us use pre-built jars of Wonder = and not build from source in our Eclipse projects to get around some of = these issues? But if so, that means it=E2=80=99s not as nice to just = dive into the source code and quickly trace / change things as we are = working...

4) Should we consider putting = WOnder frameworks into module friendly configurations? Or is that not = possible because we need to support Java 1.8 too?

5) What is the best way to use Java 17 VM along with any new = java syntax / functionality while still using WOnder frameworks?

Thanks to all for reading this far :-)
=E2=80=94 Aaron
#############################################################This message is sent to you because you are subscribed = to
  the mailing list <webobjects-dev@wocommunity.org>.
To = unsubscribe, E-mail to: <webobjects-dev-off@wocommunity.org>
To = switch to the DIGEST mode, E-mail to <webobjects-dev-digest@wocommunity.org>
To = switch to the INDEX mode, E-mail to <webobjects-dev-index@wocommunity.org>
Send= administrative queries to  <webobjects-dev-request@wocommunity.org>


#############################################################This message is sent to you because you are subscribed = to
the mailing list <webobjects-dev@wocommunity.org>.
To = unsubscribe, E-mail to: <webobjects-dev-off@wocommunity.org>
To = switch to the DIGEST mode, E-mail to <webobjects-dev-digest@wocommunity.org>
To = switch to the INDEX mode, E-mail to <webobjects-dev-index@wocommunity.org>
Send= administrative queries to  <webobjects-dev-request@wocommunity.org>


= --Apple-Mail=_D9E96F4B-B611-48D9-939A-FF7C30EBD10D--