2010-05-31 84 views
1

我運行在Gentoo了tomcat-6服務器。我在將Nexus部署到我的Tomcat服務器時遇到問題(來自sonatype網站的nexus-war,以及emerge的tomcat6)。該本地主機日誌顯示啓動時的Nexus以下:麻煩與Gentoo的(log4j的)部署Sonatype的的Nexus的Tomcat6

 

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

出於某種原因,它會在的/ dev/null,則Sonatype的工作文件夾。我一直無法找到解決這個問題的辦法。該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 

有沒有人有處理這之前呢?任何幫助是極大的讚賞。

回答

1

這是一個新的。在戰爭中,sonatype-work文件夾應該默認爲〜/ sonatype-work,所以如果你的環境沒有user.home,這可能會導致你看到的東西。您可以嘗試使用環境變量更改該默認值,有關詳細信息,請參閱here。如果仍有問題,請在nexus-user列表中ping我們以獲得更多即時支持。

+0

你好。你是對的。問題在於tomcat用戶沒有分配主文件夾(tomcat用戶在新興的tomcat6時自動創建)。我更新了/ etc/passwd(tomcat用戶以前有/ dev/null設置),現在我可以將Nexus部署到Tomcat。 :-) – John 2010-06-06 20:27:55