Java web系统启动中log4j报错
信息: No Spring WebApplicationInitializer types detected on classpath
log4j:WARN File option not set for appender [info].
log4j:WARN Are you using FileAppender instead of ConsoleAppender?
log4j:ERROR Either File or DatePattern options are not set for appender [info].
log4j:WARN File option not set for appender [error].
log4j:WARN Are you using FileAppender instead of ConsoleAppender?
log4j:ERROR Either File or DatePattern options are not set for appender [error].
十一月 29, 2016 2:38:09 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
log4j:ERROR No output stream or file set for the appender named [info].[acs][INFO ] [2016-11-29 14:38:09] Root WebApplicationContext: initialization started
[acs][INFO ] [2016-11-29 14:38:09] Refreshing Root WebApplicationContext: startup date [Tue Nov 29 14:38:09 CST 2016]; root of context hierarchy
[acs][INFO ] [2016-11-29 14:38:09] Loading XML bean definitions from class path resource [app-context.xml]
[acs][INFO ] [2016-11-29 14:38:10] Loading XML bean definitions from class path resource [app-beans.xml]
[acs][INFO ] [2016-11-29 14:38:10] Loading XML bean definitions from class path resource [app-ehcache.xml]
[acs][INFO ] [2016-11-29 14:38:10] Loading XML bean definitions from class path resource [app-mvc.xml]
[acs][INFO ] [2016-11-29 14:38:11] Loading properties file from class path resource [jdbc.properties]
[acs][INFO ] [2016-11-29 14:38:11] Loading properties file from class path resource [config.properties]
[acs][INFO ] [2016-11-29 14:38:11] JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
[acs][INFO ] [2016-11-29 14:38:12] {dataSource-1} inited
[acs][INFO ] [2016-11-29 14:38:12] HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
[acs][INFO ] [2016-11-29 14:38:12] HHH000412: Hibernate Core {4.3.9.Final}
[acs][INFO ] [2016-11-29 14:38:12] HHH000206: hibernate.properties not found
[acs][INFO ] [2016-11-29 14:38:12] HHH000021: Bytecode provider name : javassist
[acs][INFO ] [2016-11-29 14:38:12] HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
[acs][INFO ] [2016-11-29 14:38:12] HHH000423: Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4
[acs][WARN ] [2016-11-29 14:38:13] HHH000038: Composite-id class does not override equals(): com.byhj.mysql.model.RoleResourceEntityPK
[acs][WARN ] [2016-11-29 14:38:13] HHH000039: Composite-id class does not override hashCode(): com.byhj.mysql.model.RoleResourceEntityPK
[acs][INFO ] [2016-11-29 14:38:13] HHH000399: Using default transaction strategy (direct JDBC transactions)
[acs][INFO ] [2016-11-29 14:38:13] HHH000397: Using ASTQueryTranslatorFactory
[acs][WARN ] [2016-11-29 14:38:13] Unrecognized value for "hibernate.hbm2ddl.auto": none
[acs][INFO ] [2016-11-29 14:38:15] {dataSource-1} closed
log4j:ERROR No output stream or file set for the appender named [error].
[acs][ERROR] [2016-11-29 14:38:15] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'complianceManager': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.byhj.mysql.dao.ComplianceRepository] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, authenticationType=CONTAINER, lookup=)}
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:308)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1185)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
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:745)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.byhj.mysql.dao.ComplianceRepository] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, authenticationType=CONTAINER, lookup=)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1103)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:963)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:858)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:442)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:420)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:545)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:155)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:305)
... 22 more