• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wrong number of arguments in method

 
Clive van Hilten
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Windows 2000 Professional with SP2
JDK1.3.0_02 with JavaMail(TM) API 1.2 release from Sun
Tomcat 3.2

all code can be found in text format at http://ariel.mit-misys.com/javaranch
I have a bean called MailBean.java. I have a JSP (transfer.jsp) that calls the sendMail method of this bean - the relevant part of the JSP is also posted at the above URL.
The error message I get when running the JSP is: "Wrong number of arguments in method". As far as I can see, I have the correct number of arguments and datatypes passed as parameters.
Can anyone tell me where I'm going wrong, please?
Thank you.
Clive
[ April 12, 2002: Message edited by: Clive van Hilten ]
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, since access to that site is FORBIDDEN is kinda hard to tell.
 
Clive van Hilten
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Cindy, I think the UBB code added the closing bracket to the URL in my post, you should be able to get to it now.
Clive
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, a quick inspection doesn't reveal anything overt. Are you sure that it's the call to sendMail that the compiler is complaining about? You might want to post the complete text of the error message as a clue.
An unrelated question (to be ignored if you don't appreciate unsolicited advice on your code): since sendMail is a static method, why do you bother instantiating a bean rather than using a static call (a la ariel.MailBean.sendMail())?
Also, is what you posted a complete class? The only methods that actually do anything are static and don't reference the member variables at all. (Or is this just an incomplete work in progress?)
hth,
bear
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic