我有一个嵌入式neo4j数据库(2.1.3),我正在使用Jython 2.7b3。我希望能够使用WrappingNeoServerBootstrapper提供的Web管理员。
我目前的代码是:
from org.neo4j.server import WrappingNeoServerBootstrapper
from org.neo4j.server.configuration import ServerConfigurator
from org.neo4j.graphdb.factory import GraphDatabaseFactory
graphDb = GraphDatabaseFactory().newEmbeddedDatabase('data/')
config = ServerConfigurator(graphDb)
WrappingNeoServerBootstrapper(graphDb, config).start()
然而,当我尝试启动WrappingNeoServerBootstrapper时,我得到一个非常长的堆栈跟踪结束:
Caused by: java.lang.ClassNotFoundException: org.neo4j.server.webadmin.rest.JmxService
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[na:1.7.0_67]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_67]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_67]
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0_67]
at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[na:1.7.0_67]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) ~[na:1.7.0_67]
at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[na:1.7.0_67]
at com.sun.jersey.api.core.ClassNamesResourceConfig.convertToSet(ClassNamesResourceConfig.java:118) ~[na:na]
... 51 common frames omitted
01:25:32.485 [main] WARN o.e.j.u.component.AbstractLifeCycle - FAILED org.eclipse.jetty.server.Server@53f6812e: javax.servlet.ServletException: org.neo4j.server.web.NeoServletContainer-1365105063@3cbbb0ac==org.neo4j.server.web.NeoServletContainer,-1,false
javax.servlet.ServletException: org.neo4j.server.web.NeoServletContainer-1365105063@3cbbb0ac==org.neo4j.server.web.NeoServletContainer,-1,false
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:563) ~[na:na]
at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:351) ~[na:na]
感谢关于我遗失的任何想法?
答案 0 :(得分:0)
根据this link,不推荐使用WrappingNeoServerBootstrapper。你在最近的手册中找不到关于NeoServerBootstrapper的消息......
解决方案应该是为新服务器编写extensions or plugins。
答案 1 :(得分:0)
如果您还没有 -
,则需要包含这些依赖项<dependency>
<groupId>org.neo4j.app</groupId>
<artifactId>neo4j-server</artifactId>
<version>${neo4j.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j.app</groupId>
<artifactId>neo4j-server</artifactId>
<version>${neo4j.version}</version>
<type>jar</type>
<classifier>static-web</classifier>
<scope>compile</scope>
</dependency>