Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Schema Locked Exception after update to CDO 4.4
[CDO] Schema Locked Exception after update to CDO 4.4 [message #1701477] Mon, 13 July 2015 15:14 Go to next message
Samuel Leisering is currently offline Samuel LeiseringFriend
Messages: 34
Registered: July 2014
Member
Hi

after updating to CDO 4.4 i get a Schema locked exception (see below). This happens as soon as i try to commit a new EMF-model to the server (even with a "fresh" server and repository).
I'm using the Derby embedded DBStore with a Security Manager, audits enabled and ensureReferentialIntegrity enabled.

H2 does not work either.

The Exception:
org.eclipse.emf.cdo.util.CommitException: Rollback in DBStore: org.eclipse.net4j.db.DBException: Schema locked: SCHEMA_NAME
	at org.eclipse.net4j.internal.db.ddl.DBSchema.assertUnlocked(DBSchema.java:278)
	at org.eclipse.net4j.internal.db.ddl.DBTable.assertUnlocked(DBTable.java:340)
	at org.eclipse.net4j.internal.db.ddl.DBTable.addField(DBTable.java:104)
	at org.eclipse.net4j.internal.db.ddl.DBTable.addField(DBTable.java:89)
	at org.eclipse.emf.cdo.server.db.mapping.AbstractTypeMapping.createDBField(AbstractTypeMapping.java:162)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.initFields(AbstractHorizontalClassMapping.java:197)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.<init>(AbstractHorizontalClassMapping.java:107)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingClassMapping.<init>(HorizontalBranchingClassMapping.java:205)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingMappingStrategy.doCreateClassMapping(HorizontalBranchingMappingStrategy.java:62)
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.createClassMapping(AbstractMappingStrategy.java:659)
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapClasses(AbstractMappingStrategy.java:651)
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapPackageInfos(AbstractMappingStrategy.java:627)
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapPackageUnits(AbstractMappingStrategy.java:616)
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.createMapping(AbstractMappingStrategy.java:538)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalMappingStrategy.createMapping(HorizontalMappingStrategy.java:144)
	at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.writePackageUnits(DBStoreAccessor.java:849)
	at org.eclipse.emf.cdo.spi.server.StoreAccessor.doWrite(StoreAccessor.java:81)
	at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.doWrite(DBStoreAccessor.java:828)
	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:48)
	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:1133)
	at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:1126)
	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:98)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:100)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:330)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:73)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:67)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:254)
	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)
Re: [CDO] Schema Locked Exception after update to CDO 4.4 [message #1701544 is a reply to message #1701477] Tue, 14 July 2015 05:14 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6447
Registered: July 2009
Senior Member
Am 13.07.2015 um 17:14 schrieb Samuel Leisering:
> Hi
>
> after updating to CDO 4.4 i get a Schema locked exception (see below).
We haven't changed much in cdo.server.db or net4j.db since 4.3.0. I've checked all respective commits and couldn't see
anything that could cause what you describe. From what version did you update to 4.4?

> This happens as soon as i try to commit a new EMF-model to the server (even with a "fresh" server and repository).
All our DB tests run against H2 and we've never seen that before, especially not with fresh repositories.

> I'm using the Derby embedded DBStore with a Security Manager, audits enabled and ensureReferentialIntegrity enabled.
Does the problem persist if you temporarily disable security and referential integrity checks?

>
> H2 does not work either.
You mean that the same exception is thrown?
What versions of Derby and H2 did you use?

>
> The Exception:
>
> org.eclipse.emf.cdo.util.CommitException: Rollback in DBStore: org.eclipse.net4j.db.DBException: Schema locked:
> SCHEMA_NAME
Is your schema really named "SCHEMA_NAME "?

Cheers
/Eike

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


Re: [CDO] Schema Locked Exception after update to CDO 4.4 [message #1701792 is a reply to message #1701477] Wed, 15 July 2015 15:56 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi Samuel,

This is the typical exception which occurs when you change your
metamodel and the models stored in CDO repo haven't been migrated.

Best Regards.

Le 13/07/2015 17:14, Samuel Leisering a écrit :
> Hi
>
> after updating to CDO 4.4 i get a Schema locked exception (see below).
> This happens as soon as i try to commit a new EMF-model to the server
> (even with a "fresh" server and repository).
> I'm using the Derby embedded DBStore with a Security Manager, audits
> enabled and ensureReferentialIntegrity enabled.
>
> H2 does not work either.
>
> The Exception:
>
> org.eclipse.emf.cdo.util.CommitException: Rollback in DBStore:
> org.eclipse.net4j.db.DBException: Schema locked: SCHEMA_NAME
> at
> org.eclipse.net4j.internal.db.ddl.DBSchema.assertUnlocked(DBSchema.java:278)
>
> at
> org.eclipse.net4j.internal.db.ddl.DBTable.assertUnlocked(DBTable.java:340)
> at
> org.eclipse.net4j.internal.db.ddl.DBTable.addField(DBTable.java:104)
> at org.eclipse.net4j.internal.db.ddl.DBTable.addField(DBTable.java:89)
> at
> org.eclipse.emf.cdo.server.db.mapping.AbstractTypeMapping.createDBField(AbstractTypeMapping.java:162)
>
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.initFields(AbstractHorizontalClassMapping.java:197)
>
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.<init>(AbstractHorizontalClassMapping.java:107)
>
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingClassMapping.<init>(HorizontalBranchingClassMapping.java:205)
>
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingMappingStrategy.doCreateClassMapping(HorizontalBranchingMappingStrategy.java:62)
>
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.createClassMapping(AbstractMappingStrategy.java:659)
>
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapClasses(AbstractMappingStrategy.java:651)
>
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapPackageInfos(AbstractMappingStrategy.java:627)
>
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapPackageUnits(AbstractMappingStrategy.java:616)
>
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.createMapping(AbstractMappingStrategy.java:538)
>
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalMappingStrategy.createMapping(HorizontalMappingStrategy.java:144)
>
> at
> org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.writePackageUnits(DBStoreAccessor.java:849)
>
> at
> org.eclipse.emf.cdo.spi.server.StoreAccessor.doWrite(StoreAccessor.java:81)
> at
> org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.doWrite(DBStoreAccessor.java:828)
>
> 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:48)
>
> 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:1133)
>
> at
> org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:1126)
> 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:98)
>
> at
> org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:100)
>
> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:330)
> at
> org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:73)
>
> at
> org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:67)
>
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:254)
> 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)
>



