Home » Modeling » EMF » [CDO] Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl]
[CDO] Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl] [message #1042364] |
Tue, 16 April 2013 10:32 |
Dieter Van Eessen Messages: 12 Registered: January 2013 |
Junior Member |
|
|
Hello,
I've got the following
PROBLEM:
-org.eclipse.net4j.util.container.FactoryNotFoundException: Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl]
-Receiving this problem both when trying to use MySQL database and H2-database.
+ A previous topic told to check whether the bundle org.eclipse.emf.cdo.server.ocl is resolved/active (using $ss cdo in OSGi console)
148 RESOLVED org.eclipse.emf.cdo.server.ocl_4.0.100.v20130318-1729
CONTEXT:
- Running Kepler4.3M6Classic, installation of CDO 4.2M6 stable builds, using the bookmarks as given.
+ Server is installed and runs without warnings/errors. Followed a tutorial written by Vincenzo (RCPvision). The console shows that the server is started succesfully. Using netstat I confirm that there's a server named java listening to port 2036. (MySQL and H2 are also running on their standard ports.) The repository has been named demo.
+ It's possible to "add repository" in the Model Repository view using repository demo on localhost. Name: "My repository"
+ created a folder inside repo1.
+ When creating new papyrus model cdoTestUML I can choose to store it into "My repos".
-Finishing the new papyrus model wizard:
=> MySQL: long time waiting ending with error:
An internal error occurred during: "Find Papyrus models".
org.eclipse.net4j.util.container.FactoryNotFoundException:
Factory not found:
org.eclipse.emf.cdo.server.queryHandlerFactories[ocl]
=> H2: not so long time waiting ending with same error...
INFO:
+ cdoTestUML.di is opened (automatically) after creation, I can edit (add classes,...), Model Explorer is getting updated but the model repository view only shows cdoTestUML.notation and cdoTestUML.uml. There's no cdoTestUML.di present.
-When I try to save this model I get:
Problem occured: Save Failed
Rollback in DBStore: java.lang.NullPointerException
at org.eclipse.emf.cdo.server.internal.db.mapping.
horizontal.AbstractHorizontalClassMapping.initTable
(AbstractHorizontalClassMapping.java:120)
+ using CDO Session view it's possible to open new session, open a transaction and then I see folder 1 is present. folder1 contains cdoTestUML.di, cdoTestUML.notation and cdoTestUML.uml... Everything is CLEAN.
- Yet it is NOT possible to open cdoTestUML.di with papyrus core editor (same error again)
+ It is possible to edit the .di/.notation/.uml with CDO-editor without warning.
+ When I log in mysql I see that the database has been created and a list of tables are present.
ALREADY TRIED:
-since the product used to run the server is based on ....server.product.tcp_h2 I've repeated the same process this time with H2 database and adapted the cdo-server.xml according to CDO/Server Configuration Reference, starting from the example file. Server is set up successfully, same error when creating model.
-adding plugins in run configuration
-adding plugins to the feature project containing the cdo-server.xml and product file.
-importing separate files into the cdo database:
+ import resource works: in session view->transaction I can see the .di,.notation and .uml files all are [NEW]. Rollback error pops up when committing. When doing it separately I can import the .uml and the .di and commit both. Commiting the .notation FAILS.
-importing papyrus project into database:
-error shows (factory not found...)
+ .di, .notation, .uml are [CLEAN] inside the repository. Opening with CDO editor works, not with papyrus core editor..
!!Import resource problems (single files) can be reproduced. Once I've imported a papyrus model (.di, .notation, .uml are CLEAN) I'm getting error (factory not found) on whatever I do, but it remains possible to import and commit.
-Thought it might have got something to do with encoding (models created in workspace always have encoding="utf-8") whilst models imported into cdo database are always encoded in ASCII. MySQL database uses latin1 encoding by default, I've adapted the settings from mysql database to use utf-8 encoding, recreated the database, but I'm getting the same error.
+On http://download.eclipse.org/modeling/emf/cdo/drops/I20130406-1405/help/ I notice that:
java.lang.Object
extended by org.eclipse.net4j.util.factory.Factory
extended by org.eclipse.emf.cdo.spi.server.QueryHandlerFactory
extended by org.eclipse.emf.cdo.server.ocl.OCLQueryHandler.Factory
I assume the exception is thrown in the class QueryHandlerFactory (contains:'String PRODUCT_GROUP ="org.eclipse.emf.cdo.server.queryHandlerFactories')
How do I solve this problem?
This is only a rough description of the problem. If more specific descriptions are required, let me know which output you need.
kind regards,
Dieter
|
|
|
Re: [CDO] Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl] [message #1042379 is a reply to message #1042364] |
Tue, 16 April 2013 10:56 |
|
Am 16.04.2013 12:32, schrieb Dieter Van Eessen:
> Hello,
>
> I've got the following
> PROBLEM:
> -org.eclipse.net4j.util.container.FactoryNotFoundException: Factory not found:
> org.eclipse.emf.cdo.server.queryHandlerFactories[ocl]
Can you set a breakpoint in org.eclipse.net4j.util.container.ManagedContainer.getFactory(String, String) and try to find
out what goes wrong there in your deployment? Maybe org.eclipse.emf.cdo.server.ocl or one of its dependency bundles can
not be activated...
> -Receiving this problem both when trying to use MySQL database and H2-database.
> + A previous topic told to check whether the bundle org.eclipse.emf.cdo.server.ocl is resolved/active (using $ss cdo
> in OSGi console)
> 148 RESOLVED org.eclipse.emf.cdo.server.ocl_4.0.100.v20130318-1729
>
> CONTEXT:
> - Running Kepler4.3M6Classic, installation of CDO 4.2M6 stable builds, using the bookmarks as given. + Server is
> installed and runs without warnings/errors. Followed a tutorial written by Vincenzo (RCPvision). The console shows
> that the server is started succesfully. Using netstat I confirm that there's a server named java listening to port
> 2036. (MySQL and H2 are also running on their standard ports.) The repository has been named demo.
> + It's possible to "add repository" in the Model Repository view using repository demo on localhost. Name: "My
> repository"
> + created a folder inside repo1.
> + When creating new papyrus model cdoTestUML I can choose to store it into "My repos".
> -Finishing the new papyrus model wizard: => MySQL: long time waiting ending with error: An internal error occurred
> during: "Find Papyrus models".
> org.eclipse.net4j.util.container.FactoryNotFoundException: Factory not found:
> org.eclipse.emf.cdo.server.queryHandlerFactories[ocl]
> => H2: not so long time waiting ending with same error...
>
>
> INFO:
> + cdoTestUML.di is opened (automatically) after creation, I can edit (add classes,...), Model Explorer is getting
> updated but the model repository view only shows cdoTestUML.notation and cdoTestUML.uml. There's no cdoTestUML.di
> present.
> -When I try to save this model I get:
> Problem occured: Save Failed
> Rollback in DBStore: java.lang.NullPointerException
> at org.eclipse.emf.cdo.server.internal.db.mapping.
> horizontal.AbstractHorizontalClassMapping.initTable
> (AbstractHorizontalClassMapping.java:120)
> + using CDO Session view it's possible to open new session, open a transaction and then I see folder 1 is present.
> folder1 contains cdoTestUML.di, cdoTestUML.notation and cdoTestUML.uml... Everything is CLEAN. - Yet it is NOT
> possible to open cdoTestUML.di with papyrus core editor (same error again)
I *suspect* that Papyrus internally uses OCL queries here and there. Christian (CC'ed) may want to comment on that, but
in the meantime we can focus on why the OCLQueryHandler can not be created in your server.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
> + It is possible to edit the .di/.notation/.uml with CDO-editor without warning.
> + When I log in mysql I see that the database has been created and a list of tables are present.
>
> ALREADY TRIED:
> -since the product used to run the server is based on ....server.product.tcp_h2 I've repeated the same process this
> time with H2 database and adapted the cdo-server.xml according to CDO/Server Configuration Reference, starting from
> the example file. Server is set up successfully, same error when creating model.
> -adding plugins in run configuration
> -adding plugins to the feature project containing the cdo-server.xml and product file.
> -importing separate files into the cdo database: + import resource works: in session view->transaction I can see the
> .di,.notation and .uml files all are [NEW]. Rollback error pops up when committing. When doing it separately I can
> import the .uml and the .di and commit both. Commiting the .notation FAILS.
> -importing papyrus project into database:
> -error shows (factory not found...)
> + .di, .notation, .uml are [CLEAN] inside the repository. Opening with CDO editor works, not with papyrus core editor..
>
> !!Import resource problems (single files) can be reproduced. Once I've imported a papyrus model (.di, .notation, .uml
> are CLEAN) I'm getting error (factory not found) on whatever I do, but it remains possible to import and commit.
>
> -Thought it might have got something to do with encoding (models created in workspace always have encoding="utf-8")
> whilst models imported into cdo database are always encoded in ASCII. MySQL database uses latin1 encoding by default,
> I've adapted the settings from mysql database to use utf-8 encoding, recreated the database, but I'm getting the same
> error.
>
> +On http://download.eclipse.org/modeling/emf/cdo/drops/I20130406-1405/help/ I notice that:
> java.lang.Object
> extended by org.eclipse.net4j.util.factory.Factory
> extended by org.eclipse.emf.cdo.spi.server.QueryHandlerFactory
> extended by org.eclipse.emf.cdo.server.ocl.OCLQueryHandler.Factory
>
> I assume the exception is thrown in the class QueryHandlerFactory (contains:'String PRODUCT_GROUP
> ="org.eclipse.emf.cdo.server.queryHandlerFactories')
>
> How do I solve this problem?
> This is only a rough description of the problem. If more specific descriptions are required, let me know which output
> you need.
>
> kind regards,
> Dieter
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl] [message #1042408 is a reply to message #1042379] |
Tue, 16 April 2013 11:49 |
|
Hi,
Find responses in-line, below.
Cheers,
Christian
On 2013-04-16 10:56:05 +0000, Eike Stepper said:
> Am 16.04.2013 12:32, schrieb Dieter Van Eessen:
>> Hello,
>>
>> I've got the following
>> PROBLEM:
>> -org.eclipse.net4j.util.container.FactoryNotFoundException: Factory not
>> found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl]
> Can you set a breakpoint in
> org.eclipse.net4j.util.container.ManagedContainer.getFactory(String,
> String) and try to find out what goes wrong there in your deployment?
> Maybe org.eclipse.emf.cdo.server.ocl or one of its dependency bundles
> can not be activated...
>
>> -Receiving this problem both when trying to use MySQL database and H2-database.
>> + A previous topic told to check whether the bundle
>> org.eclipse.emf.cdo.server.ocl is resolved/active (using $ss cdo in
>> OSGi console)
>> 148 RESOLVED org.eclipse.emf.cdo.server.ocl_4.0.100.v20130318-1729
That looks OK. This plug-in requires
org.eclipse.ocl.ecore_[3.0.0,4.0.0). That dependency is also correctly
resolved, with its dependency tree?
>>
>> CONTEXT:
>> - Running Kepler4.3M6Classic, installation of CDO 4.2M6 stable builds,
>> using the bookmarks as given. + Server is installed and runs without
>> warnings/errors. Followed a tutorial written by Vincenzo (RCPvision).
>> The console shows that the server is started succesfully. Using netstat
>> I confirm that there's a server named java listening to port 2036.
>> (MySQL and H2 are also running on their standard ports.) The repository
>> has been named demo.
>> + It's possible to "add repository" in the Model Repository view using
>> repository demo on localhost. Name: "My repository"
>> + created a folder inside repo1.
>> + When creating new papyrus model cdoTestUML I can choose to store it
>> into "My repos".
>> -Finishing the new papyrus model wizard: => MySQL: long time waiting
>> ending with error: An internal error occurred during: "Find Papyrus
>> models".
>> org.eclipse.net4j.util.container.FactoryNotFoundException: Factory not
>> found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl]
>> => H2: not so long time waiting ending with same error...
Papyrus uses an OCL query to find the resources in the repository that
are Papyrus models (they contain a SashWindowMngr at the root). This
is used to present them as "models" in the browser with child nodes for
the resources that contain the DI, UML, and Notation content.
>>
>>
>> INFO:
>> + cdoTestUML.di is opened (automatically) after creation, I can edit
>> (add classes,...), Model Explorer is getting updated but the model
>> repository view only shows cdoTestUML.notation and cdoTestUML.uml.
>> There's no cdoTestUML.di present.
>> -When I try to save this model I get:
>> Problem occured: Save Failed
>> Rollback in DBStore: java.lang.NullPointerException
>> at org.eclipse.emf.cdo.server.internal.db.mapping.
>> horizontal.AbstractHorizontalClassMapping.initTable
>> (AbstractHorizontalClassMapping.java:120)
>> + using CDO Session view it's possible to open new session, open a
>> transaction and then I see folder 1 is present. folder1 contains
>> cdoTestUML.di, cdoTestUML.notation and cdoTestUML.uml... Everything is
>> CLEAN. - Yet it is NOT possible to open cdoTestUML.di with papyrus core
>> editor (same error again)
> I *suspect* that Papyrus internally uses OCL queries here and there.
> Christian (CC'ed) may want to comment on that, but in the meantime we
> can focus on why the OCLQueryHandler can not be created in your server.
That is correct. But the problem with the OCLQueryHandler is not
something that I have encountered in my test configurations. What else
could it be than missing the Eclipse OCL run-time on the server side?
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
-------- 8< --------
|
|
| |
Re: [CDO] Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl] [message #1042919 is a reply to message #1042682] |
Wed, 17 April 2013 03:18 |
|
Hi, Dieter,
There may be an exception stack trace in the workspace .log file that
can help us to determine what went wrong for you. Perhaps you could
attach that?
Apart from this, the application that is the CDO server is
org.eclipse.cdo.server.app. In case it might help you, I attach the
launch configuration that I use to launch a CDO server for testing the
Papyrus CDO integration feature.
You don't need to create a product configuration to debug the CDO
server. Running the server application (as in the attached launch
config) should be sufficient.
HTH,
Christian
On 2013-04-16 18:55:38 +0000, Dieter Van Eessen said:
> Eike Stepper wrote on Tue, 16 April 2013 06:56
>>> I've got the following
>>> PROBLEM:
>>> -org.eclipse.net4j.util.container.FactoryNotFoundException: Factory not
>>> found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl]
>> Can you set a breakpoint in
>> org.eclipse.net4j.util.container.ManagedContainer.getFactory(String,
>> String) and try to find out what goes wrong there in your deployment?
>> Maybe org.eclipse.emf.cdo.server.ocl or one of its dependency bundles
>> can not be activated...
>
> I'm not highly acquainted with software development...
> How do I debug for this problem? I've added breakpoint within this
> function and also imported all org.eclipse.emf.cdo.*,
> org.eclipse.papyrus.cdo and org.eclipse.net4j plugins.
> Currently have several eclipse applications available, which you've
> probably written with debug purpose. I know how to debug small java
> apps but I don't know how to create a product configuration which would
> allow me to debug this problem...
>
> Perhaps also worth mentioning that when using mongodb, I'm experiencing
> the same problem.
> Thanks,
> Dieter
|
|
|
Re: [CDO] Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl] [message #1044052 is a reply to message #1042919] |
Thu, 18 April 2013 12:41 |
Dieter Van Eessen Messages: 12 Registered: January 2013 |
Junior Member |
|
|
Hello,
The problem regarding stated above has been solved, it was indeed a matter of unresolved dependencies. By comparing the launch config you provided I've noticed some deps were missing. Now also found the 'validate plugin' functionality... Sorry for the inconvenience.
Creating models (with class diagram and basic types) in the repository ok now, add'n'save children (eg. classes) in model explorer and cdo-editor works also. Yet I'm facing a NullPointerException error when adding a class on the class diagram and then save the model.
The .log has been added (LOG.NullExcInitTable.txt). In attempt to debug (breakpoint on: cf. code below), the program keeps on breaking (+30 times) on BREAK1, showing a TimeoutRuntimeException (LOG.timeoutExcep.txt).
The ID of debug variable (DEBUG.NullExcInitTable.txt) "this HorizontalNonAuditClassMapping (id=4923)" increases but the amount of tables in the database (MySQL) stays constant. When I disable BREAK1, leaving only BREAK 2 on the next line, the NullPointerException at AbstractHorizontalClassMapping.initTable pops up.
table = database.getSchema().getTable(tableName);
if (table == null)
{
IDBSchema workingCopy = database.getSchemaTransaction().getWorkingCopy(); //BREAK1
table = workingCopy.addTable(tableName); //BREAK2
This occurs with both H2 (no password) and MySQL database (root user and password) (for mongo I'm getting a not yet implemented error).
Thanks,
Dieter
[Updated on: Thu, 18 April 2013 12:47] Report message to a moderator
|
|
|
Re: [CDO] Factory not found: org.eclipse.emf.cdo.server.queryHandlerFactories[ocl] [message #1044233 is a reply to message #1044052] |
Thu, 18 April 2013 16:40 |
|
Am 18.04.2013 14:41, schrieb Dieter Van Eessen:
> Hello,
>
> The problem regarding stated above has been solved, it was indeed a matter of unresolved dependencies. By comparing the launch config you provided I've noticed some deps were missing. Now also found the 'validate plugin' functionality... Sorry for the inconvenience.
Don't worry. Plugins are a blessing when the deployment is okay and a PITA if it isn't :P
> Creating models (with class diagram and basic types) in the repository ok now, add'n'save children (eg. classes) in model explorer and cdo-editor works also. Yet I'm facing a NullPointerException error when adding a class on the class diagram and then save the model.
>
> The .log has been added (LOG.NullExcInitTable.txt). In attempt to debug (breakpoint on: cf. code below), the program keeps on breaking (+30 times) on BREAK1, showing a TimeoutRuntimeException (LOG.timeoutExcep.txt). The ID of debug variable (DEBUG.NullExcInitTable.txt) "this HorizontalNonAuditClassMapping (id=4923)" increases though. When I disable BREAK1, leaving only BREAK 2 on the next line, the NullPointerException at AbstractHorizontalClassMapping.initTable pops up.
>
> table = database.getSchema().getTable(tableName);
> if (table == null)
> {
> IDBSchema workingCopy = database.getSchemaTransaction().getWorkingCopy(); //BREAK1
> table = workingCopy.addTable(tableName); //BREAK2
In the latest I-build we fixed some odd memory and thread leaks that caused TimeoutExceptions in our Hudson build. Can
you try out that build?
Your breakpoints sit on very new code which resulted from a major overhaul of the net4j.db framework. Unfortunately the
stack traces do no longer match the tip of the master branch. Can you reproduce them with the latest I-build?
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| | |
Goto Forum:
Current Time: Sat Apr 27 00:22:38 GMT 2024
Powered by FUDForum. Page generated in 0.03894 seconds
|