"failed to create an XPathFactory" with Grails 1.1/Tomcat5/OpenJDK 1.6.0/CentOS 5.3

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

"failed to create an XPathFactory" with Grails 1.1/Tomcat5/OpenJDK 1.6.0/CentOS 5.3

Sean Gilligan-2
I'm trying to run a newly created (one model object and one scaffolded
controller) Grails 1.1 application under Tomcat 5 on CentOS 5.3.

CentOS 5.3 is a binary-compatible derivative of Red Hat Enterprise Linux
5.3.  I have all the latest (as of today) updates
(java-1.6.0-openjdk-1.6.0.0-0.30.b09.el5, tomcat5-5.5.23-0jpp.7.el5_2.1)


I worked around the log4j path problem by creating a tomcat-writable
logfile in
/usr/share/tomcat5/stacktrace.log

I this logfile I'm getting a stack trace that begins:

2009-04-23 11:23:40,078 [http-8080-Processor24] ERROR StackTrace  -
Sanitizing stacktrace:
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 XP
thFctory implementation found for the object model:
http://java.sun.com/jaxp/xpath/dom
    at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)
    at
org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean.afterPropertiesSet(GrailsApplicationFactoryBean.java:84)
    at

 From googling around I believe it is a classpath issue, but I'm not
quite sure what to do.   I also noticed that there may be change to
remove use of XPath in Grails 1.1.1 as a similar issue was occurring on
Google app engine.

Any suggestions?

full stack trace:
------------------------------------------------
2009-04-23 11:23:40,078 [http-8080-Processor24] ERROR StackTrace  -
Sanitizing stacktrace:
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 XP
thFctory implementation found for the object model:
http://java.sun.com/jaxp/xpath/dom
    at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)
    at
org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean.afterPropertiesSet(GrailsApplicationFactoryBean.java:84)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
    at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
    at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
    at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
    at
org.codehaus.groovy.grails.web.context.GrailsContextLoader.createWebApplicationContext(GrailsContextLoader.java:65)
    at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
    at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
    at
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1176)
    at
org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:545)
    at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:105)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
    at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    at java.lang.Thread.run(Thread.java:636)
2009-04-23 11:23:40,101 [http-8080-Processor24] ERROR StackTrace  -
Sanitizing stacktrace:
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'grailsApplication' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Invocation of init method failed;
nested exception is java.lang.RuntimeExcepti
n: 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 XPathFctory
implementation
ound for the object model: http://java.sun.com/jaxp/xpath/dom
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
    at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
    at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
    at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
    at
org.codehaus.groovy.grails.web.context.GrailsContextLoader.createWebApplicationContext(GrailsContextLoader.java:65)
    at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
    at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
    at
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1176)
    at
org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:545)
    at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:105)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
    at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    at java.lang.Thread.run(Thread.java:636)
Caused by: 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.XPathFactoryConfigurationExcep
ion: No XPathFctory implementation found for the object model:
http://java.sun.com/jaxp/xpath/dom
    at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
    at
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1176)
    at
org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:545)
    at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:105)


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: "failed to create an XPathFactory" with Grails 1.1/Tomcat5/OpenJDK 1.6.0/CentOS 5.3

Chanwit Kaewkasi
On Thu, Apr 23, 2009 at 9:50 PM, Sean Gilligan <[hidden email]> wrote:
> I also noticed that there may be change to
> remove use of XPath in Grails 1.1.1 as a similar issue was occurring on
> Google app engine.
>

Yes, it has been removed to use Groovy's XmlSlurper already in 1.1.1-snapshot.

Best regards,

Chanwit

--
Chanwit Kaewkasi
PhD Candidate,
Centre for Novel Computing
School of Computer Science
The University of Manchester
Oxford Road
Manchester
M13 9PL, UK

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: "failed to create an XPathFactory" with Grails 1.1/Tomcat5/OpenJDK 1.6.0/CentOS 5.3

Chanwit Kaewkasi
In reply to this post by Sean Gilligan-2
On Thu, Apr 23, 2009 at 9:50 PM, Sean Gilligan <[hidden email]> wrote:
> I'm trying to run a newly created (one model object and one scaffolded
> controller) Grails 1.1 application under Tomcat 5 on CentOS 5.3.
>
> Any suggestions?

Do not know if dropping a set of jars from Xalan into the app (or the
server lib path) might help.

Cheers,

Chanwit

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: "failed to create an XPathFactory" with Grails 1.1/Tomcat5/OpenJDK 1.6.0/CentOS 5.3

Sean Gilligan-2
I put xalan-2.7.0.jar in %PROJECT_HOME%/lib and then rebuilt and deployed the war and now it works!

Thanks,

Sean


Chanwit Kaewkasi wrote:
On Thu, Apr 23, 2009 at 9:50 PM, Sean Gilligan [hidden email] wrote:
  
I'm trying to run a newly created (one model object and one scaffolded
controller) Grails 1.1 application under Tomcat 5 on CentOS 5.3.

Any suggestions?
    

Do not know if dropping a set of jars from Xalan into the app (or the
server lib path) might help.

Cheers,

Chanwit

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email