<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Hello,</div><div><br></div><div>Hopefully this is the right forum, although the error I’m seeing is coming from the SIS lib.</div><div><br></div><div>I’m attempting to create a basic WFS client application using GeoToolkit and have run into this problem.  Please excuse the lengthy post, but I wanted to provide complete information.</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(147, 26, 104);">...</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #931a68">final</span> MyClientSecurity security = <span style="color: #931a68">new</span> MyClientSecurity(); //extends DefaultClientSecurity</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; min-height: 15px;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">        <span style="color: #931a68">final</span> WFSFeatureStoreFactory wfsFeatureStoreFactory = <span style="color: #931a68">new</span> WFSFeatureStoreFactory();</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">        <span style="color: #931a68">final</span> <span style="text-decoration: underline">Map</span> params = <span style="color: #931a68">new</span> <span style="text-decoration: underline">java.util.HashMap</span>();</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">        <span style="color: #931a68">final</span> URL url = <span style="color: #931a68">new</span> URL(</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(57, 51, 255);"><span style="color: #000000">                        </span>"<a href="https://my.wfs.service/wfsaccess?service=wfs">https://my.wfs.service/wfsaccess?service=wfs</a>"<span style="color: #000000">);</span></div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">        <span style="text-decoration: underline">params.put(</span><span style="text-decoration: underline ; color: #3933ff">"url"</span><span style="text-decoration: underline">, url)</span>;</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">        <span style="text-decoration: underline">params.put(</span><span style="text-decoration: underline ; color: #3933ff">"security"</span><span style="text-decoration: underline">, security)</span>; //version not set as I understand it defaults to 1.1.0</div><p style="margin: 0px; font-size: 11px; font-family: Monaco; min-height: 15px;">       <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; font-family: Monaco;"><span class="Apple-tab-span" style="white-space:pre">        </span>WebFeatureClient client = wfsFeatureStoreFactory.open(<span style="text-decoration: underline">params</span>);</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; min-height: 15px;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">       <span style="color: #931a68">final</span> String[] <span style="text-decoration: underline">typeNames</span> = client.getTypeNames();</div></div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">...</div><div><br></div><div><br></div><div>When I try to create an instance of WFSFeatureStoreFactory, it throws this stack trace</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);">Exception in thread "main" java.lang.ExceptionInInitializerError</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.geotoolkit.feature.FeatureFactory.<clinit>(<span style="text-decoration: underline ; color: #011993">FeatureFactory.java:65</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">  </span>at org.geotoolkit.feature.FeatureUtilities.<clinit>(<span style="text-decoration: underline ; color: #011993">FeatureUtilities.java:59</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">      </span>at org.geotoolkit.data.AbstractFeatureStoreFactory.open(<span style="text-decoration: underline ; color: #011993">AbstractFeatureStoreFactory.java:105</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">    </span>at org.geotoolkit.data.wfs.WFSFeatureStoreFactory.open(<span style="text-decoration: underline ; color: #011993">WFSFeatureStoreFactory.java:129</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">  </span>at com.pvm.gtktest.AppTest.test2(<span style="text-decoration: underline ; color: #011993">AppTest.java:58</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">        </span>at com.pvm.gtktest.AppTest.main(<span style="text-decoration: underline ; color: #011993">AppTest.java:91</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(1, 25, 147);"><span style="color: #ff2600">Caused by: </span><span style="text-decoration: underline">java.lang.NullPointerException</span></div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">    </span>at org.apache.sis.util.resources.IndexedResourceBundle.ensureLoaded(<span style="text-decoration: underline ; color: #011993">IndexedResourceBundle.java:313</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">      </span>at org.apache.sis.util.resources.IndexedResourceBundle.ensureLoaded(<span style="text-decoration: underline ; color: #011993">IndexedResourceBundle.java:313</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">      </span>at org.apache.sis.util.resources.IndexedResourceBundle.ensureLoaded(<span style="text-decoration: underline ; color: #011993">IndexedResourceBundle.java:313</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">      </span>at org.apache.sis.util.resources.IndexedResourceBundle.handleGetObject(<span style="text-decoration: underline ; color: #011993">IndexedResourceBundle.java:398</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">   </span>at java.util.ResourceBundle.getObject(<span style="text-decoration: underline ; color: #011993">ResourceBundle.java:389</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">   </span>at java.util.ResourceBundle.getString(<span style="text-decoration: underline ; color: #011993">ResourceBundle.java:355</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">   </span>at org.apache.sis.util.resources.IndexedResourceBundle.getString(<span style="text-decoration: underline ; color: #011993">IndexedResourceBundle.java:523</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre"> </span>at org.apache.sis.util.resources.IndexedResourceBundle.getString(<span style="text-decoration: underline ; color: #011993">IndexedResourceBundle.java:555</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre"> </span>at org.geotoolkit.factory.FactoryRegistry.getLogHeader(<span style="text-decoration: underline ; color: #011993">FactoryRegistry.java:980</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre"> </span>at org.geotoolkit.factory.FactoryRegistry.scanForPlugins(<span style="text-decoration: underline ; color: #011993">FactoryRegistry.java:794</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">       </span>at org.geotoolkit.factory.FactoryRegistry.scanForPluginsIfNeeded(<span style="text-decoration: underline ; color: #011993">FactoryRegistry.java:850</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">       </span>at org.geotoolkit.factory.FactoryRegistry.getUnfilteredProviders(<span style="text-decoration: underline ; color: #011993">FactoryRegistry.java:273</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">       </span>at org.geotoolkit.factory.FactoryRegistry.getServiceImplementation(<span style="text-decoration: underline ; color: #011993">FactoryRegistry.java:527</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">     </span>at org.geotoolkit.factory.DynamicFactoryRegistry.getServiceImplementation(<span style="text-decoration: underline ; color: #011993">DynamicFactoryRegistry.java:312</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">       </span>at org.geotoolkit.factory.FactoryRegistry.getOrCreateServiceProvider(<span style="text-decoration: underline ; color: #011993">FactoryRegistry.java:434</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">   </span>at org.geotoolkit.factory.DynamicFactoryRegistry.getOrCreateServiceProvider(<span style="text-decoration: underline ; color: #011993">DynamicFactoryRegistry.java:168</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">     </span>at org.geotoolkit.factory.FactoryRegistry.getServiceProvider(<span style="text-decoration: underline ; color: #011993">FactoryRegistry.java:311</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">   </span>at org.geotoolkit.factory.FactoryFinder.getFactory(<span style="text-decoration: underline ; color: #011993">FactoryFinder.java:240</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre">       </span>at org.geotoolkit.factory.FactoryFinder.getFilterFactory(<span style="text-decoration: underline ; color: #011993">FactoryFinder.java:670</span>)</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(255, 38, 0);"><span class="Apple-tab-span" style="white-space:pre"> </span>at org.geotoolkit.feature.AbstractFeatureFactory.<clinit>(<span style="text-decoration: underline ; color: #011993">AbstractFeatureFactory.java:51</span>)</div></div><br><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">The stack points to line 313 of IndexedResourceBundle class which has a comment…</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(78, 144, 114);">// If we get a NullPointerException or</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(78, 144, 114);">// ClassCastException here,</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(78, 144, 114);">// it would be a bug in the way we create the chain of</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(78, 144, 114);">// parents.</div></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Is this a bug?  If so, how can I work around it?  If not, what am I doing wrong?</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Also, I’m building from source code using the JDK7 branch of Apache SIS, and the latest source from GeoToolkit, but have the same problem if I just use binary packages.</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I’m also using locale en_US</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Thanks in advance for any advice you can provide</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Cheers,</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Bret</div></div></div>
</div>
<br></body></html>