Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem when trying to instanciate a Bean ->

 
Dominic Steng�rd
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all freaky coders out there!
I am trying to instanciate a Bean with the following code:
DbConnection dbConn = new DbConnection();
Both the Bean I'm calling from and the one I'm trying to instatnciate are in the same package, and still I get the following error message:
cannot resolve symbol
symbol: class DbConnection
location: class test_beans.Member
DbConnection dbConn = new DbConnection
���������������       �����������^
I just can't figure out where the problem is, I have tried everything and checked the code over and over... please help me out.
Thanks in advance.
Regards
------------------
Dominic Steng�rd
Sun Certified Java 2 Programmer
------------------

[This message has been edited by Dominic Steng�rd (edited April 18, 2001).]
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's a DbConnection? I can't find it anywhere in the API.
Try just Connection.
 
Dominic Steng�rd
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DbConnection is my homebuilt bean and it should be just like instanciating any class.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well it is looking for a symbol, not a class, so it sounds like the line above the one that you showed us is in error. Perhaps some more complete code would help?
 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does your bean have a public or protected no-arg constructor ?
Pho
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic