0

由于找不到“file:conf/log4j.properties”的问题,无法在我的 MacBook 上运行任何类型的 Neo4j(1.7.2、1.8.2、1.9.RC2),即使jakarta-log4j从端口安装,它看起来也一样遇到无法玩的问题……安装时是否缺少 .jar?有任何想法吗?我可以找到log4j.properties与其他应用程序相关的其他内容。

已检查的问题: 在 mac 上启动 neo4jlog4j 无法使用我的 log4j.properties 进行初始化

Neo4j RC 1.9.2 版本(实际安装了 Java 1.7,但这不是主要问题):

laptop:bin doduibhi$ ./neo4j start
WARNING! You are using an unsupported version of the Java runtime. Please     use Oracle(R) Java(TM) Runtime Environment 7.
Starting Neo4j Server...WARNING: not changing user
process [4223]... waiting for server to be ready.............. Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.

<from_logdir> less neo4j.0.0.log
Jun 1, 2013 2:41:03 PM org.neo4j.server.logging.Logger log
WARNING: WARNING! You are using an unsupported version of the Java runtime.      Please use Oracle(R) Java(TM) Runtime Environment 7.

    6/1/13 2:41:03 PM org.neo4j.server.CommunityBootstrapper WARNING: WARNING! You are using an unsupported version of the Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 7.
log4j:ERROR Could not read configuration file from URL [file:conf/log4j.properties].
java.io.FileNotFoundException: conf/log4j.properties (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:120)
    at java.io.FileInputStream.<init>(FileInputStream.java:79)
    at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
    at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
    at java.net.URL.openStream(URL.java:1010)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:459)
    at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471)
    at org.apache.log4j.LogManager.<clinit>(LogManager.java:125)
    at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:243)
    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
    at org.apache.commons.configuration.AbstractFileConfiguration.<init>(AbstractFileConfiguration.java:121)
    at org.apache.commons.configuration.AbstractFileConfiguration.<init>(AbstractFileConfiguration.java:154)
    at org.apache.commons.configuration.PropertiesConfiguration.<init>(PropertiesConfiguration.java:252)
    at org.neo4j.server.configuration.PropertyFileConfigurator.loadPropertiesConfig(PropertyFileConfigurator.java:142)
    at org.neo4j.server.configuration.PropertyFileConfigurator.<init>(PropertyFileConfigurator.java:76)
    at org.neo4j.server.Bootstrapper.createConfigurator(Bootstrapper.java:177)
    at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:83)
    at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:49)
log4j:ERROR Ignoring configuration file [file:conf/log4j.properties].
Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
    at org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:133)
    at org.apache.commons.configuration.ConfigurationUtils.locate(ConfigurationUtils.java:447)
    at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:213)
    at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:197)
    at org.apache.commons.configuration.AbstractFileConfiguration.<init>(AbstractFileConfiguration.java:162)
    at org.apache.commons.configuration.PropertiesConfiguration.<init>(PropertiesConfiguration.java:252)
    at org.neo4j.server.configuration.PropertyFileConfigurator.loadPropertiesConfig(PropertyFileConfigurator.java:142)
    at org.neo4j.server.configuration.PropertyFileConfigurator.<init>(PropertyFileConfigurator.java:76)
    at org.neo4j.server.Bootstrapper.createConfigurator(Bootstrapper.java:177)
    at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:83)
    at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:49)

Neo4j 社区 1.8.2 版本:

