Receiving "TableDoesNotExistException" messages when using datasource
 Technote (troubleshooting)
 
Problem(Abstract)
The version 4 datasource in IBM® WebSphere® Application Server is configured properly, but when an application uses the datasource the following exception is logged:

com.ibm.ejs.cm.portability.TableDoesNotExistException: [IBM][CLI
Driver][DB2] SQL0204N "ABC.TABLE1" is an undefined name.
SQLSTATE=42704

For Oracle data sources, the exception would have an Oracle reason code, such as
com.ibm.ejs.cm.portability.TableDoesNotExistException: ORA-00942: table or view does not exist
 
Cause
The cause of this problem is that there are two V4 datasource definitions, each with a unique JNDI Name but with the same datasource name. The database referenced in the configured datasource does contain the table ABC.TABLE1.

Unique datasource names were enforced in WebSphere Application Server V3.5 and V4.0, but this is not enforced in WebSphere Application Server V5.0 and V6.0. This is due to the distributed nature of the later versions and is working as designed.
 
Resolving the problem
Ensure that each datasource name is unique.

(For example: V5 - Administrative console > JDBC Providers > Data Sources > [Your DS] > Name)

 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > DB Connections/Connection Pooling
Operating system(s): Windows
Software version: 6.1
Software edition:
Reference #: 1207460
IBM Group: Software Group
Modified date: May 25, 2005