Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] AuditSupport of MappingStrategy and Store does not match
[CDO] AuditSupport of MappingStrategy and Store does not match [message #430346] Sat, 16 May 2009 08:23 Go to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
Hello.

I just updated to the current CDO 2.0 Milestone via the Update Manager.
When I start my application now, I get the error "AuditSupport of
MappingStrategy and Store does not match".
I am setting up the server myself and disabled audits with an Derby
store (please see full server startup code below).
Isn't that supported? It worked with M6 (or at least the property was
ignored).
What do I have to do to fix this? Must I enable audits?

Regards,
Kai



if (debuggingMode) {
OMPlatform.INSTANCE.setDebugging(true);
OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOL E);
}
EmbeddedDataSource dataSource = new EmbeddedDataSource();
dataSource.setDatabaseName(DATABASE_NAME);
dataSource.setCreateDatabase("create");
IDBConnectionProvider provider =
DBUtil.createConnectionProvider(dataSource);
IDBAdapter adapter = DBUtil.getDBAdapter("derby-embedded");
IMappingStrategy strategy =
CDODBUtil.createHorizontalMappingStrategy();
Map<String, String> mappingStrategyProperties = new HashMap<String,
String>();

mappingStrategyProperties.put(IMappingStrategy.PROP_QUALIFIE D_NAMES,
"true");
strategy.setProperties(mappingStrategyProperties);
IDBStore store = CDODBUtil.createStore(strategy, adapter, provider);
strategy.setStore(store);
Map<String, String> props = new HashMap<String, String>();
props.put(Props.SUPPORTING_AUDITS, "false");
props.put(Props.VERIFYING_REVISIONS, "false");
props.put(Props.CURRENT_LRU_CAPACITY, "10000");
props.put(Props.REVISED_LRU_CAPACITY, "10000");
IRepository repository =
CDOServerUtil.createRepository(REPOSITORY_NAME, store, props);
serverContainer = IPluginContainer.INSTANCE;
LifecycleUtil.activate(serverContainer);
CDOServerUtil.addRepository(serverContainer, repository);
TCPUtil.getAcceptor(serverContainer, "0.0.0.0:7679");
JVMUtil.getAcceptor(serverContainer, "default");
IEvaluationService evaluationService = (IEvaluationService)
PlatformUI.getWorkbench().getService(IEvaluationService.clas s);

evaluationService.requestEvaluation(ServerManagerPropertyTes ter.IS_LOCAL_SERVER_RUNNING);
fireServerEvent(new ServerEvent(this,
ServerEvent.LOCAL_SERVER_STARTED));
Re: [CDO] AuditSupport of MappingStrategy and Store does not match [message #430347 is a reply to message #430346] Sat, 16 May 2009 08:28 Go to previous messageGo to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
The solution is
IMappingStrategy strategy =
CDODBUtil.createHorizontalNonAuditMappingStrategy();

Sorry for bothering ;-)


Kai Schlamp wrote:
> Hello.
>
> I just updated to the current CDO 2.0 Milestone via the Update Manager.
> When I start my application now, I get the error "AuditSupport of
> MappingStrategy and Store does not match".
> I am setting up the server myself and disabled audits with an Derby
> store (please see full server startup code below).
> Isn't that supported? It worked with M6 (or at least the property was
> ignored).
> What do I have to do to fix this? Must I enable audits?
>
> Regards,
> Kai
>
>
>
> if (debuggingMode) {
> OMPlatform.INSTANCE.setDebugging(true);
>
> OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
>
> OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOL E);
> }
> EmbeddedDataSource dataSource = new
> EmbeddedDataSource();
> dataSource.setDatabaseName(DATABASE_NAME);
> dataSource.setCreateDatabase("create");
> IDBConnectionProvider provider =
> DBUtil.createConnectionProvider(dataSource);
> IDBAdapter adapter =
> DBUtil.getDBAdapter("derby-embedded");
> IMappingStrategy strategy =
> CDODBUtil.createHorizontalMappingStrategy();
> Map<String, String> mappingStrategyProperties = new
> HashMap<String, String>();
>
> mappingStrategyProperties.put(IMappingStrategy.PROP_QUALIFIE D_NAMES,
> "true");
> strategy.setProperties(mappingStrategyProperties);
> IDBStore store = CDODBUtil.createStore(strategy,
> adapter, provider);
> strategy.setStore(store);
> Map<String, String> props = new HashMap<String,
> String>();
> props.put(Props.SUPPORTING_AUDITS, "false");
> props.put(Props.VERIFYING_REVISIONS, "false");
> props.put(Props.CURRENT_LRU_CAPACITY, "10000");
> props.put(Props.REVISED_LRU_CAPACITY, "10000");
> IRepository repository =
> CDOServerUtil.createRepository(REPOSITORY_NAME, store, props);
> serverContainer = IPluginContainer.INSTANCE;
> LifecycleUtil.activate(serverContainer);
> CDOServerUtil.addRepository(serverContainer,
> repository);
> TCPUtil.getAcceptor(serverContainer, "0.0.0.0:7679");
> JVMUtil.getAcceptor(serverContainer, "default");
> IEvaluationService evaluationService =
> (IEvaluationService)
> PlatformUI.getWorkbench().getService(IEvaluationService.clas s);
>
> evaluationService.requestEvaluation(ServerManagerPropertyTes ter.IS_LOCAL_SERVER_RUNNING);
>
> fireServerEvent(new ServerEvent(this,
> ServerEvent.LOCAL_SERVER_STARTED));
Re: [CDO] AuditSupport of MappingStrategy and Store does not match [message #430348 is a reply to message #430347] Sat, 16 May 2009 08:43 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Kai,

Good that you found it ;-)

