Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

after updating to 1.3.3 OWS exits without launching application #413

Closed
andreipiv opened this issue Apr 9, 2021 · 10 comments
Closed

after updating to 1.3.3 OWS exits without launching application #413

andreipiv opened this issue Apr 9, 2021 · 10 comments

Comments

@andreipiv
Copy link

andreipiv commented Apr 9, 2021

hey all, I'm on OWS 1.3.3. I'm working on making our JNLP applications work with Oracle, ITW, and also looking into OWS (it seems this is where things are headed anyway).

My issue is that given a JNLP :

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="6.0+" codebase="https://someUrl/JNLPApplication/" href="rr.webstart?AUTH=verySecretValue" version="1.0.0.0">
  <application-desc main-class="com.company.web.WebStart">
    <argument>someArgument</argument>
  <argument>AUTH=verySecretValues</argument></application-desc>
  <information>
    <title>hello</title>
    <vendor>Hello Co</vendor>
    <icon href="28009738a3420097c5d058032649e52778e164e6/images/Icon128x128.png" width="128" height="128" />
    <icon href="f2523d7c6535b301765380e85bf94eaa7d066cc0/images/Icon48x48.png" width="48" height="48" />
  </information>
  <update check="always" policy="always" />
  <security>
    <all-permissions />
  </security>
  <resources>
    <property name="jnlp.packEnabled" value="true" />
    <property name="sun.java2d.dpiaware" value="false" />
    <java version="1.8+" java-vm-args="--add-exports=java.desktop/sun.swing=ALL-UNNAMED --add-exports=java.desktop/sun.swing.table=ALL-UNNAMED --add-exports=java.desktop/sun.swing.plaf.synth=ALL-UNNAMED --add-opens=java.desktop/javax.swing.plaf.synth=ALL-UNNAMED --add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED --add-opens=java.desktop/javax.swing=ALL-UNNAMED --add-opens=java.desktop/javax.swing.tree=ALL-UNNAMED --add-opens=java.desktop/java.awt.event=ALL-UNNAMED --add-exports=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED --add-exports=java.desktop/sun.awt.shell=ALL-UNNAMED --add-exports=java.desktop/com.sun.awt=ALL-UNNAMED --add-exports=java.base/sun.security.action=ALL-UNNAMED --add-opens=java.base/sun.util.calendar=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text.html.parser=ALL-UNNAMED  --add-opens=java.desktop/sun.awt=ALL-UNNAMED  --add-opens=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-opens=java.base/sun.net.www.http=ALL-UNNAMED  --add-opens=java.base/sun.net=ALL-UNNAMED  --add-opens=java.desktop/java.awt=ALL-UNNAMED" />
    <jar href="2e2ce14c5c0518304ddb7241adf2974f47df1797/java/commons-validator-1.7.jar" />
    <jar href="d5bdad059abd58c87c2fd416a670e545fbcf1a88/java/DashboardComponent-1.1.jar" />
    <jar href="60b455de08dce7b6b4407345118b2f01914b52ba/java/editlivejava-9.1.0.541.jar" />
    <jar href="333876faf6bd5e0cc070392aed96017e4fe1461b/java/gson-2.8.0.jar" />
    <jar href="083003315be4aaead3a39032262794c204958e4f/java/guava-25.0-jre.jar" />
    <jar href="b34e7c0c7a06e324f4ed9199e8fa52870bc1469b/java/java-websocket-1.3.1.jar" />
    <jar href="667aab4782e6c6d00c7a951d1c1556a81818fb00/java/jide-3.7.3.jar" />
    <jar href="dcad29c990f5b0f2b00cc946e4215f109299b89d/java/json-simple-1.1.jar" />
    <jar href="35a69eeb9483d135f5b0bae6d90504cfa48c8bf3/java/JUnitFramework-1.2.jar" />
    <jar href="e7262a822d266a68378e93a92362cac2126002ea/java/log4j-1.2.17.jar" />
    <jar href="ce14300709dd7749dc6f976f90af759247b6c21b/java/rapidresponse.jar" />
    <jar href="70a285024f8ef77bba0984ca6cf8e065de60ffb3/java/signalr-client-sdk-1.0.0.0.jar" />
    <jar href="5ba43bc8763e861aad3b8cc632d9a3e6fe586c1e/java/syntheticaLAF-2.30.0.16.jar" />
    <jar href="cbf9abf928fe551fadcaa19881b70c8b791a3a92/java/cb-v2-2.8.1.0.jar" />
  </resources>
  <resources os="Windows" arch="amd64">
    <jar href="d240ff60cc87a31b1596c464ca587c6e1844b514/java/cb-win64-v2-2.8.1.0.jar" />
  </resources>
  <resources os="Windows" arch="x86_64">
    <jar href="d240ff60cc87a31b1596c464ca587c6e1844b514/java/cb-win64-v2-2.8.1.0.jar" />
  </resources>
  <resources os="Windows" arch="x86">
    <jar href="532b705158bf9b21e68e42978b14eee80dca8eca/java/cb-win32-v2-2.8.1.0.jar" />
  </resources>
