Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Persisting GMF diagram: Integer cannot be cast to Long
[Teneo] Persisting GMF diagram: Integer cannot be cast to Long [message #615949] Sat, 22 March 2008 13:38
Matthias Treitler is currently offline Matthias TreitlerFriend
Messages: 117
Registered: July 2009
Senior Member
Hello!

Thank you very much for implementing the feature to persist the GMF
diagram to a database.

But certainly I am not able to manage it.

A followed the tutorial on elver.org, but I get the following exception
when the save method of the resource gets called:

835872 [main] ERROR org.eclipse.emf.teneo.hibernate.HbMapperException -
Exception when saving resource odm_jobplan
java.lang.ClassCastException: java.lang.Integer cannot be cast to
java.lang.Long
at org.hibernate.type.LongType.set(LongType.java:42)
at org.hibernate.type.NullableType.nullSafeSet(NullableType.jav a:136)
at org.hibernate.type.NullableType.nullSafeSet(NullableType.jav a:107)
at org.hibernate.type.AnyType.nullSafeSet(AnyType.java:144)
at
org.hibernate.persister.entity.AbstractEntityPersister.dehyd rate(AbstractEntityPersister.java:1997)
at
org.hibernate.persister.entity.AbstractEntityPersister.inser t(AbstractEntityPersister.java:2243)
at
org.hibernate.persister.entity.AbstractEntityPersister.inser t(AbstractEntityPersister.java:2660)
at
org.hibernate.action.EntityInsertAction.execute(EntityInsert Action.java:56)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:25 0)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue. java:234)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue. java:141)
at
org.hibernate.event.def.AbstractFlushingEventListener.perfor mExecutions(AbstractFlushingEventListener.java:298)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(De faultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at
org.eclipse.emf.teneo.hibernate.HbSessionWrapper.flush(HbSes sionWrapper.java:161)
at
org.eclipse.emf.teneo.hibernate.resource.HibernateResource.s aveResource(HibernateResource.java:348)
at
org.eclipse.emf.teneo.resource.StoreResource.save(StoreResou rce.java:348)



Here some more trace back:
835832 [main] DEBUG org.hibernate.SQL - insert into "ecore_eobject"
(e_version, econtainer_class, e_container, e_container_featureid,
"visible", "type", "element_type", "element_id", "name",
"measurementunit", "dtype", e_id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
'Diagram', ?)
835832 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - preparing
statement
835842 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister
- Dehydrating entity: [Diagram#65539]
835842 [main] DEBUG org.hibernate.type.IntegerType - binding '0' to
parameter: 1
835842 [main] DEBUG org.hibernate.type.IntegerType - binding '0' to
parameter: 4
835842 [main] DEBUG org.hibernate.type.BooleanType - binding 'true' to
parameter: 5
835842 [main] DEBUG org.hibernate.type.StringType - binding 'Odm' to
parameter: 6
835842 [main] DEBUG org.hibernate.type.StringType - binding 'Jobplan' to
parameter: 7
835842 [main] DEBUG org.hibernate.type.LongType - binding '32768' to
parameter: 8
835842 [main] INFO org.hibernate.type.LongType - could not bind value
'32768' to parameter: 8; java.lang.Integer cannot be cast to java.lang.Long
835842 [main] DEBUG org.hibernate.jdbc.ConnectionManager - registering
flush end


Persisting my on model "Jobplan" works fine, but persisting the "Diagram"
doesn't work :(!

Thank you very any help!

Best regards,
Matthias
Previous Topic:[EMFatic] antlr 3.x IP Quetion
Next Topic:Teneo - NamedQuery annotation support
Goto Forum:
  


Current Time: Sun Jun 13 19:54:36 GMT 2021

Powered by FUDForum. Page generated in 0.01416 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top