Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO Teneo] Problem mapping an EJavaObject using a CDO Server with a Hibernate Datastore
[CDO Teneo] Problem mapping an EJavaObject using a CDO Server with a Hibernate Datastore [message #509760] Mon, 25 January 2010 10:29 Go to next message
Bjoern Sundin is currently offline Bjoern SundinFriend
Messages: 47
Registered: July 2009
Member
After converting my application from Teneo/Hibernate to CDO (3.0) using a
Teneo Hibernate Datastore I have a problem with an EJavaObject not being
mapped anymore. Basically is it a java object that I would like to store
binary into the database. With teneo 1.0.1 it worked (using derby or mysql).
Attached is a text file with the hbm mapping and stack traces (log.txt).



Details:

Line 2728:

<property name="value" lazy="false" insert="true" update="true"
not-null="false" unique="false">

<column not-null="false" unique="false" name="`value`" length="1024"/>

<type
name=" org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype ">

<param name="edatatype">EJavaObject</param>

<param
name="epackage">http://www.eclipse.org/emf/2002/Ecore</param>

</type>

</property>



Exception:

Could not determine type for:

org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at

table: steptelegramcontent, for columns:

[org.hibernate.mapping.Column(value)]

org.hibernate.MappingException: Could not determine type for:

org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at

table: steptelegramcontent, for columns:

[org.hibernate.mapping.Column(value)]



Any help is appreciated!



Cheers

Bj
  • Attachment: log.zip
    (Size: 16.16KB, Downloaded 110 times)
Re: [CDO Teneo] Problem mapping an EJavaObject using a CDO Server with a Hibernate Datastore [message #509778 is a reply to message #509760] Mon, 25 January 2010 11:28 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Bjoern,
Yes this works very different than in Teneo. With CDO the types on the client (incl. user types) are not know on the
server. Afaiu CDO can not persist arbitrary user types as it needs to know how to (de-)serialize the objects when
sending them over from the client to the server and back.

Eike or others, how would this be handled? Is there a way that you can specify how an object value (not a native java
lang) should be send to the server?

Depending on how CDO sends the object to the server and represents it there, I can generate the correct mapping for
these non-mapped types.

Btw, I am not sure if this is a blocking issue for you, but you can annotate the efeature as transient then it won't be
persisted for now, so you are not stuck.

gr. Martin

Bjoern Sundin wrote:
> After converting my application from Teneo/Hibernate to CDO (3.0) using a
> Teneo Hibernate Datastore I have a problem with an EJavaObject not being
> mapped anymore. Basically is it a java object that I would like to store
> binary into the database. With teneo 1.0.1 it worked (using derby or mysql).
> Attached is a text file with the hbm mapping and stack traces (log.txt).
>
>
>
> Details:
>
> Line 2728:
>
> <property name="value" lazy="false" insert="true" update="true"
> not-null="false" unique="false">
>
> <column not-null="false" unique="false" name="`value`" length="1024"/>
>
> <type
> name=" org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype ">
>
> <param name="edatatype">EJavaObject</param>
>
> <param
> name="epackage">http://www.eclipse.org/emf/2002/Ecore</param>
>
> </type>
>
> </property>
>
>
>
> Exception:
>
> Could not determine type for:
>
> org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at
>
> table: steptelegramcontent, for columns:
>
> [org.hibernate.mapping.Column(value)]
>
> org.hibernate.MappingException: Could not determine type for:
>
> org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at
>
> table: steptelegramcontent, for columns:
>
> [org.hibernate.mapping.Column(value)]
>
>
>
> Any help is appreciated!
>
>
>
> Cheers
>
> Björn
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [CDO Teneo] Problem mapping an EJavaObject using a CDO Server with a Hibernate Datastore [message #509785 is a reply to message #509778] Mon, 25 January 2010 07:28 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hey Guys,

So far we've not been giving much thought on binary EDataTypes like java
objects or even streams. Currently all EDataTypes except the most
primitive ones and their wrappers have a special handling to make them
serialize efficiently. All other types and especially custom EDataTypes
(as opposed to the ones in Ecore) are (de-) serialized as Strings.

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Martin Taal schrieb:
> Hi Bjoern,
> Yes this works very different than in Teneo. With CDO the types on the
> client (incl. user types) are not know on the server. Afaiu CDO can
> not persist arbitrary user types as it needs to know how to
> (de-)serialize the objects when sending them over from the client to
> the server and back.
>
> Eike or others, how would this be handled? Is there a way that you can
> specify how an object value (not a native java lang) should be send to
> the server?
>
> Depending on how CDO sends the object to the server and represents it
> there, I can generate the correct mapping for these non-mapped types.
>
> Btw, I am not sure if this is a blocking issue for you, but you can
> annotate the efeature as transient then it won't be persisted for now,
> so you are not stuck.
>
> gr. Martin
>
> Bjoern Sundin wrote:
>> After converting my application from Teneo/Hibernate to CDO (3.0)
>> using a Teneo Hibernate Datastore I have a problem with an
>> EJavaObject not being mapped anymore. Basically is it a java object
>> that I would like to store binary into the database. With teneo 1.0.1
>> it worked (using derby or mysql). Attached is a text file with the
>> hbm mapping and stack traces (log.txt).
>>
>>
>>
>> Details:
>>
>> Line 2728:
>>
>> <property name="value" lazy="false" insert="true" update="true"
>> not-null="false" unique="false">
>>
>> <column not-null="false" unique="false" name="`value`"
>> length="1024"/>
>>
>> <type
>> name=" org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype ">
>>
>> <param name="edatatype">EJavaObject</param>
>>
>> <param
>> name="epackage">http://www.eclipse.org/emf/2002/Ecore</param>
>>
>> </type>
>>
>> </property>
>>
>>
>>
>> Exception:
>>
>> Could not determine type for:
>>
>> org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at
>>
>> table: steptelegramcontent, for columns:
>>
>> [org.hibernate.mapping.Column(value)]
>>
>> org.hibernate.MappingException: Could not determine type for:
>>
>> org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at
>>
>> table: steptelegramcontent, for columns:
>>
>> [org.hibernate.mapping.Column(value)]
>>
>>
>>
>> Any help is appreciated!
>>
>>
>>
>> Cheers
>>
>> Björn
>>
>>
>
>


Re: [CDO Teneo] Problem mapping an EJavaObject using a CDO Server with a Hibernate Datastore [message #509790 is a reply to message #509778] Mon, 25 January 2010 12:41 Go to previous messageGo to next message
Bjoern Sundin is currently offline Bjoern SundinFriend
Messages: 19
Registered: July 2009
Location: Switzerland
Junior Member
Hello Martin,

Thanks for the tip about annotating the efeature as transient, it will have to be a temporary workaround in order for me to go on with the feasibility tests I'm doing right now.

Cheers
Björn
Re: [CDO Teneo] Problem mapping an EJavaObject using a CDO Server with a Hibernate Datastore [message #509794 is a reply to message #509785] Mon, 25 January 2010 12:50 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Eike,
Okay clear.

Is there a test case in the current test suite which shows this, use an unknown edatatype, case?

I need to make a small change in the mapping logic to handle this. For everyones info, here is the bugzilla covering it:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=300659

gr. Martin

Eike Stepper wrote:
> Hey Guys,
>
> So far we've not been giving much thought on binary EDataTypes like java
> objects or even streams. Currently all EDataTypes except the most
> primitive ones and their wrappers have a special handling to make them
> serialize efficiently. All other types and especially custom EDataTypes
> (as opposed to the ones in Ecore) are (de-) serialized as Strings.
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
> Martin Taal schrieb:
>> Hi Bjoern,
>> Yes this works very different than in Teneo. With CDO the types on the
>> client (incl. user types) are not know on the server. Afaiu CDO can
>> not persist arbitrary user types as it needs to know how to
>> (de-)serialize the objects when sending them over from the client to
>> the server and back.
>>
>> Eike or others, how would this be handled? Is there a way that you can
>> specify how an object value (not a native java lang) should be send to
>> the server?
>>
>> Depending on how CDO sends the object to the server and represents it
>> there, I can generate the correct mapping for these non-mapped types.
>>
>> Btw, I am not sure if this is a blocking issue for you, but you can
>> annotate the efeature as transient then it won't be persisted for now,
>> so you are not stuck.
>>
>> gr. Martin
>>
>> Bjoern Sundin wrote:
>>> After converting my application from Teneo/Hibernate to CDO (3.0)
>>> using a Teneo Hibernate Datastore I have a problem with an
>>> EJavaObject not being mapped anymore. Basically is it a java object
>>> that I would like to store binary into the database. With teneo 1.0.1
>>> it worked (using derby or mysql). Attached is a text file with the
>>> hbm mapping and stack traces (log.txt).
>>>
>>>
>>>
>>> Details:
>>>
>>> Line 2728:
>>>
>>> <property name="value" lazy="false" insert="true" update="true"
>>> not-null="false" unique="false">
>>>
>>> <column not-null="false" unique="false" name="`value`"
>>> length="1024"/>
>>>
>>> <type
>>> name=" org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype ">
>>>
>>> <param name="edatatype">EJavaObject</param>
>>>
>>> <param
>>> name="epackage">http://www.eclipse.org/emf/2002/Ecore</param>
>>>
>>> </type>
>>>
>>> </property>
>>>
>>>
>>>
>>> Exception:
>>>
>>> Could not determine type for:
>>>
>>> org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at
>>>
>>> table: steptelegramcontent, for columns:
>>>
>>> [org.hibernate.mapping.Column(value)]
>>>
>>> org.hibernate.MappingException: Could not determine type for:
>>>
>>> org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at
>>>
>>> table: steptelegramcontent, for columns:
>>>
>>> [org.hibernate.mapping.Column(value)]
>>>
>>>
>>>
>>> Any help is appreciated!
>>>
>>>
>>>
>>> Cheers
>>>
>>> Björn
>>>
>>>
>>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [CDO Teneo] Problem mapping an EJavaObject using a CDO Server with a Hibernate Datastore [message #509801 is a reply to message #509794] Mon, 25 January 2010 12:55 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Martin Taal schrieb:
> Hi Eike,
> Okay clear.
>
> Is there a test case in the current test suite which shows this, use
> an unknown edatatype, case?
Hard to say. But I couldn't find any ecore file with the string:

xsi:type="ecore:EDataType"

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper


>
> I need to make a small change in the mapping logic to handle this. For
> everyones info, here is the bugzilla covering it:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=300659
>
> gr. Martin
>
> Eike Stepper wrote:
>> Hey Guys,
>>
>> So far we've not been giving much thought on binary EDataTypes like java
>> objects or even streams. Currently all EDataTypes except the most
>> primitive ones and their wrappers have a special handling to make them
>> serialize efficiently. All other types and especially custom EDataTypes
>> (as opposed to the ones in Ecore) are (de-) serialized as Strings.
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>
>> Martin Taal schrieb:
>>> Hi Bjoern,
>>> Yes this works very different than in Teneo. With CDO the types on the
>>> client (incl. user types) are not know on the server. Afaiu CDO can
>>> not persist arbitrary user types as it needs to know how to
>>> (de-)serialize the objects when sending them over from the client to
>>> the server and back.
>>>
>>> Eike or others, how would this be handled? Is there a way that you can
>>> specify how an object value (not a native java lang) should be send to
>>> the server?
>>>
>>> Depending on how CDO sends the object to the server and represents it
>>> there, I can generate the correct mapping for these non-mapped types.
>>>
>>> Btw, I am not sure if this is a blocking issue for you, but you can
>>> annotate the efeature as transient then it won't be persisted for now,
>>> so you are not stuck.
>>>
>>> gr. Martin
>>>
>>> Bjoern Sundin wrote:
>>>> After converting my application from Teneo/Hibernate to CDO (3.0)
>>>> using a Teneo Hibernate Datastore I have a problem with an
>>>> EJavaObject not being mapped anymore. Basically is it a java object
>>>> that I would like to store binary into the database. With teneo 1.0.1
>>>> it worked (using derby or mysql). Attached is a text file with the
>>>> hbm mapping and stack traces (log.txt).
>>>>
>>>>
>>>>
>>>> Details:
>>>>
>>>> Line 2728:
>>>>
>>>> <property name="value" lazy="false" insert="true" update="true"
>>>> not-null="false" unique="false">
>>>>
>>>> <column not-null="false" unique="false" name="`value`"
>>>> length="1024"/>
>>>>
>>>> <type
>>>> name=" org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype ">
>>>>
>>>>
>>>> <param name="edatatype">EJavaObject</param>
>>>>
>>>> <param
>>>> name="epackage">http://www.eclipse.org/emf/2002/Ecore</param>
>>>>
>>>> </type>
>>>>
>>>> </property>
>>>>
>>>>
>>>>
>>>> Exception:
>>>>
>>>> Could not determine type for:
>>>>
>>>> org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at
>>>>
>>>> table: steptelegramcontent, for columns:
>>>>
>>>> [org.hibernate.mapping.Column(value)]
>>>>
>>>> org.hibernate.MappingException: Could not determine type for:
>>>>
>>>> org.eclipse.emf.teneo.hibernate.mapping.DefaultToStringUserT ype, at
>>>>
>>>> table: steptelegramcontent, for columns:
>>>>
>>>> [org.hibernate.mapping.Column(value)]
>>>>
>>>>
>>>>
>>>> Any help is appreciated!
>>>>
>>>>
>>>>
>>>> Cheers
>>>>
>>>> Björn
>>>>
>>>>
>>>
>
>


Previous Topic:[CDO Teneo] Cannot start a CDO Server with a Hibernate Datastore using a Derby Database
Next Topic:Containament reference upper bound
Goto Forum:
  


Current Time: Fri Apr 19 19:07:59 GMT 2024

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

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

Back to the top