[Hibernate-JIRA] Created: (HHH-5969) PostgreSQLDialect missing Types.BINARY mapping, used by UUIDBinaryType
by Ondrej Zizka (JIRA)
PostgreSQLDialect missing Types.BINARY mapping, used by UUIDBinaryType
----------------------------------------------------------------------
Key: HHH-5969
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5969
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.2
Environment: org.hibernate.test.id.uuid.sqlrep.sqlbinary.UUIDBinaryTest.testUsage
/hudson/view/Hibernate%20Community/job/hibernate-core-testsuite-branch36/database=postgresql82,jdk=java15_default,label=hibernate/lastCompletedBuild/testReport/org.hibernate.test.id.uuid.sqlrep.sqlbinary/UUIDBinaryTest/testUsage/
Reporter: Ondrej Zizka
Assignee: Strong Liu
org.hibernate.type.UUIDBinaryType has
public int getSqlType() {
return Types.BINARY;
}
which is
java.sql.Types.BINARY = -2;
Then, org.hibernate.dialect.PostgreSQLDialect.getTypeName(-2, ...) does not have the mapping for it (only for Types.VARBINARY == -3).
org.hibernate.MappingException: No Dialect mapping for JDBC type: -2
at org.hibernate.dialect.TypeNames.get(TypeNames.java:77)
at org.hibernate.dialect.TypeNames.get(TypeNames.java:100)
at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:296)
at org.hibernate.mapping.Column.getSqlType(Column.java:208)
at org.hibernate.mapping.Table.sqlTemporaryTableCreateString(Table.java:371)
at org.hibernate.mapping.PersistentClass.prepareTemporaryTables(PersistentClass.java:774)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:272)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845)
at org.hibernate.testing.junit.functional.ExecutionEnvironment.initialize(ExecutionEnvironment.java:106)
at org.hibernate.testing.junit.functional.FunctionalTestCase.setUp(FunctionalTestCase.java:93)
at junit.framework.TestCase.runBare(TestCase.java:125)
at org.hibernate.testing.junit.UnitTestCase.runBare(UnitTestCase.java:63)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
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:592)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
--
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
12 years, 11 months
[Hibernate-JIRA] Updated: (HHH-1268) Unidirection OneToMany causes duplicate key entry violation when removing from list
by Gail Badner (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1268?page=c... ]
Gail Badner updated HHH-1268:
-----------------------------
Fix Version/s: (was: 3.6.5)
3.6.6
> Unidirection OneToMany causes duplicate key entry violation when removing from list
> -----------------------------------------------------------------------------------
>
> Key: HHH-1268
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1268
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.1, 3.5.6, 3.6.0
> Environment: 3.1 final
> MySql 4.1.14 using MYISAM tables
> Reporter: Rex Madden
> Assignee: Gail Badner
> Fix For: 3.2.x, 3.3.x, 3.6.6, 4.0.0.next
>
> Attachments: possible_solution.patch, src.zip
>
>
> Simple OneToMany parent/child relationship using the default table structure (2 tables and a join table)
> Add 3 children to the parent. Flush. Remove the first child. Flush throws error:
> Exception in thread "main" org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
> at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:69)
> at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
> at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:202)
> at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:230)
> at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:143)
> at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
> at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
> at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:980)
> at UnidirectionalOneToManyRemoveFromListBug.main(UnidirectionalOneToManyRemoveFromListBug.java:27)
> 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:86)
> Caused by: java.sql.BatchUpdateException: Duplicate key or integrity constraint violation, message from server: "Duplicate entry '5' for key 2"
> at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1461)
> at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
> at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
> ... 11 more
> The problem is that there is a unique key on the relationship table that gets violated. The session removes the last row in the relationship table, then attempts to rewrite the child_id's. It fails since there is a uniqueness constraint on that column.
--
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
12 years, 11 months
[Hibernate-JIRA] Created: (HHH-5277) Build fails on some systems when using jdk 6
by Hardy Ferentschik (JIRA)
Build fails on some systems when using jdk 6
--------------------------------------------
Key: HHH-5277
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5277
Project: Hibernate Core
Issue Type: Bug
Components: build
Reporter: Hardy Ferentschik
When building Core using Java 6 artifacts are renamed during install from *.jar to *.jdocbook-style (at list in the core sub-module). This of course screws up the local repo. Here is the build log of a _mvn install_ in the core module:
{noformat}
517$ setJava 1.6
Configuring Shell Environment for Java 1.6
Current Java:
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)
hardy@aleppo:~/work/hibernate/core/trunk/core
518$ mvn clean install -Dmaven.test.skip=true
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Hibernate Core
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory /Users/hardy/work/hibernate/core/trunk/core/target
[INFO] [enforcer:enforce {execution: enforce-java}]
[INFO] [antlr:generate {execution: default}]
[INFO] Using Antlr grammar: /Users/hardy/work/hibernate/core/trunk/core/src/main/antlr/hql.g
ANTLR Parser Generator Version 2.7.6 (2005-12-22) 1989-2005
warning: invalid command-line argument: -traceTreeParser; ignored
[INFO] Using Antlr grammar: /Users/hardy/work/hibernate/core/trunk/core/src/main/antlr/hql-sql.g
ANTLR Parser Generator Version 2.7.6 (2005-12-22) 1989-2005
warning: invalid command-line argument: -traceParser; ignored
[INFO] Using Antlr grammar: /Users/hardy/work/hibernate/core/trunk/core/src/main/antlr/sql-gen.g
ANTLR Parser Generator Version 2.7.6 (2005-12-22) 1989-2005
warning: invalid command-line argument: -traceParser; ignored
[INFO] Using Antlr grammar: /Users/hardy/work/hibernate/core/trunk/core/src/main/antlr/order-by.g
ANTLR Parser Generator Version 2.7.6 (2005-12-22) 1989-2005
warning: invalid command-line argument: -traceTreeParser; ignored
[INFO] Using Antlr grammar: /Users/hardy/work/hibernate/core/trunk/core/src/main/antlr/order-by-render.g
ANTLR Parser Generator Version 2.7.6 (2005-12-22) 1989-2005
warning: invalid command-line argument: -traceParser; ignored
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO] Copying 5 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 1306 source files to /Users/hardy/work/hibernate/core/trunk/core/target/classes
[INFO] [injection:bytecode {execution: default}]
[INFO] writing injection changes back [/Users/hardy/work/hibernate/core/trunk/core/target/classes/org/hibernate/Version.class]
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Not compiling test sources
[INFO] [surefire:test {execution: default-test}]
[INFO] Tests are skipped.
[INFO] [jar:jar {execution: default-jar}]
[INFO] Building jar: /Users/hardy/work/hibernate/core/trunk/core/target/hibernate-core-3.6.0-SNAPSHOT.jar
[INFO] [source:jar-no-fork {execution: attach-sources}]
[INFO] Building jar: /Users/hardy/work/hibernate/core/trunk/core/target/hibernate-core-3.6.0-SNAPSHOT-sources.jar
[INFO] [install:install {execution: default-install}]
[INFO] Installing /Users/hardy/work/hibernate/core/trunk/core/target/hibernate-core-3.6.0-SNAPSHOT.jar to /Users/hardy/tmp/m2/org/hibernate/hibernate-core/3.6.0-SNAPSHOT/hibernate-core-3.6.0-SNAPSHOT.jdocbook-style
[INFO] Installing /Users/hardy/work/hibernate/core/trunk/core/target/hibernate-core-3.6.0-SNAPSHOT-sources.jar to /Users/hardy/tmp/m2/org/hibernate/hibernate-core/3.6.0-SNAPSHOT/hibernate-core-3.6.0-SNAPSHOT-sources.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 15 seconds
[INFO] Finished at: Fri May 28 15:29:33 CEST 2010
[INFO] Final Memory: 43M/211M
[INFO] ------------------------------------------------------------------------
{noformat}
The maven version is: _Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)_
Strong was able to reproduce the problem on his Fedora box, but on this Mac it works.
--
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
12 years, 11 months
[Hibernate-JIRA] Créée: (HHH-2389) Improving DB2 dialect
by Nicolas Billard (JIRA)
Improving DB2 dialect
---------------------
Key: HHH-2389
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2389
Project: Hibernate3
Type: Improvement
Components: query-hql
Versions: 3.2.1
Environment: Development based on v 3.2.1
Reporter: Nicolas Billard
Priority: Minor
Attachments: DB2Dialect.java
The class joined to this issue overrides the DB2 dialect. The dialect included in hibernate doesn't work very well when you want to limit returned results (when you call setFirstResult and / or setMaxResults on a query) :
- the instructions "fetch first XXX row only is not used
- a temporary table is used when it's not usefull
- when you have subselects, an exception can occur if subselects have order by clause (because of the getRowNumber method, not corrected here).
This version of getLimitString() method generates faster requests (tests made on a table of 300000 rows shows that fetching rows from 20 to 30 takes 0.3 seconds with original version, 0.02 with this one).
--
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
12 years, 11 months
[Hibernate-JIRA] Created: (HHH-6219) Memory leak with Infinispan cache
by Sergey Astakhov (JIRA)
Memory leak with Infinispan cache
---------------------------------
Key: HHH-6219
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6219
Project: Hibernate Core
Issue Type: Bug
Components: caching (L2)
Affects Versions: 3.6.4
Environment: JBoss 6.1, Hibernate 3.6.4.Final, Infinispan 4.2.1.Final
Reporter: Sergey Astakhov
Priority: Blocker
We have problem with an memory leak in our application when setup Hibernate with use Infinispan as L2 cache. After investigation of memory dumps, looks like all memory is consumed by links, comming from PutFromLoadValidator objects (by pendingPuts map collections). The PendingPutMap objects holding references to the PendingPut objects with the state 'completed=true'. The state 'completed=true' is comming from invalidateKey/invalidateRegion calls, but I didn't find any removals of the objects in this state from PendingPutMap collections - may be this is cause of the leak.
--
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
12 years, 11 months
[Hibernate-JIRA] Created: (HHH-6259) failure trying to delete an @Entity with a NULL @Version timestamp using postgresql
by radai (JIRA)
failure trying to delete an @Entity with a NULL @Version timestamp using postgresql
-----------------------------------------------------------------------------------
Key: HHH-6259
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6259
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.1
Environment: jboss 6, hibernate 3.6.1, postgresql 9.0, JDBC4 driver, windows 7 x64
Reporter: radai
given an @Entity with a Timestamp @Version property that happens to be NULL, hibernate fails to delete the entity, assuming the entity is dirty.
the root cause for this is the PreparedStatement hibernate generates. the sql string looks something along the lines of:
"delete from [table] where [idField]=? and [timestampField]=?"
hibernate then sets the 1st arg to the entity's id (non null) and then calls setNull() to set the 2nd parameter to null (the timestamp property for the entity is null). the postgres JDBC driver doesnt return any error, but executing the statement returns 0 rows, which in turn causes hibernate to assume the entity has been changed in the meantime and throw an exception.
apparently the postgresql jdbc4 driver expects "[timestampField] is null" in the sql string and nothing else.
im not sure if its hibernate or the postgresql driver at fault here, but the overall combnation of the two definitely does not work.
--
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
12 years, 11 months