Announcement Announcement Module
Collapse
No announcement yet.
Exception expected 1 actual 2 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exception expected 1 actual 2

    Dear all,
    I want to retrive the 5 strings in alist using namedparameterjdbctemplate class.
    exception
    org.springframework.dao.IncorrectResultSizeDataAcc essException: Incorrect result size: expected 1, actual 2

    my code
    String query = "select REV_NAME from T_REVENUE_REV";
    List rev =queryForList(query,String.class);
    return rev;
    I am new to springs plz help
    Last edited by junugari; May 24th, 2011, 02:11 AM.

  • #2
    Is that really your code?! The queryForList method should be called on the namedparameterjdbctemplate, for some reason it looks more like an internal method (if it is an internal method post it). Also the NPJT doesn't have a queryForList method that takes a query and type attribute...

    Basically without seeing the code that is actually creating the query it is hard to say what is happening.

    Comment


    • #3
      And please don't post duplicates

      Comment


      • #4
        Thanx for ur advise...

        Comment

        Working...
        X