Maybe we should change that API to only one factory method to make this
distinction more obvious for migrators:

public static IMappingStrategy
createHorizontalMappingStrategy(boolean auditing)

Cheers
/Eike

----
http://thegordian.blogspot.com



Kai Schlamp schrieb:
> The solution is
> IMappingStrategy strategy =
> CDODBUtil.createHorizontalNonAuditMappingStrategy();
>
> Sorry for bothering ;-)
>
>
> Kai Schlamp wrote:
>> Hello.
>>
>> I just updated to the current CDO 2.0 Milestone via the Update Manager.
>> When I start my application now, I get the error "AuditSupport of
>> MappingStrategy and Store does not match".
>> I am setting up the server myself and disabled audits with an Derby
>> store (please see full server startup code below).
>> Isn't that supported? It worked with M6 (or at least the property was
>> ignored).
>> What do I have to do to fix this? Must I enable audits?
>>
>> Regards,
>> Kai
>>
>>
>>
>> if (debuggingMode) {
>> OMPlatform.INSTANCE.setDebugging(true);
>>
>> OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
>>
>> OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOL E);
>> }
>> EmbeddedDataSource dataSource = new
>> EmbeddedDataSource();
>> dataSource.setDatabaseName(DATABASE_NAME);
>> dataSource.setCreateDatabase("create");
>> IDBConnectionProvider provider =
>> DBUtil.createConnectionProvider(dataSource);
>> IDBAdapter adapter =
>> DBUtil.getDBAdapter("derby-embedded");
>> IMappingStrategy strategy =
>> CDODBUtil.createHorizontalMappingStrategy();
>> Map<String, String> mappingStrategyProperties =
>> new HashMap<String, String>();
>>
>> mappingStrategyProperties.put(IMappingStrategy.PROP_QUALIFIE D_NAMES,
>> "true");
>> strategy.setProperties(mappingStrategyProperties);
>> IDBStore store = CDODBUtil.createStore(strategy,
>> adapter, provider);
>> strategy.setStore(store);
>> Map<String, String> props = new HashMap<String,
>> String>();
>> props.put(Props.SUPPORTING_AUDITS, "false");
>> props.put(Props.VERIFYING_REVISIONS, "false");
>> props.put(Props.CURRENT_LRU_CAPACITY, "10000");
>> props.put(Props.REVISED_LRU_CAPACITY, "10000");
>> IRepository repository =
>> CDOServerUtil.createRepository(REPOSITORY_NAME, store, props);
>> serverContainer = IPluginContainer.INSTANCE;
>> LifecycleUtil.activate(serverContainer);
>> CDOServerUtil.addRepository(serverContainer,
>> repository);
>> TCPUtil.getAcceptor(serverContainer,
>> "0.0.0.0:7679");
>> JVMUtil.getAcceptor(serverContainer, "default");
>> IEvaluationService evaluationService =
>> (IEvaluationService)
>> PlatformUI.getWorkbench().getService(IEvaluationService.clas s);
>>
>> evaluationService.requestEvaluation(ServerManagerPropertyTes ter.IS_LOCAL_SERVER_RUNNING);
>>
>> fireServerEvent(new ServerEvent(this,
>> ServerEvent.LOCAL_SERVER_STARTED));


