Am 04.02.2013 09:24, schrieb Ricky de Klerck:
> Hi,
>
> I recently created a project with CDO M3 installed in Eclipse. I now updated to M4, but my application doesn't work
> anymore.
>
> First it complained about this line:
>
> session.getPackageRegistry().putEPackage(ModelPackage.eINSTANCE);
> CDOPackageRegistryPopulator.populate(session.getPackageRegistry());
>
> The error was that no packages can be added during runtime,
And the full stack trace?

> so use setInitial.. instead. So I deleted the line and added this line in the clone:
So, you're talking about an offline replication scenario?

>
> repo.setInitialPackages(ModelPackage.eINSTANCE);
>
> I Also tried adding it only in the server, but this makes no difference. I keep getting this error when saving my
> CDOResource:
>
> Package not found: http://model/1.0
And the full stack trace?

>
> What am I doing wrong? This code was working in M3..? Or should I add the setInitial is both the clone and the server?
Offline replication does not support the addition of packages to clones that have been synchronized with their master at
least once. That's why setInitialPackages() should be called on both master and clone *before* they're activated the
first time. After this first activation the call is ignored.

Am 04.02.2013 09:30, schrieb Ricky de Klerck:
> Well.. I tried to set the setInitialPackages in both the clone and server and now it works. Is this the way it suppose
> to be done from M4?
It's always been supposed to be done this way. I remember that an actual check was added later. With full stack traces
it would be easier for me to tell exactly when and where.