小编ste*_*ner的帖子

使用Logback.xml播放2.1和Neo4J WrappingNeoServer错误

我有一个嵌入式neo4j服务器,管理控制台在Play 2.0.1应用程序中运行.我最近升级到与DeadBolt兼容的候选版本,发现该应用程序不再运行.

要启动服务器,我正在执行以下操作:

    graphDb = (GraphDatabaseAPI) new GraphDatabaseFactory()
                .newEmbeddedDatabaseBuilder(CONF_DBMETA_LOCATION)
                .setConfig(ShellSettings.remote_shell_enabled, "true")
                .newGraphDatabase();
        ServerConfigurator config;
        config = new ServerConfigurator(graphDb);
        // let the server endpoint be on a custom port

        srv = new WrappingNeoServerBootstrapper(graphDb, config);
        srv.start();
Run Code Online (Sandbox Code Playgroud)

不幸的是,我得到:

> java.lang.RuntimeException:
> org.neo4j.kernel.lifecycle.LifecycleException: Component
> 'org.neo4j.kernel.logging.LogbackService@4c043845' failed to
> initialize. Please see attached cause exception.
Run Code Online (Sandbox Code Playgroud)

我已经尝试从我的Build.scala中删除slf4j和logback依赖项,其中添加了neo4j-server但无济于事.似乎neo4j正在加载错误的logback.xml.此外,如果我将noTransitive()添加到neo4j-server依赖项中,启动时的logback.xml警告就会消失.我想neo4j特定的logback.xml嵌入在jar中,并导致问题.我看到的一个可能的解决方案是通过代码编写自定义配置,但我不确定如何执行此操作.有什么想法吗?作为参考,我在启动时遇到这些错误:

>     22:11:05,124 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find
> resource [logback.groovy]
>     22:11:05,125 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find
> resource [logback-test.xml]
>     22:11:05,125 |-INFO in …
Run Code Online (Sandbox Code Playgroud)

logback slf4j neo4j playframework-2.1

10
推荐指数
1
解决办法
2091
查看次数

标签 统计

logback ×1

neo4j ×1

playframework-2.1 ×1

slf4j ×1