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:
|
|