Hibernate and DB2 data fetching

蓝咒 提交于 2019-12-11 15:25:39

问题


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?


回答1:


Problem is with database schema.

i was using

schema.tableName

when I use

schema1.tableName

it works. Because in DB schema was schema1.



来源:https://stackoverflow.com/questions/5497875/hibernate-and-db2-data-fetching

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!