Open dominikFenzl-nextlane opened 4 months ago
Disclaimer: I am not a OWS developer ;)
What do you mean by „OWS tries to load a jar file“ - can you see it in what log? Maybe it‘s some mechanism specific to JCEF?
PS I had a similar effect with an OSGI Application (not with JCEF) where some “Bundle logic” tried to load Jars (thus it was not OWS trying to load the jar in my case).
Where did you find that bundling information, i did not find any entries in pointing to a jcef.jar file.
OWS does not map the correct jar.
This is the output if i try to access a class in the jar
CachedJarFileCallback.addMapping : http://127.0.0.1:8080/ecaros2client/jcef.jar -> http://127.0.0.1:8080/ecaros2client/jcef.jar . . . Error flag set for resource 'http://127.0.0.1:8080/ecaros2client/jcef.jar'. Can not return a local file for the resource Error flag set for resource 'http://127.0.0.1:8080/ecaros2client/jcef.jar'. Can not return a local file for the resource No cache file for cacheable resource 'http://127.0.0.1:8080/ecaros2client/jcef.jar' found. Error flag set for resource 'http://127.0.0.1:8080/ecaros2client/jcef.jar'. Can not return a local file for the resource Download done. Shutting down executor Could not download resource [l=http://127.0.0.1:8080/ecaros2client/jcef.jar v=null s=I] from any of theses urls [http://127.0.0.1:8080/ecaros2client/jcef.jar] caused byExecutionException: java.io.FileNotFoundException: http://127.0.0.1:8080/ecaros2client/jcef.jar caused by FileNotFoundException: http://127.0.0.1:8080/ecaros2client/jcef.jar caused by FileNotFoundException: http://127.0.0.1:8080/ecaros2client/jcef.jar downloadFrom exception: http://127.0.0.1:8080/ecaros2client/jcef.jar Exception while downloading resource [l=http://127.0.0.1:8080/ecaros2client/jcef.jar v=null s=I] from http://127.0.0.1:8080/ecaros2client/jcef.jar - message: http://127.0.0.1:8080/ecaros2client/jcef.jar cause: java.io.FileNotFoundException: http://127.0.0.1:8080/ecaros2client/jcef.jar Will download in background: http://127.0.0.1:8080/ecaros2client/jcef.jar Failed to determine best URL for [l=http://127.0.0.1:8080/ecaros2client/jcef.jar v=null s=I] will try all of [http://127.0.0.1:8080/ecaros2client/jcef.jar] failed to determine best URL: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Server returned 404 for http://127.0.0.1:8080/ecaros2client/jcef.jar For [l=http://127.0.0.1:8080/ecaros2client/jcef.jar v=null s=I] the server returned 404 code for HEAD request for http://127.0.0.1:8080/ecaros2client/jcef.jar URL connection 'http://127.0.0.1:8080/ecaros2client/jcef.jar' header fields: {null=[HTTP/1.1 404 Not Found], Connection=[keep-alive], Content-Length=[68], Date=[Wed, 17 Apr 2024 06:24:30 GMT], Content-Type=[text/html;charset=UTF-8]} Following exception should be harmless, but may help in finding root cause. Candidate URLs for [l=http://127.0.0.1:8080/ecaros2client/jcef.jar v=null s=I]: [http://127.0.0.1:8080/ecaros2client/jcef.jar] needsUpdateCheck: http://127.0.0.1:8080/ecaros2client/jcef.jar -> true isCached: CacheKey{location=http://127.0.0.1:8080/ecaros2client/jcef.jar, version=null} = true Start processing resource: jcef.jar Prefetching resource jcef.jar Create resource for 'http://127.0.0.1:8080/ecaros2client/jcef.jar'
All other jars, but not the missing one, are mapped at the applications startup
I've experienced a similar (but possibly not identical) issue. If a class file for one of the classes in a .jar file happens to be on my classpath, then it's sometimes loaded instead of the one that's in the .jar file (I would have expected applications run through OpenWebStart to override the CLASSPATH environment variable).
jcef-0b8e42e+cef-122.1.10+gc902316+chromium-122.0.6261.112.jar
Perhaps the '+ char in the jar file url is problematic. Is it possible to simplify the name?
jcef-0b8e42e+cef-122.1.10+gc902316+chromium-122.0.6261.112.jar
Perhaps the '+ char in the jar file url is problematic. Is it possible to simplify the name?
This jar name comes directly from maven central / maven repository so for production it won't be possible to change this. But i can try to exclude this dependency and use a local copy with simplified name tho test if it is realy the name witch is causing the problem.
When i tested i'll reply again
@janakmulani This seems to be the Problem, after adding the jar to a local repository without the + int the name/version openwebstart loads the jar fine.
Yes, the + character is used as an encoding for a white space in the URL encoding
OK i'll try to reach out to the maintainer of the package if he is able to remove the + from the artifacts versions in future releases
OWS tries to load a jar file, jcef.jar, from the root of the applications deployment dir. This jar does not exist and is not referenced in the jnlp file.
OWS also misses to load the correct jar file present in the jnlp and in the deployment. The correct one is jcef-api-jcef-0b8e42e+cef-122.1.10+gc902316+chromium-122.0.6261.112.jar. This jar file is located in a sub directory of the deployment.
All other jars are loaded correctly.
OS is ubuntu 22.04 jdk is adoptium openjdk 11.2.
Oracle webstart with jdk 8 has no Problem
IcedTea webstart standalone has no problem either.
Copying the file to the wrong location with the wrong name fixes the Problem but is no solution in productive environment.