Skip to main content



      Home
Home » Modeling » EMF » [CDO] Crash on CDO after restart when using mongodb store
[CDO] Crash on CDO after restart when using mongodb store [message #929235] Mon, 01 October 2012 05:59 Go to next message
Eclipse UserFriend
Hi,

We have developed an application that conects to a CDO repository. We configured the CDO (version 4.1) to use a db store and we tried with Derby and Postgre, and everything worked ok. But, if we changed the store to be mongodb, we are unable to restart the application correctly.

The first time we start the CDO repo using Mongo DB and the application, everything works. The CDO is initialized and after starting the application up we are able to query the CDO repository and store and fetch data. The problem appears when we stop the CDO repository and application and we try to start them up again. First, the CDO starts correctly, without throwing any warning, but when we start the application that connects to the CDO repo, we get the following stacktrace:

!ENTRY org.eclipse.net4j 4 0 2012-10-01 10:53:05.832
!MESSAGE Root resource has not been initialized in Repository[sports-catalogue]
!STACK 0
java.lang.IllegalStateException: Root resource has not been initialized in Repository[sports-catalogue]
at org.eclipse.emf.cdo.internal.server.SessionManager.ensureRootResourceInitialized(SessionManager.java:266)
at org.eclipse.emf.cdo.internal.server.SessionManager.openSession(SessionManager.java:223)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.OpenSessionIndication.responding(OpenSessionIndication.java:117)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.responding(CDOServerIndicationWithMonitoring.java:170)
at org.eclipse.net4j.signal.IndicationWithMonitoring.responding(IndicationWithMonitoring.java:92)
at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedOutput(IndicationWithResponse.java:98)
at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:298)
at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:67)
at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:65)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
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)

When I try to debug the CDO source code, I see that, as it is a restart, the rootResourcdId is not created, but read and it is returning a null value. The null value returned is because the following query, which runs against Mongo DB, doesn't return any result:

db.commits.find({ "revisions.cdo_class" : { "$in" : [ 0 , 0]} , "revisions.cdo_version" : { "$gte" : 1} , "revisions.cdo_container" : 0 , "revisions.name" : null })

The thing is that in my Mongo DB instance, I don't have anything that matches:

"revisions.cdo_class" : { "$in" : [ 0 , 0]}

Any idea? Am I missing anything?

I have attached the cdo-server.xml config file used.

Thanks.
Re: [CDO] Crash on CDO after restart when using mongodb store [message #929276 is a reply to message #929235] Mon, 01 October 2012 06:33 Go to previous messageGo to next message
Eclipse UserFriend
Am 01.10.2012 11:59, schrieb Joaquin Guillen:
> Hi,
>
> We have developed an application that conects to a CDO repository. We configured the CDO (version 4.1) to use a db store and we tried with Derby and Postgre, and everything worked ok. But, if we changed the store to be mongodb, we are unable to restart the application correctly.
>
> The first time we start the CDO repo using Mongo DB and the application, everything works. The CDO is initialized and after starting the application up we are able to query the CDO repository and store and fetch data. The problem appears when we stop the CDO repository and application and we try to start them up again. First, the CDO starts correctly, without throwing any warning, but when we start the application that connects to the CDO repo, we get the following stacktrace:
>
> !ENTRY org.eclipse.net4j 4 0 2012-10-01 10:53:05.832
> !MESSAGE Root resource has not been initialized in Repository[sports-catalogue]
> !STACK 0
> java.lang.IllegalStateException: Root resource has not been initialized in Repository[sports-catalogue]
> at org.eclipse.emf.cdo.internal.server.SessionManager.ensureRootResourceInitialized(SessionManager.java:266)
> at org.eclipse.emf.cdo.internal.server.SessionManager.openSession(SessionManager.java:223)
> at org.eclipse.emf.cdo.server.internal.net4j.protocol.OpenSessionIndication.responding(OpenSessionIndication.java:117)
> at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.responding(CDOServerIndicationWithMonitoring.java:170)
> at org.eclipse.net4j.signal.IndicationWithMonitoring.responding(IndicationWithMonitoring.java:92)
> at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedOutput(IndicationWithResponse.java:98)
> at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:298)
> at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:67)
> at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:65)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
> 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)
>
> When I try to debug the CDO source code, I see that, as it is a restart, the rootResourcdId is not created, but read and it is returning a null value. The null value returned is because the following query, which runs against Mongo DB, doesn't return any result:
>
> db.commits.find({ "revisions.cdo_class" : { "$in" : [ 0 , 0]}
The two zeros look suspicious to me. They're probably meant to be internal classifier IDs. But according to
Classes.mapNewClassifier() these IDs can't be zero. I have currently no MongoDB installed (nor have I looked at the
MongoDBStore for a year or two). Can you try to find out with the debugger why the classifiers have no mapped IDs?

Especially if/when (or why not) Classes.initialize() and Commits.initializeClassifiers() are called:

private void initialize()
{
if (!initialized)
{
Commits commits = store.getCommits();
commits.initializeClassifiers();
initialized = true;
}
}

Cheers
/Eike

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


> , "revisions.cdo_version" : { "$gte" : 1} , "revisions.cdo_container" : 0 , "revisions.name" : null })
>
> The thing is that in my Mongo DB instance, I don't have anything that matches:
>
> "revisions.cdo_class" : { "$in" : [ 0 , 0]}
>
> Any idea? Am I missing anything?
>
> I have attached the cdo-server.xml config file used.
>
> Thanks.
Re: [CDO] Crash on CDO after restart when using mongodb store [message #929437 is a reply to message #929276] Mon, 01 October 2012 09:07 Go to previous messageGo to next message
Eclipse UserFriend
Hi Eike,

Thanks for the quick reply.

Classes.initialize() and Commits.initializeClassifiers() methods are called. But it seems Commits.initializeClassifiers() runs a query that is not returning any record:

db.commits.find({ "units" : { "$exists" : true}})

and the methods handleEmbedded() and handleClassifiers() of the anonymous inner class that implements QueryEmbeddedUnits in the Commits.initializeClassifiers() are not called.
Re: [CDO] Crash on CDO after restart when using mongodb store [message #929547 is a reply to message #929437] Mon, 01 October 2012 10:52 Go to previous message
Eclipse UserFriend
Am 01.10.2012 15:07, schrieb Joaquin Guillen:
> Hi Eike,
> Thanks for the quick reply.
>
> Classes.initialize() and Commits.initializeClassifiers() methods are called. But it seems
> Commits.initializeClassifiers() runs a query that is not returning any record:
>
> db.commits.find({ "units" : { "$exists" : true}})
That query looks pretty simple. Can you see why no docs are returned?

Cheers
/Eike

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


> and the methods handleEmbedded() and handleClassifiers() of the anonymous inner class that implements
> QueryEmbeddedUnits in the Commits.initializeClassifiers() are not called.
Previous Topic:Ecore Metamodel EAttribute bugs
Next Topic:EMF 2.8.1?
Goto Forum:
  


Current Time: Fri Nov 07 08:40:43 EST 2025

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

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

Back to the top