FW: IF-FF 1.1 Java Toolkit 1.2 SAXParseException: Premature end of file

"Tran, Canh" <[email protected]> Tue, 26 Apr 2005 10:46:09 -0600
Newsgroups gmane.comp.sourceid.sso.user
Message-ID <129E06032BC8CE4380307A04580C6E4E02322921@milexch01.csg.csgsystems.com>
This is a multi-part message in MIME format.

--===============2126781912==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C54A7F.73550F6F"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C54A7F.73550F6F
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi all,

=20

I have deployed the demo on WebLogic 8.1 and get the following
exception:

=20

throwable class name: org.xml.sax.SAXParseException

toString(): org.xml.sax.SAXParseException: Premature end of file.

getMessage(): Premature end of file.

Document (line,col) where exception occurred: (1,1)

Document PublicId: null

Document SystemId: null

Stack Trace: org.xml.sax.SAXParseException: Premature end of file.

      at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)

      at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
Source)

      at org.sourceid.sso.util.XMLUtils.sendSOAP(XMLUtils.java:536)

      at
org.sourceid.sso.servlets.FederationTerminator.produceRequest(Federation
Terminator.java:233)

      at
org.sourceid.sso.servlets.FederationTerminator.service(FederationTermina
tor.java:87)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

=20

when I 'Terminate Federation' on the SP side.

=20

After some debugging, I was able to track it down to line 532-533 of
XMLUtils.java.

=20

It seems that method.getResponseBodyAsString() does not return null.  I
had to replace line 533 with

if (responseBody =3D=3D null || responseBody.length() =3D=3D 0) {

=20

Has this not happened with anyone else?


------_=_NextPart_001_01C54A7F.73550F6F
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal;
	font-family:Arial;
	color:windowtext;}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:Arial;
	color:teal;
	font-weight:normal;
	font-style:normal;
	text-decoration:none none;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Hi all,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I have deployed the demo on WebLogic 8.1 and get the =
following
exception:<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>throwable class name: =
org.xml.sax.SAXParseException<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>toString(): org.xml.sax.SAXParseException: =
Premature
end of file.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>getMessage(): Premature end of =
file.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>Document (line,col) where exception occurred: =
(1,1)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>Document PublicId: =
null<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>Document SystemId: =
null<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>Stack Trace: org.xml.sax.SAXParseException:
Premature end of file.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.xerces.parsers.DOMParser.parse(Unknown =
Source)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown =
Source)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at =
org.sourceid.sso.util.XMLUtils.sendSOAP(XMLUtils.java:536)<o:p></o:p></sp=
an></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.sourceid.sso.servlets.FederationTerminator.produceRequest(FederationT=
erminator.java:233)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
org.sourceid.sso.servlets.FederationTerminator.service(FederationTerminat=
or.java:87)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at =
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)<o:p></o:p></=
span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>when I &#8216;Terminate Federation&#8217; on the SP =
side.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>After some debugging, I was able to track it down to =
line
532-533 of XMLUtils.java.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>It seems that </span></font><font size=3D2 =
face=3D"Courier New"><span
style=3D'font-size:10.0pt;font-family:"Courier =
New"'>method.getResponseBodyAsString()</span></font><font
size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial'> does not
return null.&nbsp; I had to replace line 533 =
with<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt;
font-family:"Courier New"'>if (responseBody =3D=3D null || =
responseBody.length() =3D=3D
0) {<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Has this not happened with anyone =
else?<o:p></o:p></span></font></p>

</div>

</body>

</html>

------_=_NextPart_001_01C54A7F.73550F6F--

--===============2126781912==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
sso-users mailing list
[email protected]
http://lists.sourceid.org/mailman/listinfo/sso-users

--===============2126781912==--