Mailing List webobjects-dev@wocommunity.org Message #240
From: Ramsey Gurley <webobjects-dev@wocommunity.org>
Subject: Re: [WO-DEV] java.lang.IllegalAccessError: class com.webobjects.foundation.NSTimeZone (in unnamed module @0x6c2c1385) cannot access class sun.security.action.GetPropertyAction
Date: Thu, 26 Aug 2021 00:07:13 +0000
To: WebObjects & WOnder Development <webobjects-dev@wocommunity.org>
Sure, the Dockerfile is really pretty barebones for this,


What happening is maven is using the exec plugin to call docker on the command line to build the dockerfile by passing it two build args.

You can build the project and then build the image using the Dockerfile using instructions at the top of the Dockerfile. If you're not using maven, you probably need to modify ADD slightly to make it find the right project path.

If you plan on using secure=true on a woform or anything else which generatesCompleteURLs, then I discovered you can make that work without setting a wohost variable. Just add --hostname=localhost_or_your_domain to the docker run args. In fact, trying to set WOHost broke it and only the default action would work.

I'll probably updated it when JDK 17 lands next month. I'll probably add a HEALTHCHECK to the Dockerfile, but it should work for you mostly as-is currently.

Ramsey

On Aug 25, 2021, at 9:21 PM, Jesse Tayler <webobjects-dev@wocommunity.org> wrote:

I don’t yet us Maven, but I have Docker working and like the container.

I’d prefer a WO Docker that was better quality, I’m based on a docker file I cannot really read or understand.

What’s your docker link? Is there a page for it?

On Aug 24, 2021, at 6:57 PM, Ramsey Gurley <webobjects-dev@wocommunity.org> wrote:

The dockerfile is rebuilt on every maven build with the -Pdocker profile. I need to add an env variable for the WOHost in the case of generating complete urls. That's my only known issue at the moment with it. Also, the artifactId needs to be lowercase, simply because docker doesn't like uppercase in image names.

I looked at a lot of different approaches, but using the exec-maven-plugin seems the most straightforward.

On Aug 25, 2021, at 1:44 AM, Jesse Tayler <webobjects-dev@wocommunity.org> wrote:

Nice, did you end up compiling your docker file?

Mine is based on another docker file that frankly, I can’t reliably read -- although it nicely adds WO / Wonder along with my configurations and installs, it’s not easy for me to edit and adjust and I’d like to improve that on the next time around — 

On Aug 24, 2021, at 12:41 PM, Ray Kiddy <webobjects-dev@wocommunity.org> wrote:

Hey there -

So, I ran the instructions below, starting with the cloning of the wodocker project. I am on OSX 11.3.1 and usually run java11. I had to launch my Docker app to get the daemon working. I had to install java16.

And everything worked? The app launched successfully? WTF, man! How _did_ this happen? :--)

Ramsey. Your share of this is much appreciated.

cheers - ray


On 8/23/21 3:48 PM, Ramsey Gurley wrote:
Hey Markus,

Yeah, you need to do a

--add-exports java.base/sun.security.action=ALL-UNNAMED

for that on compile as well as run. You can add it to the compile with the maven-compiler-plugin and to run in eclipse, add it under VM args in the run config for your woapp. I have a maven build of a WO app in a docker container that works on Java 16 I've been working on in my spare time.

https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnullterminated%2Fwodocker%2Fblob%2Fmaster%2Fpom.xml&amp;data=04%7C01%7CRamsey.Gurley%40practicemojo.com%7Ce1a6345d48f4486216e008d9671e8dcf%7Cde0a512999d34d35a92809047a134775%7C1%7C0%7C637654203194385457%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=8WEoKefwakdd5mvI6vu7PJBGDTiQ%2FneCS5%2B7bgtx%2FRQ%3D&amp;reserved=0

I need to add a readme, but if interested in building in a container, just

git clone git@github.com:nullterminated/wodocker.git
cd wodocker
mvn clean verify -Pdocker

to run it is,

docker run --rm -it -p 8080:8080 your.app/wodocker:latest

And then visit http://localhost:8080/

