Breaking News
Home / Java / Java Issues / Hibernate SQL Error: 904

Hibernate SQL Error: 904

Issue

2012-02-21 12:20:00,341[ExecuteThread: ’93’ for queue: ‘default’]DEBUG CustomerDAOFactory
[#23640743#]-method : CustomerAttribDAO
getCustomerAttributesDAO()
2012-02-21 12:20:00,341[ExecuteThread: ’93’ for queue: ‘default’]DEBUG

CustomerAttributesDAOImpl [#23640743#]-method : CustomerAttributes findOrCreateBy(String accountId)
2012-02-21 12:20:00,350[ExecuteThread: ’93’ for queue: ‘default’]WARN JDBCExceptionReporter

[#23640743#]-SQL Error: 904, SQLState: 42000
2012-02-21 12:20:00,350[ExecuteThread: ’93’ for queue: ‘default’]ERROR JDBCExceptionReporter

[#23640743#]-ORA-00904: “CUSTOMERAT0_”.”AUTH_REDUCTION_FLG”: invalid identifier

2012-02-21 12:20:00,350[ExecuteThread: ’93’ for queue: ‘default’]ERROR

CustomerAttributesDAOImpl [#23640743#]-Failed to query the Customer List : could not execute query
org.hibernate.exception.SQLGrammarException

Issue

Basically in this case Hibernate is not able to find the column name ex.AUTH_REDUCTION_FLG so check the database table most likely its not there. Likewise if the column exists check Hibernate mapping may be the column name there is not correct.
[pb_builder]

Check Also

Data truncation: Data too long for column – JDBC

Issue Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column ‘columname‘ at row 1     …

Advertisment ad adsense adlogger