[Hibernate-JIRA] Commented: (HHH-1123) Cannot put more than 1000 elements in a InExpression
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1123?page=c... ]
Steve Ebersole commented on HHH-1123:
-------------------------------------
Haavar, but see that problem is tailor made to explain why SQL added temporary tables.
Siddarth, again you are thinking of the simplistic case. But a solution in a library has to account for all cases. Not to mention that you gloss over exactly what it is you think the library should actually do. So your example receives 9999 element collection, it passes your built in <10000 check, but will still obviously fail on these databases we are talking about. So what do you think Hibernate should do? And not that I already explained why a "simple split" will not work.
> Cannot put more than 1000 elements in a InExpression
> ----------------------------------------------------
>
> Key: HHH-1123
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1123
> Project: Hibernate Core
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.1 rc2, 3.2.0.alpha1
> Environment: Oracle 9i
> Reporter: Alexis Seigneurin
> Assignee: Strong Liu
> Attachments: Animal.hbm.xml, hibernate-inexpression-oracle-3.2.patch, HQLHelper.java, LongInElementsTest.java, patch.txt
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> The number of elements that we can put in a "in" expression is limited to a certain amount (1000 for Oracle, for instance). When creating a criteria query, the org.hibernate.criterion.InExpression class should split the expression into several smaller ones.
> Attached is a patch which splits the expression by slices of 500 elements. For example, if we have 1001 elements to put in the "in" expression, the result would be :
> (entity.field in (?, ?, ?...) or entity.field in (?, ?, ?...) or entity.field in (?))
> The surrounding parantheses are useful to avoid problems with other conditions (a "and" condition taking over the one of the "or" conditions).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[Hibernate-JIRA] Created: (HSEARCH-999) TimeoutTest and JPATimeoutTest fail against Sybase
by Hardy Ferentschik (JIRA)
TimeoutTest and JPATimeoutTest fail against Sybase
--------------------------------------------------
Key: HSEARCH-999
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-999
Project: Hibernate Search
Issue Type: Bug
Components: tests
Affects Versions: 4.0.0.CR2
Reporter: Hardy Ferentschik
Assignee: Hardy Ferentschik
Fix For: 4.0.0.Final
The exception is :
{noformat}
org.hibernate.exception.GenericJDBCException: Message empty.
at org.hibernate.exception.internal.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:148)
at org.hibernate.exception.internal.SQLStateConverter.convert(SQLStateConverter.java:136)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:129)
at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
at $Proxy23.executeQuery(Unknown Source)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1978)
at org.hibernate.loader.Loader.doQuery(Loader.java:829)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289)
at org.hibernate.loader.Loader.doList(Loader.java:2463)
at org.hibernate.loader.Loader.doList(Loader.java:2449)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2279)
at org.hibernate.loader.Loader.list(Loader.java:2274)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:122)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1483)
at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374)
at org.hibernate.search.query.hibernate.impl.CriteriaObjectsInitializer.initializeObjects(CriteriaObjectsInitializer.java:107)
at org.hibernate.search.query.hibernate.impl.QueryLoader.executeLoad(QueryLoader.java:91)
at org.hibernate.search.query.hibernate.impl.AbstractLoader.load(AbstractLoader.java:72)
at org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.list(FullTextQueryImpl.java:211)
at org.hibernate.search.test.query.timeout.TimeoutTest.testEnoughTime(TimeoutTest.java:164)
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:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at org.hibernate.search.test.SearchTestCase.runTest(SearchTestCase.java:348)
at org.hibernate.search.test.SearchTestCase.runBare(SearchTestCase.java:396)
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:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
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:597)
at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
at $Proxy0.invoke(Unknown Source)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
Caused by: com.sybase.jdbc4.jdbc.SybSQLException: Message empty.
at com.sybase.jdbc4.tds.Tds.a(Unknown Source)
at com.sybase.jdbc4.tds.Tds.nextResult(Unknown Source)
at com.sybase.jdbc4.jdbc.ResultGetter.nextResult(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.queryLoop(Unknown Source)
at com.sybase.jdbc4.jdbc.SybStatement.executeQuery(Unknown Source)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeQuery(Unknown Source)
at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122)
... 43 more
{noformat}
Log:
{noformat}
16:03:26,462 (main) DEBUG ConfigContext:307 - Setting Lucene compatibility to Version LUCENE_CURRENT
16:03:26,462 (main) DEBUG ConfigContext:209 - Using default similarity implementation: org.apache.lucene.search.DefaultSimilarity
16:03:26,463 (main) DEBUG LuceneIndexingParameters:94 - Set index writer parameter max_buffered_docs to value : 1000
16:03:26,464 (main) DEBUG LuceneIndexingParameters:94 - Set index writer parameter merge_factor to value : 100
16:03:26,464 (main) DEBUG WorkspaceFactory:43 - Starting workspace for index org.hibernate.search.test.query.timeout.Clock using an exclusive index strategy
16:03:26,468 (main) INFO AvroSerializationProvider:73 - HSEARCH000079: Serialization protocol version 1.0
16:03:26,479 (main) DEBUG DocumentBuilderIndexedEntity:331 - Found JPA id and using it as document id
16:03:26,480 (main) DEBUG DocumentBuilderIndexedEntity:205 - Field selection in projections is set to true for entity org.hibernate.search.test.query.timeout.Clock.
16:03:26,481 (main) DEBUG FullTextIndexEventListener:147 - Hibernate Search event listeners activated
16:03:26,481 (main) DEBUG FullTextIndexEventListener:150 - Hibernate Search dirty checks enabled
16:03:26,493 (main) ERROR SchemaExport:426 - HHH000389: Unsuccessful: drop table Clock
16:03:26,494 (main) ERROR SchemaExport:427 - Cannot drop the table 'Clock', because it doesn't exist in the system catalogs.
16:03:28,960 (main) DEBUG SharingBufferReaderProvider:66 - Opening IndexReader for directoryProvider org.hibernate.search.test.query.timeout.Clock
16:03:28,973 (main) DEBUG MultiReaderFactory:70 - Closing MultiReader: CacheableMultiReader(ReadOnlyDirectoryReader(segments_2 _0(3.4):C1000))
16:03:28,974 (main) DEBUG SharingBufferReaderProvider:81 - Closing IndexReader: ReadOnlyDirectoryReader(segments_2 _0(3.4):C1000)
16:03:29,007 (main) WARN SqlExceptionHelper:143 - SQL Error: 7738, SQLState: null
16:03:29,008 (main) ERROR SqlExceptionHelper:144 - Message empty.
16:03:29,008 (main) WARN SqlExceptionHelper:143 - SQL Error: 7738, SQLState: null
16:03:29,009 (main) ERROR SqlExceptionHelper:144 - Message empty.
16:03:29,009 (main) WARN SqlExceptionHelper:143 - SQL Error: 7738, SQLState: null
16:03:29,009 (main) ERROR SqlExceptionHelper:144 - Message empty.
16:03:29,010 (main) WARN SqlExceptionHelper:143 - SQL Error: 7738, SQLState: null
16:03:29,010 (main) ERROR SqlExceptionHelper:144 - Message empty.
16:03:29,010 (main) WARN SqlExceptionHelper:143 - SQL Error: 7738, SQLState: null
16:03:29,010 (main) ERROR SqlExceptionHelper:144 - Message empty.
16:03:29,011 (main) WARN SqlExceptionHelper:143 - SQL Error: 7738, SQLState: null
16:03:29,011 (main) ERROR SqlExceptionHelper:144 - Message empty.
...
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[Hibernate-JIRA] Created: (HHH-5086) "ambiguous column" SQL errors in Hibernate 3.5.0 Final
by dnalos (JIRA)
"ambiguous column" SQL errors in Hibernate 3.5.0 Final
------------------------------------------------------
Key: HHH-5086
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5086
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.0-Final
Environment: Java JDK 1.6.0_19
Hibernate Core 3.5.0 Final
hibernate-jpa-2.0-api-1.0.0.Final.jar
mysql-connector-java-5.1.10-bin.jar
Reporter: dnalos
Attachments: HibernateAmbiguousTest.zip
After update Hibernate Core to 3.5, we get some Exception like this:
Column '_value' in field list is ambiguous (JDBCExceptionReporter.java:101)
We create a testcase for you, and the Exception from the testcase:
ERROR 15:39:28 0 Column '_value' in field list is ambiguous (JDBCExceptionReporter.java:101)
org.hibernate.exception.ConstraintViolationException: could not load an entity: [Invoice#401]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1937)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:76)
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3270)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1080)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:997)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:990)
at HibernateAmbiguousTest.testAmbiguous(HibernateAmbiguousTest.java:55)
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:597)
at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
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: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column '_value' in field list is ambiguous
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.Util.getInstance(Util.java:381)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2228)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1849)
at org.hibernate.loader.Loader.doQuery(Loader.java:718)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1933)
... 34 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
14 years