[geotk] Geotk 5.0-SNAPSHOT CSW Client Issue

Cullen Rombach cullenr at imagemattersllc.com
Fri May 25 07:55:17 PDT 2018


Hello,

We are currently working on a project that uses the Geotoolkit CSW client
to fetch and unmarshal metadata records. we are using version 5.0-SNAPSHOT,
since we need the support for ISO 19115-3 metadata that comes with Apache
SIS 1.0-jdk8-SNAPSHOT.

Unfortunately, we have run into an issue where CSWMarshallerPool fails to
instantiate, meaning we are unable to read the response coming from the
CSW. I get the following error (abridged):

java.lang.InternalError:
Error occured while invoking reflection on target classes. Make sure all
referenced classes are on classpath: interface
javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter
Exception: null
    at
com.sun.xml.internal.bind.v2.model.annotation.RuntimeInlineAnnotationReader.getClassValue(RuntimeInlineAnnotationReader.java:128)
...

This error occurs while building the JAXBContext inside of
CSWMarshallerPool.getInstance(). We also tried using getInstanceCswOnly()
instead, just to see if the error was related to the SIS metadata classes.

We did some digging in the debugger, and the class that is not being found
is GO_LocalName. However, GO_LocalName no longer exists in Apache SIS and
has been replaced by GO_GenericName. All references to GO_LocalName have
been removed from the most recent versions of Apache SIS and there none in
Geotoolkit, so we are unsure what exactly is causing this issue. It seems
like it could be a dependency conflict, but as far as we could tell there
is no reason for such a conflict.

This simple example class should reproduce the error:

import org.apache.sis.xml.MarshallerPool;
import org.geotoolkit.csw.xml.CSWMarshallerPool;

public class CSWTest {
    public static void main(String[] args) {
       try {
           MarshallerPool pool = CSWMarshallerPool.getInstanceCswOnly();
        }
        catch(Throwable e) {
            e.printStackTrace();
            throw e;
        }
    }
}

The only dependency (in Gradle) needed to run the above class should be:

compile group: 'org.geotoolkit', name: 'geotk-client-csw', version:
'5.0-SNAPSHOT'

Any help would be appreciated. Thank you.

-- 
Cullen Rombach
Image Matters LLC
www.imagemattersllc.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20180525/39aa76ba/attachment.html>


More information about the Geotoolkit mailing list