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 |
Kai Schlamp 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 |
Kai Schlamp 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 |
|
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));
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] AuditSupport of MappingStrategy and Store does not match [message #430350 is a reply to message #430346] |
Sat, 16 May 2009 09:35 |
Victor Roldan Betancort 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));
|
|
| | | |
Goto Forum:
Current Time: Fri Apr 26 23:10:37 GMT 2024
Powered by FUDForum. Page generated in 0.04668 seconds
|