This assumes you have java 16, maven, and docker installed with docker configured such that you don't need sudo.

I was setting up a maven archetype for it, but the archetype:create-from-project goal doesn't seem to like the fluffy bunny layout and I end up with no java source files in the archetype.

Ramsey

On Aug 23, 2021, at 11:56 PM, Markus Ruggiero (rucotec) <webobjects-dev@wocommunity.org> wrote:

I am setting up a new virgin test environment

latest BigSur 11.5.2
latest JDK from Oracle (16.0.2)
latest ant (1.10.11)
latest Eclipse for Java Developer (4.20.0)
WOlips from https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjenkins.wocommunity.org%2Fjob%2FWOLips_master%2FlastSuccessfulBuild%2Fartifact%2Ftemp%2Fdist%2F&amp;data=04%7C01%7CRamsey.Gurley%40practicemojo.com%7Ce1a6345d48f4486216e008d9671e8dcf%7Cde0a512999d34d35a92809047a134775%7C1%7C0%7C637654203194385457%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=nYetJ581Z9wB9LWFSAsqrPBGW4oGoAfOPJ%2BmyXz9fNc%3D&amp;reserved=0

Installed WO through WOInstaller.jar
     - had to run it several times. Each time it failed with unpacking after some more percentage has been processed. Eventually it made it to 100%

Created WOLips.properties
Downloaded Wonder-Master (7.3-snapshot)

ant frameworks
     - chokes on Profiling, just removed this framework -> success
ant frameworks.install
     - ok

In Eclipse create my first WonderApplication, Eclipse workspace is set to Java Compiler 1.8 compliance, no other changes or configs.

Run as WOApplication
CRASH!

Aug 23 16:37:28 BasicConcepts[49665] WARN  NSLog  - Application project found: Will locate resources in '/Users/ruggiero/Programming/eclipseWorkspace/BasicConcepts' rather than '/Users/ruggiero/Programming/eclipseWorkspace/BasicConcepts/' .
Aug 23 16:37:28 BasicConcepts[49665] WARN  er.extensions.appserver.ERXResourceManager  - Application project found: Will locate resources in '/Users/ruggiero/Programming/eclipseWorkspace/BasicConcepts' rather than '/Users/ruggiero/Programming/eclipseWorkspace/BasicConcepts/'.
Aug 23 16:37:28 BasicConcepts[49665] WARN  NSLog  - A fatal exception occurred: class com.webobjects.foundation.NSTimeZone (in unnamed module @0x6c2c1385) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0x6c2c1385
[2021-8-23 16:37:28 CEST] <main> java.lang.IllegalAccessError: class com.webobjects.foundation.NSTimeZone (in unnamed module @0x6c2c1385) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0x6c2c1385
     at com.webobjects.foundation.NSTimeZone.systemTimeZone(NSTimeZone.java:971)
     at com.webobjects.foundation.NSTimeZone.defaultTimeZone(NSTimeZone.java:818)
     at com.webobjects.foundation.NSTimestampFormatter.defaultFormatTimeZone(NSTimestampFormatter.java:734)
     at com.webobjects.appserver.WOStatisticsStore.<clinit>(WOStatisticsStore.java:249)
     at com.webobjects.appserver.WOApplication.<init>(WOApplication.java:853)
     at er.extensions.appserver.ajax.ERXAjaxApplication.<init>(ERXAjaxApplication.java:30)
     at er.extensions.appserver.ERXApplication.<init>(ERXApplication.java:1129)
     at your.app.Application.<init>(Application.java:10)
     at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78)
     at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
     at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
     at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:350)
     at java.base/java.lang.Class.newInstance(Class.java:642)
     at com.webobjects.appserver.WOApplication.main(WOApplication.java:547)
     at er.extensions.appserver.ERXApplication.main(ERXApplication.java:890)
     at your.app.Application.main(Application.java:7)

APPLICATION SHUTDOWN SEQUENCE COMPLETE

Anyone’s got an idea what’s wrong here? What am I missing? Is this related to Java16?
Thanks a lot
---markus---


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

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



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



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.
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster