New issue 122 by Zoram...@gmail.com: Error Parsing XML document on discovery
http://code.google.com/p/openid4java/issues/detail?id=122
What steps will reproduce the problem?
1. `ant jar` to build from source (r640)
2. Use a google profile URL as the identifier (ex:
http://www.google.com/profiles/<profile name>)
3. Discovery throws parsing exception
What is the expected output? What do you see instead?
Expected to properly discover the openID provider for the google profile.
Instead it throws a parsing error that is not there in older versions.
What version of the product are you using? On what operating system?
r640 on Ubuntu 10.04
Please provide any additional information below.
0x70d: Error parsing XML document
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source):-1
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source):-1
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121):121
at
org.openid4java.discovery.xrds.XrdsParserImpl.parseXmlInput(XrdsParserImpl.java:188):188
at
org.openid4java.discovery.xrds.XrdsParserImpl.parseXrds(XrdsParserImpl.java:50):50
at
org.openid4java.discovery.yadis.YadisResolver.retrieveXrdsDocument(YadisResolver.java:282):282
at
org.openid4java.discovery.yadis.YadisResolver.discover(YadisResolver.java:237):237
at
org.openid4java.discovery.yadis.YadisResolver.discover(YadisResolver.java:221):221
at
org.openid4java.discovery.yadis.YadisResolver.discover(YadisResolver.java:179):179
at org.openid4java.discovery.Discovery.discover(Discovery.java:134):134
at org.openid4java.discovery.Discovery.discover(Discovery.java:114):114
at
org.openid4java.consumer.ConsumerManager.discover(ConsumerManager.java:527):527
I'm having the same error (using the trunk), it seems to be due to XRI
resolution error.
Could be due to incomplete XML catalog or XML parser version ?
After further investigations, disabling the validation and schema
declarations works.
So I checked the XML parser used, and for some reason I was using an old
version of xerces.
Using xerces 2.6+ solves the problem.
PS: In my environment it's quite easy to upgrade xerces, though I guess it
may be impossible for some people for whatever reason, it would be nice to
disable XML validation.
I am still having this problem, even though I am using xerces 2.8.1
I am using Caucho Resin with Xerces set as the DocumentBuilder/SaxParser
factories.
My stacktrace is like such:
[16:31:46,105] ERROR - "Error constructing AuthRequest for OpenId Auth" -
http--
8081-7 com.mnp.mc.openid.sso.OpenIdConsumerManager.authRequest:?
org.openid4java.discovery.DiscoveryException: 0x70d: Error parsing XML
document
at
org.openid4java.discovery.xrds.XrdsParserImpl.parseXmlInput(XrdsParse
rImpl.java:197)
at
org.openid4java.discovery.xrds.XrdsParserImpl.parseXrds(XrdsParserImp
l.java:50)
at
org.openid4java.discovery.yadis.YadisResolver.retrieveXrdsLocation(Ya
disResolver.java:409)
at
org.openid4java.discovery.yadis.YadisResolver.discover(YadisResolver.
java:233)
at
org.openid4java.discovery.yadis.YadisResolver.discover(YadisResolver.
java:221)
at
org.openid4java.discovery.yadis.YadisResolver.discover(YadisResolver.
java:179)
at org.openid4java.discovery.Discovery.discover(Discovery.java:134)
at org.openid4java.discovery.Discovery.discover(Discovery.java:114)
at
org.openid4java.consumer.ConsumerManager.discover(ConsumerManager.jav
a:527)
at com.mnp.mc.openid.sso.OpenIdConsumerManager.authRequest(Unknown
Sourc
e)
and also this...
Caused by: org.xml.sax.SAXParseException: s4s-att-invalid-value: Invalid
attribu
te value for 'targetNamespace' in element 'schema'. Recorded reason:
cvc-datatyp
e-valid.1.2.1: 'xri://$xrd*($v*2.0)' is not a valid value for 'anyURI'.
Any help with this would be greatly appreciated.
I had the exact same error. It appeared that I had multiple versions of
xcerces in the .war file. Removing the old one fixed the problem.