aspose file tools
The moose likes Beginning Java and the fly likes 2 identically structured beans and 2 identically structured getter statements Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "2 identically structured beans and 2 identically structured getter statements" Watch "2 identically structured beans and 2 identically structured getter statements" New topic
Author

2 identically structured beans and 2 identically structured getter statements

John Piper
Greenhorn

Joined: Mar 27, 2011
Posts: 12
I have two beans that are structured exactly the same. I pull both those beans into the same java class the exact same way. Yet only one of them has a problem.

Here is the error when I try to build it:

cannot find symbol
symbol : constructor BalanceBean(java.lang.String)
location: class HWpackage.BalanceBean


Here is the working bean, UserBean2


And here is the working getter statements:



Now compare that to the non-working code.

BalanceBean:


And its getter statements:


For what ever reason "BalanceBean" on line 3 is causing all the problems.

Can someone please tell me why?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56179
    
  13

You're not looking very close. The error message is telling you exactly what is wrong.

Look at the constructor and look at how you are calling it.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Nico Van Brandt
Ranch Hand

Joined: Mar 31, 2011
Posts: 66

The error is pretty obvious

cannot find a constructor with signature BalanceBean(String)


Oracle Java SE6 Certified Programmer
Oracle Java EE5 Certified Web Component Developer
 
I agree. Here's the link: http://zeroturnaround.com/jrebel
 
subject: 2 identically structured beans and 2 identically structured getter statements
 
Similar Threads
doubt in Session parameters
How come I can pull a session attribute in a JSP page but not in a Servlet?
not getting what this servlet is doing+MVC
Mapping annotations for variables.
Objects and Classes