Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Once again Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl]
Once again Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl] [message #1060537] Sun, 26 May 2013 08:24 Go to next message
bobby car is currently offline bobby car
Messages: 2
Registered: May 2013
Junior Member
i know there are already a few threads about this error, but none of them solved my problem.

i built a standalone server 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?
  • Attachment: cdo.png
    (Size: 118.04KB, Downloaded 2 times)
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 11:56 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5163
Registered: July 2009
Senior Member
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?
Re: Once again Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl] [message #1060682 is a reply to message #1060670] Mon, 27 May 2013 13:36 Go to previous message
bobby car is currently offline bobby car
Messages: 2
Registered: May 2013
Junior Member
OCLQueryHandler.prepareContainer(IPluginContainer.INSTANCE);

that and a few more dependencies seem to fix my problem

Thanks Eike
Previous Topic:[Texo] Generated Code
Next Topic:Search engine for EMF?
Goto Forum:
  


Current Time: Tue May 28 11:28:05 EDT 2013

Powered by FUDForum. Page generated in 0.01529 seconds