• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

cannot find symbol symbol : constructor

 
Ranch Hand
Posts: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,



I am calling CategoriesDAO from CategoriesMethods class as following:


It throws two errors:


C:\Program Files (x86)\Java\Tomcat\webapps\ROOT\WEB-INF\classes>javac Categories
Methods.java
CategoriesMethods.java:141: cannot find symbol
symbol : constructor CategoriesDAO(int,int,int,int,java.lang.String,java.lang.String)
location: class sti.categories.cat.CategoriesDAO
CategoriesDAO cd = new CategoriesDAO(langPref,catPref,option,pkId,caption,caption1);
^
CategoriesMethods.java:150: viewCategories(int,java.lang.String,boolean,int) in
sti.categories.cat.CategoriesDAO cannot be applied to (boolean)
cd.viewCategories(true)+
^
2 errors



2nd ERROR: line 150 is:
========


Please advise

Thanks in anticipation
 
Ranch Hand
Posts: 954
4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this class in your classpath ?
 
Farakh khan
Ranch Hand
Posts: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tushar Goel wrote:Is this class in your classpath ?


Yes, both classes are in same package
 
Tushar Goel
Ranch Hand
Posts: 954
4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you are compiling the class in "classes" folder? Is it right folder?

Also I am not sure about EE things but as per standards folder name is not seems to be correct to me. May be "src" is better.
 
Farakh khan
Ranch Hand
Posts: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply

if I compile as follow even then same result:


Tushar Goel wrote:you are compiling the class in "classes" folder? Is it right folder?

Also I am not sure about EE things but as per standards folder name is not seems to be correct to me. May be "src" is better.


I am storing in package sti.categories.cat.*.class

you mean I changed to sti.categories.src??

 
Farakh khan
Ranch Hand
Posts: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I declared default constructor in CategoriesMethods class instead of CategoriesDAO then its compiled.

I am waiting for reply which folder I rename "src"??
 
Tushar Goel
Ranch Hand
Posts: 954
4
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hold a sec !! CategoriesMethods is super class and CategoriesDAO is its sub class. Super class never comes to know about sub class.
That's why when you changed to super class constructor then it is compiled.
 
Tushar Goel
Ranch Hand
Posts: 954
4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am waiting for reply which folder I rename "src"??


It is not mandatory thing. It is just practice. May be some one can suggest better.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic