[/liningVMservice] threw exception [Handler processing failed; nested exception is java.lang.AbstractMethodE
at com.sun.proxy.$Proxy11.insert(Unknown Source)
检查一下resultMap 和sql语句是否正确,nested exception 不是sql 语句有问题,就应该是resultmap映射有问题~

解决方案 »

  1.   


    /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table vmguest
         *
         * @mbggenerated
         */
        int insert(VMGuest record);
    <insert id="insert" parameterType="com.lining.vmservice.model.VMGuest" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        insert into vmguest (id, name, vm_type, 
          cpu_clock, cpu_count, memory_size, 
          architecture, os_type, power_state, 
          vm_state, create_date, update_date, 
          image_id, template_id, lserver_key
          )
        values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{vmType,jdbcType=VARCHAR}, 
          #{cpuClock,jdbcType=DOUBLE}, #{cpuCount,jdbcType=INTEGER}, #{memorySize,jdbcType=DOUBLE}, 
          #{architecture,jdbcType=INTEGER}, #{osType,jdbcType=VARCHAR}, #{powerState,jdbcType=VARCHAR}, 
          #{vmState,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{updateDate,jdbcType=TIMESTAMP}, 
          #{imageId,jdbcType=VARCHAR}, #{templateId,jdbcType=VARCHAR}, #{lserverKey,jdbcType=VARCHAR}
          )
      </insert>  以上是我的代码 和sql
      

  2.   

    <mapper namespace="com.lining.vmservice.mapper.VMGuestMapper" >
      <resultMap id="BaseResultMap" type="com.lining.vmservice.model.VMGuest" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        <id column="id" property="id" jdbcType="VARCHAR" />
        <result column="name" property="name" jdbcType="VARCHAR" />
        <result column="vm_type" property="vmType" jdbcType="VARCHAR" />
        .........................
      </resultMap>  以上是我的resultMap 
      

  3.   

    貌似是版本问题 我用的是mybatis-3.1.0.jar mybatis-spring-1.2.2.jar  commons-pool2-2.2.jar jdk7