Hej,
thanks Peter and Stuart for your quick answers. Peters first guess was
right, there is indeed a proxy generator involved (JBoss AS 7 Client,
when I got this right). We added an additional <Import-Package> to the
configuration of the bundle-plugin, which did the trick for now.
I'm a little surprised that it is the generator who determines which
class loader to use, but I'm really not into this whole new jBoss
Remoting and RMI thing, and I guess we gonna investigate how this works
in detail. Thanks a lot for the pointer,
Mirko
Am 29.05.2012 19:23, schrieb Peter Kriens:
Likely a proxy being generated that does not understand the Java class loading
rules ...
Dependencies of implemented interfaces must be loaded through that interface's
class loader but many proxy generators assume that they can use the class
loader of the object. See
http://blog.osgi.org/2008/08/classy-solutions-to-tricky-proxies.html
Kind regards,
Peter Kriens
On 29 mei 2012, at 17:21, Mirko Swillus wrote:
Hej,
please have a look at the following setup, where the Import-Package instruction
is not calculated in a way I would have expected:
I got two Maven projects X and Y, where X has a dependency to Y. Both projects
are build as bundles, with maven-bundle-plugin (2.3.7) in its default
configuration (just Export-Package is configured to export everything below the
particular package root).
Project X contains an interface A, which extends an interface B which is
located in project Y.
When building project X, the Import-Package section of the generated MANIFEST
does only contain the imports that A defines itself. The imports defined in the
super interface B are not observed.
The result is a NoClassDefFoundError at runtime. The BundleClassLoader of X is
not able to find the types which are imported by interface B in bundle Y.
What I would have expected is that maven-bundle-plugin does consider all
requirements of those compound types when calculating the Import-Package
instructions of the MANIFEST.
What do you think? Do I have to resolve this dependency manually by adding
explicit<Import-Package> to the pom, or is there a special 'import transitive
imports as well'-switch I missed so far?
Any comment is highly appreciated. Regards,
Mirko
____________________________________________________________________
[ M i r k o S w i l l u s ]
Software Development
Qualitype AG
Quality Management Systems | Bioinformatics
Moritzburger Weg 67 | 01109 Dresden
fon +49.351.8838 2813 | fax +49.351.8838 2809
e-mail: [email protected] | http://www.qualitype.de
Sitz der Gesellschaft: Dresden | Amtsgericht Dresden HRB 19830
Vorstand: Dr. Wilhelm Zörgiebel | Dr. Frank Götz
Aufsichtsratsvorsitz: Prof. Dr. Gerhard P. Fettweis
____________________________________________________________________
The information in this email and any attachments is confidential and is
intended for the addressee only. If you are not the intended recipient,
please delete this message and any attachments and advise the sender by
return email.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
____________________________________________________________________
[ M i r k o S w i l l u s ]
Software Development
Qualitype AG
Quality Management Systems | Bioinformatics
Moritzburger Weg 67 | 01109 Dresden
fon +49.351.8838 2813 | fax +49.351.8838 2809
e-mail: [email protected] | http://www.qualitype.de
Sitz der Gesellschaft: Dresden | Amtsgericht Dresden HRB 19830
Vorstand: Dr. Wilhelm Zörgiebel | Dr. Frank Götz
Aufsichtsratsvorsitz: Prof. Dr. Gerhard P. Fettweis
____________________________________________________________________
The information in this email and any attachments is confidential and is
intended for the addressee only. If you are not the intended recipient,
please delete this message and any attachments and advise the sender by
return email.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]