<div dir="ltr">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. <div><br></div><div>In particular, the addition of the associationRoleImpl in the classes list causes the failure:</div><div><br></div><div><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:"Courier New";font-size:9pt"><span style="color:rgb(128,128,128);font-style:italic"> classeList.addAll(Arrays.asList(org.geotoolkit.feature.catalog.AssociationRoleImpl.class));</span></pre><div>Hope that helps</div><div><br></div><div>Stephane</div><br><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 25, 2018 at 10:55 AM, Cullen Rombach <span dir="ltr"><<a href="mailto:cullenr@imagemattersllc.com" target="_blank">cullenr@imagemattersllc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><br></div><div>We are currently working on a project that uses the Geotoolkit CSW client to fetch and unmarshal metadata records. we are using version <span style="font-family:monospace,monospace">5.0-SNAPSHOT</span>, since we need the support for ISO 19115-3 metadata that comes with Apache SIS <span style="font-family:monospace,monospace">1.0-jdk8-SNAPSHOT</span>.<br></div><div><br></div><div>Unfortunately, we have run into an issue where <span style="font-family:monospace,monospace">CSWMarshallerPool</span> fails to instantiate, meaning we are unable to read the response coming from the CSW. I get the following error (abridged):<br><br><div style="margin-left:40px"><span style="font-family:monospace,monospace">java.lang.InternalError: </span><br><span style="font-family:monospace,monospace">Error occured while invoking reflection on target classes. Make sure all referenced classes are on classpath: interface javax.xml.bind.annotation.<wbr>adapters.XmlJavaTypeAdapter </span><br><span style="font-family:monospace,monospace">Exception: null</span><br><span style="font-family:monospace,monospace">    at com.sun.xml.internal.bind.v2.<wbr>model.annotation.<wbr>RuntimeInlineAnnotationReader.<wbr>getClassValue(<wbr>RuntimeInlineAnnotationReader.<wbr>java:128)</span><br><span style="font-family:monospace,monospace"></span></div></div><div style="margin-left:40px"><span style="font-family:monospace,monospace">...</span></div><div><br></div><div>This error occurs while building the <span style="font-family:monospace,monospace">JAXBContext</span> inside of <span style="font-family:monospace,monospace">CSWMarshallerPool.getInstance(<wbr>)</span><span style="font-family:arial,helvetica,sans-serif">. We also tried using <span style="font-family:monospace,monospace">getInstanceCswOnly()</span> instead, just to see if the error was related to the SIS metadata classes.</span></div><div><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div><span style="font-family:arial,helvetica,sans-serif"> We</span> did some digging in the debugger, and the class that is not being found is <span style="font-family:monospace,monospace">GO_LocalName<font face="arial,helvetica,sans-serif">. However, </font>GO_LocalName<font face="arial,helvetica,sans-serif"> no longer exists in Apache SIS and has been replaced by </font>GO_GenericName<font face="arial,helvetica,sans-serif">. All references to </font>GO_LocalName<font face="arial,helvetica,sans-serif"> 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.</font></span></div><div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><br></font></span></div><div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">This simple example class should reproduce the error:<br></font></span></div><div style="margin-left:40px"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><br></font></span></div><div style="margin-left:40px"><span style="font-family:monospace,monospace">import org.apache.sis.xml.<wbr>MarshallerPool;</span></div><div style="margin-left:40px"><span style="font-family:monospace,monospace">import org.geotoolkit.csw.xml.<wbr>CSWMarshallerPool;<font face="arial,helvetica,sans-serif"><br></font></span></div><div style="margin-left:40px"><span style="font-family:monospace,monospace"><br></span></div><div style="margin-left:40px"><span style="font-family:monospace,monospace">public class CSWTest {<br>    public static void main(String[] args) {<br>       try {<br>           MarshallerPool pool = CSWMarshallerPool.<wbr>getInstanceCswOnly();<br>        }<br>        catch(Throwable e) {<br>            e.printStackTrace();<br>            throw e;<br>        }<br>    }<br>}<font face="arial,helvetica,sans-serif"><br></font></span></div><div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><br></font></span></div><div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">The only dependency (in Gradle) needed to run the above class should be:<br><br></font></span></div><div><span style="font-family:monospace,monospace">compile group: 'org.geotoolkit', name: 'geotk-client-csw', version: '5.0-SNAPSHOT'<font face="arial,helvetica,sans-serif"><br></font></span></div><div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><br></font></span></div><div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">Any help would be appreciated. Thank you.<span class="HOEnZb"><font color="#888888"><br></font></span></font></span></div><span class="HOEnZb"><font color="#888888"><div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"></font></span><br></div><div>-- <br><div class="m_1447423033822997319gmail_signature"><div dir="ltr">Cullen Rombach<div>Image Matters LLC</div><div><a href="http://www.imagemattersllc.com" target="_blank">www.imagemattersllc.com</a></div></div></div>
</div></font></span></div>
<br>______________________________<wbr>_________________<br>
Geotoolkit mailing list<br>
<a href="mailto:Geotoolkit@lists.osgeo.org">Geotoolkit@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geotoolkit" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/geotoolkit</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-family:arial;font-size:small">Stephane Fellah<br></div><div style="font-family:arial;font-size:small">Chief  Knowledge Scientist</div><div style="font-family:arial;font-size:small">Image Matters LLC</div><div style="font-family:arial;font-size:small">Office: +(703) 669 5510</div><div style="font-family:arial;font-size:small">Cell: 703 431 9420</div></div></div></div></div>
</div>