lucee's bundled felix version does not support jrt protocol

Description

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

Exception:

java.lang.IllegalStateException: Unknown protocol: jrt
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:482) ~[lucee-5.3.1.94-RC.jar:?]
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.toExternalForm(URLHandlersStreamHandlerProxy.java:474) ~[lucee-5.3.1.94-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-5.3.1.94-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) ~[?:?]

Environment

Open JDK 11.0.2 (we are testing it out, currently production is jdk 8)
Lucee 5.3.1.94-RC in our production (but also problem with latest release 5.3.1.102)

Activity

Show:
Derrick Peavy
July 3, 2019, 3:01 AM

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.



Justin Carter
July 3, 2019, 3:08 AM

Thanks. I’m out of ideas then… Thoughts?

Pat Moody
July 3, 2019, 3:11 AM

Thanks for looking into this and your work too

I’ve just given this another go using the latest RC war file lucee-5.3.3.60-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.
https://jdk.java.net/12/

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.

cc

Derrick Peavy
July 3, 2019, 2:44 PM

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-5.3.3.60-RC and JDK 12.0.1).

Derrick Peavy
July 9, 2019, 3:47 AM

I can confirm that OpenJDK 12.0.1 and Lucee 5.3.3.60-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 5.3.2.77 DO NOT work well together (tested those before putting in fresh 5.3.3.60-RC.

Looks like I can move to 12 after all!

Fixed

Assignee

Unassigned

Reporter

Casey Yancey

Priority

New

Labels

Fix versions

Affects versions

Configure