在Ubuntu 14.04上启动neo4j 2.2.3时出错

时间:2015-08-09 09:18:35

标签: java neo4j

我已经从PPA安装了neo4j 2.2.3版(按照此处的说明:http://debian.neo4j.org/)并更改了打开文件的系统限制(根据此处的说明:neo4j and max open files等地方)。

唉,它无法启动。我已启用FINEST日志记录并在/var/lib/neo4j/data/graph.db/messages.log中收到以下错误

2015-08-09 08:44:56.954+0000 ERROR [org.neo4j]: Failed to start Neo Server on port [7474] Starting Neo4j Server failed: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
org.neo4j.server.ServerStartupException: Starting Neo4j Server failed: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
        at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:258)
        at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:117)
        at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:69)
Caused by: java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
        at org.eclipse.jetty.util.log.JettyAwareLogger.log(JettyAwareLogger.java:619)
        at org.eclipse.jetty.util.log.JettyAwareLogger.info(JettyAwareLogger.java:314)
        at org.eclipse.jetty.util.log.Slf4jLog.info(Slf4jLog.java:74)
        at org.eclipse.jetty.util.log.Log.initialized(Log.java:188)
        at org.eclipse.jetty.util.log.Log.getLogger(Log.java:290)
        at org.eclipse.jetty.util.log.Log.getLogger(Log.java:280)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.(AbstractLifeCycle.java:35)
        at org.neo4j.server.web.Jetty9WebServer.createQueuedThreadPool(Jetty9WebServer.java:191)
        at org.neo4j.server.web.Jetty9WebServer.start(Jetty9WebServer.java:152)
        at org.neo4j.server.AbstractNeoServer.startWebServer(AbstractNeoServer.java:474)
        at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:230)
        ... 2 more

似乎缺少某些东西?

1 个答案:

答案 0 :(得分:1)

问题是位于def pca_code(data): #raw_implementation var_per=.98 data-=np.mean(data, axis=0) data/=np.std(data, axis=0) cov_mat=np.cov(data, rowvar=False) evals, evecs = np.linalg.eigh(cov_mat) idx = np.argsort(evals)[::-1] evecs = evecs[:,idx] evals = evals[idx] variance_retained=np.cumsum(evals)/np.sum(evals) index=np.argmax(variance_retained>=var_per) evecs = evecs[:,:index+1] reduced_data=np.dot(evecs.T, data.T).T print(evals) print("_"*30) print(evecs) print("_"*30) #using scipy package clf=PCA(var_per) X_train=data.T X_train=clf.fit_transform(X_train) print(clf.explained_variance_) print("_"*30) print(clf.components_) print("__"*30) 的另一个slf4j库。感谢@ stefan-ambruster的建议。 /usr/java/packages/lib/ext

似乎2015-08-09 23:39:46.655+0000 ERROR [org.neo4j]: Failed to start Neo Server on port [7474] Starting Neo4j Server failed: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple; org.neo4j.server.ServerStartupException: Starting Neo4j Server failed: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple; Caused by: java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple; [loader.1] file:/usr/java/packages/lib/ext/slf4j-api-1.5.8.jar [classpath + loader.0] file:/usr/share/neo4j/system/lib/slf4j-api-1.7.7.jar [loader.1] file:/usr/java/packages/lib/ext/slf4j-log4j12-1.5.8.jar [classpath + loader.0] file:/usr/share/neo4j/system/lib/jcl-over-slf4j-1.7.7.jar 2015-08-09 23:41:20.075+0000 ERROR [org.neo4j]: Failed to start Neo Server on port [7474] Starting Neo4j Server failed: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple; org.neo4j.server.ServerStartupException: Starting Neo4j Server failed: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple; Caused by: java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple; 对版本非常敏感,所以请注意主系统版本与neo4j所需的版本不同。

我从slf4j删除了旧slf4j库,neo4j现在按预期启动。

好哇!