--
Esteban Dugueperoux - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: [CDO] Schema Locked Exception after update to CDO 4.4 [message #1705247 is a reply to message #1701792] Thu, 13 August 2015 09:29 Go to previous messageGo to next message
Samuel Leisering is currently offline Samuel LeiseringFriend
Messages: 34
Registered: July 2014
Member
Hi
@Eike:
I'm using derby version 10.8.2.2 with the net4j.db.derby version 4.1.200
for H2 i'm using org.h2 with version 1.3.168 and net4j.db.h2 version 4.2.200.

Both throw the same exception.
And no, my Schema is not named SCHEMA_NAME, i just changed it. The exception contains the correct name.

@Esteban:
Since i use a freshly generated database and server this shouldnt be the issue, because there are no CDO models stored in the repo.

Greetings,
Samuel

Re: [CDO] Schema Locked Exception after update to CDO 4.4 [message #1705926 is a reply to message #1705247] Thu, 20 August 2015 07:54 Go to previous messageGo to next message
Samuel Leisering is currently offline Samuel LeiseringFriend
Messages: 34
Registered: July 2014
Member
Hi
I did some more testing.
The thing i did now was:
* Install a completely new Eclipse Mars with a target platform containing the mars repo (to ensure that the latest released version is used)
* create a new cdo server product containing the necessary plugins
* create a cdo-server.xml that defines nothing but the repository name and the database connection (currently H2)
* start the server (which generates a completely fresh database)
* start the emf.Editor Application generated from our model
* connect to the server using the standard CDO Session view
* Add a new modelresource containing something from our model.

While committing the last step the exception still happens.

Another thing to note is that our model references another model which is also commited automatically in the last step.

Greetings,
Samuel
Re: [CDO] Schema Locked Exception after update to CDO 4.4 [message #1710666 is a reply to message #1705926] Thu, 08 October 2015 09:24 Go to previous messageGo to next message
Samuel Leisering is currently offline Samuel LeiseringFriend
Messages: 34
Registered: July 2014
Member
I got it:
My Model contained a class called "Annotation". It seems that there is another class named Annotation in one of the default models.

The DBStore Mapping tries to add the columns of my class to the already existing ANNOTATION-Table , which causes the schema-locked Exception.

The same constellation worked on CDO 4.3.
Is this a bug or the intended behaviour?
Re: [CDO] Schema Locked Exception after update to CDO 4.4 [message #1710672 is a reply to message #1710666] Thu, 08 October 2015 10:04 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6447
Registered: July 2009
Senior Member
Am 08.10.2015 um 11:24 schrieb Samuel Leisering:
> I got it:
> My Model contained a class called "Annotation". It seems that there is another class named Annotation in one of the
> default models.
>
> The DBStore Mapping tries to add the columns of my class to the already existing ANNOTATION-Table , which causes the
> schema-locked Exception.
>
> The same constellation worked on CDO 4.3. Is this a bug or the intended behaviour?
I would say it's desirable behavior ;-)

Note that you should probably also make use of the "qualifiedNames" property:
http://download.eclipse.org/modeling/emf/cdo/drops/R20150916-0434/help/org.eclipse.emf.cdo.doc/html/operators/Doc01_ConfiguringRepositories.html#Property_qualifiedNames

Cheers
/Eike

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


Previous Topic:[CDO] Simple Model Evolution
Next Topic:[CDO] No credentials provider configured
Goto Forum:
  


Current Time: Tue Oct 22 21:14:11 GMT 2019

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

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

Back to the top