users@glassfish.java.net

XPathFactory error with Glassfish

From: <forums_at_java.net>
Date: Fri, 17 Feb 2012 15:03:02 -0600 (CST)

I'm trying to use XPath in a bundle and I'm getting the following exception:

java.lang.RuntimeException: XPathFactory#newInstance() failed to create an
XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom
with the XPathFactoryConfigurationException:
javax.xml.xpath.XPathFactoryConfigurationException: No XPathFactory
implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:101)

The thing is that this is a fresh install of Glassfish 3.1.1 (Build 12)
running on Java 1.6. If I make a simple java app:

    public static void main(String[] args) {
        XPath p=XPathFactory.newInstance().newXPath();
        System.out.println(p);
    }

It works ok, so my java is not the problem, the problem is something in
Glassfish. From what I have googled it seems this is usually a class conflict
problem (using xerces/xalan jars in Java 1.5/1.6?). The problem is that I
don't know where to start looking. Please help...


--
[Message sent by forum member 'fawzib']
View Post: http://forums.java.net/node/883619