[geotk] GML Marshaller

Пузова Н.В. cbmd at meteo.ru
Wed May 22 03:56:25 PDT 2019


Hello!
How can I use geotoolskit to marshall GML elements? I try this code (as test code from source GmlXMLBindingTest.java):

MarshallerPool  pool =  GMLMarshallerPool.getInstance(); - I get an exception in this line
...
Exception in thread "main" java.lang.AssertionError: javax.xml.bind.JAXBException: Provider com.sun.xml.internal.bind.v2.ContextFactory could not be instantiated: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
org.opengis.metadata.Identifier is an interface, and JAXB can't handle interfaces.
    this problem is related to the following location:
        at org.opengis.metadata.Identifier
        at private java.util.List org.geotoolkit.gml.xml.v321.AbstractGMLType.name
        at org.geotoolkit.gml.xml.v321.AbstractGMLType
        at org.geotoolkit.gml.xml.v321.AbstractFeatureType
        at org.geotoolkit.gml.xml.v321.DynamicFeatureType
        at org.geotoolkit.gml.xml.v321.DynamicFeatureCollectionType
        at public org.geotoolkit.gml.xml.v321.DynamicFeatureCollectionType org.geotoolkit.gml.xml.v321.ObjectFactory.createDynamicFeatureCollectionType()
        at org.geotoolkit.gml.xml.v321.ObjectFactory

Field name is org.opengis.metadata.Identifier (interface). Most classes of GML are inherited from AbstractGMLType. How to solve the problem interface in the field for marshalling?

Sincerely 
Nataliia Puzova
Software Engineer 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20190522/2c5cdee7/attachment.html>


More information about the Geotoolkit mailing list