Skip to main content



      Home
Home » Modeling » EMF » [CDO] NPE starting CDO Server with MongoDB store
[CDO] NPE starting CDO Server with MongoDB store [message #768056] Mon, 19 December 2011 08:53 Go to next message
Eclipse UserFriend
Hi all,

I'm looking to test an alternate store implementation for a CDO server
(was using the Hibernate store with MySQL) and decided to give MongoDB a
try.

After reconfiguring the server however I see the following stack to
console before the server exits:

[ERROR] NullPointerException
java.lang.NullPointerException
at
org.eclipse.emf.cdo.server.internal.mongodb.Classes.getClassifierID(Classes.java:111)
at
org.eclipse.emf.cdo.server.internal.mongodb.Commits.marshallRevision(Commits.java:425)
at
org.eclipse.emf.cdo.server.internal.mongodb.Commits.marshalRevisions(Commits.java:407)
at
org.eclipse.emf.cdo.server.internal.mongodb.Commits.write(Commits.java:382)
at
org.eclipse.emf.cdo.server.internal.mongodb.MongoDBStoreAccessor.doWrite(MongoDBStoreAccessor.java:176)
at
org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:150)
at
org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:451)
at
org.eclipse.emf.cdo.internal.server.Repository.initRootResource(Repository.java:1461)
at
org.eclipse.emf.cdo.internal.server.Repository.doActivate(Repository.java:1574)
at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:72)
at
org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:99)
at
org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:89)
at
org.eclipse.emf.cdo.server.CDOServerUtil.addRepository(CDOServerUtil.java:201)
at
org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.configure(RepositoryConfigurator.java:110)
at
org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplication.doStart(CDOServerApplication.java:61)
at org.eclipse.net4j.util.om.OSGiApplication.start(OSGiApplication.java:61)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at
org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26)
at java.lang.Thread.run(Unknown Source)

Looks like an NPE during auto-unboxing a null (returned from Map lookup)
to an int.

My cdo-server.xml looks like:


<?xml version="1.0" encoding="UTF-8"?>
<cdoServer>
<acceptor type="tcp" listenAddr="0.0.0.0" port="2036"/>
<repository name="repo1">
<property name="supportingAudits" value="true"/>
<store type="mongodb">
<property name="uri" value="mongodb://localhost"/>
<property name="drop" value="false"/>
</store>
</repository>
</cdoServer>

Is there anything obvious I'm not doing? Or has anyone else seen this?


Thanks,
Dan

Relevant version information:

