XPathFactory.newInstance() throwing NullPointerException in Tomcat

View: New views
1 Messages — Rating Filter:   Alert me  

XPathFactory.newInstance() throwing NullPointerException in Tomcat

by david2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We have some code that uses XPathFactory.newInstance().  The code tests fine in the Eclipse debugger, but when we perform a Maven build and deploy the WAR to Tomcat, XPathFactory.newInstance() throws a NullPointerException:


java.lang.NullPointerException
        at javax.xml.xpath.XPathFactoryFinder._newFactory(XPathFactoryFinder.java:222)
        at javax.xml.xpath.XPathFactoryFinder.newFactory(XPathFactoryFinder.java:143)
        at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:185)
        at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:99)
        at com.myorg.myapp.ws.notification.impl.ExtnMessagePatternFilter.accepts(ExtnMessagePatternFilter.java:69)
        at org.apache.muse.ws.notification.impl.FilterCollection.accepts(FilterCollection.java:64)
        at com.myorg.myapp.ws.notification.impl.BufferedSubscriptionManager.publish(BufferedSubscriptionManager.java:73)
        at com.myorg.myapp.ws.notification.impl.NewsNotificationProducer.publish(NewsNotificationProducer.java:38)
        at org.apache.muse.ws.notification.impl.SimpleNotificationProducer.publish(SimpleNotificationProducer.java:420)
        at com.myorg.myapp.ws.handler.DDSHandler.run(DDSHandler.java:304)
        at com.myorg.commons.util.reactor.ReactorAdapter.run(ReactorAdapter.java:19)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)


Any ideas what may be going wrong?

-David
LightInTheBox - Buy quality products at wholesale price