[Hibernate-JIRA] Created: (HHH-4784) JDBCTransaction -> commit() -> notifyLocalSynchsBeforeTransactionCompletion()
by Silvan Eugen Lincan (JIRA)
JDBCTransaction -> commit() -> notifyLocalSynchsBeforeTransactionCompletion()
-----------------------------------------------------------------------------
Key: HHH-4784
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4784
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.0-Beta-2
Environment: hibernate-distribution-3.5.0-Beta-2
ms-sqlserver 2008
Reporter: Silvan Eugen Lincan
Java class: org.hibernate.transaction.JDBCTransaction
method: commit()
line: 140 call to notifyLocalSynchsBeforeTransactionCompletion()
The problem is this: method notifyLocalSynchsBeforeTransactionCompletion(), it swallows any exception that may occur at this level and permits the execution flow of commit() method to continue.
But in this case, the hibernate session may be already corrupted, so the commit will be wrong.
In my opinion, the method notifyLocalSynchsBeforeTransactionCompletion() should throw the exception, and on line 140 in commit() method, the call to this notifyLocalSynchsBeforeTransactionCompletion() should be surrounded also in the try{}catch(){}.
Otherwise, any error that can occur on Synchronization, will be omitted and the transaction committed(it should be rolled back).
I had this problem, executing the tests from envers module with the ms sqlserver 2008 database.
The test org.hibernate.envers.test.integration.reventity.ExceptionListener crashes.
I hope that it deserves your attention.
Thank you very much.
--
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, 3 months
[Hibernate-JIRA] Created: (HHH-3449) Unable to use Oracle stored procedure in a <sql-query>
by RC (JIRA)
Unable to use Oracle stored procedure in a <sql-query>
------------------------------------------------------
Key: HHH-3449
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3449
Project: Hibernate3
Issue Type: Bug
Components: query-sql
Affects Versions: 3.2.6
Environment: Hibernate 3.2.6GA
Oracle 10.2.0.4 (& Oracle JDBC Driver version - 11.1.0.6.0)
Java 1.6.0_06
Reporter: RC
Using a stored procedure to fetch result set.
However, an IllegalAccessException is thrown:
Caused by: org.hibernate.HibernateException: Problem while trying to load or access OracleTypes.CURSOR value
at org.hibernate.dialect.Oracle8iDialect.registerResultSetOutParameter(Oracle8iDialect.java:371)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1560)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2213)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1695)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:152)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811)
....
Caused by: java.lang.IllegalAccessException: Class org.hibernate.dialect.Oracle8iDialect can not access a member of class oracle.jdbc.driver.OracleTypes with modifiers ""
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
at java.lang.Class.newInstance0(Class.java:349)
at java.lang.Class.newInstance(Class.java:308)
at org.hibernate.dialect.Oracle8iDialect.registerResultSetOutParameter(Oracle8iDialect.java:369)
... 35 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, 3 months
[Hibernate-JIRA] Created: (HHH-4960) org.hibernate.test.hql.ASTParserLoadingTest error running testJpaTypeOperator test with Ingres
by Ray Fan (JIRA)
org.hibernate.test.hql.ASTParserLoadingTest error running testJpaTypeOperator test with Ingres
----------------------------------------------------------------------------------------------
Key: HHH-4960
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4960
Project: Hibernate Core
Issue Type: Bug
Components: testsuite
Affects Versions: 3.5.0-CR-2
Environment: Hibernate 3.5.0-CR-2, Ingres 9.3.1 (int.lnx/106), Ingres9Dialect
Reporter: Ray Fan
Attachments: hql-astparserloadingtest.zip
org.hibernate.test.hql.ASTParserLoadingTest testJpaTypeOperator reports an error executing the test with an Ingres exception
{noformat}
org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2257)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2151)
at org.hibernate.loader.Loader.list(Loader.java:2146)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.test.hql.ASTParserLoadingTest.testJpaTypeOperator(ASTParserLoadingTest.java:121)
Caused by: com.ingres.gcf.util.SqlEx: line 1, There is no such function as 'type'.
at com.ingres.gcf.jdbc.DrvObj.readError(Unknown Source)
at com.ingres.gcf.jdbc.DrvObj.readResults(Unknown Source)
at com.ingres.gcf.jdbc.DrvPrep.prepare(Unknown Source)
at com.ingres.gcf.jdbc.DrvConn.createPrepStmt(Unknown Source)
at com.ingres.gcf.jdbc.JdbcPrep.<init>(Unknown Source)
at com.ingres.gcf.jdbc.JdbcConn.createPrep(Unknown Source)
at com.ingres.gcf.jdbc.JdbcConn.prepareStatement(Unknown Source)
{noformat}
The test source code {{s.createQuery( "from Animal a where type(a) = Dog" ).list();}} invokes the 'type' function as part of the SQL WHERE clause.
The function 'type' is not one that is supported by Ingres.
--
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, 3 months
[Hibernate-JIRA] Created: (HSEARCH-478) Hibernate Search : MySQL Primary Key Composed -> No use DB index on select
by Gaël Saunier (JIRA)
Hibernate Search : MySQL Primary Key Composed -> No use DB index on select
--------------------------------------------------------------------------
Key: HSEARCH-478
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-478
Project: Hibernate Search
Issue Type: Bug
Components: optimizer
Affects Versions: 3.1.0.GA
Environment:
Eclipse SDK - Version: 3.3.2
MySql - 5.1.44-community
Hibernate Search - 3.1.0.GA
hibernate-entitymanager - 3.4.0.GA
hibernate-annotations - 3.4.0.GA
hibernate-core - 3.3.2.GA
Show »
Eclipse SDK - Version: 3.3.2
MySql - 5.1.44-community
Hibernate Search - 3.1.0.GA
hibernate-entitymanager - 3.4.0.GA
hibernate-annotations - 3.4.0.GA
hibernate-core - 3.3.2.GA
Reporter: Gaël Saunier
Request with In Clause and primary key composed have a bug.
MySQL couldn't use existing index when request :
Select *
>From xxx
where (y1,y2,y3) in ((v11,v12,v13),(v21,v22,v23),(v31,v32,v33))
y1,y2,y3 is composed primary key.
when i request :
Select *
>From xxx
where (y1,y2,y3) in ((v11,v12,v13))
it's ok same as :
Select *
>From xxx
where (y1,y2,y3) = (v11,v12,v13)
or (y1,y2,y3) = (v21,v22,v23)
or (y1,y2,y3) = (v31,v32,v33)
Hibernate Search use IN clause to select entity :
select this_ (.....xx....) from Demande this_ where ((this_.RDES, this_.TYPE_DEM, this_.UI_PHAR) in ((?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?), (?, ?, ?)))
I see just one solution to workaround.
It's ok for Oracle and PostgreSQL, i tested it.
To workaround, we have to make select with OR in where clause :
select .....
>From .....
where (x1,x2,x3) = (v11,v12,v13)
OR (x1,x2,x3) = (v21,v22,v23)
OR (x1,x2,x3) = (v31,v32,v33)
...
--
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, 3 months
[Hibernate-JIRA] Created: (HHH-4961) org.hibernate.test.hql.ASTParserLoadingTest error running testPaginationWithPolymorphicQuery with Ingres
by Ray Fan (JIRA)
org.hibernate.test.hql.ASTParserLoadingTest error running testPaginationWithPolymorphicQuery with Ingres
---------------------------------------------------------------------------------------------------------
Key: HHH-4961
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4961
Project: Hibernate Core
Issue Type: Bug
Components: testsuite
Affects Versions: 3.5.0-CR-2
Environment: Hibernate 3.5.0-CR-2, Ingres 9.3.1 (int.lnx/106), Ingres9Dialect
Reporter: Ray Fan
Attachments: hql-astparserloadingtest.zip
org.hibernate.test.hql.ASTParserLoadingTest testPaginationWithPolymorphicQuery reports an error executing the test with an Ingres exception
{noformat}
<error message="could not execute query" type="org.hibernate.exception.SQLGrammarException">org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2257)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2151)
at org.hibernate.loader.Loader.list(Loader.java:2146)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.test.hql.ASTParserLoadingTest.testPaginationWithPolymorphicQuery(ASTParserLoadingTest.java:249)
Caused by: com.ingres.gcf.util.SqlEx: A <column reference> contained a <qualifier> 'product0_'
which did not correspond to any of the <table reference>s
within whose scope the <column reference> appeared.
at com.ingres.gcf.jdbc.DrvObj.readError(Unknown Source)
at com.ingres.gcf.jdbc.DrvObj.readResults(Unknown Source)
at com.ingres.gcf.jdbc.DrvPrep.prepare(Unknown Source)
at com.ingres.gcf.jdbc.DrvConn.createPrepStmt(Unknown Source)
at com.ingres.gcf.jdbc.JdbcPrep.<init>(Unknown Source)
at com.ingres.gcf.jdbc.JdbcConn.createPrep(Unknown Source)
at com.ingres.gcf.jdbc.JdbcConn.prepareStatement(Unknown Source)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1597)
at org.hibernate.loader.Loader.doQuery(Loader.java:718)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:271)
at org.hibernate.loader.Loader.doList(Loader.java:2254)
... 38 more
</error>
{noformat}
The SQL query that is produced references product0_ in the WHERE clause of the subselect.
{noformat}
select
product0_.productId as productId37_,
product0_.description as descript2_37_,
product0_.cost as cost37_,
product0_.numberAvailable as numberAv4_37_,
( select
sum(li.quantity)
from
LineItem li
where
li.productId = product0_.productId ) as formula2_
from
Product product0_
{noformat}
Ingres does not support this scoping in 9.3.
--
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, 3 months
[Hibernate-JIRA] Created: (HHH-5045) org.hibernate.test.hql.HQLTest failure running testConcatenation with Ingres
by Ray Fan (JIRA)
org.hibernate.test.hql.HQLTest failure running testConcatenation with Ingres
----------------------------------------------------------------------------
Key: HHH-5045
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5045
Project: Hibernate Core
Issue Type: Bug
Components: core, testsuite
Affects Versions: 3.5.0-CR-2
Environment: Hibernate 3.5.0-CR-2, Ingres 9.3.1 (int.lnx/106), Ingres9Dialect
Reporter: Ray Fan
Priority: Minor
Assertion failure in testConcatenate:
{noformat}
<failure message="SQL is not the same as the old SQL (scalar=true) expected:<...(lower(upper('foo')||upper(?))like 'f%' )> but was:<...lower((upper('foo')+upper(?))) like 'f%'>" type="junit.framework.ComparisonFailure">junit.framework.ComparisonFailure: SQL is not the same as the old SQL (scalar=true) expected:<...(lower(upper('foo')||upper(?))like 'f%' )> but was:<...lower((upper('foo')+upper(?))) like 'f%'>
at junit.framework.Assert.assertEquals(Assert.java:81)
at org.hibernate.test.hql.QueryTranslatorTestCase.assertSQLEquals(QueryTranslatorTestCase.java:315)
at org.hibernate.test.hql.QueryTranslatorTestCase.checkSql(QueryTranslatorTestCase.java:304)
at org.hibernate.test.hql.QueryTranslatorTestCase.assertTranslation(QueryTranslatorTestCase.java:194)
at org.hibernate.test.hql.QueryTranslatorTestCase.assertTranslation(QueryTranslatorTestCase.java:120)
at org.hibernate.test.hql.QueryTranslatorTestCase.assertTranslation(QueryTranslatorTestCase.java:102)
at org.hibernate.test.hql.HQLTest.testExpressionWithParamInFunction(HQLTest.java:241)
</failure>
{noformat}
The character used as the concatenation operator is specified as '+' in the IngresDialect although Ingres supports both '+' and "||".
--
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, 3 months
[Hibernate-JIRA] Created: (HHH-3395) Oracle LONG datatype fetching fails on superclass Criteria query
by Ville Anttonen (JIRA)
Oracle LONG datatype fetching fails on superclass Criteria query
----------------------------------------------------------------
Key: HHH-3395
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3395
Project: Hibernate3
Issue Type: Bug
Environment: Oracle 10
Windows XP
Hibernate 3
Weblogic 9.2
Reporter: Ville Anttonen
I have dao-layer method like this.
public PersistentQuery getPersistentQuery(String userId, long queryId){
....
Criteria criteria = m_session.createCriteria(PersistentQuery.class);
criteria.add(Expression.eq("userId",userId));
criteria.add(Expression.eq("id",new Long(queryId)));
return (PersistentQuery) criteria.uniqueResult();
.....
}
Previous code throws "Stream already closed" exception.
PersistentQuery is abstract class
and it's subclasses contains UserType - field
that wraps Oracle's long varchar field.
I can fix this by creating criteria by subclass
like " Criteria criteria = m_session.createCriteria(PersistentOrganizationQuery.class); ".
We're migrating from ingres -> oracle and in ingres previous implementation worked fine.
--
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, 3 months