Re: [CDO] AuditSupport of MappingStrategy and Store does not match [message #430350 is a reply to message #430346] Sat, 16 May 2009 09:35 Go to previous messageGo to next message
Victor Roldan Betancort is currently offline Victor Roldan BetancortFriend
Messages: 524
Registered: July 2009
Senior Member
Kai,

I experienced the same while deploying the server (in Equinox).
The last milestone introduced an important refactor in the DBStore.
So it seems now that Horizontal with no audit is a mapping strategy
itself. In cdoserver.xml I had to add "horizontalNoAudit" (or something
similar, cant recall now).

So probably the problem is in:

IMappingStrategy strategy = CDODBUtil.createHorizontalMappingStrategy();

that creates an horizontal mapping, that only works with audit = true.

Could you submit a bug so we can create something lke
CDODBUtil.createHorzintalNoAuditMappingStrategy()?

Anyhow, this new mapping strategies with implicity audit support seems a
bit inconsistent to me...

Thoughts?

Kai Schlamp escribió:
> Hello.
>
> I just updated to the current CDO 2.0 Milestone via the Update Manager.
> When I start my application now, I get the error "AuditSupport of
> MappingStrategy and Store does not match".
> I am setting up the server myself and disabled audits with an Derby
> store (please see full server startup code below).
> Isn't that supported? It worked with M6 (or at least the property was
> ignored).
> What do I have to do to fix this? Must I enable audits?
>
> Regards,
> Kai
>
>
>
> if (debuggingMode) {
> OMPlatform.INSTANCE.setDebugging(true);
>
> OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
>
> OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOL E);
> }
> EmbeddedDataSource dataSource = new
> EmbeddedDataSource();
> dataSource.setDatabaseName(DATABASE_NAME);
> dataSource.setCreateDatabase("create");
> IDBConnectionProvider provider =
> DBUtil.createConnectionProvider(dataSource);
> IDBAdapter adapter =
> DBUtil.getDBAdapter("derby-embedded");
> IMappingStrategy strategy =
> CDODBUtil.createHorizontalMappingStrategy();
> Map<String, String> mappingStrategyProperties = new
> HashMap<String, String>();
>
> mappingStrategyProperties.put(IMappingStrategy.PROP_QUALIFIE D_NAMES,
> "true");
> strategy.setProperties(mappingStrategyProperties);
> IDBStore store = CDODBUtil.createStore(strategy,
> adapter, provider);
> strategy.setStore(store);
> Map<String, String> props = new HashMap<String,
> String>();
> props.put(Props.SUPPORTING_AUDITS, "false");
> props.put(Props.VERIFYING_REVISIONS, "false");
> props.put(Props.CURRENT_LRU_CAPACITY, "10000");
> props.put(Props.REVISED_LRU_CAPACITY, "10000");
> IRepository repository =
> CDOServerUtil.createRepository(REPOSITORY_NAME, store, props);
> serverContainer = IPluginContainer.INSTANCE;
> LifecycleUtil.activate(serverContainer);
> CDOServerUtil.addRepository(serverContainer,
> repository);
> TCPUtil.getAcceptor(serverContainer, "0.0.0.0:7679");
> JVMUtil.getAcceptor(serverContainer, "default");
> IEvaluationService evaluationService =
> (IEvaluationService)
> PlatformUI.getWorkbench().getService(IEvaluationService.clas s);
>
> evaluationService.requestEvaluation(ServerManagerPropertyTes ter.IS_LOCAL_SERVER_RUNNING);
>
> fireServerEvent(new ServerEvent(this,
> ServerEvent.LOCAL_SERVER_STARTED));
Re: [CDO] AuditSupport of MappingStrategy and Store does not match [message #430351 is a reply to message #430350] Sat, 16 May 2009 11:19 Go to previous messageGo to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
Comments below.

Víctor Roldán Betancort wrote:
> Kai,
>
> I experienced the same while deploying the server (in Equinox).
> The last milestone introduced an important refactor in the DBStore.
> So it seems now that Horizontal with no audit is a mapping strategy
> itself. In cdoserver.xml I had to add "horizontalNoAudit" (or something
> similar, cant recall now).
>
> So probably the problem is in:
>
> IMappingStrategy strategy = CDODBUtil.createHorizontalMappingStrategy();

It already seems to be there (and works). Just did not find that
possibility in the first place.

>
> that creates an horizontal mapping, that only works with audit = true.
>
> Could you submit a bug so we can create something lke
> CDODBUtil.createHorzintalNoAuditMappingStrategy()?
>
> Anyhow, this new mapping strategies with implicity audit support seems a
> bit inconsistent to me...
>
> Thoughts?

Eike's suggestion sounds good.

Regards,
Kai
Re: [CDO] AuditSupport of MappingStrategy and Store does not match [message #430352 is a reply to message #430351] Sat, 16 May 2009 11:43 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Kai Schlamp schrieb:
>
> Eike's suggestion sounds good.
Please file an enhancement request ;-)

Cheers
/Eike

----
http://thegordian.blogspot.com


Re: [CDO] AuditSupport of MappingStrategy and Store does not match [message #430353 is a reply to message #430352] Sat, 16 May 2009 13:49 Go to previous message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
Eike Stepper wrote:
> Kai Schlamp schrieb:
>> Eike's suggestion sounds good.
> Please file an enhancement request ;-)

Hey, it was your suggestion ... just kidding ;-)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=276595

Have a nice weekend,
Kai
Previous Topic:Modeling a Choice Group
Next Topic:invariant vs. constraint
Goto Forum:
  


Current Time: Fri Apr 26 23:10:37 GMT 2024

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

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

Back to the top