vylan / javaapiforkml

Automatically exported from code.google.com/p/javaapiforkml
0 stars 0 forks source link

Provide jaxb.index file #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In JAK,jxc-generated ObjectFactory classes have been removed according to:
http://labs.micromata.de/display/jak/Implementation#Implementation-CreateKMLFact
ory%28anddeleteJAXB%27sObjectFactory%29

That causes problems with those libraries that expect to find such 
ObjectFactory.
For example, using the Jaxb extension for the Restlet library:

    Kml kml = new Kml();
    ConverterHelper ch = new JaxbConverter();
    VariantInfo vi = new VariantInfo( MediaType.APPLICATION_KML );
    Representation re = ch.toRepresentation( kml, vi, this );
    System.out.print( re.getText() );

javax.xml.bind.JAXBException: "de.micromata.opengis.kml.v_2_2_0" doesnt contain 
ObjectFactory.class or jaxb.index

The solution, as suggested here: 
http://cmaki.blogspot.com/2007/09/annotated-jaxb-classes.html is to provide a 
jaxb.index text file in each package listing all classes containing 
@XmlRootElement.

See also:
http://groups.google.com/group/javaapiforkml/browse_thread/thread/809852b45a2ac5
2

Original issue reported on code.google.com by theb...@emanueleziglioli.it on 9 May 2011 at 12:17

Attachments: