java.sql.SQLException: ORA-00933: SQL command not properly ended

Hibernate JIRA | Andreas Rudolf | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

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

    Hibernate JIRA | 1 decade ago | Andreas Rudolf
    java.sql.SQLException: ORA-00933: SQL command not properly ended
  2. 0

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

    Hibernate JIRA | 1 decade ago | Andreas Rudolf
    java.sql.SQLException: ORA-00933: SQL command not properly ended
  3. 0

    using JTA and JDBC in a servlet, IBM Websphere 5.0.2

    Google Groups | 1 decade ago | Anony
    java.sql.SQLException: ORA-00933: SQL command not properly ended
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Before Report Trigger -- Lexical Parameter Issue

    Oracle Community | 7 years ago | 733009
    java.sql.SQLException: ORA-00933: SQL command not properly ended
  6. 0

    Distibuted query problem

    Oracle Community | 6 years ago | 662435
    java.sql.SQLException: ORA-00933: SQL command not properly ended

  1. rp 1 times, last 4 months ago
26 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.sql.SQLException

    ORA-00933: SQL command not properly ended

    at oracle.jdbc.dbaccess.DBError.throwSqlException()
  2. oracle.jdbc.dbaccess
    DBError.throwSqlException
    1. oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
    1 frame
  3. oracle.jdbc.ttc7
    TTC7Protocol.parseExecuteDescribe
    1. oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:241)
    2. oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    3. oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1477)
    4. oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:677)
    4 frames
  4. Oracle jdbc
    OraclePreparedStatement.executeQuery
    1. oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2285)
    2. oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2525)
    3. oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:452)
    4. oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:382)
    4 frames
  5. net.sf.hibernate
    SessionImpl.delete
    1. net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:71)
    2. net.sf.hibernate.loader.Loader.getResultSet(Loader.java:551)
    3. net.sf.hibernate.loader.Loader.doFind(Loader.java:140)
    4. net.sf.hibernate.loader.Loader.find(Loader.java:620)
    5. net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:928)
    6. net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1343)
    7. net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1322)
    8. net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:1457)
    9. net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:1443)
    9 frames
  6. Unknown
    TestHibernate.main
    1. TestHibernate.doTest(TestHibernate.java:36)
    2. TestHibernate.main(TestHibernate.java:50)
    2 frames