Discussion:
DB2 Error - DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704,
(too old to reply)
g***@gmail.com
2007-09-12 15:04:45 UTC
Permalink
Hi all

My application J2EEruns in jboss. I have migrated my database from a windows machine to a Linux machine.

Jboss is starting without any error
The application runs fine when running with the database in the windows machine. But when i try to run it with the database in the Linux machine (which is migrated from windows). It shows the following in the log file,


ERROR [http-0.0.0.0-8080-1] com.infosys.saas.ecomm.catalog.dao.CatalogmasterDAOImpl - Error at the time of executing the query = CatalogmasterSearchQuery.Message :DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704, SQLERRMC: cataloguser.TCATALOG_MASTER
com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704, SQLERRMC: cataloguser.TCATALOG_MASTER

Help neded to fix this.



Thankx in advance,
Gokul
Doug Doole
2007-09-13 12:54:01 UTC
Permalink
This post might be inappropriate. Click to display it.
c***@yahoo.com
2007-10-04 09:49:01 UTC
Permalink
"DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704, SQLERRMC:"

DRIVER = "com.ibm.db2.jcc.DB2Driver";
URL = "jdbc:db2://localhost:50000/SPT";
UID = "DB2ADMIN";
PASSWORD = "******";


caused by: table cannot be found by the login ID and password.



solved this by adding Schema of that table within sql statement.

before added, this bring error
sql: "SELECT * FROM tmp"

after added
sql: "SELECT * FROM Schema.tmp"




in my case from the picture i attached:
sql: "SELECT * FROM COMPANY"

after added
sql: "SELECT * FROM billson.COMPANY"

then Connection successful!
nice day,
billson.

Loading...