简体   繁体   中英

Hibernate and DB2 data fetching

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?

Problem is with database schema.

i was using

schema.tableName

when I use

schema1.tableName

it works. Because in DB schema was schema1 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM