Hi, thanks for your help so far
i am getting a connection now but:
I need to connect to 2 different databases on the same db2 instance.
However i can only get a connection to the first database. As soon
as i try to connect to the second database, (having the first
connection
still open) i get an exception.
I can connect to each of the databases separatly but not at the same
time
within one javaprogram.
The problem only occurs when i am locally on the aix machine where the
db2
instance resides. Running the program remotely from a windows machine
works
fine. Is it the IPC connction type the problem because it only works
for
one connection?
Thank you
Steffen
Exception:
COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0119E Unexpected
system failure. SQLSTATE=58004
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGenerator.java(Compiled
Code))
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_r eturn_code(SQLExceptionGenerator.java(Compiled
Code))
at COM.ibm.db2.jdbc.app.DB2Connection.connect(DB2Conn ection.java(Compiled
Code))
at COM.ibm.db2.jdbc.app.DB2Connection.<init>(DB2Conne ction.java:388)
at COM.ibm.db2.jdbc.app.DB2ReusableConnection.<init>( DB2ReusableConnection.java:69)
at COM.ibm.db2.jdbc.DB2PooledConnection.getConnection (DB2PooledConnection.java:188)
at COM.ibm.db2.jdbc.DB2XAConnection.<init>(DB2XAConne ction.java:98)
at COM.ibm.db2.jdbc.DB2XADataSource.getXAConnection(D B2XADataSource.java:101)
at COM.ibm.db2.jdbc.DB2XADataSource.getXAConnection(D B2XADataSource.java:68)
at de.bgnet.pada.ssp.testing.TestDB2Connection.main(T estDB2Connection.java:42)
javacode:
DB2XADataSource sourceAda = new DB2XADataSource();
sourceAda.setDatabaseName("ADABG22");
sourceAda.setPassword("***");
sourceAda.setUser("adatest");
DB2XADataSource sourceTass = new DB2XADataSource();
sourceTass.setDatabaseName("TASSDEV");
sourceTass.setPassword("***");
sourceTass.setUser("adatest");
XAConnection adaXAConnection = sourceAda.getXAConnection();
Connection connectionAda = adaXAConnection.getConnection();
System.out.println("connection ADA=" + connectionAda);
XAConnection xaTASSconnection = sourceTass.getXAConnection();
Connection connectionTass = xaTASSconnection.getConnection();
System.out.println("connection TASS=" + connectionTass);
gl*****@gmx.net (Steffen) wrote in message news:<f7*************************@posting.google.c om>...
hi there,
i have a problem connecting to a db2 database 7.2.4 on AIX using java
when running the javacode on AIX using jdk1.3.1.
The classpath is correctly set to java12/...
on windows the following code works fine for the same database:
DB2XADataSource db2 = new DB2XADataSource();
db2.setDatabaseName("MYDB");
db2.setPassword("test1");
db2.setUser("test1");
xaconnection = db2.getXAConnection();
connection = xaconnection.getConnection();
the database MYDB is configured in the client configuration assistant
on the windows machine
on the AIX machine xaconnection.getConnection() returns null
not even an exception is thrown
i cant figure out why that happens. I tried to set additional
properties
on the DB2XADataSource object, like port and servername, but I still
cant get a connection.
Does anybody know how to get the connection or
how to get more error or trace information.
Thank you.
Steffen