Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » [Teneo] Newbie question: Do I really have to register all my packages to Teneo manually? (using data
[Teneo] Newbie question: Do I really have to register all my packages to Teneo manually? (using data [message #69983] |
Fri, 02 February 2007 08:29 |
JG Messages: 51 Registered: July 2009 |
Member |
|
|
Hello,
I am just looking at Teneo, since I was looking for an elegant solution
to get a relational persistence solution for my rather complex model. It
consists of numerous nested packages. When I did my first simple test to
persist a small example model (I just used the setup code from the Teneo
library example and replaced writer/author/etc. with my classes, all of
which are within a single package, which I set to the DataStore using
setEPackages), I received a NullPointerException when the Mapping was
created. From the output code I figured that the culprit was a reference
to a class in another package (which I had to added with setEPackage).
So i did, and now the mapping generation stuck at another external
reference. Since all my packages are connected in one way or another, I
would have to add them all. Since I add to the model regularly, that
would require modifying the code whenever I introduce a new package. Is
there a way around this problem, i.e., can I tell Teneo to include the
"transitive closure" of packages?
Regards
Jürgen
|
|
| |
Re: [Teneo] Newbie question: Do I really have to register all my packages to Teneo manually? (using [message #70025 is a reply to message #69983] |
Fri, 02 February 2007 12:53 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Jurgen,
No there is currently no option to do that. Using the code posted by Ed in the other post I think
you can solve this on your side.
How many epackages do you have? And how many epackages do you add/remove per week?
Can you post the npe stacktrace or enter a bugzilla for it? Then I can improve the error handling.
gr. Martin
JG wrote:
> Hello,
>
> I am just looking at Teneo, since I was looking for an elegant solution
> to get a relational persistence solution for my rather complex model. It
> consists of numerous nested packages. When I did my first simple test to
> persist a small example model (I just used the setup code from the Teneo
> library example and replaced writer/author/etc. with my classes, all of
> which are within a single package, which I set to the DataStore using
> setEPackages), I received a NullPointerException when the Mapping was
> created. From the output code I figured that the culprit was a reference
> to a class in another package (which I had to added with setEPackage).
> So i did, and now the mapping generation stuck at another external
> reference. Since all my packages are connected in one way or another, I
> would have to add them all. Since I add to the model regularly, that
> would require modifying the code whenever I introduce a new package. Is
> there a way around this problem, i.e., can I tell Teneo to include the
> "transitive closure" of packages?
>
> Regards
>
> Jürgen
--
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
|
|
|
Re: [Teneo] Newbie question: Do I really have to register all my packages to Teneo manually? (using [message #70045 is a reply to message #70025] |
Fri, 02 February 2007 13:48 |
Aleksander Bandelj Messages: 98 Registered: July 2009 |
Member |
|
|
Just to chime in, this seems similar to:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=172645
Martin Taal wrote:
> Hi Jurgen,
> No there is currently no option to do that. Using the code posted by
> Ed in the other post I think you can solve this on your side.
> How many epackages do you have? And how many epackages do you
> add/remove per week?
>
> Can you post the npe stacktrace or enter a bugzilla for it? Then I can
> improve the error handling.
>
> gr. Martin
>
> JG wrote:
>> Hello,
>>
>> I am just looking at Teneo, since I was looking for an elegant solution
>> to get a relational persistence solution for my rather complex model. It
>> consists of numerous nested packages. When I did my first simple test to
>> persist a small example model (I just used the setup code from the Teneo
>> library example and replaced writer/author/etc. with my classes, all of
>> which are within a single package, which I set to the DataStore using
>> setEPackages), I received a NullPointerException when the Mapping was
>> created. From the output code I figured that the culprit was a reference
>> to a class in another package (which I had to added with setEPackage).
>> So i did, and now the mapping generation stuck at another external
>> reference. Since all my packages are connected in one way or another, I
>> would have to add them all. Since I add to the model regularly, that
>> would require modifying the code whenever I introduce a new package. Is
>> there a way around this problem, i.e., can I tell Teneo to include the
>> "transitive closure" of packages?
>>
>> Regards
>>
>> J�rgen
>
>
|
|
| |
Re: [Teneo] Newbie question: Do I really have to register all my packages to Teneo manually? (using [message #70084 is a reply to message #70045] |
Fri, 02 February 2007 14:00 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Yes I saw your bugzilla. The same npe was reported before, is your problem similar to this post:
http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg01760.html
He made this change:
http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg01786.html
Does this (possibly) also apply to your case?
gr. Martin
Aleksander Bandelj wrote:
> Just to chime in, this seems similar to:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=172645
>
> Martin Taal wrote:
>> Hi Jurgen,
>> No there is currently no option to do that. Using the code posted by
>> Ed in the other post I think you can solve this on your side.
>> How many epackages do you have? And how many epackages do you
>> add/remove per week?
>>
>> Can you post the npe stacktrace or enter a bugzilla for it? Then I can
>> improve the error handling.
>>
>> gr. Martin
>>
>> JG wrote:
>>> Hello,
>>>
>>> I am just looking at Teneo, since I was looking for an elegant solution
>>> to get a relational persistence solution for my rather complex model. It
>>> consists of numerous nested packages. When I did my first simple test to
>>> persist a small example model (I just used the setup code from the Teneo
>>> library example and replaced writer/author/etc. with my classes, all of
>>> which are within a single package, which I set to the DataStore using
>>> setEPackages), I received a NullPointerException when the Mapping was
>>> created. From the output code I figured that the culprit was a reference
>>> to a class in another package (which I had to added with setEPackage).
>>> So i did, and now the mapping generation stuck at another external
>>> reference. Since all my packages are connected in one way or another, I
>>> would have to add them all. Since I add to the model regularly, that
>>> would require modifying the code whenever I introduce a new package. Is
>>> there a way around this problem, i.e., can I tell Teneo to include the
>>> "transitive closure" of packages?
>>>
>>> Regards
>>>
>>> J�rgen
>>
>>
>
--
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
|
|
|
Re: [Teneo] Newbie question: Do I really have to register all my packages to Teneo manually? (using [message #70105 is a reply to message #70025] |
Fri, 02 February 2007 14:08 |
JG Messages: 51 Registered: July 2009 |
Member |
|
|
Martin Taal wrote:
> Hi Jurgen,
> No there is currently no option to do that. Using the code posted by Ed
> in the other post I think you can solve this on your side.
> How many epackages do you have? And how many epackages do you add/remove
> per week?
Its not so much an issue if *I* have to do that, but what I am building
right now is supposed to be extensible by other people, ideally by only
designing a model that extends my "core" model. So I would like to keep
dependencies on the actual packages present minimal -- zero at best.
> Can you post the npe stacktrace or enter a bugzilla for it? Then I can
> improve the error handling.
I got a lot of different errors. When I first encountered the problem,
looked at Teneo's debug output, telling me that it was just handling an
inbound "package-external" (don't know a better word) reference. So I
added this package. On the next run, I would get a very different stack
trace. So I added more packages. And was greeted with another, so I
decided to "just for now" add all packages. That's when I wrote the posting.
I appended the first two stack traces. ModelElement is that pivotal
class of mine, toMatches is the name of a reference to ModelElement
coming from another package.
[DEBUG] Adding manytomany annotations to ereference:
virtualContainer/ModelElement
[DEBUG] Setting indexed and unique from ereference.isOrdered/isUnique
because mtm was not set manually!
[DEBUG] Adding manytomany annotations to ereference: toMatches/ModelElement
Exception in thread "main" java.lang.NullPointerException
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessBidirectionalManyToManyReference(DefaultAnnotator.java: 877)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessEFeature(DefaultAnnotator.java:516)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:400)
at
org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 140)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:277)
at
org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 140)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:277)
at
org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 140)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:277)
at
org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 140)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessPackage(DefaultAnnotator.java:239)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.ma p(DefaultAnnotator.java:155)
at
org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:157)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.mapEPackages(HbD ataStore.java:377)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.mapModel(HbDataS tore.java:366)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.initialize(HbDat aStore.java:156)
at paladin.TeneoTest.main(TeneoTest.java:52)
After adding this one package, I get this one.
[DEBUG] Setting unique because is bidirectional (has eopposite) otm
[DEBUG] EReference + Reference/Clazz does not have a onetomany
annotation, adding one
[DEBUG] Setting indexed and unique from ereference because otm was not
set manually!
[DEBUG] Setting unique because is bidirectional (has eopposite) otm
Exception in thread "main" java.lang.NullPointerException
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.ge tIDFeaturesNames(DefaultAnnotator.java:1306)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.ge tJoinColumns(DefaultAnnotator.java:1126)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.ad dJoinColumns(DefaultAnnotator.java:1119)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessOneToManyReference(DefaultAnnotator.java:828)
at
org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processOneToManyReference(HibernateDefaultAn notator.java:176)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessEFeature(DefaultAnnotator.java:520)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:400)
at
org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 140)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessPackage(DefaultAnnotator.java:239)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.ma p(DefaultAnnotator.java:155)
at
org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:157)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.mapEPackages(HbD ataStore.java:377)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.mapModel(HbDataS tore.java:366)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.initialize(HbDat aStore.java:156)
at paladin.TeneoTest.main(TeneoTest.java:53)
|
|
|
Re: [Teneo] Newbie question: Do I really have to register all my packages to Teneo manually? (using [message #70245 is a reply to message #70084] |
Fri, 02 February 2007 16:37 |
Aleksander Bandelj Messages: 98 Registered: July 2009 |
Member |
|
|
It seems that he had references with file paths for ecore models, for
example src/srd/impl/srd.ecore#//EnumType and that something went wrong
with resolving these when loading ecore resources. I don't see how, with
correct relative path everything should be OK and if path was wrong,
exception would be thrown. Anyway, in my case, all references are
without file paths and ecore files are in same directory.
To express problem more clearly: I think that while creating
PAnnotations for EReference, Annotator tries to get name of Entity
PAnnotation. But this name is null, since referenced class hasn't been
processed yet, hence NullPointerException. If I add explicit @OneToMany
to EReference, NullPointerException is not thrown.
There are differences between processing dynamic and static models which
I don't understand clearly at this moment. I think the issue applies to
both, so dynamic in bugzilla title is probably a misnomer.
Martin Taal wrote:
> Yes I saw your bugzilla. The same npe was reported before, is your
> problem similar to this post:
> http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg01760.html
>
>
> He made this change:
> http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg01786.html
>
>
> Does this (possibly) also apply to your case?
>
> gr. Martin
>
> Aleksander Bandelj wrote:
>> Just to chime in, this seems similar to:
>>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=172645
>>
>> Martin Taal wrote:
>>> Hi Jurgen,
>>> No there is currently no option to do that. Using the code posted by
>>> Ed in the other post I think you can solve this on your side.
>>> How many epackages do you have? And how many epackages do you
>>> add/remove per week?
>>>
>>> Can you post the npe stacktrace or enter a bugzilla for it? Then I
>>> can improve the error handling.
>>>
>>> gr. Martin
>>>
>>> JG wrote:
>>>> Hello,
>>>>
>>>> I am just looking at Teneo, since I was looking for an elegant
>>>> solution
>>>> to get a relational persistence solution for my rather complex
>>>> model. It
>>>> consists of numerous nested packages. When I did my first simple
>>>> test to
>>>> persist a small example model (I just used the setup code from the
>>>> Teneo
>>>> library example and replaced writer/author/etc. with my classes,
>>>> all of
>>>> which are within a single package, which I set to the DataStore using
>>>> setEPackages), I received a NullPointerException when the Mapping was
>>>> created. From the output code I figured that the culprit was a
>>>> reference
>>>> to a class in another package (which I had to added with setEPackage).
>>>> So i did, and now the mapping generation stuck at another external
>>>> reference. Since all my packages are connected in one way or
>>>> another, I
>>>> would have to add them all. Since I add to the model regularly, that
>>>> would require modifying the code whenever I introduce a new
>>>> package. Is
>>>> there a way around this problem, i.e., can I tell Teneo to include the
>>>> "transitive closure" of packages?
>>>>
>>>> Regards
>>>>
>>>> J�rgen
>>>
>>>
>>
>
>
|
|
| | | |
Re: [Teneo] Newbie question: Do I really have to register all my packages to Teneo manually? (using [message #601999 is a reply to message #69983] |
Fri, 02 February 2007 12:53 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Jurgen,
No there is currently no option to do that. Using the code posted by Ed in the other post I think
you can solve this on your side.
How many epackages do you have? And how many epackages do you add/remove per week?
Can you post the npe stacktrace or enter a bugzilla for it? Then I can improve the error handling.
gr. Martin
JG wrote:
> Hello,
>
> I am just looking at Teneo, since I was looking for an elegant solution
> to get a relational persistence solution for my rather complex model. It
> consists of numerous nested packages. When I did my first simple test to
> persist a small example model (I just used the setup code from the Teneo
> library example and replaced writer/author/etc. with my classes, all of
> which are within a single package, which I set to the DataStore using
> setEPackages), I received a NullPointerException when the Mapping was
> created. From the output code I figured that the culprit was a reference
> to a class in another package (which I had to added with setEPackage).
> So i did, and now the mapping generation stuck at another external
> reference. Since all my packages are connected in one way or another, I
> would have to add them all. Since I add to the model regularly, that
> would require modifying the code whenever I introduce a new package. Is
> there a way around this problem, i.e., can I tell Teneo to include the
> "transitive closure" of packages?
>
> Regards
>
> Jürgen
--
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
|
|
|
Re: [Teneo] Newbie question: Do I really have to register all my packages to Teneo manually? (using [message #602004 is a reply to message #70025] |
Fri, 02 February 2007 13:48 |
Aleksander Bandelj Messages: 98 Registered: July 2009 |
Member |
|
|
Just to chime in, this seems similar to:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=172645
Martin Taal wrote:
> Hi Jurgen,
> No there is currently no option to do that. Using the code posted by
> Ed in the other post I think you can solve this on your side.
> How many epackages do you have? And how many epackages do you
> add/remove per week?
>
> Can you post the npe stacktrace or enter a bugzilla for it? Then I can
> improve the error handling.
>
> gr. Martin
>
> JG wrote:
>> Hello,
>>
>> I am just looking at Teneo, since I was looking for an elegant solution
>> to get a relational persistence solution for my rather complex model. It
>> consists of numerous nested packages. When I did my first simple test to
>> persist a small example model (I just used the setup code from the Teneo
>> library example and replaced writer/author/etc. with my classes, all of
>> which are within a single package, which I set to the DataStore using
>> setEPackages), I received a NullPointerException when the Mapping was
>> created. From the output code I figured that the culprit was a reference
>> to a class in another package (which I had to added with setEPackage).
>> So i did, and now the mapping generation stuck at another external
>> reference. Since all my packages are connected in one way or another, I
>> would have to add them all. Since I add to the model regularly, that
>> would require modifying the code whenever I introduce a new package. Is
>> there a way around this problem, i.e., can I tell Teneo to include the
>> "transitive closure" of packages?
>>
>> Regards
>>
>> J�rgen
>
>
|
|
| |
Re: [Teneo] Newbie question: Do I really have to register all my packages to Teneo manually? (using [message #602016 is a reply to message #70045] |
Fri, 02 February 2007 14:00 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Yes I saw your bugzilla. The same npe was reported before, is your problem similar to this post:
http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg01760.html
He made this change:
http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg01786.html
Does this (possibly) also apply to your case?
gr. Martin
Aleksander Bandelj wrote:
> Just to chime in, this seems similar to:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=172645
>
> Martin Taal wrote:
>> Hi Jurgen,
>> No there is currently no option to do that. Using the code posted by
>> Ed in the other post I think you can solve this on your side.
>> How many epackages do you have? And how many epackages do you
>> add/remove per week?
>>
>> Can you post the npe stacktrace or enter a bugzilla for it? Then I can
>> improve the error handling.
>>
>> gr. Martin
>>
>> JG wrote:
>>> Hello,
>>>
>>> I am just looking at Teneo, since I was looking for an elegant solution
>>> to get a relational persistence solution for my rather complex model. It
>>> consists of numerous nested packages. When I did my first simple test to
>>> persist a small example model (I just used the setup code from the Teneo
>>> library example and replaced writer/author/etc. with my classes, all of
>>> which are within a single package, which I set to the DataStore using
>>> setEPackages), I received a NullPointerException when the Mapping was
>>> created. From the output code I figured that the culprit was a reference
>>> to a class in another package (which I had to added with setEPackage).
>>> So i did, and now the mapping generation stuck at another external
>>> reference. Since all my packages are connected in one way or another, I
>>> would have to add them all. Since I add to the model regularly, that
>>> would require modifying the code whenever I introduce a new package. Is
>>> there a way around this problem, i.e., can I tell Teneo to include the
>>> "transitive closure" of packages?
>>>
>>> Regards
>>>
>>> J�rgen
>>
>>
>
--
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
|
|
|
Re: [Teneo] Newbie question: Do I really have to register all my packages to Teneo manually? (using [message #602022 is a reply to message #70025] |
Fri, 02 February 2007 14:08 |
JG Messages: 51 Registered: July 2009 |
Member |
|
|
Martin Taal wrote:
> Hi Jurgen,
> No there is currently no option to do that. Using the code posted by Ed
> in the other post I think you can solve this on your side.
> How many epackages do you have? And how many epackages do you add/remove
> per week?
Its not so much an issue if *I* have to do that, but what I am building
right now is supposed to be extensible by other people, ideally by only
designing a model that extends my "core" model. So I would like to keep
dependencies on the actual packages present minimal -- zero at best.
> Can you post the npe stacktrace or enter a bugzilla for it? Then I can
> improve the error handling.
I got a lot of different errors. When I first encountered the problem,
looked at Teneo's debug output, telling me that it was just handling an
inbound "package-external" (don't know a better word) reference. So I
added this package. On the next run, I would get a very different stack
trace. So I added more packages. And was greeted with another, so I
decided to "just for now" add all packages. That's when I wrote the posting.
I appended the first two stack traces. ModelElement is that pivotal
class of mine, toMatches is the name of a reference to ModelElement
coming from another package.
[DEBUG] Adding manytomany annotations to ereference:
virtualContainer/ModelElement
[DEBUG] Setting indexed and unique from ereference.isOrdered/isUnique
because mtm was not set manually!
[DEBUG] Adding manytomany annotations to ereference: toMatches/ModelElement
Exception in thread "main" java.lang.NullPointerException
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessBidirectionalManyToManyReference(DefaultAnnotator.java: 877)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessEFeature(DefaultAnnotator.java:516)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:400)
at
org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 140)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:277)
at
org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 140)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:277)
at
org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 140)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:277)
at
org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 140)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessPackage(DefaultAnnotator.java:239)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.ma p(DefaultAnnotator.java:155)
at
org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:157)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.mapEPackages(HbD ataStore.java:377)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.mapModel(HbDataS tore.java:366)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.initialize(HbDat aStore.java:156)
at paladin.TeneoTest.main(TeneoTest.java:52)
After adding this one package, I get this one.
[DEBUG] Setting unique because is bidirectional (has eopposite) otm
[DEBUG] EReference + Reference/Clazz does not have a onetomany
annotation, adding one
[DEBUG] Setting indexed and unique from ereference because otm was not
set manually!
[DEBUG] Setting unique because is bidirectional (has eopposite) otm
Exception in thread "main" java.lang.NullPointerException
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.ge tIDFeaturesNames(DefaultAnnotator.java:1306)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.ge tJoinColumns(DefaultAnnotator.java:1126)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.ad dJoinColumns(DefaultAnnotator.java:1119)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessOneToManyReference(DefaultAnnotator.java:828)
at
org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processOneToManyReference(HibernateDefaultAn notator.java:176)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessEFeature(DefaultAnnotator.java:520)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessClass(DefaultAnnotator.java:400)
at
org.eclipse.emf.teneo.hibernate.hbannotation.util.HibernateD efaultAnnotator.processClass(HibernateDefaultAnnotator.java: 140)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.pr ocessPackage(DefaultAnnotator.java:239)
at
org.eclipse.emf.teneo.annotations.mapper.DefaultAnnotator.ma p(DefaultAnnotator.java:155)
at
org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:157)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.mapEPackages(HbD ataStore.java:377)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.mapModel(HbDataS tore.java:366)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.initialize(HbDat aStore.java:156)
at paladin.TeneoTest.main(TeneoTest.java:53)
|
|
|
Re: [Teneo] Newbie question: Do I really have to register all my packages to Teneo manually? (using [message #602065 is a reply to message #70084] |
Fri, 02 February 2007 16:37 |
Aleksander Bandelj Messages: 98 Registered: July 2009 |
Member |
|
|
It seems that he had references with file paths for ecore models, for
example src/srd/impl/srd.ecore#//EnumType and that something went wrong
with resolving these when loading ecore resources. I don't see how, with
correct relative path everything should be OK and if path was wrong,
exception would be thrown. Anyway, in my case, all references are
without file paths and ecore files are in same directory.
To express problem more clearly: I think that while creating
PAnnotations for EReference, Annotator tries to get name of Entity
PAnnotation. But this name is null, since referenced class hasn't been
processed yet, hence NullPointerException. If I add explicit @OneToMany
to EReference, NullPointerException is not thrown.
There are differences between processing dynamic and static models which
I don't understand clearly at this moment. I think the issue applies to
both, so dynamic in bugzilla title is probably a misnomer.
Martin Taal wrote:
> Yes I saw your bugzilla. The same npe was reported before, is your
> problem similar to this post:
> http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg01760.html
>
>
> He made this change:
> http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg01786.html
>
>
> Does this (possibly) also apply to your case?
>
> gr. Martin
>
> Aleksander Bandelj wrote:
>> Just to chime in, this seems similar to:
>>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=172645
>>
>> Martin Taal wrote:
>>> Hi Jurgen,
>>> No there is currently no option to do that. Using the code posted by
>>> Ed in the other post I think you can solve this on your side.
>>> How many epackages do you have? And how many epackages do you
>>> add/remove per week?
>>>
>>> Can you post the npe stacktrace or enter a bugzilla for it? Then I
>>> can improve the error handling.
>>>
>>> gr. Martin
>>>
>>> JG wrote:
>>>> Hello,
>>>>
>>>> I am just looking at Teneo, since I was looking for an elegant
>>>> solution
>>>> to get a relational persistence solution for my rather complex
>>>> model. It
>>>> consists of numerous nested packages. When I did my first simple
>>>> test to
>>>> persist a small example model (I just used the setup code from the
>>>> Teneo
>>>> library example and replaced writer/author/etc. with my classes,
>>>> all of
>>>> which are within a single package, which I set to the DataStore using
>>>> setEPackages), I received a NullPointerException when the Mapping was
>>>> created. From the output code I figured that the culprit was a
>>>> reference
>>>> to a class in another package (which I had to added with setEPackage).
>>>> So i did, and now the mapping generation stuck at another external
>>>> reference. Since all my packages are connected in one way or
>>>> another, I
>>>> would have to add them all. Since I add to the model regularly, that
>>>> would require modifying the code whenever I introduce a new
>>>> package. Is
>>>> there a way around this problem, i.e., can I tell Teneo to include the
>>>> "transitive closure" of packages?
>>>>
>>>> Regards
>>>>
>>>> J�rgen
>>>
>>>
>>
>
>
|
|
| | |
Goto Forum:
Current Time: Thu Sep 26 14:23:35 GMT 2024
Powered by FUDForum. Page generated in 0.04862 seconds
|