X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.25a (ClamAV 0.103.6/26744) X-Junk-Score: 0 [] X-KAS-Score: 0 [] Return-Path: Received: from mail-qt1-f169.google.com ([209.85.160.169] verified) by selbstdenker.ag (CommuniGate Pro SMTP 6.3.14) with ESMTPS id 29045237 for webobjects-dev@wocommunity.org; Thu, 08 Dec 2022 22:23:12 +0100 Received-SPF: pass receiver=post.selbstdenker.com; client-ip=209.85.160.169; envelope-from=recurve@cocoanutstech.com Received: by mail-qt1-f169.google.com with SMTP id ay32so2154064qtb.11 for ; Thu, 08 Dec 2022 13:23:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chatnbike.com; s=chatnbike; h=references:to:in-reply-to:subject:date:mime-version:message-id:from :from:to:cc:subject:date:message-id:reply-to; bh=zQSbkFmJNr+8ps6+qQGIhXzMouO9cGmkQLlsxSXuYvw=; b=XC00k5KjrqQX7My53xuqL8P2Cl1KDXXY6MN/fbDqQlSY7dj1P2AZDDuCtxXIB2dtxl 6XErIszPq+HLhFIoVo3Q6zBf239EZ5nVg0kzL17pxYDmwBbLxmidYIOwxfjHbQqWvVt4 lxXjo+Yml8fj9+VV605eXMv/bPbyX4pZry6xQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:to:in-reply-to:subject:date:mime-version:message-id:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zQSbkFmJNr+8ps6+qQGIhXzMouO9cGmkQLlsxSXuYvw=; b=hYLbn28NPj3GckLrOLA5YMzkkTU0kU39hFK5nQv87Qo03c4oUsstKfGbmAltOIUZuo 5443v3nqonv4MVGoXA0MW0mFtOTZr+MpxwHBmEJbXocXglEoDK3+1sxHALPgm5/3y9yr 93u43HL/jFy/jdu2R1R601wCN6rtgcqENsoHDv0m6urQnNplQRYfLj0spm+VdP6jbIWM OAZIWVWwAfLTbL7n/BJc1Jpvwz/ghgWwcdtVD17IEtxhaI3bwwdkDsdR0oBpqXQC1Hrv za4gGsNBESjUtmgWVpPi4nx9+Aza5Rbu3R2ZYF9+5G/T4ZJou4nejCaLr2zIfoxNAWhY aJ3g== X-Gm-Message-State: ANoB5pnPeZPUPGz9J+LBwqDtniBOITZLJEzgUHsE9ew6uR3x/MpceSB/ ielP7BXHw4/vrvfFLpn3nOWJm9m5VXX6RlsbVc4= X-Google-Smtp-Source: AA0mqf6ppH4p3vszTInS0/bEbUjCDvVJMjZHi/YvTp/ewHGqjxVkiks9daJEEHV7Cob7kzgbSs5/tg== X-Received: by 2002:ac8:5793:0:b0:3a4:f758:fc6d with SMTP id v19-20020ac85793000000b003a4f758fc6dmr7140149qta.46.1670534570000; Thu, 08 Dec 2022 13:22:50 -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 u37-20020a05622a19a500b0035d432f5ba3sm8171996qtc.17.2022.12.08.13.22.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Dec 2022 13:22:49 -0800 (PST) From: Aaron Rosenzweig Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_A4B6C7EF-2F91-416B-8FA8-8FF606635C7D" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Date: Thu, 8 Dec 2022 16:22:48 -0500 Subject: Re: [WO-DEV] When add-exports ALL-UNNAMED is not enough (Java 17) In-Reply-To: To: WebObjects & WOnder Development References: X-Mailer: Apple Mail (2.3696.120.41.1.1) --Apple-Mail=_A4B6C7EF-2F91-416B-8FA8-8FF606635C7D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Ramsey!=20 Hope Japan is nice this time of year :-) Hope you are doing well.=20 Thank you for chiming in.=20 Ah yes, my Wonder projects must be ANT projects. I could try bringing = them in as maven projects. Something new for me :-)=20 Still=E2=80=A6 I wonder which way the maven setup goes with this=E2=80=A6 = let me break down a concrete example.=20 Consider ERAttachment. Many of us use this, it=E2=80=99s for file = uploads.=20 ERAttachment has an error in ListAllMyBucketsResponse.java (and other = files) More specifically this import is failing: import org.xml.sax.Attributes; The reason is: The package org.xml.sax is accessible from more than one = module: , java.xml It's saying that org.xml.sax is both in the "unnamed" module and in the = java.xml module. I think that means there is a jar file (somewhere) that has this defined = and is =E2=80=9Cunnamed=E2=80=9D and now, in java 17, there is a system = lib with the same package name. It=E2=80=99s like in old days it was an = external dependency but now, it=E2=80=99s rolled into the mainline java = sort of like java.lang So the question is, which to use? The unnamed jar or the system lib? I = wonder which way the Maven project goes?=20 I decided, at least initially, to get rid of the system lib.=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. At = that point, I could build ERAttachment.=20 In ERAttachment .classpath changed this line: To this line: I wonder if applying a change like that would hurt java 1.8? Since it = doesn=E2=80=99t have modules, maybe it would be ignored. Maybe it can = work for both java 1.8 and beyond.=20 Ultimately though, I=E2=80=99d think we=E2=80=99d want to move to the = system lib and not rely on an old jar. The would likely break 1.8 = compatibility.=20 > On Dec 7, 2022, at 7:55 PM, Ramsey Gurley = wrote: >=20 > Hi Aaron, >=20 > I did some work on this about 3 months ago. Wonder's master branch = should build properly on latest Java with maven ($mvn clean install). It = should also build in your eclipse workspace if you import them as maven = projects. I think the .project files are in the repo, so you may only = need to import them and eclipse will figure out they are maven projects. = I've also put together a sample wonder project that can run in your = eclipse workspace or build into a docker container at >=20 > https://github.com/nullterminated/wodocker = >=20 >=20 > That's a bit old now and I have actually put together a maven = archetype to produce a project like that with a few improvements since = then, but I haven't gotten around to publishing it anywhere. There has = been some discussion on the mailing list about adding one for D2W and a = WOFramework and pushing those three onto maven central. I just have the = one Wonder App archetype at the moment though. >=20 > There's been a bit of discussion about making a new build with the = recent changes, but so far that hasn't been done. It should be simple = enough to do, but I don't have credentials on the wocommunity jenkins = server to do that myself. I used to have ssh to that, but I've long = since lost that ssh key. >=20 > https://github.com/wocommunity/wonder/discussions/996 = >=20 > Ramsey > From: WebObjects & WOnder Development > on behalf of Aaron Rosenzweig = > > Sent: Thursday, December 8, 2022 7:42 AM > To: WebObjects & WOnder Development > > Subject: [WO-DEV] When add-exports ALL-UNNAMED is not enough (Java 17) > =20 > [You don't often get email from aaron@chatnbike.com = . Learn why this is important = athttps://aka.ms/LearnAboutSenderIdentification = ] >=20 > 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 > Confidentiality Notice: This email, including all attachments and = replies thereto, are covered by the Electronic Communications Privacy = Act, 18 U.S.C. Sections 2510-2521 and are legally privileged. This = information is confidential, and intended only for the use of the = individuals or entities named above. If you are not the intended = recipient, you are hereby notified that any disclosure, copying, = distribution or the taking of any action in reliance on the contents of = this transmitted information is strictly prohibited. Please notify us if = you have received this transmission in error. Thank you. --Apple-Mail=_A4B6C7EF-2F91-416B-8FA8-8FF606635C7D Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi = Ramsey! 

