Skip to main content



      Home
Home » Modeling » EMF » Resolved proxies return null
Resolved proxies return null [message #397347] Fri, 16 December 2005 02:49 Go to next message
Eclipse UserFriend
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 06:38 Go to previous message
Eclipse UserFriend
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
>
>
>
>
Previous Topic:Case-sensitive URL causes HREF to be ABSOLUTE
Next Topic:XSD2Ecore, Key/keyref support
Goto Forum:
  


Current Time: Fri Jul 11 20:23:51 EDT 2025

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

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

Back to the top