karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Paulin <...@bobpaulin.com>
Subject Karaf + Camel running Java 9+ IllegalAccessError
Date Thu, 16 Aug 2018 20:48:05 GMT
Hi,

I am running Apache Karaf 4.2.0 + Apache Camel 2.22.0 on Java 10.  At
startup I was getting the following error:

Caused by: java.lang.IllegalAccessError: class
javax.xml.stream.$FactoryFinder (in module java.xml) cannot access class
java.util.logging.Logger (in module java.logging) because module
java.xml does not read module java.logging

I was able to fix this by adding:

--add-reads java.xml=java.logging,ALL-UNNAMED ^

to the karaf script.


I was also able to get it to work by setting the env var

"KARAF_OPTS=--add-reads java.xml=java.logging,ALL-UNNAMED ^"

Adding the option to the KARAF_OPTS seems easier enough to support but
I'm wondering if something as common as logging would be better off
added to the karaf script.   Or perhaps a separate ENV VAR for Java
Module System options would be better. Thoughts?

- Bob



Mime
View raw message