Skip to main content



      Home
Home » Modeling » EMF » [CDO/EMF] Ecore SubPackages & CDOPackage reading
[CDO/EMF] Ecore SubPackages & CDOPackage reading [message #1021715] Wed, 20 March 2013 11:04 Go to next message
Eclipse UserFriend
Hi everyone.

I have an Ecore model with root & subpackage as :
xxx.yyy.model
xxx.yyy.model.subpackage

When CDO server starts, it reads PackageUnits from database doing :
SELECT unit, uri, parent FROM cdo_package_infos

It seems that my both packages (root & sub) have the same unit : xxx.yyy.model.

The problem is that read packages are put in a HashMap, so I obtains only one entry for both packages.

So it causes a NPE in MetaDataManager.loadPackageUnit() when trying to resolve package with id="xxx.yyy.model".

If I go down in stack strace in CDOPackageRegistryImpl(EPackageRegistryImpl).getEPackage(String), I obtain this for parameter nsURI="xxx.yyy.model"

ePackageDescriptor (CDOPackageInfoImpl) :
CDOPackageInfo[packageURI=xxx.yyy.model, parentURI=null]
CDOPackageUnit[id=xxx.yyy.model.subpackage, state=PROXY, ...]


Does CDO support ECore subpackages ??

[Updated on: Wed, 20 March 2013 11:05] by Moderator

Re: [CDO/EMF] Ecore SubPackages & CDOPackage reading [message #1021719 is a reply to message #1021715] Wed, 20 March 2013 11:12 Go to previous messageGo to next message
Eclipse UserFriend
Found this :

Changed mapping of CDOPackageUnit to prevent multiple records for the same CDOPackageUnit

On this page :

http://permalink.gmane.org/gmane.comp.ide.eclipse.cdo.scm/380

Will CDO 4.1 fix my problem ???
Re: [CDO/EMF] Ecore SubPackages & CDOPackage reading [message #1021801 is a reply to message #1021719] Wed, 20 March 2013 13:55 Go to previous messageGo to next message
Eclipse UserFriend
Am 20.03.2013 16:12, schrieb ben ben:
> Found this :
>
> Changed mapping of CDOPackageUnit to prevent multiple records for the same CDOPackageUnit
>
> On this page :
>
> http://permalink.gmane.org/gmane.comp.ide.eclipse.cdo.scm/380
>
> Will CDO 4.1 fix my problem ???
I really hope so, but you should definitely try it. I'm not aware of current problems with subpackages.

Please note that 4.0 is out of maintenance and 4.2 is very near ;-)

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO/EMF] Ecore SubPackages & CDOPackage reading [message #1022054 is a reply to message #1021801] Thu, 21 March 2013 03:55 Go to previous message
Eclipse UserFriend
Thanks for your reply Eike.

I tried 4.1-SR2, I can't definitely be sure it fixes my bug cause my previous database (HSQLDB) is aleady corrupted, but I've seen in debug that each PackageUnit is now associated with several PackageInfos containing all subpackages.

Wait and see if my database doesn't become corrupted anymore but all this stuff seems to be good Wink

[Updated on: Thu, 21 March 2013 03:56] by Moderator

Previous Topic:CDO export/import of data
Next Topic:Databinding with resource as root
Goto Forum:
  


Current Time: Sat Jul 05 05:54:38 EDT 2025

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

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

Back to the top