This discussion is archived
1 Reply Latest reply: Aug 2, 2011 3:28 PM by 796440 RSS

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

866972 Newbie
Currently Being Moderated
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
  • 1. Re: The method function(String) is undefined for the type Class--JSP error
    796440 Guru
    Currently Being Moderated
    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.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points