laptop:bin doduibhi$ ./neo4j info
Neo4j Server is not running
Using Java version: CurrentJDK
NEO4J_HOME:        /Volumes/dat1/install/neo4j-community-1.8.2
NEO4J_SERVER_PORT: 7474
NEO4J_INSTANCE:    /Volumes/dat1/install/neo4j-community-1.8.2
JAVA_HOME:         /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
JAVA_OPTS:         -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dfile.encoding=UTF-8
CLASSPATH:         /Volumes/dat1/install/neo4j-community-1.8.2/lib/concurrentlinkedhashmap-lru-1.3.1.jar:/Volumes/dat1/install/neo4j-community-1.8.2/lib/geronimo-jta_1.1_spec-1.1.1.jar:/Volumes/dat1/install/neo4j-community-1.8.2/lib/lucene-core-3.5.0.jar:/Volumes/dat1/install/neo4j-community-1.8.2/lib/neo4j-cypher-1.8.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/lib/neo4j-graph-algo-1.8.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/lib/neo4j-graph-matching-1.8.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/lib/neo4j-jmx-1.8.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/lib/neo4j-kernel-1.8.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/lib/neo4j-lucene-index-1.8.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/lib/neo4j-shell-1.8.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/lib/neo4j-udc-1.8.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/lib/org.apache.servicemix.bundles.jline-0.9.94_1.jar:/Volumes/dat1/install/neo4j-community-1.8.2/lib/scala-library-2.9.1-1.jar:/Volumes/dat1/install/neo4j-community-1.8.2/lib/server-api-1.8.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/antlr-2.7.7.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/asm-3.1.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/asm-analysis-3.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/asm-commons-3.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/asm-tree-3.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/asm-util-3.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/bcprov-jdk16-140.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/blueprints-core-1.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/blueprints-neo4j-graph-1.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/commons-beanutils-1.8.0.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/commons-beanutils-core-1.8.0.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/commons-collections-3.2.1.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/commons-configuration-1.6.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/commons-digester-1.8.1.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/commons-io-1.4.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/commons-lang-2.4.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/commons-logging-1.1.1.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/gremlin-groovy-1.5.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/gremlin-java-1.5.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/groovy-1.8.5.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/jackson-core-asl-1.9.7.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/jackson-jaxrs-1.9.7.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/jackson-mapper-asl-1.9.7.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/janino-2.5.10.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/jansi-1.5.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/jcl-over-slf4j-1.6.1.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/jersey-core-1.9.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/jersey-multipart-1.9.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/jersey-server-1.9.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/jettison-1.3.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/jetty-6.1.25.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/jetty-util-6.1.25.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/jsr311-api-1.1.2.r612.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/logback-access-0.9.30.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/logback-classic-0.9.30.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/logback-core-0.9.30.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/mimepull-1.6.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/neo4j-cypher-plugin-1.8.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/neo4j-gremlin-plugin-1.8.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/neo4j-server-1.8.2-static-web.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/neo4j-server-1.8.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/pipes-1.0.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/rrd4j-2.0.7.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/servlet-api-2.5-20081211.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/slf4j-api-1.6.2.jar:/Volumes/dat1/install/neo4j-community-1.8.2/system/lib/stax-api-1.0.1.jar:/Volumes/dat1/install/neo4j-community-1.8.2/conf/

laptop:bin doduibhi$ java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b12)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

laptop:bin doduibhi$ javac -version
javac 1.7.0_21

laptop:bin doduibhi$ ./neo4j start
Starting Neo4j Server...log4j:ERROR Could not read configuration file from URL [file:conf/log4j.properties].
java.io.FileNotFoundException: conf/log4j.properties (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:120)
    at java.io.FileInputStream.<init>(FileInputStream.java:79)
    at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
    at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
    at java.net.URL.openStream(URL.java:1010)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:459)
    at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471)
    at org.apache.log4j.LogManager.<clinit>(LogManager.java:125)
    at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:243)
    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
    at org.apache.commons.configuration.AbstractFileConfiguration.<init>(AbstractFileConfiguration.java:121)
    at org.apache.commons.configuration.AbstractFileConfiguration.<init>(AbstractFileConfiguration.java:154)
    at org.apache.commons.configuration.PropertiesConfiguration.<init>(PropertiesConfiguration.java:252)
    at org.neo4j.server.configuration.PropertyFileConfigurator.loadPropertiesConfig(PropertyFileConfigurator.java:142)
    at org.neo4j.server.configuration.PropertyFileConfigurator.<init>(PropertyFileConfigurator.java:76)
    at org.neo4j.server.storemigration.PreStartupStoreUpgrader.getConfigurator(PreStartupStoreUpgrader.java:135)
    at org.neo4j.server.storemigration.PreStartupStoreUpgrader.run(PreStartupStoreUpgrader.java:78)
    at org.neo4j.server.storemigration.PreStartupStoreUpgrader.main(PreStartupStoreUpgrader.java:57)
