|
From: <leg...@at...> - 2003-09-11 16:16:28
|
Message:
The following issue has been closed.
Resolver: Gavin King
Date: Thu, 11 Sep 2003 11:16 AM
PLease do not report bugs in your application to Hibernate JIRA! This is for bugs in HIbernate.
Please use the User Forum for this.
(The problem is probably that you are using Oracle9Dialect with Oracle8 or something like that.)
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-324
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-324
Summary: ORA-00933: SQL command not properly ended
Type: Bug
Status: Closed
Priority: Major
Resolution: REJECTED
Project: Hibernate2
Versions:
2.0.1
2.0.3
Assignee:
Reporter: Andreas Rudolf
Created: Thu, 11 Sep 2003 9:13 AM
Updated: Thu, 11 Sep 2003 11:16 AM
Environment: Linux, JDK 1.4.1_01
Description:
An session.delete("from LeafVO"); throws an exception on oracle. MySQL works without problems.
I would like to attach a small testcase, but it seems not possible here. So I just make a copy/paste of the schema and the log.
Best regards
Andy
================== hbm.log =============================
DEBUG main - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath under net/sf/hibernate/ <net.sf.hibernate.util.DTDEntityResolver>
DEBUG main - found http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath <net.sf.hibernate.util.DTDEntityResolver>
DEBUG main - Processing mapping for class: CompositeVO <net.sf.hibernate.tool.hbm2java.ClassMapping>
DEBUG main - Processing mapping for class: LeafVO <net.sf.hibernate.tool.hbm2java.ClassMapping>
DEBUG main - Writing /home/andy/karodev/hibernate-testenv/generate/CompositeVO.java <net.sf.hibernate.tool.hbm2java.Generator>
DEBUG main - Writing /home/andy/karodev/hibernate-testenv/generate/LeafVO.java <net.sf.hibernate.tool.hbm2java.Generator>
INFO main - Hibernate 2.0.3 <net.sf.hibernate.cfg.Environment>
INFO main - hibernate.properties not found <net.sf.hibernate.cfg.Environment>
INFO main - using CGLIB reflection optimizer <net.sf.hibernate.cfg.Environment>
INFO main - JVM proxy support: true <net.sf.hibernate.cfg.Environment>
INFO main - Mapping file: schema.hbm.xml <net.sf.hibernate.cfg.Configuration>
DEBUG main - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath under net/sf/hibernate/ <net.sf.hibernate.util.DTDEntityResolver>
DEBUG main - found http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath <net.sf.hibernate.util.DTDEntityResolver>
INFO main - Mapping class: CompositeVO -> composite <net.sf.hibernate.cfg.Binder>
DEBUG main - Mapped property: oid -> Oid, type: long <net.sf.hibernate.cfg.Binder>
DEBUG main - Mapped property: eid -> Eid, type: string <net.sf.hibernate.cfg.Binder>
DEBUG main - Mapped property: name -> Name, type: string <net.sf.hibernate.cfg.Binder>
DEBUG main - Mapped property: type -> Type, type: string <net.sf.hibernate.cfg.Binder>
INFO main - Mapping joined-subclass: LeafVO -> leaf <net.sf.hibernate.cfg.Binder>
DEBUG main - Mapped property: nominalValue -> NominalValue, type: double <net.sf.hibernate.cfg.Binder>
INFO main - Using dialect: net.sf.hibernate.dialect.Oracle9Dialect <net.sf.hibernate.dialect.Dialect>
INFO main - processing one-to-many association mappings <net.sf.hibernate.cfg.Configuration>
INFO main - processing foreign key constraints <net.sf.hibernate.cfg.Configuration>
DEBUG main - resolving reference to class: CompositeVO <net.sf.hibernate.cfg.Configuration>
INFO main - processing one-to-many association mappings <net.sf.hibernate.cfg.Configuration>
INFO main - processing foreign key constraints <net.sf.hibernate.cfg.Configuration>
INFO main - Hibernate 2.0.3 <net.sf.hibernate.cfg.Environment>
INFO main - hibernate.properties not found <net.sf.hibernate.cfg.Environment>
INFO main - using CGLIB reflection optimizer <net.sf.hibernate.cfg.Environment>
INFO main - JVM proxy support: true <net.sf.hibernate.cfg.Environment>
INFO main - Mapping file: schema.hbm.xml <net.sf.hibernate.cfg.Configuration>
DEBUG main - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath under net/sf/hibernate/ <net.sf.hibernate.util.DTDEntityResolver>
DEBUG main - found http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath <net.sf.hibernate.util.DTDEntityResolver>
INFO main - Mapping class: CompositeVO -> composite <net.sf.hibernate.cfg.Binder>
DEBUG main - Mapped property: oid -> Oid, type: long <net.sf.hibernate.cfg.Binder>
DEBUG main - Mapped property: eid -> Eid, type: string <net.sf.hibernate.cfg.Binder>
DEBUG main - Mapped property: name -> Name, type: string <net.sf.hibernate.cfg.Binder>
DEBUG main - Mapped property: type -> Type, type: string <net.sf.hibernate.cfg.Binder>
INFO main - Mapping joined-subclass: LeafVO -> leaf <net.sf.hibernate.cfg.Binder>
DEBUG main - Mapped property: nominalValue -> NominalValue, type: double <net.sf.hibernate.cfg.Binder>
INFO main - processing one-to-many association mappings <net.sf.hibernate.cfg.Configuration>
INFO main - processing foreign key constraints <net.sf.hibernate.cfg.Configuration>
DEBUG main - resolving reference to class: CompositeVO <net.sf.hibernate.cfg.Configuration>
INFO main - building session factory <net.sf.hibernate.impl.SessionFactoryImpl>
DEBUG main - instantiating session factory with properties: {hibernate.connection.username=jtest, hibernate.connection.password=jtest, hibernate.dialect=net.sf.hibernate.dialect.Oracle9Dialect, hibernate.connection.url=jdbc:oracle:thin:@ldb2:1521:ldb2, hibernate.connection.driver_class=oracle.jdbc.OracleDriver} <net.sf.hibernate.impl.SessionFactoryImpl>
INFO main - Using dialect: net.sf.hibernate.dialect.Oracle9Dialect <net.sf.hibernate.dialect.Dialect>
INFO main - Hibernate connection pool size: 20 <net.sf.hibernate.connection.DriverManagerConnectionProvider>
INFO main - using driver: oracle.jdbc.OracleDriver at URL: jdbc:oracle:thin:@ldb2:1521:ldb2 <net.sf.hibernate.connection.DriverManagerConnectionProvider>
INFO main - connection properties: {user=jtest, password=jtest} <net.sf.hibernate.connection.DriverManagerConnectionProvider>
INFO main - Use outer join fetching: true <net.sf.hibernate.impl.SessionFactoryImpl>
DEBUG main - total checked-out connections: 0 <net.sf.hibernate.connection.DriverManagerConnectionProvider>
DEBUG main - opening new JDBC connection <net.sf.hibernate.connection.DriverManagerConnectionProvider>
DEBUG main - created connection to: jdbc:oracle:thin:@ldb2:1521:ldb2, Isolation Level: 2 <net.sf.hibernate.connection.DriverManagerConnectionProvider>
DEBUG main - returning connection to pool, pool size: 1 <net.sf.hibernate.connection.DriverManagerConnectionProvider>
INFO main - Use scrollable result sets: true <net.sf.hibernate.impl.SessionFactoryImpl>
INFO main - JDBC 2 max batch size: 15 <net.sf.hibernate.impl.SessionFactoryImpl>
DEBUG main - initializing class SessionFactoryObjectFactory <net.sf.hibernate.impl.SessionFactoryObjectFactory>
DEBUG main - registered: 4028e585f790eab200f790eaba930000 (unnamed) <net.sf.hibernate.impl.SessionFactoryObjectFactory>
INFO main - no JDNI name configured <net.sf.hibernate.impl.SessionFactoryObjectFactory>
INFO main - Query language substitutions: {} <net.sf.hibernate.impl.SessionFactoryImpl>
DEBUG main - instantiated session factory <net.sf.hibernate.impl.SessionFactoryImpl>
DEBUG main - opened session <net.sf.hibernate.impl.SessionImpl>
DEBUG main - delete: from LeafVO <net.sf.hibernate.impl.SessionImpl>
DEBUG main - find: from LeafVO <net.sf.hibernate.impl.SessionImpl>
DEBUG main - compiling query <net.sf.hibernate.hql.QueryTranslator>
DEBUG main - flushing session <net.sf.hibernate.impl.SessionImpl>
DEBUG main - Flushing entities and processing referenced collections <net.sf.hibernate.impl.SessionImpl>
DEBUG main - Processing unreferenced collections <net.sf.hibernate.impl.SessionImpl>
DEBUG main - Scheduling collection removes/(re)creates/updates <net.sf.hibernate.impl.SessionImpl>
DEBUG main - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects <net.sf.hibernate.impl.SessionImpl>
DEBUG main - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections <net.sf.hibernate.impl.SessionImpl>
DEBUG main - Dont need to execute flush <net.sf.hibernate.impl.SessionImpl>
DEBUG main - HQL: from LeafVO <net.sf.hibernate.hql.QueryTranslator>
DEBUG main - SQL: select leafvo0_.Oid as Oid, leafvo0_.NominalValue as NominalV2_1_, leafvo0__1.Eid as Eid0_, leafvo0__1.Name as Name0_, leafvo0__1.Type as Type0_ from leaf leafvo0_ inner join composite leafvo0__1 on leafvo0_.Oid=leafvo0__1.Oid <net.sf.hibernate.hql.QueryTranslator>
DEBUG main - about to open: 0 open PreparedStatements, 0 open ResultSets <net.sf.hibernate.impl.BatcherImpl>
DEBUG main - total checked-out connections: 0 <net.sf.hibernate.connection.DriverManagerConnectionProvider>
DEBUG main - using pooled JDBC connection, pool size: 0 <net.sf.hibernate.connection.DriverManagerConnectionProvider>
DEBUG main - prepared statement get: select leafvo0_.Oid as Oid, leafvo0_.NominalValue as NominalV2_1_, leafvo0__1.Eid as Eid0_, leafvo0__1.Name as Name0_, leafvo0__1.Type as Type0_ from leaf leafvo0_ inner join composite leafvo0__1 on leafvo0_.Oid=leafvo0__1.Oid <net.sf.hibernate.impl.SessionFactoryImpl>
DEBUG main - preparing statement <net.sf.hibernate.impl.SessionFactoryImpl>
DEBUG main - SQL Exception <net.sf.hibernate.util.JDBCExceptionReporter>
java.sql.SQLException: ORA-00933: SQL command not properly ended
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:241)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1477)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:677)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2285)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2525)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:452)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:382)
at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:71)
at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:551)
at net.sf.hibernate.loader.Loader.doFind(Loader.java:140)
at net.sf.hibernate.loader.Loader.find(Loader.java:620)
at net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:928)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1343)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1322)
at net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:1457)
at net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:1443)
at TestHibernate.doTest(TestHibernate.java:36)
at TestHibernate.main(TestHibernate.java:50)
WARN main - SQL Error: 933, SQLState: 42000 <net.sf.hibernate.util.JDBCExceptionReporter>
ERROR main - ORA-00933: SQL command not properly ended
<net.sf.hibernate.util.JDBCExceptionReporter>
DEBUG main - done closing: 0 open PreparedStatements, 0 open ResultSets <net.sf.hibernate.impl.BatcherImpl>
DEBUG main - closing statement <net.sf.hibernate.impl.SessionFactoryImpl>
ERROR main - Could not execute query <net.sf.hibernate.util.JDBCExceptionReporter>
java.sql.SQLException: ORA-00933: SQL command not properly ended
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:241)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1477)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:677)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2285)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2525)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:452)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:382)
at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:71)
at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:551)
at net.sf.hibernate.loader.Loader.doFind(Loader.java:140)
at net.sf.hibernate.loader.Loader.find(Loader.java:620)
at net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:928)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1343)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1322)
at net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:1457)
at net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:1443)
at TestHibernate.doTest(TestHibernate.java:36)
at TestHibernate.main(TestHibernate.java:50)
==================schema.hbm.xml =======================
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<!-- ======================================================================== -->
<!-- Composite -->
<!-- ======================================================================== -->
<class name="CompositeVO" table="composite"
>
<id name="oid"
column="Oid"
type="long"
>
<generator class="native"/>
</id>
<property name="eid"
column="Eid"
type="string"
length="30"
not-null="true"
unique="true"
/>
<property name="name"
column="Name"
type="string"
length="50"
/>
<property name="type"
column="Type"
type="string"
length="20"
/>
<joined-subclass name="LeafVO" table="leaf"
>
<!-- Generate all possible classes -->
<key column="Oid"/>
<property
name="nominalValue"
type="java.lang.Double"
update="true"
insert="true"
column="NominalValue"
not-null="false"
>
</property>
</joined-subclass>
</class>
</hibernate-mapping>
========================================================
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|