|
|
|
Re: Once again Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl] [message #1730751 is a reply to message #1060682] |
Thu, 28 April 2016 05:28   |
Eclipse User |
|
|
|
Hi,
I'm facing the same problem while performing junit tests based on a h2 memstore.
I followed the tip of this topic and also had a look to 'org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig' with no success .
The following plug-ins are declared as required :
- org.eclipse.emf.cdo.server.ocl
- org.eclipse.ocl.ecore
And running my test against a deployed repository based on a classical h2 db store is ok.
Can anybody help me figure out what is wrong with the following configuration used in my test ?
Map<String, String> props = new HashMap<String, String>();
props.put(IRepository.Props.OVERRIDE_UUID, "");
props.put(IRepository.Props.SUPPORTING_AUDITS, "false");
props.put(IRepository.Props.SUPPORTING_BRANCHES, "false");
props.put(IRepository.Props.ENSURE_REFERENTIAL_INTEGRITY, "false");
IRepository repository = CDOServerUtil.createRepository(REPOSITORY_NAME, MEMStoreUtil.createMEMStore(), props);
container = ContainerUtil.createContainer();
OCLQueryHandler.prepareContainer(container); // Needed for issuing OCL queries
Net4jUtil.prepareContainer(container);
CDONet4jUtil.prepareContainer(container);
CDONet4jServerUtil.prepareContainer(container);
TCPUtil.prepareContainer(container);
container.activate();
TCPUtil.getAcceptor(container, URI);
CDOServerUtil.addRepository(container, repository);
connector = TCPUtil.getConnector(container, URI);
CDONet4jSessionConfiguration sessionConfig = CDONet4jUtil.createNet4jSessionConfiguration();
sessionConfig.setConnector(connector);
sessionConfig.setRepositoryName(REPOSITORY_NAME);
featureSession = sessionConfig.openNet4jSession();
concurrentSession = sessionConfig.openNet4jSession();
...
Kind regards,
Laurent
|
|
|
Re: Once again Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl] [message #1730944 is a reply to message #1730751] |
Sat, 30 April 2016 10:09   |
Eclipse User |
|
|
|
Am 28.04.2016 um 11:28 schrieb Laurent Le Moux:
> Hi,
>
> I'm facing the same problem while performing junit tests based on a h2 memstore.
> I followed the tip of this topic and also had a look to 'org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig' with
> no success :(.
>
> The following plug-ins are declared as required :
> - org.eclipse.emf.cdo.server.ocl
> - org.eclipse.ocl.ecore
>
> And running my test against a deployed repository based on a classical h2 db store is ok.
>
> Can anybody help me figure out what is wrong with the following configuration used in my test ?
>
>
> Map<String, String> props = new HashMap<String, String>();
> props.put(IRepository.Props.OVERRIDE_UUID, "");
> props.put(IRepository.Props.SUPPORTING_AUDITS, "false");
> props.put(IRepository.Props.SUPPORTING_BRANCHES, "false");
> props.put(IRepository.Props.ENSURE_REFERENTIAL_INTEGRITY, "false");
> IRepository repository = CDOServerUtil.createRepository(REPOSITORY_NAME, MEMStoreUtil.createMEMStore(), props);
>
> container = ContainerUtil.createContainer();
Please try the following instead:
container = IPluginContainer.INSTANCE;
Does that work?
Cheers
/Eike
> OCLQueryHandler.prepareContainer(container); // Needed for issuing OCL queries
> Net4jUtil.prepareContainer(container);
> CDONet4jUtil.prepareContainer(container);
> CDONet4jServerUtil.prepareContainer(container);
> TCPUtil.prepareContainer(container);
> container.activate();
> TCPUtil.getAcceptor(container, URI);
>
> CDOServerUtil.addRepository(container, repository);
>
> connector = TCPUtil.getConnector(container, URI);
> CDONet4jSessionConfiguration sessionConfig = CDONet4jUtil.createNet4jSessionConfiguration();
> sessionConfig.setConnector(connector);
> sessionConfig.setRepositoryName(REPOSITORY_NAME);
> featureSession = sessionConfig.openNet4jSession();
> concurrentSession = sessionConfig.openNet4jSession();
> ..
>
>
> Kind regards,
>
> Laurent
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07405 seconds