PLS-00306:调用' CLIP_403'错误的参数数量或类型ORA-06550:第1行第7列

时间:2018-06-18 17:05:49

标签: oracle spring-mvc stored-procedures spring-data

我试图从我的控制器调用一个简单的程序,但是它显示了这个错误,我还没有找到原因,请帮忙,我错过了什么?我没有看到任何不合适的地方。我将Spring Framework 1.5.12与Spring Data和Oracle数据库结合使用。

2018-06-18 11:40:21 DEBUG org.hibernate.SQL - {call 
CLIP_403(?,?,?,?,?,?,?,?,?,?,?)}
Hibernate: {call CLIP_403(?,?,?,?,?,?,?,?,?,?,?)}
2018-06-18 11:40:21 TRACE o.h.type.descriptor.sql.BasicBinder - binding parameter [llave] as [INTEGER] - [4]
2018-06-18 11:40:21 TRACE o.h.type.descriptor.sql.BasicBinder - binding parameter [nom] as [VARCHAR] - [Nombre]
2018-06-18 11:40:21 TRACE o.h.type.descriptor.sql.BasicBinder - binding parameter [apell] as [VARCHAR] - [Apellido]
2018-06-18 11:40:21 TRACE o.h.type.descriptor.sql.BasicBinder - binding parameter [sexo] as [INTEGER] - [0]
2018-06-18 11:40:21 TRACE o.h.type.descriptor.sql.BasicBinder - binding parameter [tipo_doc] as [INTEGER] - [1]
2018-06-18 11:40:21 TRACE o.h.type.descriptor.sql.BasicBinder - binding parameter [num_doc] as [VARCHAR] - [123456789]
2018-06-18 11:40:21 TRACE o.h.type.descriptor.sql.BasicBinder - binding parameter [fec_nac] as [TIMESTAMP] - [Fri Jan 13 00:00:00 CST 1984]
2018-06-18 11:40:21 TRACE o.h.type.descriptor.sql.BasicBinder - binding parameter [estado] as [INTEGER] - [1]
2018-06-18 11:40:21 TRACE o.h.type.descriptor.sql.BasicBinder - binding parameter [dir] as [VARCHAR] - [Dire]
2018-06-18 11:40:21 TRACE o.h.type.descriptor.sql.BasicBinder - binding parameter [tel] as [VARCHAR] - [45465465]
2018-06-18 11:40:21 TRACE o.h.type.descriptor.sql.BasicBinder - binding parameter [cel] as [VARCHAR] - [12345678]
2018-06-18 11:40:21 WARN  o.h.e.jdbc.spi.SqlExceptionHelper - SQL Error: 6550, SQLState: 65000
2018-06-18 11:40:21 ERROR o.h.e.jdbc.spi.SqlExceptionHelper - ORA-06550: línea 1, columna 7:
PLS-00306: wrong number or types of arguments in call to 'CLIP_403'
ORA-06550: línea 1, columna 7:
PL/SQL: Statement ignored

2018-06-18 10:47:25 DEBUG o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver - 
Resolving exception from handler [public org.springframework.web.servlet.ModelAndView com.grupo2.SIAV.controlador.Cliv401Controlador.guardarModificacionCliente(org.springframework.web.servlet.ModelAndView,com.grupo2.SIAV.modelo.Cliv401,org.springframework.validation.BindingResult,javax.servlet.http.HttpServletRequest)]: org.springframework.dao.InvalidDataAccessResourceUsageException: Error calling CallableStatement.getMoreResults; SQL [CLIP_403]; nested exception is org.hibernate.exception.SQLGrammarException: Error calling CallableStatement.getMoreResults
 2018-06-18 10:47:25 DEBUG o.s.w.s.m.a.ResponseStatusExceptionResolver - Resolving exception from handler [public org.springframework.web.servlet.ModelAndView com.grupo2.SIAV.controlador.Cliv401Controlador.guardarModificacionCliente(org.springframework.web.servlet.ModelAndView,com.grupo2.SIAV.modelo.Cliv401,org.springframework.validation.BindingResult,javax.servlet.http.HttpServletRequest)]: org.springframework.dao.InvalidDataAccessResourceUsageException: Error calling CallableStatement.getMoreResults; SQL [CLIP_403]; nested exception is org.hibernate.exception.SQLGrammarException: Error calling CallableStatement.getMoreResults
 2018-06-18 10:47:25 DEBUG o.s.w.s.m.s.DefaultHandlerExceptionResolver - Resolving exception from handler [public org.springframework.web.servlet.ModelAndView com.grupo2.SIAV.controlador.Cliv401Controlador.guardarModificacionCliente(org.springframework.web.servlet.ModelAndView,com.grupo2.SIAV.modelo.Cliv401,org.springframework.validation.BindingResult,javax.servlet.http.HttpServletRequest)]: org.springframework.dao.InvalidDataAccessResourceUsageException: Error calling CallableStatement.getMoreResults; SQL [CLIP_403]; nested exception is org.hibernate.exception.SQLGrammarException: Error calling CallableStatement.getMoreResults
