Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Resolved proxies return null
Resolved proxies return null [message #397347] Fri, 16 December 2005 07:49 Go to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: July 2009
Junior Member
Dear All,

I have some problems with deserializing my EMF model from XML files. I store
my model separated over two files. When I load one part of the model from
the first file everything works fines. For the objects stored in the other
file proxies are generated. But when I call any getter method of a proxy it
returns null.

First I though that maybe the proxies are not automatically resolved. But
using "EcoreUtil.UnresolvedProxyCrossReferencer.find()" returns only an
empty map. Also a manual resolving with the help of EcoreUtil.resolve()
failed. I checked also the URIs in the resource set and they are equal to
the ones used in the XML files.

Then I tried to load the referenced XML file to check whether the problem
lies in the deserialization of that file. But whithout having the proxies
between, it works fine.

After browsing the newsgroup I checked also wether all used objects are
either directly assigned to a resource or to a containment reference of an
object already in a resource. The used resources are also assigned to the
same resource set.

Now I have no idea what else I could check. Is there anyone who could give
me a hint?

Thanks,

Roland Mungenast
Re: Resolved proxies return null [message #397453 is a reply to message #397347] Fri, 16 December 2005 11:38 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Roland,

It sure sounds like the proxies aren't being resolved. You can test
EObject.eIsProxy to see if it is a proxy. Probably you should show some
code to give a better hint about what you are doing. Are you setting up
a resource set just like in the generated XyzExample in the *.tests
plugin when you load?


Roland Mungenast wrote:

>Dear All,
>
>I have some problems with deserializing my EMF model from XML files. I store
>my model separated over two files. When I load one part of the model from
>the first file everything works fines. For the objects stored in the other
>file proxies are generated. But when I call any getter method of a proxy it
>returns null.
>
>First I though that maybe the proxies are not automatically resolved. But
>using "EcoreUtil.UnresolvedProxyCrossReferencer.find()" returns only an
>empty map. Also a manual resolving with the help of EcoreUtil.resolve()
>failed. I checked also the URIs in the resource set and they are equal to
>the ones used in the XML files.
>
>Then I tried to load the referenced XML file to check whether the problem
>lies in the deserialization of that file. But whithout having the proxies
>between, it works fine.
>
>After browsing the newsgroup I checked also wether all used objects are
>either directly assigned to a resource or to a containment reference of an
>object already in a resource. The used resources are also assigned to the
>same resource set.
>
>Now I have no idea what else I could check. Is there anyone who could give
>me a hint?
>
>Thanks,
>
>Roland Mungenast
>
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Case-sensitive URL causes HREF to be ABSOLUTE
Next Topic:XSD2Ecore, Key/keyref support
Goto Forum:
  


Current Time: Fri Apr 26 00:04:34 GMT 2024

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

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

Back to the top