Unix Technical Forum

DB2 Codepage conversion problem with XML

This is a discussion on DB2 Codepage conversion problem with XML within the DB2 forums, part of the Database Server Software category; --> Hi all, i have the following problem. I'm using a DB2-Client V7 on a Linux-Server from a Java-Application. This ...


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 02:44 PM
cma2
 
Posts: n/a
Default DB2 Codepage conversion problem with XML


Hi all,



i have the following problem.



I'm using a DB2-Client V7 on a Linux-Server from a Java-Application.

This application connected to zOS(OS390)/DB2 V7 with the App-Driver
(db2java.zip).

Because I can't use Unicode on the zOS/DB2, I have disable Unicode in
the "db2cli.ini" on the DB2-Client (disableunicode=1).





More detailed Information about the systems:



Linux-Server:

java: 1.4.1_04, Java HotSpot(TM) Client VM mixed mode

os: Linux version 2.4.21 on i386

encoding: ISO-8859-15



DB2-Client:

driver: IBM DB2 JDBC 2.0 Type 2 (App-Driver from
../java12/db2java.zip)

version: 07.02.0008

isolation: read committed

opened to: jdbc:db2:adb

set in "db2cli.ini" "disableunicode=1" in the "[common]"-section



z/OS:

os-version: sorry, don't know the version



DB2:

database: DB2 OS/390

version: 07.01.0001

codepage: 273 (EBCDIC 8-Bit ?)





When I store data in a char-field on the zOS-Side everything works
great. Also characters over 0xFF was converted/translated. All these
characters where stored in the zOS/DB2 as 0x3F (I know, that I lost

the information what character it was, but it is ok).



But now my problem begin.

When the Java-Application read the data, it parsed the data with a XML-
Parser. Everything works fine until it get a character with the code
0x3F, because of codepage conversion the java-application get a
character with a hexcode 0x1A, and the XML-Parser throws an

exception that 0x1A is an illegal XML character.



Here the error:

Error: editor.proxy: Error while reading sgml

Unzulässiges XML-Zeichen: 

org.xml.sax.SAXParseException: Unzulässiges XML-Zeichen: 

at org.apache.crimson.parser.InputEntity.fatal(InputE ntity.java:1100)

at

org.apache.crimson.parser.InputEntity.parsedConten t(InputEntity.java:59-
3)

at org.apache.crimson.parser.Parser2.content(Parser2. java:1826)

at org.apache.crimson.parser.Parser2.maybeElement(Par ser2.java:1507)

at org.apache.crimson.parser.Parser2.content(Parser2. java:1779)

at org.apache.crimson.parser.Parser2.maybeElement(Par ser2.java:1507)

at org.apache.crimson.parser.Parser2.parseInternal(Pa rser2.java:500)

at org.apache.crimson.parser.Parser2.parse(Parser2.ja va:305)

at

org.apache.crimson.parser.XMLReaderImpl.parse(XMLR eaderImpl.java:442)

at

org.xml.sax.helpers.XMLReaderAdapter.parse(XMLRead erAdapter.java:223)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 02:45 PM
DB2
 
Posts: n/a
Default Re: DB2 Codepage conversion problem with XML

You might consider other drivers (StarSQL for example -
www.starquest.com) to see if the problem is related to the driver.

Bob

cma2 <member38827@dbforums.com> wrote in message news:<3349126.1063133691@dbforums.com>...
> Hi all,
>
>
>
> i have the following problem.
>
>
>
> I'm using a DB2-Client V7 on a Linux-Server from a Java-Application.
>
> This application connected to zOS(OS390)/DB2 V7 with the App-Driver
> (db2java.zip).
>
> Because I can't use Unicode on the zOS/DB2, I have disable Unicode in
> the "db2cli.ini" on the DB2-Client (disableunicode=1).
>
>
>
>
>
> More detailed Information about the systems:
>
>
>
> Linux-Server:
>
> java: 1.4.1_04, Java HotSpot(TM) Client VM mixed mode
>
> os: Linux version 2.4.21 on i386
>
> encoding: ISO-8859-15
>
>
>
> DB2-Client:
>
> driver: IBM DB2 JDBC 2.0 Type 2 (App-Driver from
> ../java12/db2java.zip)
>
> version: 07.02.0008
>
> isolation: read committed
>
> opened to: jdbc:db2:adb
>
> set in "db2cli.ini" "disableunicode=1" in the "[common]"-section
>
>
>
> z/OS:
>
> os-version: sorry, don't know the version
>
>
>
> DB2:
>
> database: DB2 OS/390
>
> version: 07.01.0001
>
> codepage: 273 (EBCDIC 8-Bit ?)
>
>
>
>
>
> When I store data in a char-field on the zOS-Side everything works
> great. Also characters over 0xFF was converted/translated. All these
> characters where stored in the zOS/DB2 as 0x3F (I know, that I lost
>
> the information what character it was, but it is ok).
>
>
>
> But now my problem begin.
>
> When the Java-Application read the data, it parsed the data with a XML-
> Parser. Everything works fine until it get a character with the code
> 0x3F, because of codepage conversion the java-application get a
> character with a hexcode 0x1A, and the XML-Parser throws an
>
> exception that 0x1A is an illegal XML character.
>
>
>
> Here the error:
>
> Error: editor.proxy: Error while reading sgml
>
> Unzulässiges XML-Zeichen:
>
> org.xml.sax.SAXParseException: Unzulässiges XML-Zeichen:
>
> at org.apache.crimson.parser.InputEntity.fatal(InputE ntity.java:1100)
>
> at
>
> org.apache.crimson.parser.InputEntity.parsedConten t(InputEntity.java:59-
> 3)
>
> at org.apache.crimson.parser.Parser2.content(Parser2. java:1826)
>
> at org.apache.crimson.parser.Parser2.maybeElement(Par ser2.java:1507)
>
> at org.apache.crimson.parser.Parser2.content(Parser2. java:1779)
>
> at org.apache.crimson.parser.Parser2.maybeElement(Par ser2.java:1507)
>
> at org.apache.crimson.parser.Parser2.parseInternal(Pa rser2.java:500)
>
> at org.apache.crimson.parser.Parser2.parse(Parser2.ja va:305)
>
> at
>
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLR eaderImpl.java:442)
>
> at
>
> org.xml.sax.helpers.XMLReaderAdapter.parse(XMLRead erAdapter.java:223)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:58 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com