Skip to main content



      Home
Home » Modeling » EMF » [CDO] EmbeddedRepositoryExample is not working
[CDO] EmbeddedRepositoryExample is not working [message #1864030] Tue, 12 March 2024 08:55 Go to next message
Eclipse UserFriend
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)

Thank you for your help

[Updated on: Wed, 24 July 2024 05:43] by Moderator

Re: [CDO] EmbeddedRepositoryExample is not working [message #1864479 is a reply to message #1864030] Tue, 19 March 2024 04:41 Go to previous message
Eclipse UserFriend
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:Library Upgrade Issues
Goto Forum:
  


Current Time: Sun Jul 06 12:10:42 EDT 2025

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

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

Back to the top