Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] "Synchronizable repositories don't support dynamic addition of new packages"
[CDO] "Synchronizable repositories don't support dynamic addition of new packages" [message #1699108] Sun, 21 June 2015 11:11 Go to next message
Richard Meyer is currently offline Richard MeyerFriend
Messages: 40
Registered: June 2012
Member
Hy all,

I'm trying to run the Failover example (org.eclipse.emf.cdo.examples.server.FailoverExample).
I have successful started Agent1 and Agent2.
But if I try to start the Client I get the following exception:

Exception in thread "main" java.lang.RuntimeException: org.eclipse.emf.cdo.util.CommitException: Rollback in DBStore: java.lang.IllegalStateException: Synchronizable repositories don't support dynamic addition of new packages. Use IRepository.setInitialPackages() instead.
	at org.eclipse.emf.cdo.internal.server.syncing.SynchronizableRepository.notifyWriteAccessHandlers(SynchronizableRepository.java:547)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.notifyBeforeCommitting(TransactionCommitContext.java:463)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.applyIDMappings(TransactionCommitContext.java:427)
	at org.eclipse.emf.cdo.spi.server.StoreAccessor.applyIDMappings(StoreAccessor.java:160)
	at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.applyIDMappings(DBStoreAccessor.java:480)
	at org.eclipse.emf.cdo.spi.server.StoreAccessor.doWrite(StoreAccessor.java:89)
	at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:152)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:651)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:47)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:1033)
	at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:1026)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:320)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:105)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:110)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:87)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:92)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:331)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:65)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:66)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:256)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

	at org.eclipse.emf.cdo.examples.server.FailoverExample$Monitored$Client.addObject(FailoverExample.java:597)
	at org.eclipse.emf.cdo.examples.server.FailoverExample$Monitored$Client.main(FailoverExample.java:558)
Caused by: org.eclipse.emf.cdo.util.CommitException: Rollback in DBStore: java.lang.IllegalStateException: Synchronizable repositories don't support dynamic addition of new packages. Use IRepository.setInitialPackages() instead.
	at org.eclipse.emf.cdo.internal.server.syncing.SynchronizableRepository.notifyWriteAccessHandlers(SynchronizableRepository.java:547)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.notifyBeforeCommitting(TransactionCommitContext.java:463)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.applyIDMappings(TransactionCommitContext.java:427)
	at org.eclipse.emf.cdo.spi.server.StoreAccessor.applyIDMappings(StoreAccessor.java:160)
	at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.applyIDMappings(DBStoreAccessor.java:480)
	at org.eclipse.emf.cdo.spi.server.StoreAccessor.doWrite(StoreAccessor.java:89)
	at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:152)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:651)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:47)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:1033)
	at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:1026)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:320)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:105)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:110)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:87)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:92)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:331)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:65)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:66)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:256)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

	at org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:89)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commitSynced(CDOTransactionImpl.java:1237)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1206)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1198)
	at org.eclipse.emf.cdo.examples.server.FailoverExample$Monitored$Client.addObject(FailoverExample.java:593)
	... 1 more


Many thanks for any advice
Richard
Re: [CDO] "Synchronizable repositories don't support dynamic addition of new packages&q [message #1699120 is a reply to message #1699108] Sun, 21 June 2015 15:37 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6445
Registered: July 2009
Senior Member
Am 21.06.2015 um 13:11 schrieb Richard Meyer:
> Hy all,
>
> I'm trying to run the Failover example (org.eclipse.emf.cdo.examples.server.FailoverExample).
> I have successful started Agent1 and Agent2.
> But if I try to start the Client I get the following exception:
>
>
> Exception in thread "main" java.lang.RuntimeException: org.eclipse.emf.cdo.util.CommitException: Rollback in DBStore:
> java.lang.IllegalStateException: Synchronizable repositories don't support dynamic addition of new packages. Use
> IRepository.setInitialPackages() instead.
As the exception message says, the combination of repository replication and dynamic package registry is not supported.
This is not a conceptual restriction, more of a resource constraint at the time synchronizable repositories were developed.

Instead of calling the IRepository.setInitialPackages() method in the server you can also add markup like the following
to the cdo-server.xml (see bug 345431):

<initialPackage nsURI="http://www.eclipse.org/emf/CDO/examples/company/1.0.0"/>

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] &quot;Synchronizable repositories don't support dynamic addition of new packages&q [message #1699165 is a reply to message #1699120] Mon, 22 June 2015 09:23 Go to previous message
Richard Meyer is currently offline Richard MeyerFriend
Messages: 40
Registered: June 2012
Member
Eike,

many thanks for your quick response.
I have added the inital package to the repository and now the failover example work.
repository.setInitalPackages(CompanyPackage.eINSTANCE);


Many thanks again,
Richard
Previous Topic:Drived attributes and custom bodies with EAttribute annotations with OCL
Next Topic:EStructuralFeature Resolution of a contained EObject Instance
Goto Forum:
  


Current Time: Mon Sep 23 11:36:14 GMT 2019

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

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

Back to the top