• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

stored procedure

Ganeshkumar cheekati
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

can anyone help me on these, i am trying to calling a stored procedure, it should be the resultset in the form of Map object. For these i used spring jdbc concept but i am getting a error like BadSqlGrammerException.

dao classes method.

public Map getClassificationView(String sUser,String sLocation,String sPattern, String sCurrPage){
LOG.info(">>>>>>>>>>>METHOD NAME getClassificationView Starts in Classification DAO>>>>>>>>>>>>>");
ProcedureAndFunctions stproc = new ProcedureAndFunctions();

stproc.declareParameter(new SqlOutParameter(sLocation,Types.VARCHAR));
stproc.declareParameter(new SqlOutParameter("null", Types.VARCHAR));
stproc.declareParameter(new SqlOutParameter(sCurrPage, Types.INTEGER));
stproc.declareParameter(new SqlOutParameter("Y", Types.VARCHAR));
Map results = stproc.execute();
for (Iterator it = results.keySet().iterator(); it.hasNext();)

LOG.info(">>>>>>>>>>>METHOD NAME getClassificationView Ends in Classification DAO>>>>>>>>>>>>>");
return results;


public class ProcedureAndFunctions extends StoredProcedure
public ProcedureAndFunctions()

public Map execute()

Map inputs = new HashMap<String,Object>();
return super.execute(inputs);



and my stored procedure contain four IN parameters, can help me any on these, tell me this is better one for converting the resultset into Map object or any other alternative in spring.

Julia Young
Posts: 1
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic