You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by "Jackson, Douglas" <do...@siemens.com> on 2019/03/05 23:46:10 UTC
karaf 4.2.2 with OpenJDK 11 on windows
Hi!
The OOTB karaf 4.2.2 does not start up when used with OpenJDK 11 - it seems to lock up on startup. I replaced the karaf.bat file with the karaf 4.2.3 karaf.bat file.
After that the karaf 4.2.2 at least starts up, but I get exceptions.
4.2.3 seems to fix these, but switching to that release would set my product release back several months.
Can anyone tell me if there is a small fix that might enable me to get around these issues on 4.2.2?
Thanks in advance,
Doug
java.lang.NoClassDefFoundError: org/apache/karaf/specs/locator/OsgiLocator
at org.apache.karaf.specs.activator.Activator.register(Activator.java:124) ~[?:?]
at org.apache.karaf.specs.activator.Activator.bundleChanged(Activator.java:96) ~[?:?]
If I add in "war" in the boot features, then I see the following:
karaf@root()> org.apache.karaf.features.internal.util.MultiException: Error restarting bundles:
Activator start error in bundle org.ops4j.pax.web.pax-web-jetty [136].
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1005)
<snip>
at java.base/java.lang.Thread.run(Thread.java:825)
Suppressed: org.osgi.framework.BundleException: Activator start error in bundle org.ops4j.pax.web.pax-web-jetty [136].
<snip>
Caused by: java.lang.ClassFormatError: Weaving hook failed.
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.transformClass(BundleWiringImpl.java:24
<snip>
Caused by: java.lang.IllegalStateException: Unknown protocol: jrt
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.2+9)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.12.1, JRE 11 Windows 10 amd64-64-Bit Compressed References 20190204_123 (JIT enabled, AOT enabled)
OpenJ9 - 90dd8cb40
OMR - d2f4534b
JCL - 289c70b684 based on jdk-11.0.2+9)
Re: karaf 4.2.2 with OpenJDK 11 on windows
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Doug,
I think I can backport the fix we did in the locator but I'm afraid you
might have other issue (especially with third party like Pax Web or ASM).
If you wanna try I can provide the patch file to apply.
Regards
JB
On 06/03/2019 00:46, Jackson, Douglas wrote:
> Hi!
>
> The OOTB karaf 4.2.2 does not start up when used with OpenJDK 11 – it
> seems to lock up on startup. I replaced the karaf.bat file with the
> karaf 4.2.3 karaf.bat file.
>
> After that the karaf 4.2.2 at least starts up, but I get exceptions.
>
> 4.2.3 seems to fix these, but switching to that release would set my
> product release back several months.
>
> Can anyone tell me if there is a small fix that might enable me to get
> around these issues on 4.2.2?
>
> Thanks in advance,
>
> Doug
>
>
>
> java.lang.NoClassDefFoundError: org/apache/karaf/specs/locator/OsgiLocator
>
> at
> org.apache.karaf.specs.activator.Activator.register(Activator.java:124)
> ~[?:?]
>
> at
> org.apache.karaf.specs.activator.Activator.bundleChanged(Activator.java:96)
> ~[?:?]
>
>
>
> If I add in “war” in the boot features, then I see the following:
>
>
>
> karaf@root()> org.apache.karaf.features.internal.util.MultiException:
> Error restarting bundles:
>
> Activator start error in bundle org.ops4j.pax.web.pax-web-jetty
> [136].
>
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1005)
>
> <snip>
>
> at java.base/java.lang.Thread.run(Thread.java:825)
>
> Suppressed: org.osgi.framework.BundleException: Activator start
> error in bundle org.ops4j.pax.web.pax-web-jetty [136].
>
> <snip>
>
> Caused by: java.lang.ClassFormatError: Weaving hook failed.
>
> at
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.transformClass(BundleWiringImpl.java:24
>
> <snip>
>
> Caused by: java.lang.IllegalStateException: Unknown protocol: jrt
>
>
>
> openjdk version "11.0.2" 2019-01-15
>
> OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.2+9)
>
> Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.12.1, JRE 11 Windows 10
> amd64-64-Bit Compressed References 20190204_123 (JIT enabled, AOT enabled)
>
> OpenJ9 - 90dd8cb40
>
> OMR - d2f4534b
>
> JCL - 289c70b684 based on jdk-11.0.2+9)
>
>
>
>
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: karaf 4.2.2 with OpenJDK 11 on windows
Posted by Freeman Fang <fr...@gmail.com>.
Hi Doug,
Karaf 4.2.3 fixed several jdk11 related issues and we strongly recommend you to switch to Karaf 4.2.3 if you want to use JDK11.
Cheers
-------------
Freeman(Yue) Fang
Red Hat, Inc.
> On Mar 6, 2019, at 7:46 AM, Jackson, Douglas <do...@siemens.com> wrote:
>
> Hi!
> The OOTB karaf 4.2.2 does not start up when used with OpenJDK 11 – it seems to lock up on startup. I replaced the karaf.bat file with the karaf 4.2.3 karaf.bat file.
> After that the karaf 4.2.2 at least starts up, but I get exceptions.
> 4.2.3 seems to fix these, but switching to that release would set my product release back several months.
> Can anyone tell me if there is a small fix that might enable me to get around these issues on 4.2.2?
> Thanks in advance,
> Doug
>
> java.lang.NoClassDefFoundError: org/apache/karaf/specs/locator/OsgiLocator
> at org.apache.karaf.specs.activator.Activator.register(Activator.java:124) ~[?:?]
> at org.apache.karaf.specs.activator.Activator.bundleChanged(Activator.java:96) ~[?:?]
>
> If I add in “war” in the boot features, then I see the following:
>
> karaf@root()> org.apache.karaf.features.internal.util.MultiException: Error restarting bundles:
> Activator start error in bundle org.ops4j.pax.web.pax-web-jetty [136].
> at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1005)
> <snip>
> at java.base/java.lang.Thread.run(Thread.java:825)
> Suppressed: org.osgi.framework.BundleException: Activator start error in bundle org.ops4j.pax.web.pax-web-jetty [136].
> <snip>
> Caused by: java.lang.ClassFormatError: Weaving hook failed.
> at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.transformClass(BundleWiringImpl.java:24
> <snip>
> Caused by: java.lang.IllegalStateException: Unknown protocol: jrt
>
> openjdk version "11.0.2" 2019-01-15
> OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.2+9)
> Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.12.1, JRE 11 Windows 10 amd64-64-Bit Compressed References 20190204_123 (JIT enabled, AOT enabled)
> OpenJ9 - 90dd8cb40
> OMR - d2f4534b
> JCL - 289c70b684 based on jdk-11.0.2+9)