Announcement Announcement Module
Collapse
No announcement yet.
Neo4j EmbeddedGraphDatabase: neo4j-shell? /webadmin UI? Clustering? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Neo4j EmbeddedGraphDatabase: neo4j-shell? /webadmin UI? Clustering?

    I like the command line neo4j-shell when using Neo4J in "server" mode. I also like the Web Admin Interface. Is there a way to enable these features for the EmbeddedGraphDatabase when using Spring Data Neo4J? I know I can set up SDN4J to use the Neo4j REST client to communicate with a remote Neo4J Server - but I'd rather have the performance of EmbeddedGraphDatabase.

    Also - when using the EmbeddedGraphDatabase - how do I configure clustering using the HA server?

    Thanks in advance.

    M

  • #2
    M,

    Here are a couple of short reads, let me know if those are not enough:

    http://docs.neo4j.org/chunked/snapsh...-embedded.html
    http://docs.neo4j.org/chunked/snapsh...ded_in_ha_mode

    Regards,

    Lasse

    Comment


    • #3
      Thanks for the response. I read the docs. I'm a bit confused. In Spring Data Neo4J I can start an embedded server like so (Which seem to follow the docs you sent):

      (from: http://static.springsource.org/sprin.../html/#d5e1703)

      Code:
          <bean id="graphDatabaseService" class="org.neo4j.kernel.EmbeddedGraphDatabase" 
                  destroy-method="shutdown">
              <constructor-arg index="0" value="target/test.db" />
              <constructor-arg index="1">
                  <map>
                      <entry key="enable_remote_shell" value="true"/>
                  </map>
              </constructor-arg>
          </bean>
      
          <bean id="serverWrapper" class="org.neo4j.server.WrappingNeoServerBootstrapper" 
            init-method="start" destroy-method="stop">
              <constructor-arg ref="graphDatabaseService"/>
          </bean>
      I added the needed JAR in my POM:

      Code:
      <dependency>
          <groupId>org.neo4j.app</groupId>
          <artifactId>neo4j-server</artifactId>
          <classifier>static-web</classifier>
          <version>1.8</version>
      </dependency>
      When I start the app - I get the following error:

      Code:
      Could not instantiate bean class [org.neo4j.kernel.EmbeddedGraphDatabase]: Constructor threw exception; nested exception is org.neo4j.kernel.lifecycle.LifecycleException: Failed to transition org.neo4j.kernel.logging.LogbackService@68ffad78 from NONE to STOPPED
      
      Caused by: java.lang.NoSuchMethodError: org.codehaus.janino.ClassBodyEvaluator.setImplementedInterfaces([Ljava/lang/Class;)V
      If remove the POM dependency and use the following Spring config:

      Code:
          <neo4j:config graphDatabaseService="graphDatabaseService"/>
      
          <bean id="graphDatabaseService" class="org.neo4j.kernel.EmbeddedGraphDatabase"
                destroy-method="shutdown">
              <constructor-arg index="0" value="target/test.db" />
              <constructor-arg index="1">
                  <map>
                      <entry key="enable_remote_shell" value="true"/>
                  </map>
              </constructor-arg>
          </bean>
      My app starts - and I can use the db in my code by autowireing in Neo4jOperations - but do I have a console? Do I have web admin interface? The docs seems to indicate I need to use the Wrapper. Any suggestions?

      Thanks,
      M

      Comment

      Working...
      X