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

Oracle Community | 807581 | 1 decade ago
  1. 0

    ACTION_UPDATE of tables with 32 columns

    Oracle Community | 1 decade ago | 807581
    java.sql.SQLException: ORA-00933: SQL command not properly ended ]
  2. 0

    Hibernate Community • View topic - ORA-00933: SQL command not properly ended

    hibernate.org | 5 months ago
    org.hibernate.exception.GenericJDBCException: could not execute query
  3. 0

    ORA-00933: SQL command not properly ended

    mail-archive.com | 5 months ago
    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

    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
  6. 0

    SQl - ORA-00933 error

    Stack Overflow | 2 years ago | praba
    java.sql.SQLException: ORA-00933: SQL command not properly ended

    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 com.iplanet.jato.model.sql.QueryModelBase.update()
    2. com.iplanet.jato
      ApplicationServletBase.doPost
      1. com.iplanet.jato.model.sql.QueryModelBase.update(QueryModelBase.java:541)
      2. com.iplanet.jato.view.RequestHandlingViewBase.executeAutoUpdatingModel(RequestHandlingViewBase.java:1370)
      3. com.iplanet.jato.view.RequestHandlingViewBase.executeAutoUpdatingModels(RequestHandlingViewBase.java:1222)
      4. com.iplanet.jato.view.RequestHandlingViewBase.handleWebAction(RequestHandlingViewBase.java:1064)
      5. com.iplanet.jato.view.command.WebActionCommand.execute(WebActionCommand.java:77)
      6. com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:308)
      7. com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:802)
      8. com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:740)
      9. com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:571)
      10. com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:957)
      11. com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:615)
      12. com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:473)
      12 frames
    3. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2 frames
    4. Glassfish Core
      StandardWrapperValve$1.run
      1. org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
      2. org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
      3. org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
      3 frames
    5. Java RT
      AccessController.doPrivileged
      1. java.security.AccessController.doPrivileged(Native Method)
      1 frame
    6. Glassfish Core
      StandardPipeline.invoke
      1. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
      2. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
      3. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
      4. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
      5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
      6. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
      6 frames
    7. com.iplanet.ias
      WebContainer.service
      1. com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
      2. com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
      2 frames