[jdom-interest] SAXBuilder on OS/390

Kevin Baynes kbaynes at seagullsw.com
Mon Sep 24 06:59:31 PDT 2001


In reply to my own post:
I checked the encoding of the file on the mainframe and it is Cp1047, which
is the EBCDIC code page.

Will Xerces or JDOM.SAXBuilder have any problems if I feed it a file of this
encoding? Do I have to translate the file some way?

> -----Original Message-----
> From: Kevin Baynes [mailto:kbaynes at seagullsw.com]
> Sent: Friday, September 21, 2001 11:39 AM
> To: jdom-interest at jdom.org
> Subject: [jdom-interest] SAXBuilder on OS/390
>
>
>
> I'm having trouble reading in an XML file into SAXBuilder from a Servlet
> in WebSphere on OS/390. It works fine on WAS on NT and Tomcat on NT.
>
> I'v uploaded the file via FTP using ASCII mode, which I think should
> translate it into EBCDIC on the other side. When I download the XML file
> and look at it, it looks fine.
>
> I built some debug code into the servlet, where I get the XML file and
> write it into the debug log prior to giving it to SAXBuilder. The log
> info is below.
>
> Any ideas? Do I need to modify the character encoding prior to giving it
> to JDOM?
>
> --- LOG FILE
> Init Date = Thu Sep 20 06:14:00 PDT 2001
> getDocument(): got the file
> getDocument(): trying to build doc
> getDocument(): building from clear data, code 001
> getDocument(): document =
> 'Loõ»¼@¾Õ˽ÂÌÉ~
¤KÐ
@ÕÉÙÌ¿ÂÉÁ~
"Æ'`>
onLZ``@Z(tm)ÇÆSz@¼ÌÁÂɽ@fSfƏâ@
¼
> ÌÁÂɽK¿oe¿
@``nL¼ÌÁÂɽn@@LϽÕËn@@@@LϽÕËɳ»ÕnP¼oe^ÉÌoe@ÊË̾¿տPÁoe^L
> aϽÕËɳ»Õn@@@@L¼ÌÁÂÉ¿nÌÝÉÕËLa¼ÌÁÂÉ¿n@@@@LÊÝÌË¿nÌÝÉÕËLaÊÝÌË¿n@@@@L³¿
> »ÂɼվռnÌÝÉÕËLa³¿»Âɼվռn@@LaϽÕËn@@LϽÕËn@@@@LϽÕËɳ»ÕnP¼oe^ÉÌoe@Ê
> Ë̾¿տPÁoe^LaϽÕËɳ»Õn@@@@L¼ÌÁÂÉ¿n³¿»ÂÉLa¼ÌÁÂÉ¿n@@@@LÊÝÌË¿n³¿»ÂÉLaÊ
> ÝÌË¿n@@@@L³¿»Âɼվռn³¿»ÂÉLa³¿»Âɼվռn@@LaϽÕËn@@LϽÕËn@@@@LϽÕËɳ»
> ÕnP¼oe^ÉÌoe@ÊË̾¿տPÁoe^LaϽÕËɳ»Õn@@@@L¼ÌÁÂÉ¿n¿Õ»ÌLa¼ÌÁÂÉ¿n@@@@LÊÝ
> ÌË¿n¿Õ»ÌLaÊÝÌË¿n@@@@L³¿»ÂɼվռnϽÕËLa³¿»Âɼվռn@@LaϽÕËn@@LϽÕËn@@
> @@LϽÕËɳ»ÕnP¼oe^ÉÌoe@ÊË̾¿տPÁoe^LaϽÕËɳ»Õn@@@@L¼ÌÁÂÉ¿nϽÕËmö"¢>La¼
> ÌÁÂÉ¿n@@@@LÊÝÌË¿@an@@@@L³¿»ÂɼվռnϽÕËLa³¿»Âɼվռn@@LaϽÕËnLa¼ÌÁÂ
> ɽn'
> getDocument(): Exception: org.jdom.JDOMException: Error on line 1 of
> document
> file:/usr/lpp/WebSphere/AppServer/hosts/default_host/swm/data/logins.xml
> : The root element is required in a well-formed document.
> error in login
>
> --------------------
> Kevin Baynes
> Software Engineer
> kbaynes at seagullsw.com




More information about the jdom-interest mailing list