An OSGi based application I have inherited uses the org.springframework.osgi.extender bundle version 1.2.1. Currently, I am using Java 1.7 and Spring 2.5.6.
I recently installed Java 8 on my machine and the org.springframework.osgi.extender bundle no longer launches due to the following error :
org.osgi.framework.BundleException: Activator start error in bundle org.springframework.osgi.extender [21].
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2196)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2064)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)
at org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl.java:114)
at org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:249)
at org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:184)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Cannot create ConcurrentHashMap - neither JDK 1.5 nor backport-concurrent available on the classpath
at org.springframework.core.CollectionFactory.createConcurrentMap(CollectionFactory.java:229)
at org.springframework.osgi.extender.internal.activator.ContextLoaderListener.<init>(ContextLoaderListener.java:332)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:4336)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2141)
... 6 more
java.lang.IllegalStateException: Cannot create ConcurrentHashMap - neither JDK 1.5 nor backport-concurrent available on the classpath
I was going to upgrade Spring to 4.0.3, but I notice that the org.springframework.core.CollectionFactory.createConcurrentMap() method has been deprecated and removed.
Will Spring DM be upgraded to work with Spring 4.*?
Will Spring DM be upgraded to work with Spring 4.*?
No. Spring discontinued to support OSGi since 4.0 and it was the right decision. The concept of Spring does not fit into OSGi.
See http://blog.osgi.org/2014/09/how-should-i-use-guicespringblueprint.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With