<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Null Pointer Exception when loading WMS layer in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/null-pointer-exception-when-loading-wms-layer/m-p/88556#M249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I recently incorporated a map into an existing project and I am receiving a null pointer exception when trying to load a wms layer. I found that the project has a dependency on a jar called "xerces.jar".&amp;nbsp; This jar has a resource in it that sets the SAXParserFactory implementation to be org.apache.xerces.jaxp.SAXParserFactoryImpl.&amp;nbsp; When this jar is not included, the SAXParserFactory implementation that is used is com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl and the wms layer loads fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was wondering if anyone has encountered this issue and had a work around.&amp;nbsp; I am unable to remove the dependency from the project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the stack trace:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;java.lang.NullPointerException&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.core.internal.tasks.f.a.a(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.core.internal.tasks.f.a.endDocument(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.core.internal.tasks.f.b.a(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.map.WmsDynamicMapServiceLayer.internalInit(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.map.Layer$1.run(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.util.concurrent.FutureTask.run(FutureTask.java:166)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.lang.Thread.run(Thread.java:722)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Jan 2014 15:34:20 GMT</pubDate>
    <dc:creator>danielconrad</dc:creator>
    <dc:date>2014-01-03T15:34:20Z</dc:date>
    <item>
      <title>Null Pointer Exception when loading WMS layer</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/null-pointer-exception-when-loading-wms-layer/m-p/88556#M249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I recently incorporated a map into an existing project and I am receiving a null pointer exception when trying to load a wms layer. I found that the project has a dependency on a jar called "xerces.jar".&amp;nbsp; This jar has a resource in it that sets the SAXParserFactory implementation to be org.apache.xerces.jaxp.SAXParserFactoryImpl.&amp;nbsp; When this jar is not included, the SAXParserFactory implementation that is used is com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl and the wms layer loads fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was wondering if anyone has encountered this issue and had a work around.&amp;nbsp; I am unable to remove the dependency from the project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the stack trace:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;java.lang.NullPointerException&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.core.internal.tasks.f.a.a(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.core.internal.tasks.f.a.endDocument(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.core.internal.tasks.f.b.a(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.map.WmsDynamicMapServiceLayer.internalInit(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.map.Layer$1.run(Unknown Source)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.util.concurrent.FutureTask.run(FutureTask.java:166)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at java.lang.Thread.run(Thread.java:722)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 15:34:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/null-pointer-exception-when-loading-wms-layer/m-p/88556#M249</guid>
      <dc:creator>danielconrad</dc:creator>
      <dc:date>2014-01-03T15:34:20Z</dc:date>
    </item>
  </channel>
</rss>

