Я использую сервер Tomcat-6 в Gentoo. У меня проблемы с развертыванием Nexus на моем сервере tomcat (nexus-war с сайта sonatype и tomcat6 через emerge). При запуске Nexus журнал localhost отображает следующее:
May 31, 2010 6:50:52 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.LogConfigListener
java.lang.IllegalStateException: Could not create default log4j.properties into /dev/null/sonatype-work/nexus/conf/log4j.properties
at org.sonatype.nexus.web.LogConfigListener.ensureLogConfigLocation(LogConfigListener.java:130)
at org.sonatype.nexus.web.LogConfigListener.contextInitialized(LogConfigListener.java:53)
at org.apache.catalina.core.StandardContext.listenerStart(Unknown Source)
at org.apache.catalina.core.StandardContext.start(Unknown Source)
at org.apache.catalina.core.ContainerBase.addChildInternal(Unknown Source)
at org.apache.catalina.core.ContainerBase.addChild(Unknown Source)
at org.apache.catalina.core.StandardHost.addChild(Unknown Source)
at org.apache.catalina.startup.HostConfig.deployWAR(Unknown Source)
at org.apache.catalina.startup.HostConfig.deployWARs(Unknown Source)
at org.apache.catalina.startup.HostConfig.deployApps(Unknown Source)
at org.apache.catalina.startup.HostConfig.start(Unknown Source)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(Unknown Source)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Unknown Source)
at org.apache.catalina.core.ContainerBase.start(Unknown Source)
at org.apache.catalina.core.StandardHost.start(Unknown Source)
at org.apache.catalina.core.ContainerBase.start(Unknown Source)
at org.apache.catalina.core.StandardEngine.start(Unknown Source)
at org.apache.catalina.core.StandardService.start(Unknown Source)
at org.apache.catalina.core.StandardServer.start(Unknown Source)
at org.apache.catalina.startup.Catalina.start(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Unknown Source)
at org.apache.catalina.startup.Bootstrap.main(Unknown Source)
Caused by: java.io.FileNotFoundException: /dev/null/sonatype-work/nexus/conf/log4j.properties (Not a directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:179)
at java.io.FileOutputStream.(FileOutputStream.java:131)
at org.codehaus.plexus.util.FileUtils.copyStreamToFile(FileUtils.java:1058)
at org.codehaus.plexus.util.FileUtils.copyURLToFile(FileUtils.java:1018)
at org.sonatype.nexus.web.LogConfigListener.ensureLogConfigLocation(LogConfigListener.java:126)
... 25 more
По какой-то причине он ищет папку sonatype-work в / dev / null. Я не смог найти решение этой проблемы. Файл log4j.properties находится в /var/lib/tomcat-6/webapps/nexus-webapp-1.6.0/WEB-INF/log4j.properties и содержит следующее:
log4j.rootLogger=INFO, console
# CONSOLE
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.sonatype.nexus.log4j.ConcisePatternLayout
log4j.appender.console.layout.ConversionPattern=%4d{yyyy-MM-dd HH:mm:ss} %-5p - %c - %m%n
Кто-нибудь имел дело с этим раньше? Любая помощь с благодарностью.