2

我在 Windows OS 10 上使用 Neo4J 社区版 2.3.0。一切正常,直到我将neo4j-server.properties文件中的配置更改为:

 org.neo4j.server.thirdparty_jaxrs_classes=org.neo4j.examples.server.unmanaged=/examples/unmanaged

服务器启动时的错误是:

启动 Neo4j 失败:org.neo4j.server.web.NeoServletContainer-5b85e832@73766070==org.neo4j.server.web.NeoServletContainer,-1,false

如果我禁用此更改,则服务器启动得很好。我正在尝试为 Neo4J 教程中给出的非托管扩展运行 HelloWorld 示例,并按照所有说明进行操作。

用于构建 Jar 的 Java 编译器是 1.7,我正在开发 STS 工具。

及早回应会有所帮助。

控制台日志如下

  [o.n.s.d.LifecycleManagingDatabase] Successfully started database
2016-01-04 16:49:08.036+0530 INFO  [o.n.s.CommunityNeoServer] Starting HTTP on port 7474 (4 threads available)
2016-01-04 16:49:08.038+0530 INFO  [o.n.s.m.ThirdPartyJAXRSModule] Mounted    unmanaged extension [org.neo4j.examples.server.unmanaged] at [/examples/unmanaged]
2016-01-04 16:49:08.039+0530 INFO  [o.n.s.w.Jetty9WebServer] Mounting static content at /webadmin
2016-01-04 16:49:08.040+0530 INFO  [o.n.s.w.Jetty9WebServer] Mounting static content at /browser
Jan 04, 2016 4:49:09 PM com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Scanning for root resource and provider classes in the packages: org.neo4j.examples.server.unmanaged
 Jan 04, 2016 4:49:09 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
   INFO: Initiating Jersey application, version 'Jersey: 1.19 02/11/2015 03:25 AM'
   Jan 04, 2016 4:49:09 PM com.sun.jersey.server.impl.application.RootResourceUriRules <init>
SEVERE: The ResourceConfig instance does not contain any root resource classes.
 2016-01-04 16:49:09.521+0530 ERROR [o.n.s.CommunityNeoServer] Failed to start Neo Server on port 7474: org.neo4j.server.web.NeoServletContainer-148016ab@5234ecb5==org.neo4j.server.web.NeoServletContainer,-1,false
2016-01-04 16:49:09.522+0530 INFO  [o.n.s.CommunityNeoServer] Successfully shutdown Neo4j Server
 2016-01-04 16:49:11.581+0530 INFO  [o.n.s.d.LifecycleManagingDatabase] Successfully stopped database
4

1 回答 1

0

问题是您使用的 .jar 没有所需的 .jar

尝试将您的 jar 导出为可执行 jar(我是从 Eclipse 中完成的)并选中“将所需的库打包到生成的 JAR”选项

于 2016-06-15T23:55:39.913 回答