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

Tries to use Pack200 even on Java 14+ #499

Closed
lapo-luchini opened this issue Feb 15, 2022 · 7 comments
Closed

Tries to use Pack200 even on Java 14+ #499

lapo-luchini opened this issue Feb 15, 2022 · 7 comments

Comments

@lapo-luchini
Copy link

It automatically detects and prefers the pack200 URL, but then it chokes on a missing JAR:

[ITW-CORE][2022-02-15 12:23:54.449 CET][DEBUG][net.adoptopenjdk.icedteaweb.lockingfile.LockableFile] Trying to create lock file C:\Users\lapo\.cache\icedtea-web\cache\recently_used.cache.lock
[ITW-CORE][2022-02-15 12:23:54.453 CET][INFO ][net.adoptopenjdk.icedteaweb.resources.cache.CacheImpl] isCached: CacheKey{location=https://w4s.andxor.it/andxor-tablet.jar, version=null} = false
[ITW-CORE][2022-02-15 12:23:54.453 CET][DEBUG][net.adoptopenjdk.icedteaweb.resources.initializer.UnversionedResourceInitializer] Candidate URLs for [l=https://w4s.andxor.it/andxor-tablet.jar v=null s=I]: [https://w4s.andxor.it/andxor-tablet.jar.pack.gz, https://w4s.andxor.it/andxor-tablet.jar]
[ITW-CORE][2022-02-15 12:23:54.456 CET][DEBUG][com.openwebstart.proxy.direct.DirectProxyProvider] Using NO_PROXY
[ITW-CORE][2022-02-15 12:23:54.499 CET][DEBUG][com.openwebstart.proxy.direct.DirectProxyProvider] Using NO_PROXY
[ITW-CORE][2022-02-15 12:23:54.654 CET][DEBUG][net.adoptopenjdk.icedteaweb.resources.initializer.UrlProber] URL connection 'https://w4s.andxor.it/andxor-tablet.jar.pack.gz' header fields: {Accept-Ranges=[bytes], null=[HTTP/1.1 200 OK], Server=[nginx/1.18.0], ETag=[W/"836073-1488555964000"], Connection=[keep-alive], Last-Modified=[Fri, 03 Mar 2017 15:46:04 GMT], Content-Length=[836073], Date=[Tue, 15 Feb 2022 11:23:56 GMT], Content-Type=[application/x-gzip]}
[ITW-CORE][2022-02-15 12:23:54.654 CET][DEBUG][net.adoptopenjdk.icedteaweb.resources.initializer.BaseResourceInitializer] Best url for [l=https://w4s.andxor.it/andxor-tablet.jar v=null s=I] is https://w4s.andxor.it/andxor-tablet.jar.pack.gz by HEAD
[ITW-CORE][2022-02-15 12:23:54.655 CET][DEBUG][net.adoptopenjdk.icedteaweb.resources.initializer.UnversionedResourceInitializer] Found best URL for [l=https://w4s.andxor.it/andxor-tablet.jar v=null s=I]: url:https://w4s.andxor.it/andxor-tablet.jar.pack.gz; responseCode:200; location: null; version: null; lastModified: 1488555964000; contentLength: 836073; 
[ITW-CORE][2022-02-15 12:23:54.661 CET][DEBUG][net.adoptopenjdk.icedteaweb.resources.downloader.BaseResourceDownloader] Will download in background: https://w4s.andxor.it/andxor-tablet.jar.pack.gz
[ITW-CORE][2022-02-15 12:23:54.662 CET][DEBUG][com.openwebstart.proxy.direct.DirectProxyProvider] Using NO_PROXY
[ITW-CORE][2022-02-15 12:23:54.684 CET][DEBUG][net.adoptopenjdk.icedteaweb.lockingfile.LockableFile] Trying to create lock file C:\Users\lapo\.cache\icedtea-web\cache\recently_used.cache.lock
[ITW-CORE][2022-02-15 12:23:54.685 CET][INFO ][net.adoptopenjdk.icedteaweb.resources.cache.CacheImpl] isCached: CacheKey{location=https://w4s.andxor.it/andxor-tablet.jar, version=null} = false
[ITW-CORE][2022-02-15 12:23:54.685 CET][DEBUG][net.adoptopenjdk.icedteaweb.resources.downloader.StreamUnpacker] Will use Pack200 for 'https://w4s.andxor.it/andxor-tablet.jar.pack.gz'
[ITW-APP ][2022-02-15 12:23:54.689 CET][ERROR][java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:234)] Exception in thread "itwpool-1-itwthread-2" java.lang.NoClassDefFoundError: java/util/jar/Pack200
[ITW-APP ][2022-02-15 12:23:54.689 CET][ERROR][java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:234)] 	at net.adoptopenjdk.icedteaweb.resources.downloader.PackGzipUnpacker.unpack(PackGzipUnpacker.java:35)
[ITW-APP ][2022-02-15 12:23:54.689 CET][ERROR][java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:234)] 	at net.adoptopenjdk.icedteaweb.resources.downloader.BaseResourceDownloader.tryDownloading(BaseResourceDownloader.java:184)
[ITW-APP ][2022-02-15 12:23:54.690 CET][ERROR][java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:234)] 	at net.adoptopenjdk.icedteaweb.resources.downloader.BaseResourceDownloader.tryDownloading(BaseResourceDownloader.java:138)
[ITW-APP ][2022-02-15 12:23:54.690 CET][ERROR][java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:234)] 	at net.adoptopenjdk.icedteaweb.resources.downloader.BaseResourceDownloader.lambda$downloadFrom$3(BaseResourceDownloader.java:119)
[ITW-APP ][2022-02-15 12:23:54.690 CET][ERROR][java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:234)] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[ITW-APP ][2022-02-15 12:23:54.690 CET][ERROR][java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:234)] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[ITW-APP ][2022-02-15 12:23:54.690 CET][ERROR][java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:234)] 	at java.base/java.lang.Thread.run(Thread.java:833)

