问题描述
Exception in thread "main" java.lang.ExceptionInInitializerErrorat 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里复制过来的,换个工程名就出现这错误了,原先那工程还啥事没有呢,郁闷 。 问题补充:HelloJimmy 写道
解决方案
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] 东软的,哈哈。检查这个配置文件中的resultMap位置。看异常调试错误,一般异常引发的原因说的很清楚了,建议自己多尝试怎么解决.
解决方案二:
你看你insert标签开始位置里面sql有没写错的,或者上下有无错误。仔细检查下吧。