[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3620?page=c...
]
Juraci Paixao Krohling commented on HHH-3620:
---------------------------------------------
This problem occurs in almost all databases (passes only for hsqldb). To verify the
problem, put a debug/trace on org.hibernate.loader.hql.QueryLoader#bindParameterValues,
around line 511 (from Branch_3_3).
At that point, you can see that "parameterSpecs" have only one parameter (id),
while the incoming parameter "queryParameters" shows both "name" and
"id" parameters.
Then, the iterator uses the parameterSpecs to bind the parameters. As the query have two
parameter markers and only one is bound, most databases throws an exception.
Oracle - testWithClause fails due to "Missing IN or OUT
parameter at index:: 1"
-------------------------------------------------------------------------------
Key: HHH-3620
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3620
Project: Hibernate Core
Issue Type: Bug
Components: testsuite
Affects Versions: 3.3.x
Environment: Databases:
Oracle 9i
Oracle 10g
MySQL 5
SQL Server 2005
Sybase 15
PostgreSQL 8.2
DB2 v8
Sources:
Branch_3_3
trunk
Reporter: Juraci Paixao Krohling
Test testWithClause (org.hibernate.test.hql.WithClauseTest) fails due to "Missing IN
or OUT parameter at index:: 1"
Stack trace:
org.hibernate.exception.GenericJDBCException: could not execute query
at
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2231)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
at org.hibernate.loader.Loader.list(Loader.java:2120)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:364)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1149)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.test.hql.WithClauseTest.testWithClause(WithClauseTest.java:112)
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 junit.framework.TestCase.runTest(TestCase.java:168)
at
org.hibernate.junit.functional.FunctionalTestCase.runTest(FunctionalTestCase.java:125)
at junit.framework.TestCase.runBare(TestCase.java:134)
at org.hibernate.junit.UnitTestCase.runBare(UnitTestCase.java:63)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at
org.hibernate.junit.functional.FunctionalTestClassTestSuite.runTest(FunctionalTestClassTestSuite.java:115)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.hibernate.junit.functional.FunctionalTestClassTestSuite.run(FunctionalTestClassTestSuite.java:84)
at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.sql.SQLException: Missing IN or OUT parameter at index:: 1
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at
oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1711)
at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3311)
at
oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3361)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1808)
at org.hibernate.loader.Loader.doQuery(Loader.java:697)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:2228)
... 31 more
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira