-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: java.sql.SQLException: ORA-00904 : invalid identifier
PostPosted: Wed Jul 26, 2006 5:54 pm 
Newbie

Joined: Wed Jul 26, 2006 5:43 pm
Posts: 2
The table , mappings and the names seem consistent.
The table was created without "" quotes for column names.

What would be the cause of this exception

Hibernate version:
hibernate3.jar

Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd
">

<hibernate-mapping package="snipe.model.favorites">
<class name="Favorites" table="SNIPE_PSP_FAVORITES">
<cache usage="read-write"/>
<id name="id" type="java.lang.Long" column="ID">
<meta attribute="use-in-tostring">true</meta>
<generator class="sequence">
<param name="sequence">SNIPE_PSP_FAVORITES_SEQ</param>
</generator>
</id>
<many-to-one name="userId" column="USER_ID" foreign-key="SNIPE_PSP_FAVORITES_FK_USER" class="snipe.model.User" index="SNIPE_PSP_FAVORIT
ES_USER_INDEX" not-null="true"/>
<property name="treeData" type="java.lang.String" column="TREE_DATA" not-null="true" length="100000">
<meta attribute="use-in-tostring">true</meta>
</property>
<property name="modifiedDate" type="java.sql.Date" column="MODIFIED_DATE" not-null="true"/>
</class>
</hibernate-mapping>

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

[java] Caused by: java.sql.SQLException: ORA-00904: "THIS_"."MODIFIED_DATE": invalid identifier

[java] at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
[java] at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
[java] at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
[java] at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
[java] at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
[java] at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:799)
[java] at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
[java] at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839)
[java] at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132)
[java] at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
[java] at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3329)
[java] at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:211)
[java] at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
[java] at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
[java] at org.hibernate.loader.Loader.doQuery(Loader.java:662)
[java] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
[java] at org.hibernate.loader.Loader.doList(Loader.java:2150)
[java] ... 55 more

Name and version of the database you are using:

Oracle 10g

SQL> describe snipe_psp_favorites;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NUMBER
USER_ID NUMBER
MODIFIED_DATE DATE
TREE_DATA CLOB


The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.