[
https://issues.apache.org/jira/browse/CAMEL-16379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17366456#comment-17366456
]
Guillaume Nodet commented on CAMEL-16379:
-----------------------------------------
{{camel-karaf}} fails on JDK 16.
{code}
[INFO] Scanning for projects...
[INFO]
[INFO] ------------< org.apache.camel.karaf:camel-osgi-activator >-------------
[INFO] Building Camel Karaf :: OSGi Activator (deprecated) 3.11.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version) @
camel-osgi-activator ---
[INFO]
[INFO] --- camel-bundle-plugin:3.11.0-SNAPSHOT:cleanVersions (versions) @
camel-osgi-activator ---
[INFO]
[INFO] --- build-helper-maven-plugin:1.12:add-source (default) @
camel-osgi-activator ---
[INFO] Source directory:
/Users/gnodet/work/git/camel-karaf/components/camel-osgi-activator/src/generated/java
added.
[INFO]
[INFO] --- build-helper-maven-plugin:1.12:add-resource (default) @
camel-osgi-activator ---
[INFO]
[INFO] --- depends-maven-plugin:1.2:generate-depends-file
(generate-depends-file) @ camel-osgi-activator ---
[INFO] Created:
/Users/gnodet/work/git/camel-karaf/components/camel-osgi-activator/target/classes/META-INF/maven/dependencies.properties
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @
camel-osgi-activator ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/Users/gnodet/work/git/camel-karaf/components/camel-osgi-activator/src/main/resources
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @
camel-osgi-activator ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- camel-package-maven-plugin:3.11.0-SNAPSHOT:generate-component
(generate) @ camel-osgi-activator ---
[INFO] Stale files detected, re-generating.
[INFO] Skipping index generation, everything is up to date.
[INFO] Generated other.properties containing 1 Camel other: osgi-activator
[INFO] Validation complete
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @
camel-osgi-activator ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/Users/gnodet/work/git/camel-karaf/components/camel-osgi-activator/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @
camel-osgi-activator ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to
/Users/gnodet/work/git/camel-karaf/components/camel-osgi-activator/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M4:test (default-test) @
camel-osgi-activator ---
[INFO]
[INFO] --- camel-bundle-plugin:3.11.0-SNAPSHOT:manifest (bundle-manifest) @
camel-osgi-activator ---
[INFO] Stale files detected, re-generating manifest.
[INFO]
[INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ camel-osgi-activator ---
[INFO] Building jar:
/Users/gnodet/work/git/camel-karaf/components/camel-osgi-activator/target/camel-osgi-activator-3.11.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-site-plugin:3.7.1:attach-descriptor (attach-descriptor) @
camel-osgi-activator ---
[INFO] Skipping because packaging 'jar' is not pom.
[INFO]
[INFO] --- maven-assembly-plugin:3.2.0:single (default) @ camel-osgi-activator
---
[INFO] Reading assembly descriptor: src/assembly/test-bundles.xml
[INFO] Copying files to
/Users/gnodet/work/git/camel-karaf/components/camel-osgi-activator/target/test-bundles
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M4:test (default) @ camel-osgi-activator
---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.camel.component.osgi.activator.CamelOsgiActivatorIT
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
details.
Error installing bundle listed in startup.properties with url:
mvn:org.apache.karaf.features/org.apache.karaf.features.extension/4.3.2 and
startlevel: 1
java.lang.reflect.InaccessibleObjectException: Unable to make field private
static final java.lang.Object java.net.URL.streamHandlerLock accessible: module
java.base does not "opens java.net" to unnamed module @29444d75
at
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
at
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at
java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:177)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:171)
at
org.apache.felix.framework.util.SecureAction._swapStaticFieldIfNotClass(SecureAction.java:998)
at
org.apache.felix.framework.util.SecureAction.swapStaticFieldIfNotClass(SecureAction.java:983)
at
org.apache.felix.framework.URLHandlers.unregisterFrameworkListsForContextSearch(URLHandlers.java:346)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at
org.apache.felix.framework.util.SecureAction.invoke(SecureAction.java:893)
at
org.apache.felix.framework.URLHandlers.unregisterFrameworkInstance(URLHandlers.java:661)
at
org.apache.felix.framework.URLHandlersActivator.stop(URLHandlersActivator.java:75)
at
org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:720)
at
org.apache.felix.framework.Felix$SystemBundleActivator.stop(Felix.java:5224)
at
org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:720)
at org.apache.felix.framework.Felix.stopBundle(Felix.java:2795)
at org.apache.felix.framework.Felix$2.run(Felix.java:1154)
java.lang.reflect.InaccessibleObjectException: Unable to make field private
static volatile java.net.ContentHandlerFactory java.net.URLConnection.factory
accessible: module java.base does not "opens java.net" to unnamed module
@29444d75
at
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
at
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at
java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:177)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:171)
at
org.apache.felix.framework.util.SecureAction._swapStaticFieldIfNotClass(SecureAction.java:1019)
at
org.apache.felix.framework.util.SecureAction.swapStaticFieldIfNotClass(SecureAction.java:983)
at
org.apache.felix.framework.URLHandlers.unregisterFrameworkListsForContextSearch(URLHandlers.java:361)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at
org.apache.felix.framework.util.SecureAction.invoke(SecureAction.java:893)
at
org.apache.felix.framework.URLHandlers.unregisterFrameworkInstance(URLHandlers.java:661)
at
org.apache.felix.framework.URLHandlersActivator.stop(URLHandlersActivator.java:75)
at
org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:720)
at
org.apache.felix.framework.Felix$SystemBundleActivator.stop(Felix.java:5224)
at
org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:720)
at org.apache.felix.framework.Felix.stopBundle(Felix.java:2795)
at org.apache.felix.framework.Felix$2.run(Felix.java:1154)
{code}
This looks similar to FELIX-6430, so opening the packages as indicated in that
patch should work.
> Support for JDK 16
> ------------------
>
> Key: CAMEL-16379
> URL: https://issues.apache.org/jira/browse/CAMEL-16379
> Project: Camel
> Issue Type: New Feature
> Components: build system
> Reporter: Claus Ibsen
> Assignee: Guillaume Nodet
> Priority: Major
> Fix For: 3.12.0
>
>
> JDK 16 is GA now. So lets look at what it takes to get core camel to build
> and support this.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)