log4j:ERROR Ignoring configuration file [file:conf/log4j.properties].
Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
    at org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:133)
    at org.apache.commons.configuration.ConfigurationUtils.locate(ConfigurationUtils.java:447)
    at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:213)
    at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:197)
    at org.apache.commons.configuration.AbstractFileConfiguration.<init>(AbstractFileConfiguration.java:162)
    at org.apache.commons.configuration.PropertiesConfiguration.<init>(PropertiesConfiguration.java:252)
    at org.neo4j.server.configuration.PropertyFileConfigurator.loadPropertiesConfig(PropertyFileConfigurator.java:142)
    at org.neo4j.server.configuration.PropertyFileConfigurator.<init>(PropertyFileConfigurator.java:76)
    at org.neo4j.server.storemigration.PreStartupStoreUpgrader.getConfigurator(PreStartupStoreUpgrader.java:135)
    at org.neo4j.server.storemigration.PreStartupStoreUpgrader.run(PreStartupStoreUpgrader.java:78)
    at org.neo4j.server.storemigration.PreStartupStoreUpgrader.main(PreStartupStoreUpgrader.java:57)


laptop:bin doduibhi$ uname -a
Darwin laptop.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64

laptop:bin doduibhi$ pwd
/Volumes/dat1/install/neo4j-community-1.8.2/bin

log4j 不应该在下面的某个地方作为库吗?

laptop:lib doduibhi$ pwd
/Volumes/dat1/install/neo4j-community-1.8.2/system/lib

laptop:lib doduibhi$ ls -al | grep log
-rwxr-xr-x@  1 doduibhi  staff    60686 26 Oct  2011 commons-logging-1.1.1.jar
-rwxr-xr-x@  1 doduibhi  staff    92824 20 Apr  2012 logback-access-0.9.30.jar
-rwxr-xr-x@  1 doduibhi  staff   246428 20 Apr  2012 logback-classic-0.9.30.jar
-rwxr-xr-x@  1 doduibhi  staff   323588 20 Apr  2012 logback-core-0.9.30.jar

laptop:conf doduibhi$ pwd
/Volumes/dat1/install/neo4j-community-1.8.2/conf

laptop:conf doduibhi$ ls -al
total 64
drwxr-xr-x@ 10 doduibhi  staff   340 18 May 18:40 .
drwxr-xr-x@ 15 doduibhi  staff   510 27 Feb 15:08 ..
-rw-r--r--@  1 doduibhi  staff   672 27 Feb 15:08 README.txt
-rw-r--r--@  1 doduibhi  staff   860 27 Feb 15:08 custom-logback.xml
-rw-r--r--@  1 doduibhi  staff  2642 27 Feb 15:08 logging.properties
-rw-r--r--@  1 doduibhi  staff  1434 27 Feb 15:08 neo4j-http-logging.xml
-rw-r--r--@  1 doduibhi  staff  3367 27 Feb 15:08 neo4j-server.properties
-rw-r--r--@  1 doduibhi  staff  1484 27 Feb 15:08 neo4j-wrapper.conf
-rw-r--r--@  1 doduibhi  staff  1000 27 Feb 15:08 neo4j.properties
-rw-r--r--@  1 doduibhi  staff  2653 27 Feb 15:08 windows-wrapper-logging.properties
4

2 回答 2

0

另外,请尝试使用最新的自制软件安装(https://github.com/mxcl/homebrew

brew install neo4j
neo4j start
于 2013-06-04T10:21:16.410 回答
0

你可能有版本冲突?您说的是 Neo4j 1.9,但您的日志显示 1.8.2 您是否碰巧仍然将旧版本安装为服务?

也许去你的 Neo4j 1.8.2 安装并运行 bin/neo4j remove

然后请从http://neo4j.org/download下载最终版本:Neo4j 1.9 (stable)并重试。

为了验证我刚刚在我的 Mac 上从 neo4j.org 下载了 Neo4j 1.8.2 的新版本,它立即启动。

于 2013-06-01T11:15:36.773 回答