In case it helps, the ps command shows the JVM process is started with the 
command line options:

/usr/lib/jvm/java-11-openjdk-11.0.11.0.9-1.el7_9.x86_64/bin/java 
--add-reads=java.xml=java.logging
--patch-module java.base=lib/endorsed/org.apache.karaf.specs.locator-4.3.2.jar 
--patch-module java.xml=lib/endorsed/org.apache.karaf.specs.java.xml-4.3.2.jar
--add-opens java.base/java.security=ALL-UNNAMED 
--add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.naming/javax.naming.spi=ALL-UNNAMED
--add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED
--add-exports=java.base/sun.net.www.protocol.file=ALL-UNNAMED
--add-exports=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED
--add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED
--add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED
--add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED
--add-exports=java.base/sun.net.www.content.text=ALL-UNNAMED
--add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED
-classpath lib/jdk9plus/*:lib/boot/*:lib/endorsed/* ….


I am not very familiar with the new modules in the JVM, but I wonder if it is 
missing something like:

--add-opens java.base/org.apache.karaf.specs.locator=ALL-UNNAMED


???


Best regards,
Alex soto




> On May 24, 2021, at 8:34 AM, Jean-Baptiste Onofre <[email protected]> wrote:
> 
> Hi Alex,
> 
> That’s weird as it’s what we are using in Karaf itests as well.
> 
> It seems related to a missing JDK11 argument (—allow-access).
> 
> Do you have something else in the trace/log ?
> 
> Regards
> JB
> 
>> Le 24 mai 2021 à 16:26, Alex Soto <[email protected] 
>> <mailto:[email protected]>> a écrit :
>> 
>> Hello,
>> 
>> I am getting the following error running integration tests with Pax-Exam 
>> version 4.13.4, and Karaf version 4.3.2, on Java 11.
>> 
>> 
>> 2021-05-19T04:34:09,372 | ERROR | features-3-thread-1 | Felix                
>>             | 5 - org.ops4j.pax.logging.pax-logging-api - 2.0.9 | Bundle 
>> org.apache.felix.framework [0] EventDispatcher: Error during dispatch. 
>> (java.lang.IllegalAccessError: class 
>> org.apache.karaf.specs.activator.Activator (in unnamed module @0x3fb72de) 
>> cannot access class org.apache.karaf.specs.locator.OsgiLocator (in module 
>> java.base) because module java.base does not export 
>> org.apache.karaf.specs.locator to unnamed module @0x3fb72de)
>> java.lang.IllegalAccessError: class 
>> org.apache.karaf.specs.activator.Activator (in unnamed module @0x3fb72de) 
>> cannot access class org.apache.karaf.specs.locator.OsgiLocator (in module 
>> java.base) because module java.base does not export 
>> org.apache.karaf.specs.locator to unnamed module @0x3fb72de
>>         at 
>> org.apache.karaf.specs.activator.Activator.register(Activator.java:125) 
>> ~[org.apache.karaf.specs.activator-4.3.2.jar:4.3.2]
>>         at 
>> org.apache.karaf.specs.activator.Activator.bundleChanged(Activator.java:97) 
>> ~[org.apache.karaf.specs.activator-4.3.2.jar:4.3.2]
>>         at 
>> org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915)
>>  ~[?:?]
>>         at 
>> org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834)
>>  ~[?:?]
>>         at 
>> org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516)
>>  ~[?:?]
>>         at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4817) 
>> ~[?:?]
>>         at 
>> org.apache.felix.framework.StatefulResolver.fireResolvedEvents(StatefulResolver.java:1300)
>>  ~[?:?]
>>         at 
>> org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:512)
>>  ~[?:?]
>>         at org.apache.felix.framework.Felix.resolveBundles(Felix.java:4327) 
>> ~[?:?]
>>         at 
>> org.apache.felix.framework.FrameworkWiringImpl.resolveBundles(FrameworkWiringImpl.java:133)
>>  ~[?:?]
>>         at 
>> org.apache.karaf.features.internal.service.BundleInstallSupportImpl.resolveBundles(BundleInstallSupportImpl.java:244)
>>  ~[?:?]
>>         at 
>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.resolveBundles(FeaturesServiceImpl.java:1175)
>>  ~[?:?]
>>         at 
>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1027)
>>  ~[?:?]
>>         at 
>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1069)
>>  ~[?:?]
>>         at 
>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:1004)
>>  ~[?:?]
>>         at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
>>         at 
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>>  [?:?]
>>         at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>>  [?:?]
>>         at java.lang.Thread.run(Thread.java:829) [?:?]
>> 
>> My test is based on org.apache.karaf.itests.KarafTestSupport, where the 
>> proper JVM options should be set to deal with this module issues. 
>> Any idea about what may be going on?
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>> 
> 

Reply via email to