This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JDBC and the fly likes more DB to bean to servlet to table problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "more DB to bean to servlet to table problems" Watch "more DB to bean to servlet to table problems" New topic
Author

more DB to bean to servlet to table problems

Angel Kal
Greenhorn

Joined: Dec 11, 2011
Posts: 17

I keep getting the same error on line 107 (CourseBean cbl = new CourseBean()) of my servlet here "actual and formal argument length differ". Im not 100% but i believe it has to do with my table key not being an integer, and I think the error may be in my bean class. If anyone can help resolve this error I will be so greatful!

Servlet:


Bean:


BeanList:



If any of the other files are needed to help decypher this one let me know I will gladly post. Thank you in advance, and happy holidays to everyone
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19725
    
  20

You try to call the constructor that takes no arguments, but you don't have such a constructor. You only have one that takes several Strings.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Angel Kal
Greenhorn

Joined: Dec 11, 2011
Posts: 17

Wow....I feel dumb...thank you! I guess I must have just been staring at it too long to realize it wasn't there! Now Im having a problem at line 115 it says that cbl cannot be converted by method invocation conversion? Any ideas as to what that could mean? Again, Im very new to servlets, and Im not having any problems with databases that have a numeric index key, so I guess I must need to learn more about using string table keys!
Angel Kal
Greenhorn

Joined: Dec 11, 2011
Posts: 17

Thankyou. Im new to this I will post here next time.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: more DB to bean to servlet to table problems