</jnlp>

The resulting execution command is improperly made:

"C:\Program Files\AdoptOpenJDK\jre-8.0.265.01-hotspot\bin\java.exe", -Xbootclasspath/a:C:\Users\myUser\AppData\Local\Programs\OpenWebStart\openwebstart.jar, -Dicedtea-web.bin.location=C:\Users\myUser\AppData\Local\Programs\OpenWebStart\javaws, --add-exports=java.desktop/sun.swing=ALL-UNNAMED, --add-exports=java.desktop/sun.swing.table=ALL-UNNAMED, --add-exports=java.desktop/sun.swing.plaf.synth=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.plaf.synth=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED, --add-opens=java.desktop/javax.swing=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.tree=ALL-UNNAMED, --add-opens=java.desktop/java.awt.event=ALL-UNNAMED, --add-exports=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED, --add-exports=java.desktop/sun.awt.shell=ALL-UNNAMED, --add-exports=java.desktop/com.sun.awt=ALL-UNNAMED, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-opens=java.base/sun.util.calendar=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html.parser=ALL-UNNAMED, --add-opens=java.desktop/sun.awt=ALL-UNNAMED, --add-opens=java.base/sun.net.www.protocol.https=ALL-UNNAMED, --add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED, --add-opens=java.base/sun.net.www.http=ALL-UNNAMED, --add-opens=java.base/sun.net=ALL-UNNAMED, --add-opens=java.desktop/java.awt=ALL-UNNAMED, -Dsun.java2d.dpiaware=false, -Djnlp.packEnabled=true, net.sourceforge.jnlp.runtime.Boot, -Xnofork, MySpecial.jnlp]

The log just mentions:

[apivkine][ITW-CORE][2021-04-09 11:50:48.836 EDT][DEBUG][net.sourceforge.jnlp.runtime.Boot][main#4dcbadb4] Exiting Boot.mainWithReturnCode() with 0

but if you attempt to run that command manually you'll see that it's not in the proper format...

My guess is that the add-exports et al calls create some problem when running with Java 8 -- but it should be passed after the params in that case / ignored, as the case with ITW and Oracle Java:

something like

"C:\Program Files\AdoptOpenJDK\jre-8.0.265.01-hotspot\bin\java.exe" -Xbootclasspath/a:C:\Users\myUser\AppData\Local\Programs\OpenWebStart\openwebstart.jar -Dicedtea-web.bin.location="C:\Users\myUser\AppData\Local\Programs\OpenWebStart\javaws", net.sourceforge.jnlp.runtime.Boot -Xnofork "RapidResponse (49).jnlp"  --add-exports=java.desktop/sun.swing=ALL-UNNAMED, --add-exports=java.desktop/sun.swing.table=ALL-UNNAMED etc.
@andreipiv
Copy link
Author

The original error is either with not being able to find the right classloader or failure to initialize the JVM

@sclassen
Copy link
Member

java 8 does not support the --add-exports and other JVM9 module parameters and will fail if it encounters them in the command line

@andreipiv
Copy link
Author

Though technically correct ( which is the best kind but still),

This is a new occurence. What's more, this still works with ITW and WS. So if it's java 8 we should just fall back to that behavior probably (unsupported guys are just ignored?).

@sclassen
Copy link
Member

With new occurrence you mean that the program was working correctly with OWS 1.3.2?

@andreipiv
Copy link
Author

Yes, though I'm not 100% sure which version I had previously (but I started seeing this after updating).

@sclassen
Copy link
Member

Last time we changed the behavior was with release 1.1.8
See the PR AdoptOpenJDK/IcedTea-Web#704

@sclassen
Copy link
Member

What you can try is to specify two JVMs in the JNLP one for 1.8* without the Java9 arguments
And one for 9+ with the Java9 arguments

@andreipiv
Copy link
Author

I'm not sure which OWS version i had before (I tried it out a long time ago).

Looks like that PR shows the issue - we used to test for Java 9+...

Because JWS, ITW, and an older OWS worked with Java 8 (and a JNLP like that), it'd be great to fix that. (if it's Java 8, we should just revert to ITW's native behaviour)

I can look into reworking the JNLP - my goal is to make 1.8 work across OWS, JWS, and ITW, while adding support for Java 14+

@sclassen
Copy link
Member

The behavior prior to 1.1.8 is not desirable. So we will not restore it. Rather we plan on failing explicitly when encountering modules arguments for a JVM 1.8*

@sclassen
Copy link
Member

fixed in #418

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants