Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
maven-bundle-plugin-3.2.0
-
None
-
None
-
An OSGi contanier (JBoss, Karaf) with 2 different Javassists deployed.
Description
I deploy 2 different versions of javassist in my OSGi containers: javassist-3.18.1-GA.jar and javassist-3.15.0-GA.jar. Dependent on the wiring situation I get sometimes exceptions caused by incompatibility of the both versions:
HHH000142: Javassist Enhancement failed: com.estermann.testwab.TestWabEntity: java.lang.NoSuchMethodError: javassist.util.proxy.RuntimeSupport.find2Methods(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/reflect/Method;)V
To fix it I add version parameter on javassist import in my bundle plugin configuration:
<plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>3.2.0</version> <extensions>true</extensions> <configuration> <instructions> <Meta-Persistence>META-INF/persistence.xml</Meta-Persistence> <Import-Package>javassist.util.proxy;version=3.18, * </Import-Package> </instructions> </configuration> </plugin>
But since bundle-plugin 3.2.0 (which includes FELIX-5233) having the Meta-Persistence instruction results in additional imported packages. So the resulting manifest includes two imports of javassist.util.proxy:
Import-Package: javassist.util.proxy;version="3.18", javassist.util.proxy;resolution:=optional
...which results in
org.osgi.framework.BundleException: Duplicate import of package javassist.util for com.estermann.testwab:0.0.1.SNAPSHOT
I would expect that two import declarations to get merged by the plugin.
Attachments
Issue Links
- is related to
-
FELIX-5233 New JPA analyser for the maven bundle plugin
- Closed