我正在使用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);
}