Issue 122 in openid4java: Error Parsing XML document on discovery

38 views
Skip to first unread message

codesite...@google.com

unread,
Jul 17, 2010, 12:45:09 PM7/17/10
to openid4java-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

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

codesite...@google.com

unread,
Jul 26, 2010, 12:28:25 PM7/26/10
to openid4java-...@googlegroups.com

Comment #1 on issue 122 by nicolas.berthet: Error Parsing XML document on
discovery
http://code.google.com/p/openid4java/issues/detail?id=122

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 ?

codesite...@google.com

unread,
Jul 26, 2010, 1:09:27 PM7/26/10
to openid4java-...@googlegroups.com

Comment #2 on issue 122 by nicolas.berthet: Error Parsing XML document on
discovery
http://code.google.com/p/openid4java/issues/detail?id=122

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.

codesite...@google.com

unread,
Nov 15, 2011, 7:51:06 PM11/15/11
to openid4java-...@googlegroups.com

Comment #3 on issue 122 by sull...@gmail.com: Error Parsing XML document on
discovery
http://code.google.com/p/openid4java/issues/detail?id=122

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.

codesite...@google.com

unread,
Nov 29, 2011, 10:08:47 AM11/29/11
to openid4java-...@googlegroups.com

Comment #4 on issue 122 by erikskog...@gmail.com: Error Parsing XML

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.

codesite...@google.com

unread,
May 28, 2012, 5:47:19 AM5/28/12
to openid4java-...@googlegroups.com

Comment #5 on issue 122 by rpriyank...@gmail.com: Error Parsing XML
I have problem similar to that sull...@gmail.com
I am using Xerces 2.11.0 on Linux and neither I have any other Xerces files.
Any help would be greatly appreciated.


codesite...@google.com

unread,
Aug 16, 2012, 10:19:11 PM8/16/12
to openid4java-...@googlegroups.com

Comment #6 on issue 122 by rpriyank...@gmail.com: Error Parsing XML
I'm running my application from localhost and currently it doesn't have a
domain name. Could that be a reason for failure in discovery process?

codesite...@google.com

unread,
Oct 31, 2012, 7:56:47 PM10/31/12
to openid4java-...@googlegroups.com
Updates:
Status: Fixed

Comment #7 on issue 122 by Johnny.B...@gmail.com: Error Parsing XML
(No comment was entered for this change.)

codesite...@google.com

unread,
May 19, 2013, 10:00:49 PM5/19/13
to openid4java-...@googlegroups.com

Comment #8 on issue 122 by enricogi...@gmail.com: Error Parsing XML
I fixed the issue by updating the version of xmlParserAPIs and xercesImpl
from 2.5 to 2.6.x.


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages