We are in the process of upgrading from jdk 8 --> jdk 11 and encountered a compatibility issue with an Apache Felix dependency embedded in 5.3.x Lucee jar. (exception below)
JDK 9 and up introduced a new way of loading resources, including the JRT protocol. Apache Felix Framework version 6.0.1 currently has a bug that doesn't support JRT within its url handling code (without add-opens flag), but has fixed this issue in 6.0.2. See https://issues.apache.org/jira/browse/FELIX-6035?jql=project%20%3D%20FELIX%20AND%20fixVersion%20%3D%20framework-6.0.2
Unfortunately, all Lucee 5.3.x jars include 6.0.1 Apache Felix classes within it making it impossible to exclude and rely on the later version in our app. In order to support JRT, would love if Lucee would either upgrade to the JRT supported version of Apache Felix or rip it out allowing clients to choose the required compatible version
Cheers, casey yancey
java.lang.IllegalStateException: Unknown protocol: jrt
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:482) ~[lucee-220.127.116.11-RC.jar:?]
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:474) ~[lucee-18.104.22.168-RC.jar:?]
at java.base/java.net.URL.toExternalForm(URL.java:1001) ~[?:?]
at java.base/java.net.URL.toString(URL.java:987) ~[?:?]
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.openConnection(URLHandlersStreamHandlerProxy.java:267) ~[lucee-22.214.171.124-RC.jar:?]
at java.base/java.net.URL.openConnection(URL.java:1051) ~[?:?]
at java.base/java.net.URL.openStream(URL.java:1117) ~[?:?]
at java.base/java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1738) ~[?:?]
Open JDK 11.0.2 (we are testing it out, currently production is jdk 8)
Lucee 126.96.36.199-RC in our production (but also problem with latest release 188.8.131.52)
They are all the same size and date - 67,474,059 bytes
First instance at the root of tomcat was deployed on May 27. Then copied to the other three contexts on June 1.
Thanks. I’m out of ideas then… Thoughts?
Thanks for looking into this and your work too
I’ve just given this another go using the latest RC war file lucee-184.108.40.206-RC and JDK 12.0.1 and have had success.
I’ve used JDK 12.0.1 as the open source jdk site does not appear to have versions below this.
We use war deployments using vagrant and puppet and I checked to see that the lucee.jar files were identical and they are. I manually set up the JDK as we’ve not yet configured puppet on this version yet.
I could have another go with 11.0.3 but am keen to just go with what I have working for the moment, unless you have any reason we shouldn’t be using JDK 12.
I can try this out on my D.O. instance, unfortunately, I won’t hav time to do that right now. It takes about 20 minutes to resize the instance, replace the WAR file, upgrade Java, etc. All very easy and quick, but I can’t allow myself to get into that rabbit hole today. I have flagged this in my to do list and hope to try out by the end of the week (lucee-220.127.116.11-RC and JDK 12.0.1).
I can confirm that OpenJDK 12.0.1 and Lucee 18.104.22.168-RC do indeed work well together for me. I tested on my Digital Ocean instance with two sites. I can run both contexts as well as Tomcat manager. No errors.
However, OpenJDK 12.0.1 and Lucee 22.214.171.124 DO NOT work well together (tested those before putting in fresh 126.96.36.199-RC.
Looks like I can move to 12 after all!