regression: xml fails with java 21, admin broken too

Description

"ERROR","http-nio-9888-exec-1","12/07/2024","11:07:47","","class lucee.invoc.wrap.v3.com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.____init____ (in unnamed module @0x68f8198c) cannot access class com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl (in module java.xml) because module java.xml does not export com.sun.org.apache.xerces.internal.jaxp to unnamed module @0x68f8198c;class lucee.invoc.wrap.v3.com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.____init____ (in unnamed module @0x68f8198c) cannot access class com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl (in module java.xml) because module java.xml does not export com.sun.org.apache.xerces.internal.jaxp to unnamed module @0x68f8198c;class lucee.invoc.wrap.v3.com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.____init____ (in unnamed module @0x68f8198c) cannot access class com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl (in module java.xml) because module java.xml does not export com.sun.org.apache.xerces.internal.jaxp to unnamed module @0x68f8198c;lucee.runtime.exp.NativeException: class lucee.invoc.wrap.v3.com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.____init____ (in unnamed module @0x68f8198c) cannot access class com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl (in module java.xml) because module java.xml does not export com.sun.org.apache.xerces.internal.jaxp to unnamed module @0x68f8198c at lucee.invoc.wrap.v3.com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.____init____.apply(Unknown Source) at lucee.runtime.reflection.pairs.ConstructorInstance.invoke(ConstructorInstance.java:63) at lucee.commons.lang.ClassUtil.loadInstance(ClassUtil.java:455) at lucee.runtime.text.xml.XMLUtil._newDocumentBuilderFactory(XMLUtil.java:471) at lucee.runtime.text.xml.XMLUtil.newDocumentBuilderFactory(XMLUtil.java:349) at lucee.runtime.text.xml.XMLUtil.parse(XMLUtil.java:306) at lucee.runtime.text.xml.XMLUtil.parse(XMLUtil.java:289) at lucee.runtime.tag.Xml.doEndTag(Xml.java:93) at web_cfm$cf.udfCall(/admin/web.cfm:210)

 

this PR has testbox 6.0.1, which supports reflection being disabled, i removed the property from the test runner, so tests run with the Lucee default, i.e. false

https://github.com/lucee/Lucee/pull/2422/files

which then surfaces the XML reflection problems on github actions

https://github.com/lucee/Lucee/actions/runs/12212777028

For me locally, the admin crashes

 

image-20241207-123852.png

Environment

None

Attachments

1
  • 07 Dec 2024, 12:38 pm

relates to

Activity

Show:

Pothys - MitrahSoft 10 December 2024 at 06:22

, I investigated this ticket with Lucee version 6.2.0.198-SNAPSHOT and Java 21.0.4. When I tried upgrading the version via the admin mode, no issues were encountered, and it is working fine now.

Zac Spitzer 7 December 2024 at 20:04

works for me

Michael Offner 7 December 2024 at 15:42

we need to back port this fix to Lucee 6.1

Michael Offner 7 December 2024 at 15:16


get

java.lang.IllegalAccessException: class lucee.runtime.reflection.pairs.ConstructorInstance cannot access class com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl

 

get

java.lang.IllegalAccessError: class lucee.invoc.wrap.v3.com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.____init____ (in unnamed module @0x267d9256) cannot access class com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl (in module java.xml) because module java.xml does not export com.sun.org.apache.xerces.internal.jaxp to unnamed module @0x267d9256

Lucee tries different factories tries to load them and when fails picks the next, but it expects an exception catch (Exception e) {, but a java.lang.IllegalAccessError is not under that umbrella.

Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Created 7 December 2024 at 10:38
Updated 10 December 2024 at 06:22
Resolved 10 December 2024 at 06:22

Flag notifications