Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361346

Summary: Packages are not automatically registered
Product: [Modeling] EMF Reporter: Federico Tomassetti <f.tomassetti>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: minor    
Priority: P3    
Version: 4.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Federico Tomassetti CLA 2011-10-19 03:50:01 EDT
Build Identifier: 

When the method view.getRootResource() is invoked sometimes an exception is thrown because a metamodel is not registered.

(org.eclipse.emf.cdo.common.util.CDOException: Generated packages locally not available: CDOPackageUnit[id=http://www.eclipse.org/emf/CDO/Eresource/4.0.0, state=PROXY, type=UNKNOWN, originalType=NATIVE, timeStamp=2011-10-14 11:32:20.183])

The problem disappears registering manually the metamodel.

(see discussion starting with http://www.eclipse.org/forums/index.php/mv/msg/203918/651989/#msg_651989)

Reproducible: Sometimes

Steps to Reproduce:
1. Start the server
2. Insert an object using a metamodel of your choice 
3. From another program try to access the root of that resource
Comment 1 Federico Tomassetti CLA 2011-12-15 08:50:53 EST
Consider using the solutions proposed in:

https://bugs.eclipse.org/bugs/show_bug.cgi?format=multiple&id=252956

Invoking:

session.options().setGeneratedPackageEmulationEnabled(true); 

solve the problem.

Maybe that should be the default.
Comment 2 Eike Stepper CLA 2011-12-15 12:39:11 EST
commit 5869f4b67436992a19e1ccaa644892085336a88d
Comment 3 Eike Stepper CLA 2011-12-15 12:39:58 EST
Port to 4.0 via bug 366844.
Comment 4 Eike Stepper CLA 2012-01-06 13:51:16 EST
*** Bug 367170 has been marked as a duplicate of this bug. ***
Comment 5 Eike Stepper CLA 2012-09-21 07:17:00 EDT
Closing.