felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Onslow <robert.ons...@gmail.com>
Subject Re: NoClassDefFoundError of classes that are in the JRE
Date Thu, 11 Aug 2016 08:15:14 GMT
Remo

When I moved from eclipse to felix I found that everything apart from
java.* has to be imported as in

Import-Package: javax.xml.parsers

Robert

On Thu, Aug 11, 2016 at 9:02 AM, Remo Liechti <remo.liechti@swisslog.com> wrote:
> Hi guys
>
> Another issue I came across while bundling the osgi application into a webapplication
for WebLogic.
> It seems like some of the bundles I like to start fail during activation, because they
cannot find the class description of classes that actually are in the regular JRE:
>
> <Aug 11, 2016 9:47:19 AM CEST> <Error> <OSGiForApps> <BEA-000000>
<com.kuka.configuration.manager:15:[com.kuka.configuration.manager] The activate method
has thrown an exception
> org.apache.felix.log.LogException: java.lang.NoClassDefFoundError: javax/xml/parsers/DocumentBuilderFactory
>        at com.kuka.configuration.project.ConfigurationProjectSerializer.<clinit>(ConfigurationProjectSerializer.java:39)
>        at com.kuka.configuration.project.ConfigurationProject.loadInternal(ConfigurationProject.java:281)
>
> When searching for that class in eclipse, I find it within the JRE of Weblogic. Does
Felix use another JRE, or does Felix inherit all classes into each classloader of each bundle
only if the package is something within java.*, and stuff like javax.* and so on are not inherited
within the classloaders? I ask this because stuff like java.io.File and so on are found.
>
> I tried to add the xerces into my application, however, it cannot be found still.
> The application I'm migrating was using equinox before, does it maybe import the javax
by default while felix isn't? Is there a way to add a dependency in the manifest file to xerces?
I failed with this approach:
>
> Import-Package: xerces;version="2.11.0",
> [...]
>
> Thanks,
> Remo
>
>
>
>
>
> This message may contain legally privileged or confidential information and is therefore
addressed to the named persons only. The recipient should inform the sender and delete this
message, if he/she is not named as addressee. The sender disclaims any and all liability for
the integrity and punctuality of this message. The sender has activated an automatic virus
scanning, but does not guarantee the virus free transmission of this message.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message