Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3959642
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:45:19+00:00 2026-05-20T02:45:19+00:00

Possible Duplicate: Spring's Stored Procedure – results coming back from procedure always empty. I

  • 0

Possible Duplicate:
Spring's Stored Procedure – results coming back from procedure always empty.

I have the following code and although I know the call should result in contents I always get back an empty resultset can anyone suggest why?

ParameterizedRowMapper<ExamPaper> mapper = new ParameterizedRowMapper<ExamPaper>() {

  public ExamPaper mapRow(ResultSet rs, int rowNum) throws SQLException {


    logger.info("in the row mapper with"+rs.toString());
    logger.info("in the row mapper with x no of rows " +rowNum);

    ExamPaper examPaper = new ExamPaper();
    examPaper.setCampus(rs.getString("campus"));
    examPaper.setTitle(rs.getString("title"));
    examPaper.setPaper(rs.getString("paper"));
    examPaper.setCode(rs.getString("code"));
    examPaper.year.add(rs.getString("year"));
    examPaper.semester.add(rs.getString("semester"));
    return examPaper;
  }
};

Map params = new HashMap();
params.put("ic_search_string","fluid");
params.put("ic_location_flag", "unmc");
logger.info("calling stored procedure");
OracleStoredProcedure storedProcedure = new OracleStoredProcedure(getDataSource(),"pkg_exam_papers.p_get_exam_papers",logger, mapper);

Map results = storedProcedure.execute(params);
logger.info(results.size());

public class OracleStoredProcedure extends StoredProcedure 
{
  private Log logger;
  public OracleStoredProcedure(DataSource dataSource,String storedProcedureName, Log logger,ParameterizedRowMapper mapper)
  {
    super();
    this.logger = logger;

    setDataSource(dataSource);
    setFunction(false);
    setSql(storedProcedureName)

    declareParameter(new SqlParameter("ic_search_string", OracleTypes.VARCHAR));
    declareParameter(new SqlParameter("ic_location_flag", OracleTypes.VARCHAR));
    declareParameter(new SqlOutParameter("orc_results", OracleTypes.CURSOR, mapper));
    declareParameter(new SqlOutParameter("on_errcode", OracleTypes.INTEGER));
    declareParameter(new SqlOutParameter("oc_errmess", OracleTypes.CHAR));

    compile();

  }

  public Map execute(Map parameters)
  {
    Map out = new HashMap();

    try 
    {
      out = super.execute(parameters);
    }
    catch (NullPointerException nullPointerException)
    {
      logger.error("Exception when executing stored procedure: " + nullPointerException.getMessage());
    }
    catch(Exception exception)
    {
      logger.error("Exception when executing stored procedure: " + exception.getMessage());
    }

    return out;
  }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T02:45:20+00:00Added an answer on May 20, 2026 at 2:45 am

    I think your questioned is answered by another similar one from a year ago: Spring's Stored Procedure – results coming back from procedure always empty

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: remove duplicate from string in PHP Have a string like: $str =
Possible Duplicate: New to Spring - BeanFactory vs ApplicationContext? Why we always use the
Possible Duplicate: What is dependency injection? Spring is the framework from where the concept
Possible Duplicate: Using regular expression within a stored procedure I need to validate a
Possible Duplicate: Output (echo/print) everything from a PHP Array I have done a query
Possible Duplicate: String with array structure to Array I have an array as such
Possible Duplicate: Do I have to use mysql_real_escape_string if I bind parameters? I have
Possible Duplicate: Spring + Hibernate : a different object with the same identifier value
Possible Duplicate: determine target url based on roles in spring security 3.1 Hello all
Possible Duplicate: How to implement AOP with Spring i am using spring for hibernate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.