Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Getting error ORA-00904: "THIS_". on model

873139Jul 4 2011 — edited Jul 4 2011
I am wiring 2 pre existing (hibernate) model classes to my Gails 1.3 app.
I get this error on both model classes. Interestingly in both cases the
error is flagged on the last column in each table.

How can I resolve this?

Here is one error msg in full and corresponding model class.

Error 500: Executing action [list] of controller [org.hbsp.cl.hwf.model.HMMModuleController] caused exception: could not execute query; SQL [select this_.module_id as module1_2_0_, this_.abbreviation as abbrevia2_2_0_, this_.forum_id as forum3_2_0_, this_.name as name2_0_, this_.path as path2_0_, this_.product_id as product6_2_0_, this_.product_name as product7_2_0_ from hmm_module this_]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
Servlet: grails
URI: /mmt_admin/grails/HMMModule/list.dispatch
Exception Message: ORA-00904: "THIS_"."PRODUCT_NAME": invalid identifier
Caused by: ORA-00904: "THIS_"."PRODUCT_NAME": invalid identifier
Class: HMMModuleController
At Line: [13]


java.sql.SQLSyntaxErrorException: ORA-00904: "THIS_"."PRODUCT_NAME": invalid identifier


at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)

at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)

at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)

at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)

at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)

at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)

at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:863)

at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)
:
:



@Entity
@Table(name = "HMM_MODULE")
public class HMMModule implements Serializable {
:
:

@Column(name = "product_name", length = 12, nullable = false)
private String productName;

public HMMModule() {
}

:
:

public void setProductName(String productName) {
this.productName = productName;
}

public String getProductName() {
return productName;
}

}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 1 2011
Added on Jul 4 2011
1 comment
2,878 views