Hope = Japan is nice this time of year :-) Hope you are doing = well. 

Thank you for chiming in. 

Ah yes, my Wonder projects must be ANT = projects. I could try bringing them in as maven projects. Something new = for me :-) 

Still=E2=80=A6 I wonder which way the maven setup goes with = this=E2=80=A6 let me break down a concrete example. 

Consider ERAttachment. = Many of us use this, it=E2=80=99s for file uploads. 

ERAttachment has an = error in ListAllMyBucketsResponse.java (and other files)

More specifically = this import is failing: import org.xml.sax.Attributes;

The reason is: The = package org.xml.sax is accessible from more than one = module: <unnamed>, java.xml

It's saying that org.xml.sax is = both in the "unnamed" module and in the java.xml module.

I think that means there = is a jar file (somewhere) that has this defined and is =E2=80=9Cunnamed=E2= =80=9D and now, in java 17, there is a system lib with the same package = name. It=E2=80=99s like in old days it was an external dependency but = now, it=E2=80=99s rolled into the mainline java sort of like = java.lang

So the question is, which to use? The unnamed = jar or the system lib? I wonder which way the Maven project = goes? 

I decided, at least initially, to get rid of the system = lib. 

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. At that point, I could = build ERAttachment. 

In ERAttachment .classpath changed this line:
= <classpathentry kind=3D"con" = path=3D"org.eclipse.jdt.launching.JRE_CONTAINER"/>

