ben-manes / concurrentlinkedhashmap

A ConcurrentLinkedHashMap for Java
Apache License 2.0
470 stars 113 forks source link

Cannot start as OSGi bundle #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Imported as bundle into apache Karaf (Karaf version 2.3.3,  OSGi Framework 
org.eclipse.osgi - 3.8.0.v20120529-1548) cannot start a bundle with exception:

com.googlecode.concurrentlinkedhashmap.lru_1.4.0 [234]" could not be resolved. 
Reason: Missing Constraint: Import-Package: sun.misc; version="0.0.0"

proposed solution: import directive to exclude com.sun import (it is done 
implicitly via JVM runtime).

Original issue reported on code.google.com by gabriel....@apogado.com on 12 May 2014 at 1:16

GoogleCodeExporter commented 9 years ago
Duplicate of the issue #40 

Original comment by gabriel....@apogado.com on 12 May 2014 at 1:40

GoogleCodeExporter commented 9 years ago
I'm sorry for not being available to resolve this issue. I'm sure by now you've 
worked around it using org.osgi.framework.system.packages.extr property. I'd 
like to fix and release v1.4.1 so that workaround isn't necessary.

It appears that the common solution is to add,
<Import-Package>sun.misc.*resolution:=optional</Import-Package>

Should I use that configuration or an exclusion rule that your suggested? 
(Sorry, I'm not familiar with OSGi).

Please reply on #40. Thanks!

Original comment by Ben.Manes@gmail.com on 15 Dec 2014 at 8:04