karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Freeman Fang <freeman.f...@gmail.com>
Subject Re: Karaf 2.3.2: ClassNotFoundException for javax.* packages
Date Mon, 19 Aug 2013 00:14:22 GMT
FYI, we already have a jira[1] to track this issue

[1]https://issues.apache.org/jira/browse/KARAF-2446
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋



On 2013-8-16, at 下午8:01, Ioan Eugen Stan wrote:

> Hello JB,
> 
> I think Freeman is right. I will explain my setup here:
> 
> I have a bundle that uses Jasper to create PDF's. The Jasper bundle
> I'm using (5.1.0 from Maven Central) depends on Xerces libraries but
> declares Dynamic-Imports, not explicit imports.
> Because Karaf does not export the xerces packages from lib/endorsed I
> have to add the xerces bundle. I'm also using XML parsers from
> javax.xml.* packages, implemented by xerces from lib/endorsed.
> 
> The issue arises from the fact that during PDF generation, classes
> from my own xerces bundle get mixed with classes from javax.xml system
> bundle implemented by the lib/endorsed xerces. Since they are loaded
> by different ClassLoaders it results in a ClassCast exception. I think
> the solution is, as Freeman suggested to export the xerces packages
> from the lib/endorsed version. That way the calsses will be loaded
> from the same bundle, by the same ClassLoader.
> 
> I'm willing to test this if you tell me what to do. I'm not that deep
> in Karaf yet, and no time to get deep right now.
> 
> Regards,


Mime
View raw message