[Simple-support] Java.lang.NoClassDefFoundError exception
Brought to you by:
niallg
|
From: Wessam A. R. <wes...@gm...> - 2007-08-17 17:20:35
|
Hi,
I just started using this library in a module am developing for Netbeans
IDE. I was just trying out the tutorial example but it keeps giving me a
Java.lang.NoClassDefFoundError exception. in the details of this error this
is written beside the exception name "javax/xml/stream/XMLInputFactory".
This is the code i wrote:
*try {
org.simpleframework.xml.Serializer serializer = new Persister();
Example example = new Example("Example message", 123);
File result = new File("H:\\example.xml");
serializer.write(example, result);
} catch (Exception ex) {
Exceptions.printStackTrace(ex);
}*
and this is the class i have:
*@Root
public class Example {*
* @Element
private String text;*
* @Attribute
private int index;*
* public Example() {
super();
} *
* public Example(String text, int index) {
this.text = text;
this.index = index;
}*
* public String getMessage() {
return text;
}*
* public int getId() {
return index;
}
}*
Please i need help with this.
Thanks in advance
Wessam
|