我们的项目是spring MVC+mybatis+mysql框架,应用服务器和数据库服务器为centos6.5。
现在发现一个奇怪的问题,在mysql中定义的存储过程,通过发布在linux服务器的web应用执行,数据库中没有值,后台也没有输出任何错误。
但是通过windows的应用服务器调用就可以执行并且有值。
检查了存储过程的执行权限,应该没有问题。网上也找不到类似问题的解决方案,十分苦恼!特来请教各位大侠,多谢!附:mybatis的存储过程配置文件
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="BureauCheckStatMapper">
        
        <resultMap type="com.nk.mis.overallmerit.entity.BureauCheckStat" id="BureauCheckStatMap">
                <id column="c_id" jdbcType="INTEGER" property="id"/>
                <result column="c_begin_time" jdbcType="TIMESTAMP" property="beginTime"/>
                <result column="c_end_time" jdbcType="TIMESTAMP" property="endTime"/>
                <result column="c_check_dept_id" jdbcType="INTEGER" property="checkDeptId"/>
                <result column="c_check_dept_name" jdbcType="VARCHAR" property="checkDeptName"/>
                <result column="c_question_num" jdbcType="INTEGER" property="questionNum"/>
                <result column="c_score" jdbcType="DOUBLE" property="score"/>
                <result column="c_create" jdbcType="VARCHAR" property="create"/>
                <result column="c_creater_id" jdbcType="INTEGER" property="createrId"/>
                <result column="c_creater_time" jdbcType="TIMESTAMP" property="createrTime"/>
                <result column="c_update" jdbcType="VARCHAR" property="update"/>
                <result column="c_updater_id" jdbcType="INTEGER" property="updaterId"/>
                <result column="c_updater_time" jdbcType="TIMESTAMP" property="updaterTime"/>
                <result column="c_stat_type" jdbcType="VARCHAR" property="statType" />
                <result column="c_stat_value" jdbcType="VARCHAR" property="statValue" />
        </resultMap>
        <select id="findPage" parameterType="hashmap" resultMap="BureauCheckStatMap">
                select t.*
                <include refid="pageFind"></include>
                order by t.c_creater_time desc
        </select>
        <sql id="pageFind">
                from c_bureau_check_stat t
                <where>
                        <if test="statType != null"><![CDATA[and t.c_stat_type= #{statType, jdbcType=TIMESTAMP}]]></if>
                <if test="statValue != null"><![CDATA[and t.c_stat_value= #{statValue, jdbcType=TIMESTAMP}]]></if>
                        <if test="beginTime != null"><![CDATA[and t.c_begin_time= #{beginTime, jdbcType=TIMESTAMP}]]></if>
                        <if test="endTime != null"><![CDATA[and t.c_end_time = #{endTime, jdbcType=TIMESTAMP}]]></if>
                        <if test="createrId != null"><![CDATA[and t.c_creater_id = #{createrId, jdbcType=INTEGER}]]></if>
                </where>
        </sql>
        <!-- 调用存储过程生成数据 -->
        <select id="createData" parameterType="hashmap" statementType="CALLABLE">  
      {#{returnValue,jdbcType=INTEGER, mode=OUT}=call f_department_stat(#{statType,jdbcType=VARCHAR, mode=IN}, #{statValue,jdbcType=VARCHAR, mode=IN}, #{beginTime,jdbcType=TIMESTAMP, mode=IN},   #{endTime,jdbcType=TIMESTAMP, mode=IN},     #{createrId,jdbcType=INTEGER, mode=IN})}  
  </select>  
</mapper>