org.eclipse.emf.cdo (4.0.1.v20110831-1303)
org.eclipse.emf.cdo (4.0.1.v20110818-0735)
org.eclipse.emf.cdo.server.mongodb (4.0.0.v20110607-1632)
org.eclipse.emf.cdo.server.net4j (4.0.1.v20110818-0735)
Re: [CDO] NPE starting CDO Server with MongoDB store [message #768086 is a reply to message #768056] Mon, 19 December 2011 09:55 Go to previous messageGo to next message
Eclipse UserFriend
Hi Dan,

I've looked at the code but an explanation does not jump into my face immediately. It's quite some time ago that I
developed the MongoDBStore and I'm not sure if someone uses it. I've not maintained it since and I can not easily
reproduce your problem. I fear you'd have to use the debugger yourself.

Cheers
/Eike

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


Am 19.12.2011 14:53, schrieb Dan Pollitt:
> Hi all,
>
> I'm looking to test an alternate store implementation for a CDO server (was using the Hibernate store with MySQL) and
> decided to give MongoDB a try.
>
> After reconfiguring the server however I see the following stack to console before the server exits:
>
> [ERROR] NullPointerException
> java.lang.NullPointerException
> at org.eclipse.emf.cdo.server.internal.mongodb.Classes.getClassifierID(Classes.java:111)
> at org.eclipse.emf.cdo.server.internal.mongodb.Commits.marshallRevision(Commits.java:425)
> at org.eclipse.emf.cdo.server.internal.mongodb.Commits.marshalRevisions(Commits.java:407)
> at org.eclipse.emf.cdo.server.internal.mongodb.Commits.write(Commits.java:382)
> at org.eclipse.emf.cdo.server.internal.mongodb.MongoDBStoreAccessor.doWrite(MongoDBStoreAccessor.java:176)
> at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:150)
> at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:451)
> at org.eclipse.emf.cdo.internal.server.Repository.initRootResource(Repository.java:1461)
> at org.eclipse.emf.cdo.internal.server.Repository.doActivate(Repository.java:1574)
> at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:72)
> at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:99)
> at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:89)
> at org.eclipse.emf.cdo.server.CDOServerUtil.addRepository(CDOServerUtil.java:201)
> at org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.configure(RepositoryConfigurator.java:110)
> at org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplication.doStart(CDOServerApplication.java:61)
> at org.eclipse.net4j.util.om.OSGiApplication.start(OSGiApplication.java:61)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26)
> at java.lang.Thread.run(Unknown Source)
>
> Looks like an NPE during auto-unboxing a null (returned from Map lookup) to an int.
>
> My cdo-server.xml looks like:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <cdoServer>
> <acceptor type="tcp" listenAddr="0.0.0.0" port="2036"/>
> <repository name="repo1">
> <property name="supportingAudits" value="true"/>
> <store type="mongodb">
> <property name="uri" value="mongodb://localhost"/>
> <property name="drop" value="false"/>
> </store>
> </repository>
> </cdoServer>
>
> Is there anything obvious I'm not doing? Or has anyone else seen this?
>
>
> Thanks,
> Dan
>
> Relevant version information:
>
> org.eclipse.emf.cdo (4.0.1.v20110831-1303)
> org.eclipse.emf.cdo (4.0.1.v20110818-0735)
> org.eclipse.emf.cdo.server.mongodb (4.0.0.v20110607-1632)
> org.eclipse.emf.cdo.server.net4j (4.0.1.v20110818-0735)
>
>
Re: [CDO] NPE starting CDO Server with MongoDB store [message #991846 is a reply to message #768086] Thu, 20 December 2012 05:36 Go to previous messageGo to next message
Eclipse UserFriend
Hi everyone,

I've got the exact same issue.

I launch mongoDB as explained here
http://wiki.eclipse.org/CDO/MongoDB_Store . I've tried with several
versions of mongod.exe (available here http://www.mongodb.org/downloads)
but still encounter this NPE.

Does anyone know which version of the launcher matches
org.eclipse.emf.cdo.server.mongodb_4.0.0.v20110607-1632 and
com.mongodb_2.4.0.v20110704-1109 plugins ?

Best regards,
Alex
Re: [CDO] NPE starting CDO Server with MongoDB store [message #992272 is a reply to message #991846] Fri, 21 December 2012 03:56 Go to previous messageGo to next message
Eclipse UserFriend
Am 20.12.2012 11:36, schrieb Alex Lagarde:
> Hi everyone,
>
> I've got the exact same issue.
>
> I launch mongoDB as explained here http://wiki.eclipse.org/CDO/MongoDB_Store . I've tried with several versions of
> mongod.exe (available here http://www.mongodb.org/downloads) but still encounter this NPE.
>
> Does anyone know which version of the launcher matches org.eclipse.emf.cdo.server.mongodb_4.0.0.v20110607-1632 and
> com.mongodb_2.4.0.v20110704-1109 plugins ?
All the .exe files in my MongoDB/bin folder have the date 2010-12-07. Not sure if that's the build, package or unzip time.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] NPE starting CDO Server with MongoDB store [message #992302 is a reply to message #992272] Fri, 21 December 2012 05:07 Go to previous messageGo to next message
Eclipse UserFriend
Hey that works!

FYI if you want to add this information somewhere, the corresponding
mongodb manager version is 1.6.5 (available on the archived releases of
http://www.mongodb.org/downloads )

Thanks a lot Eike !
Alex
Re: [CDO] NPE starting CDO Server with MongoDB store [message #992306 is a reply to message #992302] Fri, 21 December 2012 05:12 Go to previous message
Eclipse UserFriend
Am 21.12.2012 11:07, schrieb Alex Lagarde:
> Hey that works!
>
> FYI if you want to add this information somewhere, the corresponding mongodb manager version is 1.6.5 (available on
> the archived releases of http://www.mongodb.org/downloads )
Thanks for the info! I've added it to http://wiki.eclipse.org/CDO/MongoDB_Store

NPEs are commparingly easy to track down. Maybe you have a chance to make the store work with newer MongoDB versions.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Previous Topic:JSON Support
Next Topic:[CDO] Trouble exporting an (xsd based) model using EFeatureMapEntry
Goto Forum:
  


Current Time: Wed Jul 23 08:34:07 EDT 2025

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

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

Back to the top