ERLEDIGT
NEIN
NEIN
ANTWORTEN
2
2
ZUGRIFFE
3137
3137
EMPFEHLEN
-
hallo,
ich wollte paar JAXB-Beispiele ausprobieren(u.a. vom SUN: http://java.sun.com/developer/techni...Services/jaxb/)
Leider bekomme ich immer folgenden Fehler (bereits bei der Codeumsetzung):
"The type javax.xml.stream.XMLEventReader cannot be resolved. It is indirectly referenced from required .class files." Der Fehler kommt immer in der Zeile wo ich ein Marshalling (Collection collection= (Collection)
unmarshaller.unmarshal(new File( "books.xml"))
oder Unmarshalling
( Collection collection= (Collection)
unmarshaller.unmarshal(new File( "books.xml"))
mache.
Hat jemand eine Idee was da fehlt?
Benutze Eclipse 3.1.0, JDK 1.5.0 und JWSDP 2.0.
Danke im voraus
-
03.04.07 20:08 #2
- Registriert seit
- Jun 2002
- Ort
- Saarbrücken (Saarland)
- Beiträge
- 9.886
- Blog-Einträge
- 29
Hallo,
nimm doch einfach mal das jsr173_api.jar (findet man unter %JWSDP_HOME%\sjsxp\lib) in den Classpath auf.
Gruß TomJava rocks!
How to become a good Java Programmer?
Does IT in Java and .Net
The only valid measurement of code quality: WTFs / minute
Blog
Xing
Twitter
-
danke, scheint keinen Fehler mehr auszugeben, aber jetzt kommt bei Ausführen vom Programm in der allerersten Zeile:
JAXBContext jaxbContext = JAXBContext.newInstance("test.jaxb");
eine Excpetion:
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
com.sun.xml.bind.DefaultJAXBContextImpl does not have a no-arg default constructor
this problem is related to the following location:
at com.sun.xml.bind.DefaultJAXBContextImpl
at test.jaxb.ObjectFactory
Meine Java-Klasse befindet sich in einem package test.jaxb.
wo ist denn da das Problem?
Ähnliche Themen
-
JaxB namespace Problem
Von Peregrin im Forum JavaAntworten: 1Letzter Beitrag: 07.10.10, 12:40 -
JAXB Exception Problem
Von dreamer29 im Forum Enterprise Java (JEE, J2EE, Spring & Co.)Antworten: 0Letzter Beitrag: 21.06.10, 11:37 -
JAXB - Problem mit Java Listen unmarshalling
Von will2k im Forum JavaAntworten: 22Letzter Beitrag: 21.08.08, 10:56 -
JAXB (Java2XML) -> Problem mit Vererbung
Von denyo85 im Forum JavaAntworten: 1Letzter Beitrag: 24.08.07, 10:07 -
JAXB (Java2XML) -> Problem mit Array
Von denyo85 im Forum JavaAntworten: 0Letzter Beitrag: 23.08.07, 18:26





Zitieren

Login





