Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » simple-xml NodeBuilder No Class Def Found Error on Raspberry Pi running Kura
icon5.gif  simple-xml NodeBuilder No Class Def Found Error on Raspberry Pi running Kura [message #1601606] Thu, 05 February 2015 02:39 Go to next message
shauheen azami is currently offline shauheen azamiFriend
Messages: 5
Registered: January 2015
Junior Member
Hi,

I have a bundle that is using SimpleXML Framework (mvnrepository: org.simpleframework/simple-xml). The jar is on Bundle-ClassPath, and is included in the build. The bundle works fine in emulator and everything works as expected.

However when I deploy the exported bundle on Raspberry Pi (It activates just fine, no errors and the jar does include the SimpleXML jar inside it) when the bundle is used, it throws,

java.lang.NoClassDefFoundError: Could not initialize class org.simpleframework.xml.stream.NodeBuilder


Has anyone encountered this issue or knows how to fix it?
Re: simple-xml NodeBuilder No Class Def Found Error on Raspberry Pi running Kura [message #1603103 is a reply to message #1601606] Fri, 06 February 2015 01:17 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

How are you exporting your bundle from Eclipse? You may want to extract your exported bundle that you are deploying to the RPi and manually verify the jar file is there. If that looks okay, could you post the contents of your bundles Manifest file?

Thanks,
--Dave
Re: simple-xml NodeBuilder No Class Def Found Error on Raspberry Pi running Kura [message #1603211 is a reply to message #1603103] Fri, 06 February 2015 03:04 Go to previous messageGo to next message
shauheen azami is currently offline shauheen azamiFriend
Messages: 5
Registered: January 2015
Junior Member
Hi,

The export is done from eclipse (Deployable plugins and fragments), the build.properties has the simpleXML in bin.include, and yes, the bundle does include the jar file for simpleXML,

I have got it to work by having a SimpleXML bundle running on the Pi, and also Importing and exporting SimpleXML from my bundle. (I don't think this is the correct solution, as I don't want to have to expose the jar. But it is working!)

Here is the manifest:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Test Implementation
Bundle-SymbolicName: org.eclipse.kura.test.implementation
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Export-Package: org.simpleframework.xml,
 org.simpleframework.xml.convert,
 org.simpleframework.xml.core,
 org.simpleframework.xml.filter,
 org.simpleframework.xml.strategy,
 org.simpleframework.xml.stream,
 org.simpleframework.xml.transform,
 org.simpleframework.xml.util
Bundle-ClassPath: .,
 jar/org.simpleframework.simple-xml.2.3.jar
Import-Package: org.eclipse.kura.test.api,
 org.osgi.framework;version="1.7.0",
 org.osgi.service.component;version="1.2.0",
 org.simpleframework.xml,
 org.simpleframework.xml.convert,
 org.simpleframework.xml.core,
 org.simpleframework.xml.filter,
 org.simpleframework.xml.strategy,
 org.simpleframework.xml.stream,
 org.simpleframework.xml.transform,
 org.simpleframework.xml.util
Service-Component: OSGI-INF/component.xml
Require-Bundle: slf4j.api
Bundle-ActivationPolicy: lazy


Re: simple-xml NodeBuilder No Class Def Found Error on Raspberry Pi running Kura [message #1604358 is a reply to message #1603211] Fri, 06 February 2015 20:29 Go to previous message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

I tried a very simple example and didn't have a problem referencing the jar on the bundle classpath. If you could provide a link to the jar that was causing the problem, I am happy to take a look. Your method would be useful if you had other bundles that needed access to the simple-xml packages. If only the one bundle needs simple-xml, then it is better to try and resolve the classpath issue.

Thanks,
--Dave
Previous Topic:PositionService and USB GPS
Next Topic:Deploy bundle from eclipse to remote kura very slow
Goto Forum:
  


Current Time: Fri Apr 26 14:17:04 GMT 2024

Powered by FUDForum. Page generated in 0.02231 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top