LinkageError with OSGI Bundle [message #1858297] |
Tue, 28 March 2023 00:24 |
Vladimir Guan Messages: 2 Registered: March 2023 |
Junior Member |
|
|
Hi All,
I have two OSGI bundles, both use play.mvc.http.Request. One bundle, say A, contains an interface, say AA with the a method, say, processRequest that has Request as a parameter.
The other bundle, say, B, has class, say, BB which calls AA.processRequest(request).
Both SBT files dependsOn the same version of com.typesafe.play (2.8.19) and both export play.* using OsgiKeys.exportPackage
The IDE indicates that both instances of Request are from the same version. However, I get the following runtime error:
Caused by: java.lang.LinkageError: loader constraint violation: when resolving interface method 'AA.processRequest(play.mvc.Http$Request)' the class loader
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @33df927e of the current class, BB, and the class loader
play.runsupport.NamedURLClassLoader @6fa3420 for the method's defining class, AA, have different Class objects for the type play/mvc/Http$Request used in the signature (BB is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @33df927e, parent loader 'bootstrap'; BB is in unnamed module of loader play.runsupport.NamedURLClassLoader @6fa3420, parent loader play.runsupport.classloader.DelegatingClassLoader @2d7a11d2)
Any help appreciated.
Cheers,
Vlad
|
|
|
|
Powered by
FUDForum. Page generated in 0.02371 seconds