Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [net.sf.log4jdbc.Log4jdbcProxyDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]; nested exception is java.lang.ClassNotFoundException: net.sf.log4jdbc.Log4jdbcProxyDataSource
-> 이 에러 나시는 분들 db-context.xml상에 로그 설정 부분 막아주시면 안납니다. 그리고 dataSourceSpied bean을 dataSource로 바꿔주세요.
이어서 Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'driverClassName' of bean class [org.apache.ibatis.datasource.pooled.PooledDataSource]: Bean property 'driverClassName' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
1월 23, 2014 3:08:37 오후 org.apache.catalina.core.AprLifecycleListener init 정보: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.7.0_51\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jdk1.7.0_51/bin/../jre/bin/server;C:/Program Files/Java/jdk1.7.0_51/bin/../jre/bin;C:/Program Files/Java/jdk1.7.0_51/bin/../jre/lib/amd64;C:\Program Files\Java\jdk1.7.0_51\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\springsource\sts-3.4.0.RELEASE;;. 1월 23, 2014 3:08:37 오후 org.apache.tomcat.util.digester.SetPropertiesRule begin 경고: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:springboard' did not find a matching property. 1월 23, 2014 3:08:38 오후 org.apache.coyote.AbstractProtocol init 정보: Initializing ProtocolHandler ["http-bio-80"] 1월 23, 2014 3:08:38 오후 org.apache.coyote.AbstractProtocol init 정보: Initializing ProtocolHandler ["ajp-bio-8009"] 1월 23, 2014 3:08:38 오후 org.apache.catalina.startup.Catalina load 정보: Initialization processed in 1122 ms 1월 23, 2014 3:08:38 오후 org.apache.catalina.core.StandardService startInternal 정보: Starting service Catalina 1월 23, 2014 3:08:38 오후 org.apache.catalina.core.StandardEngine startInternal 정보: Starting Servlet Engine: Apache Tomcat/7.0.50 1월 23, 2014 3:08:45 오후 org.apache.catalina.core.ApplicationContext log 정보: No Spring WebApplicationInitializer types detected on classpath 1월 23, 2014 3:08:45 오후 org.apache.catalina.core.ApplicationContext log 정보: Initializing Spring root WebApplicationContext log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. 1월 23, 2014 3:08:47 오후 org.apache.catalina.core.StandardContext listenerStart 심각: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mainService' defined in ServletContext resource [/WEB-INF/classes/config/spring/service-context.xml]: Cannot create inner bean 'spring.board.dao.MainDaoImpl#5f424568' of type [spring.board.dao.MainDaoImpl] while setting bean property 'mainDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.board.dao.MainDaoImpl#5f424568' defined in ServletContext resource [/WEB-INF/classes/config/spring/service-context.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Cannot create inner bean 'net.sf.log4jdbc.tools.Log4JdbcCustomFormatter#221a28c7' of type [net.sf.log4jdbc.tools.Log4JdbcCustomFormatter] while setting bean property 'logFormatter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.sf.log4jdbc.tools.Log4JdbcCustomFormatter#221a28c7' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'margin' threw exception; nested exception is java.util.FormatFlagsConversionMismatchException: Conversion = s, Flags = # at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4961) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5455) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.board.dao.MainDaoImpl#5f424568' defined in ServletContext resource [/WEB-INF/classes/config/spring/service-context.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Cannot create inner bean 'net.sf.log4jdbc.tools.Log4JdbcCustomFormatter#221a28c7' of type [net.sf.log4jdbc.tools.Log4JdbcCustomFormatter] while setting bean property 'logFormatter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.sf.log4jdbc.tools.Log4JdbcCustomFormatter#221a28c7' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'margin' threw exception; nested exception is java.util.FormatFlagsConversionMismatchException: Conversion = s, Flags = # at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270) ... 24 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Cannot create inner bean 'net.sf.log4jdbc.tools.Log4JdbcCustomFormatter#221a28c7' of type [net.sf.log4jdbc.tools.Log4JdbcCustomFormatter] while setting bean property 'logFormatter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.sf.log4jdbc.tools.Log4JdbcCustomFormatter#221a28c7' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'margin' threw exception; nested exception is java.util.FormatFlagsConversionMismatchException: Conversion = s, Flags = # at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) ... 30 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Cannot create inner bean 'net.sf.log4jdbc.tools.Log4JdbcCustomFormatter#221a28c7' of type [net.sf.log4jdbc.tools.Log4JdbcCustomFormatter] while setting bean property 'logFormatter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.sf.log4jdbc.tools.Log4JdbcCustomFormatter#221a28c7' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'margin' threw exception; nested exception is java.util.FormatFlagsConversionMismatchException: Conversion = s, Flags = # at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) ... 40 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.sf.log4jdbc.tools.Log4JdbcCustomFormatter#221a28c7' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'margin' threw exception; nested exception is java.util.FormatFlagsConversionMismatchException: Conversion = s, Flags = # at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1396) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270) ... 50 more Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'margin' threw exception; nested exception is java.util.FormatFlagsConversionMismatchException: Conversion = s, Flags = # at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:102) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393) ... 54 more
1월 23, 2014 3:08:47 오후 org.apache.catalina.core.StandardContext startInternal 심각: Error listenerStart 1월 23, 2014 3:08:47 오후 org.apache.catalina.core.StandardContext startInternal 심각: Context [] startup failed due to previous errors 1월 23, 2014 3:08:47 오후 org.apache.catalina.core.ApplicationContext log 정보: Closing Spring root WebApplicationContext 1월 23, 2014 3:08:47 오후 org.apache.coyote.AbstractProtocol start 정보: Starting ProtocolHandler ["http-bio-80"] 1월 23, 2014 3:08:47 오후 org.apache.coyote.AbstractProtocol start 정보: Starting ProtocolHandler ["ajp-bio-8009"] 1월 23, 2014 3:08:47 오후 org.apache.catalina.startup.Catalina start 정보: Server startup in 9328 ms
같은문제로 어제 진행 했을때 주석처리가 아닌 저는 코드를 아예 지웠는데요 그렇게 해서 어제 문제가 해결이 되었었는데... 오늘 실행하니까 다시금 똑같은 메세지가 나오네요... 다시생성해서 넣어봐도 지워봐도 프로젝트 업데이트를 하고 껏다키고 혹은 다른 문제가 있는건지 구글링을 해봐도 지우고 어제되던 내용이 오늘 안되는 꼭 컴퓨터가 거짓말 하고있는 것 같은 현상에 어떻게 해야할지 머리와 속만 타들어가고있네요...
사루 2014/03/25 추천수 : 0
저도 같은 방버으로 해결됐네요.. 감사합니다.
thing 2014/07/22 추천수 : 1
margin 오류의 힌트가 될만한정보라고해야할까요...
2가지방법으로 환경을 세팅해보았습니다
첫번째는 STS 를 다운받아서 설치하였으며
두번째로는 이클립스 EE 환경에서 마켓에서 STS 를 설치하였습니다
첫번째방법으로했을떼는 margin 에서 오류가 나지 않았으며
두번째로 했을때만 오류가 나더군요 이유는저도 정확히모르지만 아무래도 뭔가 두개의차이점에서 발
생한거겠죠..
허나 STS 는 설치하였을때 드래그앤드롭으로 폴더에 파일이 옴겨지지않는 기이한현상이있어서
현재 이클립스 루나 EE 에 STS 를 마켓에서 설치하여 사용중입니다 물론 마진은 지우구요...ㅎㅎ
제발미국으 2014/08/20 추천수 : 0
Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [net.sf.log4jdbc.Log4jdbcProxyDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]; nested exception is java.lang.ClassNotFoundException: net.sf.log4jdbc.Log4jdbcProxyDataSource
-> 이 에러 나시는 분들 db-context.xml상에 로그 설정 부분 막아주시면 안납니다. 그리고 dataSourceSpied bean을 dataSource로 바꿔주세요.
이어서 Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/classes/config/spring/db-context.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'driverClassName' of bean class [org.apache.ibatis.datasource.pooled.PooledDataSource]: Bean property 'driverClassName' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?