java.sql.SQLException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Problem accessing web interfase
    via by 146661,
  • wsh error
    via by 397713,
  • can not delete a portlet in a page
    via by cksptw,
  • I'm having a strange problem in Hibernate 2.0.1 when using the session.createQuery() + query.iterate() APIs. My mapping is the following: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "--//Hibernate/Hibernate Mapping DTD//EN" "hibernate-mapping-2.0.dtd"> <hibernate-mapping auto-import="false" default-cascade="save-update"> <class name="test.model.Super"> <composite-id> <key-property name="id"/> </composite-id> <property name="superAttr"/> <joined-subclass name="test.model.Sub1"> <key> <column name="id"/> </key> <property name="sub1Attr"/> </joined-subclass> <joined-subclass name="test.model.Sub2"> <key> <column name="id"/> </key> <property name="sub2Attr"/> </joined-subclass> </class> </hibernate-mapping> The following code works perfectly: ... Transaction t = s.beginTransaction(); List l = s.find("from test.model.Super o where o.class = test.model.Sub1"); t.commit(); ... On the other hand, the following code hangs: ... Transaction t = s.beginTransaction(); Query q = s.createQuery("from test.model.Super o where o.class = test.model.Sub1"); Iterator it = q.iterate(); while (it.hasNext()) { Object o = it.next(); } t.commit(); ... The following SQL select query is generated by Hibernate upon the q.iterate() call: select super0_.id as x0_0_ from Super super0_ where (case when super0__1.id is not null then 1 when super0__2.id is not null then 2 when super0_.id is not null then 0 end=0 ) And the following exception is thrown by Oracle: [ERROR] JDBCExceptionReporter - -Could not execute query <java.sql.SQLException: ORA-00904: "SUPER0__2"."ID": invalid identifier >java.sql.SQLException: ORA-00904: "SUPER0__2"."ID": invalid identifier at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2321) at oracle.jdbc.oci8.OCIDBAccess.parseExecuteDescribe(OCIDBAccess.java:1255) at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527) at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:62) at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:539) at net.sf.hibernate.hql.QueryTranslator.iterate(QueryTranslator.java:789) at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1422) at net.sf.hibernate.impl.QueryImpl.iterate(QueryImpl.java:64) at test.query.TestQueryIter.main(TestQueryIter.java:58) java.sql.SQLException: ORA-00904: "SUPER0__2"."ID": invalid identifier at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2321) at oracle.jdbc.oci8.OCIDBAccess.parseExecuteDescribe(OCIDBAccess.java:1255) at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527) at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:62) at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:539) at net.sf.hibernate.hql.QueryTranslator.iterate(QueryTranslator.java:789) at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1422) at net.sf.hibernate.impl.QueryImpl.iterate(QueryImpl.java:64) at test.query.TestQueryIter.main(TestQueryIter.java:58) rethrown as net.sf.hibernate.JDBCException: Could not execute query: ORA-00904: "SUPER0__2"."ID": invalid identifier at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1425) at net.sf.hibernate.impl.QueryImpl.iterate(QueryImpl.java:64) at test.query.TestQueryIter.main(TestQueryIter.java:58)
    via by Fabio Tudone,
    • java.sql.SQLException: ORA-01795: maximum number of expressions in a list is 100 0 at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2321) at oracle.jdbc.oci8.OCIDBAccess.parseExecuteDescribe(OCIDBAccess.java:1255) at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672) at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:572)

    Users with the same issue

    Unknown visitor2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor2 times, last one,
    Unknown visitor1 times, last one,
    28 more bugmates