新建package一运行就报错!

大神们快来帮帮小弟吧!!!java web项目采用的springMVC+spring+mybatis框架。开发这个项目很久了,框架配置都没问题啊,只是最近在开发新功能时候,需要对应新建一些package,在其下写controller,model,service等,但是只要新建写sql语句用的xml用的package,项目就报错。帮帮小弟吧,急死了,小弟没多少C币,今日助我度难关,一定感激不尽来日涌泉相报!具体报错如下:图片说明图片说明图片说明图片说明图片说明控制台开始报错的第一句话是:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'achievementsController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'achService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private cn.com.framework.Dao.Dao cn.com.kjxx.achievementsNew.service.impl.AchService.dao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dao' defined in ServletContext resource [/WEB-INF/classes/conf/spring/applicationContext.xml]: Cannot resolve reference to bean 'sqlMapClient' while setting bean property 'sqlMapClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in ServletContext resource [/WEB-INF/classes/conf/spring/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ServletContext resource [/WEB-INF/classes/conf/ibatis/expert/sqlmapConfig-expert.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: Error. Could not initialize class. Cause: java.lang.ClassNotFoundException: tec

3个回答

你的mybatits的配置文件配错了啊,看看你xml文件里哪里写了个tec

cxf-extension-soap.xml初始化失败 好好检查一下

qq_29640831
Daisygeo 只要不再新建写xml用的package,原有的项目跑起来没问题的,一新建package就不行,我都怀疑是不是package数量到达上限了!
2 年多之前 回复

新建的包你在springmvcXML中添加你自动扫描的base-package了没?

qq_29640831
Daisygeo 添加了,之前的项目都是好使的,问题已经解决了,是我采纳的那位前辈提醒了我,一个xml中少引了一个类。谢谢了!
2 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!