OSX 10.7.5上的Neo4j的启动失败:log4j.properties

时间:2013-06-01 04:45:58

标签: java macos log4j neo4j

由于没有找到“file:conf / log4j.properties”的问题而无法在我的MacBook上运行任何Neo4j(1.7.2,1.8.2,1.9.RC2)的味道,它看起来就像{从端口安装的{1}}碰到了无法播放...是否在安装中缺少.jar?有任何想法吗?我可以找到与其他应用相关的其他jakarta-log4j

已经检查过的问题: Starting neo4j on maclog4j can't initialize with my log4j.properties

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

log4j.properties

Neo4j Community 1.8.2版本:

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)

log4j应该作为lib在某处吗?

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

2 个答案:

答案 0 :(得分:0)

你是否有版本冲突?你说的是Neo4j 1.9,但是你的日志显示1.8.2你是不是偶然将旧版本安装为服务?

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

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

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

答案 1 :(得分:0)

另外, 请使用

尝试更新的最新自制软件安装(https://github.com/mxcl/homebrew
brew install neo4j
neo4j start