Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] EmbeddedRepositoryExample is not working
[CDO] EmbeddedRepositoryExample is not working [message #1864030] Tue, 12 March 2024 12:55 Go to next message
Antoine rrrrr is currently offline Antoine rrrrrFriend
Messages: 1
Registered: March 2024
Junior Member
Hi everybody,

I try to run the example EmbeddedRepositoryExample of org.eclipse.emf.cdo.examples.embedded but it's not working.
The first run there is no error, but the second when the database is already created i have a java.lang.NullPointerException.

I use the release 4.23 of CDO

this is my stack :
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageInfo.getPackageUnit()" because "packageInfo" is null
at org.eclipse.emf.cdo.internal.server.Repository.initPackage(Repository.java:2560)
at org.eclipse.emf.cdo.internal.server.Repository.initSystemPackages(Repository.java:2501)
at org.eclipse.emf.cdo.server.internal.embedded.EmbeddedRepository.initSystemPackages(EmbeddedRepository.java:80)
at org.eclipse.emf.cdo.internal.server.Repository.doActivate(Repository.java:2846)
at org.eclipse.net4j.util.lifecycle.Lifecycle.internalActivate(Lifecycle.java:76)
at org.eclipse.net4j.util.lifecycle.ShareableLifecycle.internalActivate(ShareableLifecycle.java:43)
at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:178)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:146)
at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:136)
at org.eclipse.emf.cdo.server.embedded.CDOEmbeddedRepositoryConfig.activateRepository(CDOEmbeddedRepositoryConfig.java:169)
at org.eclipse.emf.cdo.server.embedded.CDOEmbeddedRepositoryConfig.doActivate(CDOEmbeddedRepositoryConfig.java:198)
at thales.avs.maiia.cdo.CDOFacade.doActivate(CDOFacade.java:102)
at org.eclipse.net4j.util.lifecycle.Lifecycle.internalActivate(Lifecycle.java:76)
at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:178)
at thales.avs.maiia.cdo.EmbeddedRepositoryExample.main(EmbeddedRepositoryExample.java:18)

Thank you for your help
Re: [CDO] EmbeddedRepositoryExample is not working [message #1864479 is a reply to message #1864030] Tue, 19 March 2024 08:41 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
I changed the example code as follows:

  public static void main(String[] args) throws Exception
  {
    // In stand-alone initialize the needed EPackages eagerly!
    EcorePackage.eINSTANCE.getClass();
    EresourcePackage.eINSTANCE.getClass();
    EtypesPackage.eINSTANCE.getClass();
    CompanyPackage.eINSTANCE.getClass();

    CDOFacade.INSTANCE.activate();


I also inlined the private constant CDOFacade.DB_FOLDER to avoid init order problems, but I guess you did that, too ;-)


Previous Topic:Track change notifications
Next Topic:Order of multi-inheritance is not deterministic?
Goto Forum:
  


Current Time: Thu May 02 09:52:03 GMT 2024

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

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

Back to the top