File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Invalid Column Name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Invalid Column Name" Watch "Invalid Column Name" New topic

Invalid Column Name

pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 303
I am giving the following exception when i call this

2011/06/05 16:43:29 ERROR exceptionOccured( - 3. ResultSet.getString(BRCD_CMPN_NO)
java.sql.SQLException: Invalid column name
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.driver.OracleStatement.get_column_index(
at oracle.jdbc.driver.OracleResultSetImpl.findColumn(
at oracle.jdbc.driver.OracleResultSet.getString(
at net.sf.log4jdbc.ResultSetSpy.getString(
at com.mchange.v2.c3p0.impl.NewProxyResultSet.getString(
at org.hibernate.type.StringType.get(
at org.hibernate.type.NullableType.nullSafeGet(
at org.hibernate.type.NullableType.nullSafeGet(
at org.hibernate.type.AbstractType.hydrate(

Please tell me where i am wrong.
in Mkumar

Joined: Sep 08, 2008
Posts: 20

As per exception "java.sql.SQLException: Invalid column name", as of now i can suggest please verify the name of the databased fields available in the mapping file with database and pojo class.

I believe field name is mismatching some where in the mapping file/pojo with DB.

I agree. Here's the link:
subject: Invalid Column Name
It's not a secret anymore!