[geotk] Geotk 5.0-SNAPSHOT CSW Client Issue

Stephane Fellah stephanef at imagemattersllc.com
Fri May 25 10:56:01 PDT 2018


Following up Cullen email, I built a custom marshaller pool for CSW that
excludes the following classes related to feature catalog and the
marshaller instantiation works fine.

In particular, the addition of the associationRoleImpl in the classes list
causes the failure:

 classeList.addAll(Arrays.asList(org.geotoolkit.feature.catalog.AssociationRoleImpl.class));

Hope that helps

Stephane




On Fri, May 25, 2018 at 10:55 AM, Cullen Rombach <
cullenr at imagemattersllc.com> wrote:

> 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
>
> _______________________________________________
> Geotoolkit mailing list
> Geotoolkit at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geotoolkit
>



-- 
Stephane Fellah
Chief  Knowledge Scientist
Image Matters LLC
Office: +(703) 669 5510
Cell: 703 431 9420
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20180525/a7e7ef13/attachment.html>


More information about the Geotoolkit mailing list