spring报错。求大神指教

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了spring报错。求大神指教相关的知识,希望对你有一定的参考价值。

DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'tagChangeMapper'
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'.

参考技术A 重点是下面这段异常信息:
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 应该是构造方法无限递归了。

本回答被提问者采纳

执行yum clean all 报错了,一星期都还没解决 求大神指教

[root@syncsoft136 yum]# yum clean allerror: bad option 'archcolor' at (null):96error: bad option 'archcolor' at (null):96error: bad option 'archcolor' at (null):96错误:dbiOpen: dbapi 1 not available错误:无法从 /var/lib/rpm 打开软件包数据库CRITICAL:yum.main:Error: rpmdb open failed

估计是是RPM数据库被破坏
试试重建数据库:
cd /var/lib/rpm/
for i in `ls | grep 'db.'`;do mv $i $i.bak;done
rpm --rebuilddb
yum clean all追问

这个方法之前试过了,不行

参考技术A 请问解决了么。我也遇到了

以上是关于spring报错。求大神指教的主要内容,如果未能解决你的问题,请参考以下文章

执行yum clean all 报错了,一星期都还没解决 求大神指教

java 开发在使用Redis时总是报这样的错误,重启就好 但是问题还是会出现。 求哪位大神指教指教

java做单元测试的时候报错,网上的教程都看了,感觉没啥问题,但是就是调不通,求大神指教一下?大谢!

求大神指教:python将文件内容转字典

spring ibatis 框架 点击添加按钮 出现了插入两条相同的数据 可能原因 是 ? 求各位大神 指教~

java spring MVC 用poi做Excel导入碰到一个问题,求大神指教,有关下拉框的问题