JSP error: No match was found for method

Hi,

I edited my JSP file to reference a java class which has two definitions for a function. The JSP file initially referenced version one of the function and was operating just fine. I then changed it to reference version two with different parameters and I am receiving a "No match was found for method" error. I then cut and paste version two into an entirely new function and am getting the same error. Rebuilt the java class with no errors, restarted the jrun server. What could I possibly be missing here?

Thanks.
lcftahoeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kjayaramanCommented:
Hi,
Seems absurd, but can you change something in your jsp [mightbe a newline] and reload the jsp in a new browser window.

The jsp needs to be rebuilt to use the new version of your class. But you restarted jrun. Hmmm.
0
TimYatesCommented:
can you post the JSP and the class?  Sounds like you have got your parameter types wrong in one of them...
0
KuldeepchaturvediCommented:
Sometimes it happens with me.. the best way that I use is to delete the .class file that JSP creates in the work folder..
it forces to recompile the JSP page...
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

lcftahoeAuthor Commented:
The parameter types are correct. I am able to make other changes to the jsp file that are showing up. I deleted the class file and restarted Jrun again, still no luck.
0
KuldeepchaturvediCommented:
Hmm are you sure that your changed class have the same package name as previous one? and also the same name as the previous class that you were using??
Can you post the full stack trace to we can look at it??
0
TimYatesCommented:
And can you post your java code and the bit of your JSP that calls it?
0
lcftahoeAuthor Commented:
Yes, the changed class is the same name. Furthermore the previous one contained the function definition I want to use but it is not recognized, nor is the function I added with a different name.

Not sure what you mean by post - I re-made the java class and uploaded it to the server. Then checked the class and the new function definition is there. Then changed the jsp file (in which some of the changes I made ARE showing up). Then deleted the class files for the JSP file. Then restarted JRun. What am I missing here?
0
KuldeepchaturvediCommented:
when we say post.. we were meaning to cut & paste your class file and jsp code in this forum so that we can look at it..:-)
0
lcftahoeAuthor Commented:
Ah, gotcha :). So in the java code there are three functions I copied here: only the 3rd one is working (the first part of the if statement in the jsp code).

JSP code:

<tsb:param name="sendFilter" default="" />
...
TSB.Parameters params = TSB.Parameters.getInstance(pageContext);
TSB.Configuration config = new TSB.Configuration();
...

if (params.isEmpty("sendFilter")) {
      List      users = config.getParticipants(conn);
      }
else
      {
      List      users = config.getParticipants_byStatus(conn,params.getInteger("sendFilter"));
      }


Configuration.java code:

/** Return list of participants in a given status */
      public List getParticipants(Connection conn, int status) throws SQLException
      {
            Statement      stmt = conn.createStatement();
            ResultSet      rs = stmt.executeQuery("SELECT cpUser FROM tsbConfigParticipants,tsbUsers WHERE cpConfig=" +
                  getPrimaryKey() + " AND cpStatus=" + String.valueOf(status) +
                  " AND usId=cpUser ORDER BY usLastName,usFirstName");
            List      results = new ArrayList();
            while (rs.next())
                  results.add(new Integer(rs.getInt(1)));
            rs.close();
            stmt.close();
            return results;
      }
      
      /** Return list of participants in a given status */
      public List getParticipants_byStatus(Connection conn, int status) throws SQLException
      {
            Statement      stmt = conn.createStatement();
            ResultSet      rs = stmt.executeQuery("SELECT cpUser FROM tsbConfigParticipants,tsbUsers WHERE cpConfig=" +
                  getPrimaryKey() + " AND cpStatus=" + String.valueOf(status) +
                  " AND usId=cpUser ORDER BY usLastName,usFirstName");
            List      results = new ArrayList();
            while (rs.next())
                  results.add(new Integer(rs.getInt(1)));
            rs.close();
            stmt.close();
            return results;
      }

      /** Return list of participants of all statuses
      public List getParticipants(Connection conn) throws SQLException
      {
            Statement      stmt = conn.createStatement();
            ResultSet      rs = stmt.executeQuery("SELECT cpUser FROM tsbConfigParticipants,tsbUsers WHERE cpConfig=" +
                  getPrimaryKey() + " AND usId=cpUser ORDER BY usLastName,usFirstName");
            List      results = new ArrayList();
            while (rs.next())
                  results.add(new Integer(rs.getInt(1)));
            rs.close();
            stmt.close();
            return results;
      }
0
lcftahoeAuthor Commented:
Up-ing the points as this seems elusive and I've got to figure it out!
0
TimYatesCommented:
doesn't params.getInteger("sendFilter") return an Integer?

And all your methods take an int

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
KuldeepchaturvediCommented:
>> users = config.getParticipants_byStatus(conn,params.getInteger("sendFilter"));

Are you sure that params.getInteger(String) takes an string as input and returns a interger?
If not then thats where your problem is...
0
lcftahoeAuthor Commented:
bingo, forced the int conversion in the jsp code instead of the class file.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JSP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.