关于Ibatis和Spring的一个异常错误

Exception in thread "main" java.lang.ExceptionInInitializerError
at com.neusoft.gw.util.Launcher.main(Launcher.java:24)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in class path resource [com/neusoft/gw/config/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [com/neusoft/gw/config/SqlMapConfig.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: org.xml.sax.SAXParseException: Attribute "resultMap" must be declared for element type "insert".Loading XML bean definitions from class path resource [com/neusoft/gw/config/tableManage/applicationContext_tableManage.xml]

上面就是错误提示信息,大家能帮我看看我哪块出问题了吗?我很奇怪,这个工程是我从自己的IDE里复制过来的,换个工程名就出现这错误了,原先那工程还啥事没有呢,郁闷 。

2个回答

org.xml.sax.SAXParseException: [color=blue]Attribute "resultMap" must be declared for element type "insert"[/color].Loading XML bean definitions from class path resource [com/neusoft/gw/config/tableManage/[color=blue]applicationContext_tableManage.xml[/color]]

东软的,哈哈。
检查这个配置文件中的resultMap位置。
看异常调试错误,一般异常引发的原因说的很清楚了,建议自己多尝试怎么解决.

你看你insert标签开始位置里面sql有没写错的,或者上下有无错误。仔细检查下吧。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!