Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[SQL]
[CDO] Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[SQL] [message #702432] Tue, 26 July 2011 11:19 Go to next message
Key Ofeka is currently offline Key OfekaFriend
Messages: 14
Registered: January 2011
Junior Member
Hi,

Trying to execute a simple query using this code

CDOView view = sess.openView();
String sql = "SELECT cdoid FROM ETLGroup WHERE uuid = ${uuid}" ;
CDOQuery cdoq = view.createQuery("SQL", sql);
cdoq.setParameter("uuid", etlGrpUUID);
CloseableIterator<ETLGroup> result = cdoq.getResultAsync(ETLGroup.class);
ETLGroup etlGrp = null;
for(Iterator<ETLGroup> it = result; it.hasNext();) {
    etlGrp = it.next();
}


We've got the exception:

org.eclipse.net4j.util.container.FactoryNotFoundException: Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[SQL]
	at org.eclipse.net4j.util.container.ManagedContainer.getFactory(ManagedContainer.java:193)
	at org.eclipse.net4j.util.container.ManagedContainer.createElement(ManagedContainer.java:490)
	at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:281)
	at org.eclipse.net4j.util.container.ManagedContainer.getElement(ManagedContainer.java:265)
	at org.eclipse.emf.cdo.spi.server.ContainerQueryHandlerProvider.getQueryHandler(ContainerQueryHandlerProvider.java:42)
	at org.eclipse.emf.cdo.internal.server.Repository.getQueryHandler(Repository.java:846)
	at org.eclipse.emf.cdo.internal.server.QueryManager$QueryContext.run(QueryManager.java:274)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)


I believe an additional plug-in should be installed to register the needed factory, if so could anyone tell me what is the plug-in?

PS
The running CDO server is Ok, we can create, store and retrieve objects from it.
We use CDO 3.0
Re: [CDO] Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[SQL] [message #702543 is a reply to message #702432] Tue, 26 July 2011 14:01 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
What sql backend storage are you using, e.g. mysql/oracle/...?

- use :VAR_NAME instead of ${VAR_NAME}, not sure if that works at all
- set query handler id to "sql" instead of "SQL" (case sensitive)

Re: [CDO] Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[SQL] [message #702558 is a reply to message #702543] Tue, 26 July 2011 14:14 Go to previous messageGo to next message
Key Ofeka is currently offline Key OfekaFriend
Messages: 14
Registered: January 2011
Junior Member
Erdal Karaca wrote on Tue, 26 July 2011 10:01
What sql backend storage are you using, e.g. mysql/oracle/...?

I use MySQL

Erdal Karaca wrote on Tue, 26 July 2011 10:01
- use :VAR_NAME instead of ${VAR_NAME}, not sure if that works at all

:VAR_NAME works. The query should be changed as well.

Erdal Karaca wrote on Tue, 26 July 2011 10:01
- set query handler id to "sql" instead of "SQL" (case sensitive)

Changing to lower case works very well. Great! Thank you!

[Updated on: Tue, 26 July 2011 14:17]

Report message to a moderator

Re: [CDO] Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[SQL] [message #702583 is a reply to message #702558] Tue, 26 July 2011 14:43 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
You can keep uuid as your variable/parameter name in your query, VAR_NAME was just an example...
Re: [CDO] Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[SQL] [message #702662 is a reply to message #702543] Tue, 26 July 2011 16:24 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 26.07.2011 16:01, schrieb Erdal Karaca:
> [...]- set query handler id to "sql" instead of "SQL" (case sensitive)
I think that's the cause of the problem: query language names are case sensitive and you must use "sql", not "SQL".

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:Genercis in eclipse Idingo
Next Topic:[CDO] java.lang.ClassNotFoundException: org.eclipse.net4j.db.DBException
Goto Forum:
  


Current Time: Fri Apr 26 12:46:15 GMT 2024

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

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

Back to the top