在jboss服务器中部署应用程序时出现以下错误。 link中提到的解决方案不适用于我的应用程序。希望这不是重复的问题。
16:22:53,520 ERROR [stderr] (MSC service thread 1-2) log4j:ERROR Could not read configuration file [\WEB-INF\classes\log4j.properties].
16:22:53,522 ERROR [stderr] (MSC service thread 1-2) java.io.FileNotFoundException: \WEB-INF\classes\log4j.properties (The system cannot find the path specified)
16:22:53,522 ERROR [stderr] (MSC service thread 1-2) at java.io.FileInputStream.open(Native Method)
16:22:53,522 ERROR [stderr] (MSC service thread 1-2) at java.io.FileInputStream.<init>(Unknown Source)
16:22:53,522 ERROR [stderr] (MSC service thread 1-2) at java.io.FileInputStream.<init>(Unknown Source)
16:22:53,525 ERROR [stderr] (MSC service thread 1-2) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:372)
16:22:53,525 ERROR [stderr] (MSC service thread 1-2) at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:403)
16:22:53,525 ERROR [stderr] (MSC service thread 1-2) at au.com.woolworths.replenishment.galaxy.web.servlet.Log4jInitServlet.init(Log4jInitServlet.java:37)
16:22:53,525 ERROR [stderr] (MSC service thread 1-2) at javax.servlet.GenericServlet.init(GenericServlet.java:242)
16:22:53,527 ERROR [stderr] (MSC service thread 1-2) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202)
16:22:53,527 ERROR [stderr] (MSC service thread 1-2) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102)
16:22:53,527 ERROR [stderr] (MSC service thread 1-2) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655)
16:22:53,530 ERROR [stderr] (MSC service thread 1-2) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873)
16:22:53,530 ERROR [stderr] (MSC service thread 1-2) at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)
16:22:53,530 ERROR [stderr] (MSC service thread 1-2) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
16:22:53,530 ERROR [stderr] (MSC service thread 1-2) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
16:22:53,532 ERROR [stderr] (MSC service thread 1-2) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
16:22:53,532 ERROR [stderr] (MSC service thread 1-2) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
16:22:53,532 ERROR [stderr] (MSC service thread 1-2) at java.lang.Thread.run(Unknown Source)
16:22:53,532 ERROR [stderr] (MSC service thread 1-2) log4j:ERROR Ignoring configuration file [\WEB-INF\classes\log4j.properties].
16:22:53,532 INFO [stdout] (MSC service thread 1-2) Log4J Logging started: C:\\Softwares\Developer Studio\runtimes\jboss-eap-7.1.1\standalone\deployments\ReplenishmentR2EAR.ear\ReplenishmentR2.war\\WEB-INF\classes\log4j.properties
该文件位于我的应用程序的classes文件夹中。
请告知如何解决此问题。
已附加log4j属性文件的内容如下。
### direct log messages to stdout ###
#log4j.appender.stdout=org.apache.log4j.ConsoleAppender
#log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
#log4j.appender.stdout.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss.SSS} [%t] %-5p %c - %m%n
### direct log messages to chainsaw ###
#log4j.appender.server=org.apache.log4j.net.SocketAppender
#log4j.appender.server.Port=4445
#log4j.appender.server.RemoteHost=127.0.0.1
### direct messages to file hibernate.log ###
#log4j.appender.file=org.apache.log4j.FileAppender
#log4j.appender.file.File=hibernate.log
#log4j.appender.file.layout=org.apache.log4j.PatternLayout
#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
### set log levels - for more verbose logging change 'info' to 'debug' ###
#log4j.rootLogger=debug, stdout, stderr
log4j.rootLogger=INFO,file
# companyname classes
log4j.logger.au.com.companyname=INFO,file
log4j.additivity.au.com.companyname=false
# p6spy classes
log4j.logger.com.p6spy=debug
# Hibernate
log4j.logger.net.sf.hibernate=info
# apache
log4j.logger.org.apache=warn
### log just the SQL
#log4j.logger.net.sf.hibernate.SQL=debug
log4j.logger.org.springframework=debug
### log JDBC bind parameters ###
log4j.logger.net.sf.hibernate.type=info
### log schema export/update ###
log4j.logger.net.sf.hibernate.tool.hbm2ddl=info
### log cache activity ###
#log4j.logger.net.sf.hibernate.cache=debug
### enable the following line if you want to track down connection ###
### leakages when using DriverManagerConnectionProvider ###
#log4j.logger.net.sf.hibernate.connection.DriverManagerConnectionProvider=trace
### Quartz logging
log4j.logger.org.quartz.plugins.history.LoggingTriggerHistoryPlugin=debug
log4j.logger.org.quartz.plugins.management.ShutdownHookPlugin=debug
log4j.logger.java.sql.Connection=info
log4j.logger.java.sql.Statement=info
log4j.logger.java.sql.PreparedStatement=info
log4j.logger.java.sql.ResultSet=info
log4j.logger.au.com.companyname.replenishment.dao.hibernate.CompanynameSessionFilter=WARN
log4j.logger.au.com.companyname.replenishment.util.WebsphereJndiObjectFactory=WARN
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.conversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c - %m%n
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.file=${jboss.server.log.dir}/rplncentral.log
log4j.appender.file.MaxFileSize=100MB
log4j.appender.file.MaxBackupIndex=10
# Define the layout for file appender