|
Re: Once again Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl] [message #1060670 is a reply to message #1060537] |
Mon, 27 May 2013 15:56 |
|
Am 27.05.2013 14:34, schrieb bobby car:
> i know there are already a few threads about this error, but none of them solved my problem.
>
> i built a standalone server
A standalone server needs to register the needed factory via:
OCLQueryHandler.prepareContainer(IPluginContainer.INSTANCE);
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
> and client (without eclipse, launch-files or something else, just by calling the server/client class) based on examples by Eike Stepper:
> - server: http://git.eclipse.org/c/cdo/cdo.git/tree/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/Server.java
> - client: http://git.eclipse.org/c/cdo/cdo.git/tree/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/StandaloneManualExample.java
>
> i attached a picture with my included plugins (for the server). i already included 'org.eclipse.emf.cdo.server.ocl_4.0.0.v20120911-1146.jar' (as mentioned in other threads) and in the osgi-terminal it is marked as resovled.
>
> i also tested the precompiled server from 'emf-cdo-R20130213-0014-CDOServer-Linux.zip' (also added the ...server.ocl-jar) and i got the same error.
>
>
> the request of my client which causes the error looks like that:
>
> // the connection is create like in the example above
> CDOTransaction transaction = s.openTransaction();
> CDOQuery cqo = transaction.createQuery("ocl", "Company.allInstances()");
> final List<Company> companies = cqo.getResult(Company.class);
> int size = companies.size();
>
>
> The error trace from the server looks like:
> [ERROR] Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl]
> org.eclipse.net4j.util.container.FactoryNotFoundException: Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl]
> at org.eclipse.net4j.util.container.ManagedContainer.getFactory(ManagedContainer.java:200)
> at org.eclipse.net4j.util.container.ManagedContainer.createElement(ManagedContainer.java:534)
> at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:292)
> at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:273)
> at org.eclipse.emf.cdo.spi.server.ContainerQueryHandlerProvider.getQueryHandler(ContainerQueryHandlerProvider.java:42)
> at org.eclipse.emf.cdo.internal.server.Repository.getQueryHandler(Repository.java:977)
> at org.eclipse.emf.cdo.internal.server.QueryManager$QueryContext.run(QueryManager.java:293)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:722)
>
> Has anybody some ideas? Did i miss any dependency or something?
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
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 09:28 |
Laurent Le Moux Messages: 44 Registered: June 2015 |
Member |
|
|
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 14:09 |
|
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
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04003 seconds