Hibernate and DB2 data fetching
Asked Answered
C

1

0

I am using struts and hibernate application. I have a problem while fetching records from DB2 via hibernate.

I am getting this error

14:22:17,804 WARN  [JDBCExceptionReporter] SQL Error: -204, SQLState: 42704
14:22:17,804 ERROR [JDBCExceptionReporter] DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DB2ADMIN.TABLENAME, DRIVER=3.57.82
14:22:17,804 WARN  [JDBCExceptionReporter] SQL Error: -727, SQLState: 56098
14:22:17,804 ERROR [JDBCExceptionReporter] DB2 SQL Error: SQLCODE=-727, SQLSTATE=56098, SQLERRMC=2;-204;42704;DB2ADMIN.TABLENAME, DRIVER=3.57.82
14:22:17,804 WARN  [JDBCExceptionReporter] SQL Error: -727, SQLState: 56098
14:22:17,804 ERROR [JDBCExceptionReporter] DB2 SQL Error: SQLCODE=-727, SQLSTATE=56098, SQLERRMC=2;-204;42704;DB2ADMIN.TABLENAME, DRIVER=3.57.82
14:22:17,804 ERROR [VisualListAction] com.sit.exceptions.DaoException: Unable to fetch tablenameItems.
14:22:17,804 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception

Error code 42704 means that tableName table does not exist. But it exists in the database.

Any idea what could be the problem? Problem with schema or anything else?

Canna answered 31/3, 2011 at 9:41 Comment(0)
C
1

Problem is with database schema.

i was using

schema.tableName

when I use

schema1.tableName

it works. Because in DB schema was schema1.

Canna answered 31/3, 2011 at 10:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.