Forum Stats

  • 3,854,674 Users
  • 2,264,399 Discussions
  • 7,905,751 Comments

Discussions

The method function(String) is undefined for the type Class--JSP error

866972
866972 Member Posts: 21
Hi ,

I have a method defined in my dataManagerDAO class

getNoc( strRppsId) throws Exception {}

Now I am calling this method inside my JSP page :
DataManagerDAO dataMgr = new DataManagerDAO();

dataMgr.getNoc(strRppsId)..

But whenver I am running it locally , it fails to compile and gives following error msg :

The method getNoc(String) is undefined for the type DataManagerDAO

ny clue wats going wrong in here ?

Thanks

Answers

  • 796440
    796440 Member Posts: 19,179 Gold Trophy
    edited Aug 2, 2011 6:28PM
    JavaB wrote:
    Hi ,

    I have a method defined in my dataManagerDAO class
    Is it dataManagerDAO or DataManagerDAO?
    getNoc( strRppsId) throws Exception {}
    That's not a legal Java method declaration, so it's clearly not your actual declaration, so I have no idea what your actual declaration is, so I can't tell you what you're doing wrong.
    Now I am calling this method inside my JSP page :
    DataManagerDAO dataMgr = new DataManagerDAO();

    dataMgr.getNoc(strRppsId)..

    But whenver I am running it locally , it fails to compile and gives following error msg :

    The method getNoc(String) is undefined for the type DataManagerDAO
    Quite obviously you're calling a method getNoc(String) but that method doesn't exist on the DataManagerDAO class. No matter how much you may think you know that it does, you're wrong and the compiler is right.

    Maybe you misspelled or mis-capitalized something. Maybe you're passing the wrong type of argument. Maybe you're still using an older version of the DataManagerDAO class from before you added that method. Not enough information here to say for sure.
    ny clue wats going wrong in here ?
    I assume you mean "any", not "ny" and "what's", not "wats". Clear, correct, precise communication counts with folks here almost as much as it does with the Java compiler.
This discussion has been closed.