<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <sqlMap namespace="AlgoTask"> <typeAlias alias="algoTaskDO" type="com.cainiao.weqc.data.dal.algorithm.AlgoTaskDO" /> <resultMap id="algoTaskDOResultMap" class="algoTaskDO"> <result property="id" column="id" /> <result property="gmtCreate" column="gmt_create" /> <result property="gmtModified" column="gmt_modified" /> <result property="name" column="name" /> <result property="ownerId" column="owner_id" /> <result property="scenarioId" column="scenario_id" /> <result property="resultId" column="result_id" /> <result property="status" column="status" /> <result property="description" column="description" /> </resultMap> <sql id="allColumns"> id as id, gmt_create as gmtCreate, gmt_modified as gmtModified, name as name, owner_id as ownerId, scenario_id as scenarioId, result_id as resultId, status as status, description as description </sql> <select id="getAllTask" parameterClass="java.lang.Long" resultClass="algoTaskDOResultMap"> select <include refid="allColumns" /> from algo_task WHERE 1=1 </select> </sqlMap>
在本地启web工程时发现报错:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'algoDataManager': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'algoDataSourceDAO': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.cainiao.weqc.data.dao.BaseSqlMapDAO.setBaseSqlMapClient(com.ibatis.sqlmap.client.SqlMapClient); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'singleSqlMapClient' defined in URL [jar:file:/C:/Program%20Files/taobao-tomcat-8.0.26/deploy/ROOT/WEB-INF/lib/weqc.data-0.0.1-SNAPSHOT.jar!/dao/dao-single.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [ibatis/sqlmap/single/sqlmap-config.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: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: Error. Could not initialize class. Cause: java.lang.ClassNotFoundException: algoTaskDOResultMap
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:306) ~[spring-context-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1146) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) ~[spring-context-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) ~[spring-context-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410) ~[spring-web-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) ~[spring-web-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at com.alibaba.citrus.webx.context.WebxComponentsLoader.initWebApplicationContext(WebxComponentsLoader.java:127) [citrus-webx-all-in-one-3.0.5.jar:na]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4744) [catalina.jar:8.0.26.463]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5190) [catalina.jar:8.0.26.463]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.26.463]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) [catalina.jar:8.0.26.463]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) [catalina.jar:8.0.26.463]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) [catalina.jar:8.0.26.463]
at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1661) [catalina.jar:8.0.26.463]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_17]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_17]
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300) [tomcat-coyote.jar:8.0.26.463]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) [na:1.7.0_17]
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792) [na:1.7.0_17]
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:463) [catalina.jar:8.0.26.463]
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:413) [catalina.jar:8.0.26.463]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_17]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_17]
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300) [tomcat-coyote.jar:8.0.26.463]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) [na:1.7.0_17]
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792) [na:1.7.0_17]
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1486) [na:1.7.0_17]
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:96) [na:1.7.0_17]
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1327) [na:1.7.0_17]
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1419) [na:1.7.0_17]
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:847) [na:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_17]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_17]
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322) [na:1.7.0_17]
at sun.rmi.transport.Transport$1.run(Transport.java:177) [na:1.7.0_17]
at sun.rmi.transport.Transport$1.run(Transport.java:174) [na:1.7.0_17]
at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_17]
at sun.rmi.transport.Transport.serviceCall(Transport.java:173) [na:1.7.0_17]
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553) [na:1.7.0_17]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808) [na:1.7.0_17]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667) [na:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_17]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_17]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'algoDataSourceDAO': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.cainiao.weqc.data.dao.BaseSqlMapDAO.setBaseSqlMapClient(com.ibatis.sqlmap.client.SqlMapClient); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'singleSqlMapClient' defined in URL [jar:file:/C:/Program%20Files/taobao-tomcat-8.0.26/deploy/ROOT/WEB-INF/lib/weqc.data-0.0.1-SNAPSHOT.jar!/dao/dao-single.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [ibatis/sqlmap/single/sqlmap-config.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: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: Error. Could not initialize class. Cause: java.lang.ClassNotFoundException: algoTaskDOResultMap
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1146) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:444) ~[spring-context-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:418) ~[spring-context-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:546) ~[spring-context-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:155) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:303) ~[spring-context-3.2.7.RELEASE.jar:3.2.7.RELEASE]
... 57 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.cainiao.weqc.data.dao.BaseSqlMapDAO.setBaseSqlMapClient(com.ibatis.sqlmap.client.SqlMapClient); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'singleSqlMapClient' defined in URL [jar:file:/C:/Program%20Files/taobao-tomcat-8.0.26/deploy/ROOT/WEB-INF/lib/weqc.data-0.0.1-SNAPSHOT.jar!/dao/dao-single.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [ibatis/sqlmap/single/sqlmap-config.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: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: Error. Could not initialize class. Cause: java.lang.ClassNotFoundException: algoTaskDOResultMap
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:604) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:286) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
... 70 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'singleSqlMapClient' defined in URL [jar:file:/C:/Program%20Files/taobao-tomcat-8.0.26/deploy/ROOT/WEB-INF/lib/weqc.data-0.0.1-SNAPSHOT.jar!/dao/dao-single.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [ibatis/sqlmap/single/sqlmap-config.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: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: Error. Could not initialize class. Cause: java.lang.ClassNotFoundException: algoTaskDOResultMap
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:912) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:855) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:770) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:561) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
... 72 common frames omitted
Caused by: org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [ibatis/sqlmap/single/sqlmap-config.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: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: Error. Could not initialize class. Cause: java.lang.ClassNotFoundException: algoTaskDOResultMap
at org.springframework.orm.ibatis.SqlMapClientFactoryBean.buildSqlMapClient(SqlMapClientFactoryBean.java:343) ~[spring-orm-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.orm.ibatis.SqlMapClientFactoryBean.afterPropertiesSet(SqlMapClientFactoryBean.java:293) ~[spring-orm-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509) ~[spring-beans-3.2.7.RELEASE.jar:3.2.7.RELEASE]
... 82 common frames omitted
Caused by: 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: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: Error. Could not initialize class. Cause: java.lang.ClassNotFoundException: algoTaskDOResultMap
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62) ~[ibatis-sqlmap-2.3.4.726.jar:na]
at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:62) ~[ibatis-sqlmap-2.3.4.726.jar:na]
at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:55) ~[ibatis-sqlmap-2.3.4.726.jar:na]
at org.springframework.orm.ibatis.SqlMapClientFactoryBean.buildSqlMapClient(SqlMapClientFactoryBean.java:340) ~[spring-orm-3.2.7.RELEASE.jar:3.2.7.RELEASE]
... 85 common frames omitted
Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: 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: algoTaskDOResultMap
at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123) ~[ibatis-sqlmap-2.3.4.726.jar:na]
at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84) ~[ibatis-sqlmap-2.3.4.726.jar:na]
at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102) ~[ibatis-sqlmap-2.3.4.726.jar:na]
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72) ~[ibatis-sqlmap-2.3.4.726.jar:na]
17-Jan-2017 17:30:55.465 SEVERE [RMI TCP Connection(7)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:60) ~[ibatis-sqlmap-2.3.4.726.jar:na]
17-Jan-2017 17:30:55.467 SEVERE [RMI TCP Connection(7)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
... 88 common frames omitted
Caused by: 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: algoTaskDOResultMap
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62) ~[ibatis-sqlmap-2.3.4.726.jar:na]
17-Jan-2017 17:30:55.491 INFO [RMI TCP Connection(7)-127.0.0.1] com.taobao.catalina.pandora.PandoraManager.getPandoraLocation found pandora location from system property: D:\Tools\taobao-hsf.sar
at com.ibatis.sqlmap.engine.builder.xml.SqlMapParser.parse(SqlMapParser.java:44) ~[ibatis-sqlmap-2.3.4.726.jar:na]
17-Jan-2017 17:30:55.491 INFO [RMI TCP Connection(7)-127.0.0.1] com.taobao.catalina.pandora.PandoraManager.stopInternal Stopping pandora container: D:\Tools\taobao-hsf.sar
at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$10.process(SqlMapConfigParser.java:257) ~[ibatis-sqlmap-2.3.4.726.jar:na]
at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121) ~[ibatis-sqlmap-2.3.4.726.jar:na]
... 92 common frames omitted
Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: Error. Could not initialize class. Cause: java.lang.ClassNotFoundException: algoTaskDOResultMap
at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123) ~[ibatis-sqlmap-2.3.4.726.jar:na]
at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84) ~[ibatis-sqlmap-2.3.4.726.jar:na]
at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102) ~[ibatis-sqlmap-2.3.4.726.jar:na]
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72) ~[ibatis-sqlmap-2.3.4.726.jar:na]
17-Jan-2017 17:30:55.499 INFO [RMI TCP Connection(7)-127.0.0.1] com.taobao.catalina.pandora.PandoraManager.stopInternal Pandora container stopped.
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:60) ~[ibatis-sqlmap-2.3.4.726.jar:na]
... 95 common frames omitted
Caused by: com.ibatis.sqlmap.client.SqlMapException: Error. Could not initialize class. Cause: java.lang.ClassNotFoundException: algoTaskDOResultMap
at com.ibatis.sqlmap.engine.builder.xml.SqlStatementParser.resolveClass(SqlStatementParser.java:89) ~[ibatis-sqlmap-2.3.4.726.jar:na]
at com.ibatis.sqlmap.engine.builder.xml.SqlStatementParser.parseGeneralStatement(SqlStatementParser.java:67) ~[ibatis-sqlmap-2.3.4.726.jar:na]
at com.ibatis.sqlmap.engine.builder.xml.SqlMapParser$21.process(SqlMapParser.java:362) ~[ibatis-sqlmap-2.3.4.726.jar:na]
at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121) ~[ibatis-sqlmap-2.3.4.726.jar:na]
... 99 common frames omitted
Caused by: java.lang.ClassNotFoundException: algoTaskDOResultMap
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332) ~[catalina.jar:8.0.26.463]
at com.taobao.catalina.loader.AliWebappClassLoaderBase.loadClass(AliWebappClassLoaderBase.java:89) ~[catalina.jar:8.0.26.463]
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166) ~[catalina.jar:8.0.26.463]
at java.lang.Class.forName0(Native Method) ~[na:1.7.0_17]
at java.lang.Class.forName(Class.java:188) ~[na:1.7.0_17]
at com.ibatis.common.resources.Resources.classForName(Resources.java:267) ~[ibatis-sqlmap-2.3.4.726.jar:na]
at com.ibatis.sqlmap.engine.builder.xml.SqlStatementParser.resolveClass(SqlStatementParser.java:84) ~[ibatis-sqlmap-2.3.4.726.jar:na]
... 102 common frames omitted
正确的用法是:
将其中的resultClass改为resultMap
<select id="getAllTask" parameterClass="java.lang.Long" resultMap="algoTaskDOResultMap"> select <include refid="allColumns" /> from algo_task WHERE 1=1 </select>
参考了:http://javajiao.iteye.com/blog/180101 才得以解决!!!