2018-06-18 10:47:25 DEBUG o.s.web.servlet.DispatcherServlet - Could not complete request
org.springframework.dao.InvalidDataAccessResourceUsageException: Error calling CallableStatement.getMoreResults; SQL [CLIP_403]; nested exception is org.hibernate.exception.SQLGrammarException: Error calling CallableStatement.getMoreResults
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:261)
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:244)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:525)
at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:59)
at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:209)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:147)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:133)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:57)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)

我的程序:

CREATE OR REPLACE PROCEDURE CLIP_403 (llave integer, nom varchar2, apell varchar2, sexoo integer, tipo_doc integer , num_doc varchar2, fec_nac date, estado integer, dir varchar2, tel varchar2, cel varchar2)
IS
BEGIN
UPDATE CLIENTE SET NOM_CLIENTE = nom, DIRECCION = dir, TELEFONO = tel, CELULAR = cel WHERE ID_CLIENTE = llave;
UPDATE PERSONAL SET ID_TIPO_DOC = tipo_doc, ID_EST_CIVIL = estado, APELLIDO = apell, NUM_DOC_PER = num_doc, FECHA_NACIMIENTO = fec_nac, SEXO = sexoo WHERE ID_CLIENTE = llave;
COMMIT;
END;

我在我的控制器中这样称呼它:

cliv401Repo.registrar(cli.getIdCLiente(), cli.getNomCliente(), cli.getApellido(), cli.getSexo(),
            cli.getTipoDoc(), cli.getNumDocPer(), cli.getFechaNacimiento(), cli.getEstCivil(),
            cli.getDireccion(), cli.getTelefono(), cli.getCelular());

在回购中:

@Procedure(name = "CLIP_403")
void actualizar(@Param("llave") Integer llave,
        @Param("nom") String nom,
        @Param("apell") String apell,
        @Param("sexo") Integer sexo,
        @Param("tipo_doc") Integer tipoDoc,
        @Param("num_doc") String numDoc,
        @Param("fec_nac") Date fechaNac,
        @Param("estado") Integer estado,
        @Param("dir") String dir,
        @Param("tel") String tel,
        @Param("cel") String cel);

模特:

@NamedStoredProcedureQueries({
@NamedStoredProcedureQuery(
        name = "CLIP_403",
        procedureName = "CLIP_403",
        parameters = {
            @StoredProcedureParameter(mode = ParameterMode.IN, name = "llave", type = Integer.class)
            ,
        @StoredProcedureParameter(mode = ParameterMode.IN, name = "nom", type = String.class)
            ,
        @StoredProcedureParameter(mode = ParameterMode.IN, name = "apell", type = String.class)
            ,
        @StoredProcedureParameter(mode = ParameterMode.IN, name = "sexo", type = Integer.class)
            ,
        @StoredProcedureParameter(mode = ParameterMode.IN, name = "tipo_doc", type = Integer.class)
            ,
        @StoredProcedureParameter(mode = ParameterMode.IN, name = "num_doc", type = String.class)
            ,
        @StoredProcedureParameter(mode = ParameterMode.IN, name = "fec_nac", type = Date.class)
            ,
        @StoredProcedureParameter(mode = ParameterMode.IN, name = "estado", type = Integer.class)
            ,
        @StoredProcedureParameter(mode = ParameterMode.IN, name = "dir", type = String.class)
            ,
        @StoredProcedureParameter(mode = ParameterMode.IN, name = "tel", type = String.class)
            ,
        @StoredProcedureParameter(mode = ParameterMode.IN, name = "cel", type = String.class)
        }
)})

0 个答案:

没有答案