This is the JNLP file:

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+">
  <information>
    <title>Andxor Tablet Signature Client</title>
    <vendor>Andxor Soluzioni Informatiche srl</vendor>
    <homepage href="http://www.andxor.it/" />
    <description>Andxor Tablet Signature Client is used by web2sign to access the signature tablet hardware.</description>
  </information>
  <security>
    <all-permissions />
  </security>
  <resources>
    <property name="jnlp.packEnabled" value="true"/>
    <j2se version="1.7+" />
    <jar href="https://w4s.andxor.it/andxor-tablet.jar" />
  </resources>
  <application-desc main-class="com.andxor.tablet.applet.Server">
    <argument>xWcHBfU84dU8ErFJQTOHEL</argument>
    <argument>https://w4s.andxor.it/</argument>
  </application-desc>
</jnlp>
@lapo-luchini
Copy link
Author

Also: in this case the GUI just keeps spinning and spinning, if I didn't open up the console I'd have no indication that the process was already stopped.

image

@lapo-luchini lapo-luchini changed the title Pack200 support seems to be missing in 1.5.1 Tries to use Pack200 even on Java 14+ Feb 15, 2022
@lapo-luchini
Copy link
Author

Pack200 is not missing from OpenWebStart but rather from Java17 that it was trying to use.
I tried forcing Java11 and it all works okay.
I think OpenWebStart could, on its side, detect the usage of Java14+ (where Pack200 is missing) and try and prefer the uncompressed JAR instead of the Pack200 compressed one, as both are detected, as per this log line:
[ITW-CORE][2022-02-15 12:23:54.453 CET][DEBUG][net.adoptopenjdk.icedteaweb.resources.initializer.UnversionedResourceInitializer] Candidate URLs for [l=https://w4s.andxor.it/andxor-tablet.jar v=null s=I]: [https://w4s.andxor.it/andxor-tablet.jar.pack.gz, https://w4s.andxor.it/andxor-tablet.jar]

@sclassen
Copy link
Member

will be fixed by AdoptOpenJDK/IcedTea-Web#857

@sclassen
Copy link
Member

Can you post a little more of that log please.
It seams funny that how the exception is logged in your case.

Thanks

@lapo-luchini
Copy link
Author

Sure, there you go: log.zip

@sclassen
Copy link
Member

Thank you, found what I was looking for.

The next planned release is in April. The fix will make it into that

@janakmulani
Copy link
Contributor

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

No branches or pull requests

3 participants