[Hibernate-JIRA] Created: (HHH-5983) Actions contain non-transient references to session, entity, collection causing inconsistencies after serialization
by Gail Badner (JIRA)
Actions contain non-transient references to session, entity, collection causing inconsistencies after serialization
-------------------------------------------------------------------------------------------------------------------
Key: HHH-5983
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5983
Project: Hibernate Core
Issue Type: Bug
Components: core
Reporter: Gail Badner
Assignee: Gail Badner
Fix For: 4.0.0.Alpha1
Actions contain non-transient references to session, entity, collection causing inconsistencies after serialization.
Inconsistencies include:
- session fields in actions are different from the session field in the ActionQueue containing those actions
- entity instances, PersistenCollection objects, and state arrays in actions are copies of what is present in the PersistentContext
These action fields should be made transient. After deserialization, these fields should be initialized by doing lookups in the PersistenceContext.
--
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
13 years, 10 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: 4.0.0.Alpha1)
4.0.0.Alpha3
> 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.next, 4.0.0.Alpha3
>
> 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
13 years, 10 months
[Hibernate-JIRA] Created: (WEBSITE-5) Unable to compile the Tutorial using Maven - The POM.xml file needs version numbers for the dependencies.
by Gabriel Perry (JIRA)
Unable to compile the Tutorial using Maven - The POM.xml file needs version numbers for the dependencies.
---------------------------------------------------------------------------------------------------------
Key: WEBSITE-5
URL: http://opensource.atlassian.com/projects/hibernate/browse/WEBSITE-5
Project: Hibernate Website
Issue Type: Bug
Environment: Windows XP
Reporter: Gabriel Perry
Priority: Blocker
Hi,
I'm trying to go through the tutorial located at: http://docs.jboss.org/hibernate/core/3.3/reference/en/html/tutorial.html#...
...however, after installing Maven version 3.0.3 as instructed by the tutorial... I'm getting some errors when trying to compile the Tutorial project.
Here's the output I'm getting:
C:\projects\04_internal_projects\hibernate-tutorial>mvn compile
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.hibernate.tutorials:hibernate-tutorial:1.0.0-SNAPSHOT (C:\projects\04_internal_projects\hibernate-t
utorial\pom.xml) has 4 errors
[ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-core:jar is missing. @ line 21, column 22
[ERROR] 'dependencies.dependency.version' for javax.servlet:servlet-api:jar is missing. @ line 25, column 21
[ERROR] 'dependencies.dependency.version' for org.slf4j:slf4j-simple:jar is missing. @ line 31, column 21
[ERROR] 'dependencies.dependency.version' for javassist:javassist:jar is missing. @ line 37, column 21
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
As far as I can tell... Maven wants each dependency to specify a version number, but the tutorial page does not define this. So... for all intents and purposes... I can't really run the tutorial code and I'd like to very much get started and learn Hibernate.
Thanks,
~Gabriel Perry
flupe(a)flupe.com
--
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
13 years, 10 months