Grails Openid plugin and Xerces

I just created a grails 1.1 application, and installed the openid plugin. When starting the application, I got the following exception:

2009-03-17 22:25:41,090 [main] ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerManager': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.openid4java.consumer.ConsumerManager]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/xerces/parsers/DOMParser
at java.security.AccessController.doPrivileged(Native Method)
...
Caused by: java.lang.NoClassDefFoundError: org/apache/xerces/parsers/DOMParser
at org.openid4java.discovery.Discovery.(Discovery.java:47)
at org.openid4java.consumer.ConsumerManager.(ConsumerManager.java:51)
... 21 more


I worked around this by dropping xercesImpl-2.6.2.jar in the lib directory of my grails app. This seems to work - I've successfully logged in via my yahoo openid account.

I haven't looked any further into this - time is short already, but I hope this helps you if you stumble across this problem.

Popular posts from this blog

Using the Crystal Reports Java API to generate PDF

No Scope registered for scope request

Using Selenium WebDriver to select JSF/PrimeFaces selectOneMenu options