spring报错。求大神指教
2014-06-21 09:40:12 [Thread-1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating instance of bean 'tagChangeMapper'
2014-06-21 09:40:12 [Thread-1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Eagerly caching bean 'tagChangeMapper' to allow for resolving potential circular references
2014-06-21 09:40:12 [Thread-1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tagChangeMapper' defined in file [D:\apache-tomcat-7.0.21\wtpwebapps\eemp\WEB-INF\classes\eemp\sysinfo\taginfo\mapper\TagChangeMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': : Error creating bean with name 'sysDictionaryService' defined in file [D:\apache-tomcat-7.0.21\wtpwebapps\eemp\WEB-INF\classes\eemp\sysinfo\sysmaintain\service\SysDictionaryService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.mybatis.spring.mapper.MapperFactoryBean]: Constructor threw exception; nested exception is java.lang.StackOverflowError; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysDictionaryService' defined in file [D:\apache-tomcat-7.0.21\wtpwebapps\eemp\WEB-INF\classes\eemp\sysinfo\sysmaintain\service\SysDictionaryService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.mybatis.spring.mapper.MapperFactoryBean]: Constructor threw exception; nested exception is java.lang.StackOverflowError 展开
报这类错误经常的原因是没有导入对应的jar包。如果你不确定,可以找下相关的jar包中是否有对应的xsd文件。
如果上面确认有xsd文件,确定你spring xmlns引入的版本在jar包中有。否则更正版本。
3.运行时报错如下
schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/tx/spring-tx-2.5.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 34 in XML document from class path resource [applicationContext.xml] is invalid; nested
exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'tx:advice'.
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'tx:advice'.
nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.mybatis.spring.mapper.MapperFactoryBean]: Constructor threw exception; nested exception is java.lang.StackOverflowError; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysDictionaryService' defined in file [D:\apache-tomcat-7.0.21\wtpwebapps\eemp\WEB-INF\classes\eemp\sysinfo\sysmaintain\service\SysDictionaryService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.mybatis.spring.mapper.MapperFactoryBean]: Constructor threw exception; nested exception is java.lang.StackOverflowError
你是不是用单例模式了?!
公司其他人的代码。我更新下来就开始报错。eclipse起不来。这种情况一般问题都出在哪?
java.lang.StackOverflowError 应该是构造方法无限递归了。