org.pentaho.di.core.exception.KettleDatabaseException: An error occurred executing SQL: SELECT 1 /* this quote ' will cause an error */ FROM dual WHERE sysdate <= ? ORA-00911: invalid character

Pentaho BI Platform Tracking | Dave Greco | 9 years ago
  1. 0

    Single quotes (') inside a query causes an oracle error. I've only verified this behavior in the Table Input step when using "Insert Data from Step". See the attached transform for an example. 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : Unexpected error : 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : org.pentaho.di.core.exception.KettleDatabaseException: 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : An error occurred executing SQL: 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : SELECT 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : 1 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : /* this quote ' will cause an error */ 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : FROM 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : dual 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : WHERE 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : sysdate <= ? 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : ORA-00911: invalid character 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at org.pentaho.di.core.database.Database.openQuery(Database.java:1736) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:200) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:119) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at org.pentaho.di.trans.steps.tableinput.TableInput.run(TableInput.java:326) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : Caused by: java.sql.SQLException: ORA-00911: invalid character 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:799) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1037) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3316) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3361) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at org.pentaho.di.core.database.Database.openQuery(Database.java:1697) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : ... 3 more

    Pentaho BI Platform Tracking | 9 years ago | Dave Greco
    org.pentaho.di.core.exception.KettleDatabaseException: An error occurred executing SQL: SELECT 1 /* this quote ' will cause an error */ FROM dual WHERE sysdate <= ? ORA-00911: invalid character
  2. 0

    Single quotes (') inside a query causes an oracle error. I've only verified this behavior in the Table Input step when using "Insert Data from Step". See the attached transform for an example. 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : Unexpected error : 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : org.pentaho.di.core.exception.KettleDatabaseException: 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : An error occurred executing SQL: 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : SELECT 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : 1 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : /* this quote ' will cause an error */ 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : FROM 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : dual 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : WHERE 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : sysdate <= ? 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : ORA-00911: invalid character 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at org.pentaho.di.core.database.Database.openQuery(Database.java:1736) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:200) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:119) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at org.pentaho.di.trans.steps.tableinput.TableInput.run(TableInput.java:326) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : Caused by: java.sql.SQLException: ORA-00911: invalid character 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:799) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1037) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3316) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3361) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : at org.pentaho.di.core.database.Database.openQuery(Database.java:1697) 2008/03/13 09:16:12 - Fetch Legs.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : ... 3 more

    Pentaho BI Platform Tracking | 9 years ago | Dave Greco
    org.pentaho.di.core.exception.KettleDatabaseException: An error occurred executing SQL: SELECT 1 /* this quote ' will cause an error */ FROM dual WHERE sysdate <= ? ORA-00911: invalid character
  3. 0

    Hibernate is generating invalid SQL (for Oracle) for collections that are stored in fields with names that start with underscores. In this SQL: Hibernate: select _tags0_.SIMPLE_OBJECT_ID as SIMPLE1_0_, _tags0_.TAG as TAG0_ from SIMPLE_OBJECT_TAG _tags0_ where _tags0_.SIMPLE_OBJECT_ID=? an alias called "_tags0_" is created for the collection table. Unfortunately, Oracle does not allow non-alphabetic characters for the first character in an alias. Here's the stacktrace: Hibernate: select _tags0_.SIMPLE_OBJECT_ID as SIMPLE1_0_, _tags0_.TAG as TAG0_ from SIMPLE_OBJECT_TAG _tags0_ where _tags0_.SIMPLE_OBJECT_ID=? WARN JDBCExceptionReporter 20060822-011120.817 - SQL Error: 911, SQLState: 42000 ERROR JDBCExceptionReporter 20060822-011120.818 - ORA-00911: invalid character INFO DefaultLoadEventListener 20060822-011120.820 - Error performing load command org.hibernate.exception.SQLGrammarException: could not initialize a collection: [SimpleObject._tags#1] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.loadCollection(Loader.java:1926) at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:520) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60) at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1676) at org.hibernate.collection.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:454) at org.hibernate.engine.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:755) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:229) at org.hibernate.loader.Loader.loadEntity(Loader.java:1785) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:47) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:41) at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2730) at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:365) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:346) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:161) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:862) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:799) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:792) at InvalidCharacterErrorCase.runTest(InvalidCharacterErrorCase.java:28) at InvalidCharacterErrorCase.main(InvalidCharacterErrorCase.java:11) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90) Caused by: java.sql.SQLException: ORA-00911: invalid character at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216) at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:799) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039) at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3329) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139) at org.hibernate.loader.Loader.getResultSet(Loader.java:1669) at org.hibernate.loader.Loader.doQuery(Loader.java:662) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.loadCollection(Loader.java:1919) ... 26 more I have attached a test case that causes this error. After a little bit of research, it appears that a change to StringHelper.generateAlias(String description, int unique) (or StringHelper.generateAliasRoot(String description)) to remove all characters up to the first alphabetic character would solve this problem.

    Hibernate JIRA | 1 decade ago | Jerry Cattell
    org.hibernate.exception.SQLGrammarException: could not initialize a collection: [SimpleObject._tags#1]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hibernate is generating invalid SQL (for Oracle) for collections that are stored in fields with names that start with underscores. In this SQL: Hibernate: select _tags0_.SIMPLE_OBJECT_ID as SIMPLE1_0_, _tags0_.TAG as TAG0_ from SIMPLE_OBJECT_TAG _tags0_ where _tags0_.SIMPLE_OBJECT_ID=? an alias called "_tags0_" is created for the collection table. Unfortunately, Oracle does not allow non-alphabetic characters for the first character in an alias. Here's the stacktrace: Hibernate: select _tags0_.SIMPLE_OBJECT_ID as SIMPLE1_0_, _tags0_.TAG as TAG0_ from SIMPLE_OBJECT_TAG _tags0_ where _tags0_.SIMPLE_OBJECT_ID=? WARN JDBCExceptionReporter 20060822-011120.817 - SQL Error: 911, SQLState: 42000 ERROR JDBCExceptionReporter 20060822-011120.818 - ORA-00911: invalid character INFO DefaultLoadEventListener 20060822-011120.820 - Error performing load command org.hibernate.exception.SQLGrammarException: could not initialize a collection: [SimpleObject._tags#1] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.loadCollection(Loader.java:1926) at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:520) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60) at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1676) at org.hibernate.collection.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:454) at org.hibernate.engine.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:755) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:229) at org.hibernate.loader.Loader.loadEntity(Loader.java:1785) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:47) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:41) at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2730) at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:365) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:346) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:161) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:862) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:799) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:792) at InvalidCharacterErrorCase.runTest(InvalidCharacterErrorCase.java:28) at InvalidCharacterErrorCase.main(InvalidCharacterErrorCase.java:11) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90) Caused by: java.sql.SQLException: ORA-00911: invalid character at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216) at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:799) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039) at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3329) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139) at org.hibernate.loader.Loader.getResultSet(Loader.java:1669) at org.hibernate.loader.Loader.doQuery(Loader.java:662) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.loadCollection(Loader.java:1919) ... 26 more I have attached a test case that causes this error. After a little bit of research, it appears that a change to StringHelper.generateAlias(String description, int unique) (or StringHelper.generateAliasRoot(String description)) to remove all characters up to the first alphabetic character would solve this problem.

    Hibernate JIRA | 1 decade ago | Jerry Cattell
    org.hibernate.exception.SQLGrammarException: could not initialize a collection: [SimpleObject._tags#1]
  6. 0

    Error in html&nbsp; Page while deleting record.

    Oracle Community | 6 years ago | 805444
    java.sql.SQLException: ORA-00911: invalid character

    12 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-00911: invalid character

      at oracle.jdbc.driver.DatabaseError.throwSqlException()
    2. Oracle jdbc
      OraclePreparedStatement.executeQuery
      1. oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
      2. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
      3. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
      4. oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
      5. oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
      6. oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:799)
      7. oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1037)
      8. oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839)
      9. oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132)
      10. oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3316)
      11. oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3361)
      11 frames
    3. org.pentaho.di
      TableInput.run
      1. org.pentaho.di.core.database.Database.openQuery(Database.java:1697)
      2. org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:200)
      3. org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:119)
      4. org.pentaho.di.trans.steps.tableinput.TableInput.run(TableInput.java:326)
      4 frames