首页新闻找找看学习计划

resultMap的格式问题

0
悬赏园豆:5 [已关闭问题] 关闭于 2014-05-25 23:43
<resultMap type="ProductionDetail" id="ProductionDetailMap">
        <id property="dispacthCode" column="PK_Dispatch_Code" />
        <id property="engineeringCode" column="PK_Engineering_Code" />
        <id property="designCode" column="PK_Design_Code" />
        <id property="procedureNo" column="PK_Procedure_No" />

        <result property="proName" column="Product_Name" />
        <result property="proType" column="Production_Type" />
        <result property="partName" column="Part_Name" />
        <result property="processName" column="Procedure_Name" />
        <result property="actualQuantity" column="Actual_Quantity" />
        <result property="wasteQuantity" column="Waste_Quantity" />
        <result property="workingTime" column="Working" />
    </resultMap>

求大神讲解,我写上这个resultMap就会报错,网上查看了很多,格式基本一样,是不是有什么细节我没有注意到,求大神指点,报错如下:

2014-05-23 20:54:12,695 [main] ERROR [org.mybatis.spring.mapper.MapperFactoryBean] - Error while adding the mapper 'interface com.hyprint.dao.pp.ProductionDetailDAO' to configuration.
java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class . Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'ProductionDetail'. Cause: java.lang.ClassNotFoundException: Cannot find class: ProductionDetail
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:100)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:75)
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.loadXmlResource(MapperAnnotationBuilder.java:119)
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.parse(MapperAnnotationBuilder.java:92)
at org.apache.ibatis.binding.MapperRegistry.addMapper(MapperRegistry.java:45)
at org.apache.ibatis.session.Configuration.addMapper(Configuration.java:463)
at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:78)
at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1460)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1400)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:545)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:871)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:196)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class . Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'ProductionDetail'. Cause: java.lang.ClassNotFoundException: Cannot find class: ProductionDetail
at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:69)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:235)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:223)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElements(XMLMapperBuilder.java:215)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:96)
... 45 more
Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'ProductionDetail'. Cause: java.lang.ClassNotFoundException: Cannot find class: ProductionDetail
at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:93)
at org.apache.ibatis.builder.BaseBuilder.resolveAlias(BaseBuilder.java:93)
at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:67)
... 49 more
Caused by: java.lang.ClassNotFoundException: Cannot find class: ProductionDetail
at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:173)
at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:72)
at org.apache.ibatis.io.Resources.classForName(Resources.java:235)
at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:89)
... 51 more

zds_song的主页 zds_song | 初学一级 | 园豆:190
提问于:2014-05-23 20:57
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册