赞
踩
使用eclipse导入使用SpringMVC框架和MyBatis框架的项目时,报如下错误:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Constructor threw exception; nested exception is javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
困惑许久,终于找到原因:原来是使用了jdk1.6+Tomcat5.0导致的异常,只有这两种组合才会导致这种错误的产生,其他的组合都不会这样。
解决方案:更换jdk版本或者更换Tomcat版本,建议大家不要使用jdk1.6+Tomcat5.0这样的组合,尽量用较新的版本。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。