takcy / openid4java

Automatically exported from code.google.com/p/openid4java
Apache License 2.0
0 stars 0 forks source link

TransformerException in discovery parsing HTML for META tag #83

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Try discovery on http://edevil.livejournal.com

What is the expected output? What do you see instead?

The expected output would be to find 

<meta http-equiv="X-XRDS-Location"
content="http://edevil.livejournal.com/data/yadis" />

which is on the page but I think it fails because of this line in the HTML:
<span class='ljuser' lj:user='edevil' style='white-space: nowrap;'>

Notice the lj: prefix in the attribute name.

What version of the product are you using? On what operating system?
Rev: 556

Please provide any additional information below.
java.lang.RuntimeException: javax.xml.transform.TransformerException:
java.lang.RuntimeException: Namespace for prefix 'lj' has not been declared.
        at
org.openid4java.util.OpenID4JavaDOMParser.toXmlString(OpenID4JavaDOMParser.java:
90)
        at
org.openid4java.discovery.yadis.CyberNekoDOMYadisHtmlParser.getHtmlMeta(CyberNek
oDOMYadisHtmlParser.java:43)
        at
org.openid4java.discovery.yadis.YadisResolver.getHtmlMeta(YadisResolver.java:306
)
        at
org.openid4java.discovery.yadis.YadisResolver.retrieveXrdsLocation(YadisResolver
.java:414)
        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.java:527)
        at pt.sapo.web.OpenIDLogin.authRequest(OpenIDLogin.java:127)
        at pt.sapo.web.OpenIDLogin.service(OpenIDLogin.java:104)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2
13)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1
78)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107
)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:425)
        at
org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol
.java:452)
        at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
        at java.lang.Thread.run(Thread.java:595)
Caused by: javax.xml.transform.TransformerException:
java.lang.RuntimeException: Namespace for prefix 'lj' has not been declared.
        at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Transform
erImpl.java:647)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Transform
erImpl.java:279)
        at
org.openid4java.util.OpenID4JavaDOMParser.toXmlString(OpenID4JavaDOMParser.java:
86)
        ... 25 more
Caused by: java.lang.RuntimeException: Namespace for prefix 'lj' has not
been declared.
        at
com.sun.org.apache.xml.internal.serializer.SerializerBase.getNamespaceURI(Serial
izerBase.java:866)
        at
com.sun.org.apache.xml.internal.serializer.SerializerBase.addAttribute(Serialize
rBase.java:406)
        at
com.sun.org.apache.xml.internal.serializer.ToUnknownStream.addAttribute(ToUnknow
nStream.java:286)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:177)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:206)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:206)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:206)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:206)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:206)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:206)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:121)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:85)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(T
ransformerImpl.java:592)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Transform
erImpl.java:638)

Original issue reported on code.google.com by andrefcruz on 30 Jan 2009 at 6:00

GoogleCodeExporter commented 8 years ago
Also, trowing a RuntimeException when there's a problem parsing a page is 
unnecessary
I think. :)

Original comment by andrefcruz on 30 Jan 2009 at 7:28

GoogleCodeExporter commented 8 years ago
Fixed in r564.

Original comment by zhoushu...@gmail.com on 15 Feb 2009 at 11:35