The problem comes from the timestamps. We had seen this bug before with GIR. The reason being that inserts that do not contain the TIMESTAMP field will automatically insert 0000-00-00 00:00:00. I'm not sure its a hibernate or mysql behaviour but I would guess mysql

Nevertheless, hibernate doesn't see entries with these kind of versions as "versions" of an instance. Therefore, it crashes when trying to save. I will look if there is such a bug logged for hibernate and if so if they plan to fix it.

To patch this problem, I have modified the initialization scripts (sql) of the authentication to have a default SQL for the TIMESTAMP of 2005-01-01 00:00:00. I know its not ideal but until hiberntate is fixed, its the best I could come up with.

Frank



François Eric wrote:




------------------------------------------------------------------------

Subject:
Problem with LoginGroup
From:
François Eric <[EMAIL PROTECTED]>
Date:
Tue, 15 Nov 2005 10:33:09 -0500
To:
Vincent-Olivier Arsenault <[EMAIL PROTECTED]>

To:
Vincent-Olivier Arsenault <[EMAIL PROTECTED]>


I just found a bug that I hadn't seen before and want to know if you guys have noticed it.

In any application started with StartTemplate.zuml (so with the default Logins) I get the following error when trying to add a LoginRole to a newly created LoginGroup:

10:29:44,957 INFO [STDOUT] Caused by: org.mdarad.framework.dao.DAOException: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.mdarad.authentication.entities.Lo
ginRole
10:29:44,957 INFO [STDOUT] at org.mdarad.authentication.dao.LoginGroupDAO.saveLoginGroup(LoginGroupDAO.java:72) 10:29:44,957 INFO [STDOUT] at org.mdarad.authentication.facades.LoginGroupBusinessObjectFacadeBase.saveLoginGroup(LoginG
roupBusinessObjectFacadeBase.java:69)
10:29:44,957 INFO  [STDOUT]     ... 63 more
10:29:44,957 INFO [STDOUT] Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instanc e - save the transient instance before flushing: org.mdarad.authentication.entities.LoginRole 10:29:44,957 INFO [STDOUT] at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:210) 10:29:44,957 INFO [STDOUT] at org.hibernate.type.EntityType.getIdentifier(EntityType.java:80) 10:29:44,957 INFO [STDOUT] at org.hibernate.type.ManyToOneType.nullSafeSet(ManyToOneType.java:51) 10:29:44,957 INFO [STDOUT] at org.hibernate.collection.AbstractCollectionPersister.writeElement(AbstractCollectionPersis
ter.java:622)
10:29:44,957 INFO [STDOUT] at org.hibernate.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.
java:838)
10:29:44,957 INFO [STDOUT] at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:23) 10:29:44,957 INFO [STDOUT] at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239) 10:29:44,957 INFO [STDOUT] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223) 10:29:44,957 INFO [STDOUT] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140) 10:29:44,967 INFO [STDOUT] at org.hibernate.event.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventL
istener.java:271)
10:29:44,967 INFO [STDOUT] at org.hibernate.event.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:24) 10:29:44,967 INFO [STDOUT] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:719) 10:29:44,967 INFO [STDOUT] at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:84) 10:29:44,967 INFO [STDOUT] at org.mdarad.authentication.dao.LoginGroupDAO.saveLoginGroup(LoginGroupDAO.java:66)
10:29:44,967 INFO  [STDOUT]     ... 64 more


Do any of you why I am getting this?  I will open a bug.

François


------------------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.2/170 - Release Date: 11/15/2005




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id845&op=click
_______________________________________________
Mdarad-toolbox-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mdarad-toolbox-devs

Reply via email to