Select to view content in your preferred language

Null Pointer Exception when loading WMS layer

2093
0
01-03-2014 07:34 AM
danielconrad
Deactivated User
Hi,

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".  This jar has a resource in it that sets the SAXParserFactory implementation to be org.apache.xerces.jaxp.SAXParserFactoryImpl.  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.

I was wondering if anyone has encountered this issue and had a work around.  I am unable to remove the dependency from the project.

Thanks.

Here is the stack trace:

java.lang.NullPointerException
at com.esri.core.internal.tasks.f.a.a(Unknown Source)
at com.esri.core.internal.tasks.f.a.endDocument(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.esri.core.internal.tasks.f.b.a(Unknown Source)
at com.esri.map.WmsDynamicMapServiceLayer.internalInit(Unknown Source)
at com.esri.map.Layer$1.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
0 Kudos
0 Replies