karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Paulin <...@bobpaulin.com>
Subject Re: Karaf + Camel running Java 9+ IllegalAccessError
Date Thu, 16 Aug 2018 21:12:52 GMT
Apparently I need to look in master.  This appears fixed with
4.2.1-SNAPSHOT.  Thanks!

- Bob


On 8/16/2018 3:48 PM, Bob Paulin wrote:
> 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