logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nash Xiao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-700) When used in MyBatis 3.2.7, an error "java.lang.ClassNotFoundException: org.apache.logging.log4j.spi.AbstractLoggerWrapper" was reported,while the rc1 with no problem. In the log4j-api-2.0-rc2.jar, the AbstractLoggerWrapper.class is missing.
Date Sun, 06 Jul 2014 05:41:33 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14053043#comment-14053043
] 

Nash Xiao commented on LOG4J2-700:
----------------------------------

java.lang.ExceptionInInitializerError
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating
bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' defined in class path
resource [applicationContext.xml]: Unsatisfied dependency expressed through bean property
'sqlSessionFactory': : Error creating bean with name 'sqlSessionFactory' defined in class
path resource [applicationContext.xml]: Invocation of init method failed; nested exception
is org.springframework.core.NestedIOException: Failed to parse config resource: class path
resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException:
Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.logging.LogException: Error
setting Log implementation.  Cause: java.lang.reflect.InvocationTargetException; nested exception
is org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Invocation of
init method failed; nested exception is org.springframework.core.NestedIOException: Failed
to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException:
Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.logging.LogException: Error
setting Log implementation.  Cause: java.lang.reflect.InvocationTargetException
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1239)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1131)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:438)
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:624)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
	at com.demo.ParamDeliveryDemo.<clinit>(ParamDeliveryDemo.java:21)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with
name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Invocation
of init method failed; nested exception is org.springframework.core.NestedIOException: Failed
to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException:
Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.logging.LogException: Error
setting Log implementation.  Cause: java.lang.reflect.InvocationTargetException
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:912)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:855)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:770)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1224)
	... 13 more
Caused by: org.springframework.core.NestedIOException: Failed to parse config resource: class
path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException:
Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.logging.LogException: Error
setting Log implementation.  Cause: java.lang.reflect.InvocationTargetException
	at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:434)
	at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:340)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)
	... 23 more
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration.
Cause: org.apache.ibatis.logging.LogException: Error setting Log implementation.  Cause: java.lang.reflect.InvocationTargetException
	at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:109)
	at org.apache.ibatis.builder.xml.XMLConfigBuilder.parse(XMLConfigBuilder.java:92)
	at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:428)
	... 26 more
Caused by: org.apache.ibatis.logging.LogException: Error setting Log implementation.  Cause:
java.lang.reflect.InvocationTargetException
	at org.apache.ibatis.logging.LogFactory.setImplementation(LogFactory.java:131)
	at org.apache.ibatis.logging.LogFactory.useCustomLogging(LogFactory.java:83)
	at org.apache.ibatis.session.Configuration.setLogImpl(Configuration.java:213)
	at org.apache.ibatis.builder.xml.XMLConfigBuilder.settingsElement(XMLConfigBuilder.java:218)
	at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:103)
	... 28 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at org.apache.ibatis.logging.LogFactory.setImplementation(LogFactory.java:127)
	... 32 more
Caused by: java.lang.NoClassDefFoundError: org/apache/logging/log4j/spi/AbstractLoggerWrapper
	at org.apache.ibatis.logging.log4j2.Log4j2AbstractLoggerImpl.<init>(Log4j2AbstractLoggerImpl.java:39)
	at org.apache.ibatis.logging.log4j2.Log4j2Impl.<init>(Log4j2Impl.java:34)
	... 37 more
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.spi.AbstractLoggerWrapper
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	... 39 more
Exception in thread "main" 

> When used in MyBatis 3.2.7, an error "java.lang.ClassNotFoundException: org.apache.logging.log4j.spi.AbstractLoggerWrapper"
was reported,while the rc1 with no problem. In the log4j-api-2.0-rc2.jar, the AbstractLoggerWrapper.class
is missing.
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-700
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-700
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 2.0-rc2
>         Environment: mybatis 3.2.7, spring 3.2.5, mybatis-spring 1.2.2,commons-logging-1.1.1,Windows,
jdk1.6.0_45.
>            Reporter: Nash Xiao
>            Priority: Blocker
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message