2016-12-08 115 views
0

當我在IntelliJ IDEA中使用Maven時,首先運行clean,然後安裝,然後在運行服務器時收到錯誤。我是新來設置這個,不知道如何正確配置一切。以下是我的日誌。它顯示連接到服務器,然後出現警告,然後顯示控制器列表後的錯誤。部署時使用Maven,Log4j配置錯誤。 (IntelliJ IDEA在Mac上)

11:02:54,377 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) started in 3761ms - Started 185 of 257 services (58 services are passive or on-demand) 
Connected to server 
[2016-12-08 11:02:54,670] Artifact ozs-ear:ear exploded: Artifact is being deployed, please wait... 


11:03:00,279 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] (ServerService Thread Pool -- 22) Pre-instantiating singletons in org.s[email protected]57f81bc2: defining beans [controllers]; parent: org.s[email protected]471d0906 
11:03:00,498 ERROR [stderr] (ServerService Thread Pool -- 22) log4j:ERROR setFile(null,true) call failed. 
11:03:00,499 ERROR [stderr] (ServerService Thread Pool -- 22) java.io.FileNotFoundException: /logs/ex/exlog.log (No such file or directory) 
11:03:00,499 ERROR [stderr] (ServerService Thread Pool -- 22) at java.io.FileOutputStream.open(Native Method) 
11:03:00,499 ERROR [stderr] (ServerService Thread Pool -- 22) at java.io.FileOutputStream.<init>(FileOutputStream.java:221) 
11:03:00,499 ERROR [stderr] (ServerService Thread Pool -- 22) at java.io.FileOutputStream.<init>(FileOutputStream.java:142) 
11:03:00,500 ERROR [stderr] (ServerService Thread Pool -- 22) at org.apache.log4j.FileAppender.setFile(FileAppender.java:294) 
11:03:00,500 ERROR [stderr] (ServerService Thread Pool -- 22) at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165) 
11:03:00,500 ERROR [stderr] (ServerService Thread Pool -- 22) at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223) 
11:03:00,500 ERROR [stderr] (ServerService Thread Pool -- 22) at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307) 
11:03:00,501 ERROR [stderr] (ServerService Thread Pool -- 22) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172) 
11:03:00,501 ERROR [stderr] (ServerService Thread Pool -- 22) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104) 
11:03:00,501 ERROR [stderr] (ServerService Thread Pool -- 22) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:809) 
11:03:00,501 ERROR [stderr] (ServerService Thread Pool -- 22) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735) 

回答

1

看起來您正在嘗試將日誌寫入/logs/ex/exlog.log。目錄是否存在,您的服務器是否有權寫入?嘗試手動創建/logs/ex目錄並更改其所有者和權限,以便服務器可以寫入日誌文件。

相關問題