Hi, i get an Oracle Error (ORA-00933: SQL command not properly ended) when trying to run this litte code:
List users = s.createCriteria(User.class).list();
I changed the Config to my Mysql Testdatabase and it works correctly.
Thanks for helping.
Hibernate version: 3.0.5
Config documents:
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:orcl</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.username">xxx</property>
<property name="connection.password">xxx</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
Mapping documents:
<!-- User -->
<class name="User" table="myorcl.hiber.user">
<id name="id" type="integer" column="kUser">
<generator class="increment"/>
</id>
<property name="registerdate" type="timestamp" column="cDate"/>
<property name="lastname" type="string" column="cLastname"/>
<property name="firstname" type="string" column="cFirstname"/>
<property name="email" type="string" column="cEmail"/>
<property name="loginname" type="string" column="cLoginname"/>
<property name="password" type="string" column="cPassword"/>
</class>
Full stack trace of any exception that occurs:
Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:1596)
at org.hibernate.loader.Loader.list(Loader.java:1577)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:111)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1322)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:300)
at taptest.data.UserManager.getUserList(UserManager.java:70)
at taptest.data.UserManager.main(UserManager.java:77)
Caused by: java.sql.SQLException: ORA-00933: SQL command not properly ended
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:420)
at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:896)
at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:452)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:986)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2929)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:120)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1272)
at org.hibernate.loader.Loader.doQuery(Loader.java:391)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
at org.hibernate.loader.Loader.doList(Loader.java:1593)
... 6 more
Name and version of the database you are using: Oracle 10g
The generated SQL (show_sql=true):
Hibernate: select this_.kUser as kUser0_, this_.cDate as cDate0_0_, this_.cLastname as cLastname0_0_, this_.cFirstname as cFirstname0_0_, this_.cEmail as cEmail0_0_, this_.cLoginname as cLoginname0_0_, this_.cPassword as cPassword0_0_ from myorcl.hiber.user this_
|