To this line:
<classpathentry kind=3D"con" = path=3D"org.eclipse.jdt.launching.JRE_CONTAINER">
= <attributes>
<attribute = name=3D"module" value=3D"true"/>
= <attribute = name=3D"limit-modules" value=3D"java.datatransfer,java.instrument,jav= a.net.http,java.scripting,java.transaction.xa,jdk.compiler,jdk.dynalink,jd= k.httpserver,jdk.incubator.foreign,jdk.incubator.vector,jdk.internal.ed,jd= k.internal.le,jdk.internal.opt,jdk.jartool,jdk.jdi,jdk.jsobject,jdk.manage= ment.agent,jdk.management.jfr,jdk.net,jdk.nio.mapmode,jdk.sctp,jdk.security.auth,jdk.secu= rity.jgss,jdk.unsupported"/>
= </attributes>
</classpathentry>

I wonder if applying a change like that would = hurt java 1.8? Since it doesn=E2=80=99t have modules, maybe it would be = ignored. Maybe it can work for both java 1.8 and beyond. 

Ultimately though, I=E2=80= =99d think we=E2=80=99d want to move to the system lib and not rely on = an old jar. The would likely break 1.8 compatibility. 
=

On Dec 7, 2022, at 7:55 PM, Ramsey Gurley <Ramsey.Gurley@practicemojo.com> wrote:

Hi Aaron,

I did some work on this about 3 months ago. Wonder's master = branch should build properly on latest Java with maven ($mvn clean = install). It should also build in your eclipse workspace if you import = them as maven projects. I think the .project files are in the repo, so = you may only need to import them and eclipse will figure out they are = maven projects. I've also put together a sample wonder project that can = run in your eclipse workspace or build into a docker container = at



That's a bit old now and I = have actually put together a maven archetype to produce a project like = that with a few improvements since then, but I haven't gotten around to = publishing it anywhere. There has been some discussion on the mailing = list about adding one for D2W and a WOFramework and pushing those three = onto maven central. I just have the one Wonder App archetype at the = moment though.

There's been a bit of discussion about making a new build with = the recent changes, but so far that hasn't been done. It should be = simple enough to do, but I don't have credentials on the wocommunity = jenkins server to do that myself. I used to have ssh to that, but I've = long since lost that ssh key.


Ramsey

From: WebObjects & WOnder = Development <webobjects-dev@wocommunity.org> on behalf of Aaron = Rosenzweig <aaron@chatnbike.com>
Sent: Thursday, December 8, 2022 = 7:42 AM
To: WebObjects & WOnder = Development <webobjects-dev@wocommunity.org>
Subject: [WO-DEV] When add-exports = ALL-UNNAMED is not enough (Java 17)
 
[You don't often get email from aaron@chatnbike.com. = Learn why this is important athttps://aka.ms/LearnAboutSenderIdentification ]

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>


Confidentiality Notice: This email, including all = attachments and replies thereto, are covered by the Electronic = Communications Privacy Act, 18 U.S.C. Sections 2510-2521 and are legally = privileged. This information is confidential, and intended only for the = use of the individuals or entities named above. If you are not the = intended recipient, you are hereby notified that any disclosure, = copying, distribution or the taking of any action in reliance on the = contents of this transmitted information is strictly prohibited. Please = notify us if you have received this transmission in error. Thank = you.

= --Apple-Mail=_A4B6C7EF-2F91-416B-8FA8-8FF606635C7D--