It seems that you create a new graph database service per request, which is not what you would want to do. You should have it created only once and injected into your controllers.
It is also trying to upgrade the store? Perhaps you should upgrade the store first and see if the problem persists. Also your database seems to be somehow broken, perhaps you can consistency-check it first? http://www.markhneedham.com/blog/2014/01/22/neo4j-backup-store-copy-and-consistency-check/ <http://www.markhneedham.com/blog/2014/01/22/neo4j-backup-store-copy-and-consistency-check/> Michael > Am 14.05.2015 um 13:32 schrieb Rita <[email protected]>: > > Thank you for the reply Michael. > I also try to pass from Glassfish 3.1.2 to Glassfish 4 but the problem is the > same: > > > SEVERE: java.lang.RuntimeException: Error starting > org.neo4j.kernel.EmbeddedGraphDatabase, C:\graph1 > at > org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:334) > at > org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:59) > at > org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:108) > at > org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:95) > at > org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:176) > at db.Init.open(Init.java:23) > at org.apache.jsp.open_jsp._jspService(open_jsp.java:58) > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) > at > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411) > at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) > at > org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) > at > org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) > at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) > at > org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282) > at > com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) > at > com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) > at > org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201) > at > org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175) > at > org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) > at > org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) > at > org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) > at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) > at > org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) > at > org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) > at > org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) > at > org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) > at > org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) > at > org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) > at > org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) > at java.lang.Thread.run(Thread.java:722) > Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component > 'org.neo4j.kernel.impl.transaction.state.DataSourceManager@5573799a' was > successfully initialized, but failed to start. Please see attached cause > exception. > at > org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513) > at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) > at > org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:329) > ... 40 more > Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component > 'org.neo4j.kernel.NeoStoreDataSource@549a2ada' was successfully initialized, > but failed to start. Please see attached cause exception. > at > org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513) > at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) > at > org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:117) > at > org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) > ... 42 more > Caused by: java.lang.IllegalStateException: Wanted record STORE_VERSION, but > this record wasn't read since the neostore didn't contain it > at > org.neo4j.kernel.impl.store.record.NeoStoreUtil.getValue(NeoStoreUtil.java:127) > at > org.neo4j.kernel.impl.store.record.NeoStoreUtil.getStoreVersion(NeoStoreUtil.java:155) > at > org.neo4j.kernel.impl.storemigration.UpgradableDatabase.hasCurrentVersion(UpgradableDatabase.java:114) > at > org.neo4j.kernel.impl.storemigration.StoreMigrator.needsMigration(StoreMigrator.java:155) > at > org.neo4j.kernel.impl.storemigration.StoreUpgrader.getParticipantsEagerToMigrate(StoreUpgrader.java:259) > at > org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrateIfNeeded(StoreUpgrader.java:134) > at > org.neo4j.kernel.NeoStoreDataSource.upgradeStore(NeoStoreDataSource.java:558) > at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:459) > at > org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) > ... 45 more > > > > For investigation I can give you two WAR that can be loaded on Glassfish 4. > What do you think? > Many thanks. > > Rita > > Il giorno giovedì 14 maggio 2015 11:54:14 UTC+2, Michael Hunger ha scritto: > Perhaps something in Glassfish's JMX handling interferes there. > > Not sure how easy this is to reproduce ... best would be if you could provide > an out of the box test (using embedded glassfish) that shows the behavior. > > Michael > >> Am 14.05.2015 um 11:26 schrieb Rita <rita...@ <>gmail.com >> <http://gmail.com/>>: >> >> Hi Sumit, >> thank you. I am opening the 2 databases in 2 differents web application >> using Glassfish 3.1.2 I've seen that the error exists only using the web app >> with Glassfish. So your case is ok, I am sorry I did not mention details >> before. So the problem is the combination of Neo4j 2.2.1 and Glassfish. >> >> Rita >> >> >> Il giorno mercoledì 13 maggio 2015 05:30:38 UTC+2, Sumit Gupta ha scritto: >> Hi Rita, >> >> I tried to creating multiple instances of embedded Neo4j (using different DB >> locations) it works fine for me with Neo4j 2.2.1 Community versions. >> >> Here is my code: - >> >> public static void main(String[] args) { >> GraphDatabaseFactory graphDbFactory = new >> GraphDatabaseFactory(); >> GraphDatabaseService graphDb = graphDbFactory >> .newEmbeddedDatabase("c:\\Temp\\data\\dbName"); >> >> System.out.println("First graph is initialized "); >> >> GraphDatabaseFactory graphDbFactory1 = new >> GraphDatabaseFactory(); >> GraphDatabaseService graphDb1 = graphDbFactory1 >> .newEmbeddedDatabase("c:\\Temp\\data\\dbName1"); >> >> System.out.println("Second graph is initialized "); >> >> >> } >> >> >> Can you please paste your the code which is initializing the 2 different >> Databases. >> >> Thanks, >> Sumit >> >> On Tuesday, 12 May 2015 13:07:56 UTC+5:30, Rita wrote: >> Thank you for the reply. >> I am starting different Neo4j graphs. As I said before, I always do it until >> 1.9.9 version, so it is a new problem of 2.2.1! With one db 1.9.9 and one >> 2.2.1 the start is ok, instead with both db 2.2.1 the start gives that >> error. >> So I please ask if it is possible to investigate on this issue that seems to >> be a bug. >> >> Many thanks >> Rita >> >> Il giorno martedì 12 maggio 2015 02:47:52 UTC+2, Sumit Gupta ha scritto: >> Hi, >> >> Are you starting both instances with same DB files or different? >> >> I any case i do not think you will be able to do it because the JMX beans >> from second instance will try to get registered within same JMX domain, >> which was started by first instance. >> >> I will check and see if there is any configuration which can support user >> defined JMX domains. >> >> Thanks, >> Sumit >> >> On Monday, 11 May 2015 14:57:00 UTC+5:30, Rita wrote: >> Anyone does have an idea please? >> >> Thanks, >> Rita >> >> >> >> Il giorno venerdì 8 maggio 2015 10:00:21 UTC+2, Rita ha scritto: >> Hi all, >> I am using Neo4j 2.2.1 embedded in java application. I've found a problem. I >> cannot open different Neo4j graphs on my server because when I start the >> second istance I'm getting an error. In the messages.log I have the >> following: >> >> --- INITIALIZED diagnostics END --- >> Failed to register Kernel JMX Bean >> Failed to register JMX Bean >> org.neo4j.jmx.impl.ManagementBeanProvider[Primitive count] >> (javax.management.InstanceAlreadyExistsException: >> org.neo4j:instance=kernel#0,name=Primitive count) >> Failed to register JMX Bean org.neo4j.jmx.impl.ManagementBeanProvider[Store >> file sizes] (javax.management.InstanceAlreadyExistsException: >> org.neo4j:instance=kernel#0,name=Store file sizes) >> Failed to register Configuration JMX Bean >> Couldn't close neostore after startup failure >> --- STOPPING diagnostics START --- >> --- STOPPING diagnostics END --- >> Shutdown started >> >> I don't have this error when I use version 1.9.9 on both graphs or if only >> one is 2.2.1. Could you give me an idea to solve this issue please ? >> Thank you. >> >> Rita >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Neo4j" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to neo4j+un...@ <>googlegroups.com <http://googlegroups.com/>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
