2013-12-23 109 views
0

我正在使用struts2-spring,spring-mybatis。當我測試在工作臺上沒有任何問題,例如mybatis嵌套異常是org.apache.ibatis.reflection.ReflectionException

12:21:18,499 DEBUG insertar:46 - ooo Using Connection [[email protected]] 12:21:18,499 DEBUG insertar:46 - ==> Preparing: { CALL INSERTAR_REGISTRO(?,?,?)} 12:21:18,516 DEBUG insertar:46 - ==> Parameters: 10302770(String), 2013-10-18(String), 2013-10-18 01:30:00(String) 12:21:18,531 TRACE insertar:50 - <== Columns: VID, VENTRADA, VSALIDA, @VPROX, @INSERTAR, @ESTADO, @CONTADOR 12:21:18,531 TRACE insertar:50 - <== Row: 69, 2013-10-18 07:15:00.0, 2013-10-18 07:20:00.0, <<BLOB>>, 1, 2, 14 **nested exception is org.apache.ibatis.reflection.ReflectionException: Error instantiating void with invalid types() or values(). Cause: java.lang.NoSuchMethodException: void.<init>() # org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Error instantiating void with invalid types() or values(). Cause: java.lang.NoSuchMethodException: void.<init>()**

:我得到這個錯誤CALL INSERTAR_REGISTRO('10302770','2013-10-18','2013-10-18 01:30:00');但在我的應用程序得到例外。我的手續PROCEDURE INSERTAR_REGISTRO(IN PNNUMEROID varchar(8), IN PDFECHAEVENTO varchar(10), IN PNFECHAHORA varchar(19))

我的服務類:

@Service 
@Scope("request") 
public class RegistroServiceImp implements RegistroService { 

@Autowired 
RegistroMapper registroMapper; 

@Transactional 
public void registrar(Registro registro, String fecha_hora) 
     throws Exception { 
    String[] arrayFch = registro.getFecha_evento().split("/"); 
    String nuevaFch = arrayFch[2] + "-" + arrayFch[1] + "-" + arrayFch[0]; 
    System.out.println(nuevaFch); 
    registroMapper.insertar(registro.getNumero_id(), nuevaFch, nuevaFch 
      + " " + fecha_hora); 
} 

回答

0

嗯,我解決我的問題,只是刪除我的選擇的信息。我認爲這個問題是因爲我的變量@VPROX的形式是SET @VPROX = 0,後來我SET @VPROX = VSALIDA,這個變量VSALIDA的形式是DECLARE VSALIDA DATETIME。我不知道,因爲ibatis我返回變量@VPROX像<<BLOB>>和工作臺像日期時間。

相關問題