Announcement Announcement Module
No announcement yet.
Common approach to stored procedure Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16

    I have tried the same way.. but parameters are not correctly passed to procedure.. I'm trying to invoke procedure inside a package.. All the parameters seems to have null values after passing.. Does any one have same experience? Please help..


    • #17
      I followed the same approach (Refering to jakim8915 post) which you have mentioned, in calling the stored procedure, it throws the following exception
      (I have created Prcedure "getStateName" which takes one parameter (StateID) and should return State Name.). Can you please tell me what is that I am missing. Thanks in advance.

      org.springframework.dao.TransientDataAccessResourc eException: CallableStatementCallback; SQL [{call getStateName(?)}]; Callable statments not supported.; nested exception is java.sql.SQLException: Callable statments not supported.
      at ionTranslator.doTranslate(SQLStateSQLExceptionTran
      at QLExceptionTranslator.translate(AbstractFallbackSQ
      at QLExceptionTranslator.translate(AbstractFallbackSQ
      at QLExceptionTranslator.translate(AbstractFallbackSQ
      at org.springframework.jdbc.core.JdbcTemplate.execute (
      at org.springframework.jdbc.object.StoredProcedure.ex ecute(
      at com.wipro.daoImpl.CallPocedure.execute(CallPocedur
      at com.wipro.daoImpl.CallProcedureDaoImpl.getStateNam e(
      at com.wipro.serviceImpl.CallProcedureServiceImpl.get StateName(
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at npointUsingReflection(
      at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat
      at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed( :149)
      at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:106)
      at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed( :171)
      at org.springframework.aop.interceptor.ExposeInvocati onInterceptor.invoke(ExposeInvocationInterceptor.j ava:89)
      at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed( :171)
      at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(
      at $Proxy1.getStateName(Unknown Source)
      at com.wipro.client.CallProcedureClient.getStateName(
      at com.wipro.client.CallProcedureClient.main(CallProc
      Caused by: java.sql.SQLException: Callable statments not supported.
      at com.mysql.jdbc.Connection.prepareCall(Connection.j ava:1287)
      at org.springframework.jdbc.core.CallableStatementCre atorFactory$CallableStatementCreatorImpl.createCal lableStatement(CallableStatementCreatorFactory.jav a:167)
      at org.springframework.jdbc.core.JdbcTemplate.execute (
      Last edited by MPatric; Jul 1st, 2011, 12:23 AM.


      • #18
        1. Such questions should be posted Data forum (
        2. It looks as if a JDBC driver you are using does not support a stored procedures (nested exception is java.sql.SQLException: Callable statments not supported.). So you either have to use a different JDBC driver for your DB (if exists) or use another DB.