Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Re: [Teneo] Hibernate xsd:any support / JPOX genereate MappingFile problem
Re: [Teneo] Hibernate xsd:any support / JPOX genereate MappingFile problem [message #615501] Sat, 16 February 2008 12:43
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Daniel,
See inline (MT>>>).

gr. Martin

Daniel Gerlach wrote:
> org.eclipse.emf.teneo.TeneoException: The dbid
>
http://docs.active-endpoints.com/activebpel/sample/wsdl/flig htTrackerService/2006/07/flightTrackerService.wsdl/DocumentR oot/FlightHistory

> and nsuri:
>
http://docs.active-endpoints.com/activebpel/sample/wsdl/flig htTrackerService/2006/07/flightTrackerService.wsdl

> does not resolve to an epackage
> (...)
>
> Is there a possible workaround to grab the EObjects which don't belongs
> to an registerd EPackage and save them as BLOBs in the database in a
> special table.
MT>> No this is currently not possible, Teneo assumes that all eobjects belong a registered
epackage. If you enter a bugzilla for this then I can see what I can do. But to be realistic, it is
a fair amount of work so it will take a while (> 1 month) before I can pick this up.

>
> 2. Because im am not tied to a special OR-Mapper, i tried JPOX 1.19 with
> Teneo, which according to elver.org supports "xsd:any". But here, i get
> an exception when i am creating the corresponding package.jdo for the
> given ecore. The exception happens when i programmaticly create the
> mapping and also from the eclipse/JPOX plugin- menu.
MT>> Hmm, I would need to debug this to see what happens. For one reason or another my news reader
(thunderbird) gets confused by your post. So I see the attachment content inline and can't download
them. Can you send them to me directly (mtaal@elver.org)?
But for jpox the same limitation as for hibernate applies, the epackage to which you refer should be
registered with Teneo.

>
> (...)
> 523 [main] DEBUG
> org.eclipse.emf.teneo.annotations.mapper.OneToManyReferenceA nnotator -
> EReference + correlation/Correlations does not have a onetomany
> annotation, adding one
> 523 [main] DEBUG
> org.eclipse.emf.teneo.annotations.mapper.OneToManyReferenceA nnotator -
> Setting indexed and unique from ereference because otm was not set manually!
> 523 [main] DEBUG
> org.eclipse.emf.teneo.annotations.mapper.EClassAnnotator - Creating
> mapping for eclass CorrelationSet
> 523 [main] DEBUG
> org.eclipse.emf.teneo.annotations.mapper.EClassAnnotator - Adding
> default annotations for EClass: CorrelationSet
> 524 [main] DEBUG
> org.eclipse.emf.teneo.annotations.mapper.EClassAnnotator - Setting the
> superentity of the eclass
> 524 [main] DEBUG
> org.eclipse.emf.teneo.annotations.mapper.SingleAttributeAnno tator -
> Adding default annotations for EAttribute name
> 524 [main] DEBUG
> org.eclipse.emf.teneo.annotations.mapper.OneToManyAttributeA nnotator -
> EAttribute properties/CorrelationSet needs a onetomany
> 524 [main] DEBUG
> org.eclipse.emf.teneo.annotations.mapper.OneToManyAttributeA nnotator -
> One to many not present adding one
> Exception in thread "main" java.lang.NullPointerException
> at
> org.eclipse.emf.teneo.util.EcoreDataTypes.getTargetTypeName( EcoreDataTypes.java:117)
> at
>
org.eclipse.emf.teneo.annotations.mapper.BaseEFeatureAnnotat or.getTargetTypeName(BaseEFeatureAnnotator.java:168)
> at
>
org.eclipse.emf.teneo.annotations.mapper.OneToManyAttributeA nnotator.annotate(OneToManyAttributeAnnotator.java:100)
> at
> org.eclipse.emf.teneo.annotations.mapper.EFeatureAnnotator.a nnotate(EFeatureAnnotator.java:135)
> at
> org.eclipse.emf.teneo.annotations.mapper.EClassAnnotator.ann otate(EClassAnnotator.java:223)
> at
>
org.eclipse.emf.teneo.annotations.mapper.AnnotationGenerator .processPackage(AnnotationGenerator.java:167)
> at
> org.eclipse.emf.teneo.annotations.mapper.AnnotationGenerator .map(AnnotationGenerator.java:135)
> at
>
org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:142)
> at
>
org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:66)
> at
> org.eclipse.emf.teneo.jpox.JpoxHelper.generateMapping(JpoxHe lper.java:162)
> at
> org.eclipse.emf.teneo.jpox.JpoxHelper.generateMapping(JpoxHe lper.java:153)
> at test.TestJpox.genMappingFile(TestJpox.java:54)
> at test.TestJpox.main(TestJpox.java:21)
>
>
> I have debugged a little bit and it seems the list of eClassifiers in
> the EcoreDataTypes.class has one entry which is set to null. But i
> haven't any clue what's happening here.....
>
>
> 3. One last little question:
>
> Hibernate offers to load an object from the database with the objectID:
>
> Code:
>
> session.load(objectID);
>
> or
>
> session.get(objectID);
>
> The context here is, that i work with detached objects and after the
> work is done, i want to reload these objects. I get the ID with
> IdentifierCacheHandler.getID(), but how can i load the objects with it.
>
> Is this possible in Teneo, or should i use a normal query to get the
> objects again?
MT>> The id which you get back from the IdentifierCacheHandler can be used as a normal id in
hibernate. Note the identifiercachehandler only works if your objects have stayed in-memory all the
time. So for example if you send them over the wire (in a client-server scenario) and get them back
then it won't work (as the object is a different instance in memory).

>
> Thanks in advance,
>
> Daniel Gerlach
>
>

--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
Previous Topic:[Teneo] Hibernate xsd:any support / JPOX genereate MappingFile problem
Next Topic:Re: [Teneo] Hibernate xsd:any support / JPOX genereate MappingFile problem
Goto Forum:
  


Current Time: Tue Jun 15 13:05:56 GMT 2021

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

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

Back to the top