<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4611.1300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Sorry if this message appears again in the future,
I sent it with the wrong email account so it has been retain at the border
(moderator)... Anyway, this one should go through
directly...</FONT><BR><BR>I'm using jdom since early october and I'm
experiencing some problems.<BR>First, the context.<BR><BR>I have a servlet
running on a master server. One of the features of this<BR>servlet is to
be able to send the content of a table in XML, task that seems<BR>to work
well.<BR><BR>I also have a process on a slave server that connect to the master
once in a<BR>while and ask about data for some tables. It seems to work
well also but<BR>for small table. One of the table contains 3442 records
with
this<BR>definition:<BR><BR>
ID int auto_increment NOT
NULL,<BR>
Name char(80) DEFAULT
'',<BR>
Description text DEFAULT
'',<BR>
Creation_Date Datetime DEFAULT
'',<BR>
SIZE int DEFAULT
0,<BR>
Keywords VARCHAR(255) DEFAULT
'',<BR>
SubmitBy int DEFAULT
1,<BR>
Version CHAR(12) DEFAULT
'',<BR>
DirectoryID int DEFAULT
0,<BR>
ProjectID int DEFAULT
1,<BR>
Status int DEFAULT
1,<BR>
Filetype VARCHAR(10) DEFAULT
'',<BR>
CVSID int DEFAULT
0,<BR>
LastUpdated timestamp<BR><BR>As you can see, it's not a really heavy
table. I estimate the whole data<BR>under 500K. Here's an example of
the data I receive:<BR><BR><?xml version="1.0" encoding="UTF-8"
?><BR><Table Name="Artifacts"><BR><Record
Id="8787"><BR><ProjectID>31</ProjectID><BR><SubmitBy>1</SubmitBy><BR><Description
/><BR><DirectoryID>1136</DirectoryID><BR><Creation_Date>2001-02-15
17:15:40</Creation_Date><BR><SIZE>0</SIZE><BR><Name>MyFile.pdf</Name><BR><Filetype>L</Filetype><BR><Status>1</Status><BR><Version
/><BR><Keywords
/><BR><CVSID>98</CVSID><BR><LastUpdated>20010215171540</LastUpdated><BR></Record><BR>...<BR></Table><BR><BR>And
here's the error (not always the same but always about
incorrect<BR>end-tag):<BR><BR>org.jdom.JDOMException: Error on line 2941: The
element type "LastUpdated"<BR>must be terminated by the matching end-tag
"</LastUpdated>".<BR><BR>Finally, here's the code that I use on the client
side:<BR><BR>--- begin ---<BR> unet =
Url.openConnection();<BR> unet.setDoOutput(true);<BR>
unet.setRequestProperty("Cookie", cookie);<BR>
unet.setRequestProperty("content-type",<BR>"application/x-www-form-urlencoded");<BR>
out = new DataOutputStream(unet.getOutputStream());<BR>
out.writeBytes(<BR> "Act=getupdate&tablename=" +
tableName);<BR> out.flush();<BR>
out.close();<BR><BR> SAXBuilder jdom = new
SAXBuilder();<BR> Document doc =
jdom.build(unet.getInputStream());<BR>--- end ---<BR><BR>The exception is
generated in the jdom.build. Based on that, there's big<BR>change that
either the master server don't always send everything (I doubt<BR>on this
because if I connect with a browser, I always get the full result<BR>but it can
take time) or the slave timed-out or lost the connection at
some<BR>point.<BR><BR>What would be the best thing to do in that
situation? Is there something to<BR>know about jdom.build(InputStream)
concerning timeout? Is there a mechanism<BR>already existing that would
give me the capability to establish that a<BR>problem occurs and that would
retry in some way?<BR><BR>Somebody else tried to do something
similar?<BR><BR><BR>Thanks.<BR><BR><BR>Etienne Fortin<BR></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>