473,320 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Problem with DB2 XML Extender and JDBC on AS/400

Hello,

I have a problem with the IBM DB2 UDB XML Extender. I`m working on a
iSeries 400 server (AS/400, V5R1) with a
integrated DB2 (my client is NT 4.0 Service Pack 1 with JDK1.1.8). I
want to create XML files out of the DB2 data
using the XML collections method and SQL mapping.
I successfully enabled my database, put the collection.dtd into
DTD_REF, created a DAD file and enabled the
collection (xcolltest01) using the OS/400 command line via Client
Access Express.
I can find the collection in my DB2XML.LIB on the server in the
XML_USAGE file.

To compose the XML document I wrote a Java program. When I start this
program (java testxml4), I always get the following
error message:
java.sql.SQLException: [CEE9901] Anwendungsfehler. MCH3402 nicht
überwacht durch QZXMDB2XML bei
Anweisung 0000000062, Instruktion X'0000'.
at com.ibm.as400.access.JDError,throwSQLException(JDE rror.java:388)
at com.ibm.as400.access.AS400JDBCStatement.commonExec ute(AS400JDBCStatement.java:640)
at com.ibm.as400.access.AS40JBDCPreparedStatement.exe cute(AS400JDBCPreparedStatement.java:692)
at testxml4.<init><testxml4.java:38>
at testxml4.main<testxml4.java:6>

When I enter "java testxml4" again right after the error message came,
I get another error message:
# of rows: 0
ReturnCode: -11
ErrorMessage: DXXQ016 Die Eingabetabelle RESULT_TAB konnte nicht
gefunden werden (my result table hasn`t been found, even though I
created a table with that name before)

This is a very interesting message because there seems to be a
connection to the database, so my java prog seems to
work fine.

I don`t know where the fault is:
1. A wrong way of creating a result table or
2. my java code
1. To create a result table I start SQL from the command line (STRSQL)
and write:
Create table RESULT_TAB(doc varchar(8000))

Then I get the information that the table has been created in QGPL but
without connecting to the journal. I don`t know if this is a problem
´cause I can find the empty table in QGPL.

2. Here`s my full java code that connects to the database and calls
the stored procedure dxxRetrieveXML():
_____
import java.sql.*;

public class testxml4 {
public static void main(String[] args) {
testxml4 mysql;
mysql = new testxml4(
"com.ibm.as400.access.AS400JDBCDriver","jdbc:as400 :S4420B1A", "delta",
"omega");
} //Treibername der DB2-Datenbank; JDBC-URL; Benutzername; Passwort;
means: DB2-Driver; JDBC-URL; Username; Password

public testxml4(String driver, String url, String user, String
password) {
Connection cn;
CallableStatement cs;

try {
Class.forName(driver);
cn = DriverManager.getConnection(url, user, password);

cs = cn.prepareCall("CALL DB2XML.dxxRetrieveXML(?, ?, ?, ?, ?, ?,
?, ?, ?, ?)");
cs.setString(1, "XCOLLTEST01"); // CollectionName
cs.setString(2, "RESULT_TAB"); // result table name
cs.setString(3, "xml_document"); // result column name
cs.setString(4, "valid_document"); // valid column name
cs.setInt(5, 0); // override type
cs.setString(6, "NO_OVERRIDE"); // override
cs.setInt(7, 100); // max # of rows

cs.registerOutParameter(8, Types.INTEGER); // actual # of rows
cs.registerOutParameter(9, Types.INTEGER); // return code
cs.registerOutParameter(10, Types.VARCHAR); // error message text
cs.execute();

System.out.println("# of rows: " + cs.getInt(8));
System.out.println("return Code: " + cs.getInt(9));
System.out.println("Message Text: " + cs.getString(10));
cn.close();

} catch (Exception e) {
e.printStackTrace();
}
}
}
_____

I`m completely frustrated and don`t know what to do. Is there anyone
that can help me solving this problem?

Thanks in advance,
Marc
Nov 12 '05 #1
2 5239
XML Extenders do use an Isolation Level other than NC, so that would require the
table to be journaled/logged. If you create your table in an SQL created
schema, the journaling will happen automatically.
CREATE SCHEMA myschema;
Create table myschema.RESULT_TAB(doc varchar(8000))

You might want to also specify an isolation level on the JDBC connection, I
don't recall the default.

--
Kent Milligan, DB2 & BI team
PartnerWorld for Developers, iSeries
km***@us.eye-bee-m.com (spam trick) GO HAWKEYES!!
www.iseries.ibm.com/db2

(opinions stated are not necessarily those of my employer)
Nov 12 '05 #2
Hi Kent,

thank you so much for your help. I will try to get the table journaled
tomorrow. I thought that my problem could be the
"Not-Connecting-To-The-Journal"-thing, but I had no idea how to create
a journaled table.
Maybe your advice will solve my problem.

Marc
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Stanley Sinclair | last post by:
Bear with me. I am being very calm; took a Valium. I have waited two weeks to write this, because every time I wrote it before the message was, at best, nasty. I need to use the services of...
0
by: rabbit | last post by:
Hi all, i work at moment with DB2 XML Extender und want to update the element's value in the xml documents. I store the xml data in xmlclob column. Using the following commando ...
2
by: Belinda | last post by:
Hi. I am just getting started with DB2's spatial extender and could really use some help. Pointers to good docs or examples are welcome. I am using DB2 version 8 on Sun. I have a database of...
0
by: mailkhurana | last post by:
Hii , I am trying to use a type 2 driver to connect to DB2 0n AIX 5 I have a small java test to class to establish a conneciton with the db .. I am NOT using WAS or any appserver When I try to...
11
by: Brad | last post by:
To DB2 Personal Developer Edition GIS users: How do I acquire a spatial extender license key for the DB2 PDE? I expected to be able to use it right out of the box. Brad
10
by: sssk28 | last post by:
i have installed fedora core 6 and i am getting following error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this...
0
by: silpa | last post by:
Hi, I have a problem with calendar extender. Example: <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:TextBox ID="TextBox1"...
1
malav123
by: malav123 | last post by:
Hi, In my master page i have right pannel, in which i am using the user control and collapsiblePanelExtender and in that right panel there is one link button named "Event", so if user clicks on that...
0
by: wojski696969 | last post by:
Hi.. I'm using ASP.NET AJAX Control Toolkit. I've got collapsible extender (CE) putted inside of modal popup extender (MPE), and there is a problem if i scroll the page when collapsible area is...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.