Could not initialize class org.apache.log4j.LogManager

deadlygame 发布于 2013/12/16 14:22
阅读 5K+
收藏 0
SEVERE: Exception sending context initialized event to listener instance of class com.wangjubao.core.web.filter.WangjubaoContextLoaderListener
java.lang.ExceptionInInitializerError
at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
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.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:191)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at com.wangjubao.core.web.filter.WangjubaoContextLoaderListener.contextInitialized(WangjubaoContextLoaderListener.java:15)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:133)
at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:156)
at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "..\logs\stdout" "write")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:366)
at java.security.AccessController.checkPermission(AccessController.java:555)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkWrite(SecurityManager.java:979)
at java.io.FileOutputStream.<init>(FileOutputStream.java:203)
at java.io.FileOutputStream.<init>(FileOutputStream.java:136)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:215)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)

... 26 more

pom文件

<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.wangjubao.shared</groupId>
<artifactId>wangjubao.core.web</artifactId>
<version>0.1.0-SNAPSHOT</version>
<name>wangjubao.core.web</name>
<url>http://svn.wangjubao.com/svn/repos/shared/wangjubao.core.web</url>
<packaging>war</packaging>


<properties>
<spring.version>3.0.7.RELEASE</spring.version>
<slf4j.version>1.5.6</slf4j.version>
<log4j.version>1.2.14</log4j.version>
</properties>


<dependencies>
<!-- <dependency> <groupId>open.qq.com</groupId> <artifactId>auth-sdk</artifactId> 
<version>1.01</version> </dependency> <dependency> <groupId>com.wangjubao.shared</groupId> 
<artifactId>wangjubao.app.thirdsyn</artifactId> <version>0.1.0-SNAPSHOT</version> 
</dependency> -->
<dependency>
<groupId>wangjubao</groupId>
<artifactId>com.wangjubao.tool</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>com.wangjubao.app</groupId>
<artifactId>dolphin.standalone.buyersearch</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.wangjubao.app</groupId>
<artifactId>dolphin.biz.service</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.wangjubao.app</groupId>
<artifactId>dolphin.biz.common</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.wangjubao.app</groupId>
<artifactId>dolphin.biz.dal</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.wangjubao.app</groupId>
<artifactId>dolphin.biz.dal.extend</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>fakepath</groupId>
<artifactId>httpcore</artifactId>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.1</version>
<type>pom.tmp.sha1.tmp</type>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.1</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>fakepath</groupId>
<artifactId>httpclient</artifactId>
<version>4.1.1</version>
</dependency>


<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>com.wangjubao.shared</groupId>
<artifactId>wangjubao.framework</artifactId>
<version>0.1.1-SNAPSHOT</version>
</dependency>
<!-- <dependency> <groupId>com.wangjubao.shared</groupId> <artifactId>wangjubao.app.buyersearch</artifactId> 
<version>0.1.0-SNAPSHOT</version> </dependency> -->
<dependency>
<groupId>com.wangjubao.app</groupId>
<artifactId>wangjubao.core.service</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>13.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>com.ibatis</groupId>
<artifactId>ibatis</artifactId>
<version>2.3.4.726</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.19</version>
</dependency>
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.8</version>
</dependency>
<dependency>
<groupId>org.htmlparser</groupId>
<artifactId>htmlparser</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>com.googlecode.xmemcached</groupId>
<artifactId>xmemcached</artifactId>
<version>1.3.5</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>


<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
<version>6.1.14</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>org.supercsv</groupId>
<artifactId>supercsv</artifactId>
<version>1.52</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>


<dependency>
<groupId>fakepath</groupId>
<artifactId>jxl</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>taobao.sdk</groupId>
<artifactId>taobao-sdk-java-auto</artifactId>
<version>20130811</version>
</dependency>
<dependency>
<groupId>taobao-ump</groupId>
<artifactId>ump-sdk</artifactId>
<version>1.3.3</version>
</dependency>


<dependency>
<groupId>fakepath</groupId>
<artifactId>jaxen</artifactId>
<version>1.1-beta-6</version>
</dependency>
<!-- <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> 
<version>1.5</version> </dependency> -->
<dependency>
<groupId>fakepath</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>


<dependency>
<groupId>fakepath</groupId>
<artifactId>dubbo</artifactId>
<version>2.5.3</version>
</dependency>


<dependency>
<groupId>com.wangjubao.app</groupId>
<artifactId>dolphin.standalone.activity.sumup</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
</dependencies>


<build>
<plugins>
<plugin>
<groupId>com.alibaba.maven.plugins</groupId>
<artifactId>maven-autoconf-plugin</artifactId>
<version>0.5</version>
<executions>
<execution>
<id>autoconf</id>
<phase>process-resources</phase>
<goals>
<goal>config</goal>
</goals>
</execution>
</executions>
<configuration>
<path>${project.build.directory}/${project.build.finalName}.${project.packaging}</path>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.1</version>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-javac</artifactId>
<version>1.8.1</version>
</dependency>
</dependencies>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>1.3.1</version>
</plugin>


<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0-beta-1</version>
<configuration>
<path>/</path>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<configuration>
<stopPort>9966</stopPort>
<stopKey>foo</stopKey>
</configuration>
</plugin>


<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.22</version>
<!-- <version>7.0.1.v20091125</version> 7.2.0.v20101020 -->
<configuration>
<contextPath>/</contextPath>
<scanIntervalSeconds>2</scanIntervalSeconds>
<reload>automatic</reload>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>80</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>


<requestLog implementation="org.mortbay.jetty.NCSARequestLog">
<filename>target/access.log</filename>
<retainDays>90</retainDays>
<append>false</append>
<extended>false</extended>
<logTimeZone>GMT+8:00</logTimeZone>
</requestLog>
<systemProperties>
<systemProperty>
<name>org.mortbay.jetty.webapp.parentLoaderPriority</name>
<value>true</value>
</systemProperty>
</systemProperties>


</configuration>
</plugin>


<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.1.3</version>
<configuration>
<container>
<containerId>tomcat6x</containerId>
<type>remote</type>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.remote.username>tomcat</cargo.remote.username>
<cargo.remote.password>tomcat</cargo.remote.password>
<cargo.remote.manager.url>http://110.76.47.213/manager</cargo.remote.manager.url>
</properties>
</configuration>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>nexus-releases</id>
<name>Nexus Release Repository</name>
<url>http://110.76.47.211:8081/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<name>Nexus Snapshot Repository</name>
<url>http://110.76.47.211:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>


<repositories>
<repository>
<id>nexus-snapshots</id>
<name>Nexus Snapshot Repository</name>
<layout>default</layout>
<url>http://110.76.47.211:8081/nexus/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>


异常如上

加载中
返回顶部
顶部