Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

cannot resolve symbol : constructor

807569Sep 27 2006 — edited Sep 27 2006
Hi,

I am facing problem in below code -

ProbeReq request = null;
request = new ProbeReq(config, log, probe, dest);

This code is in DBConn.java file. Now when i try to compile DBConn.java it says -

DBConn.java:54: cannot resolve symbol
symbol : constructor ProbeReq (com.aa.util.Config,com.aa.util.Logging,com.aa.util.Probe,com.aa.util.Destination)
location: class com.aa.central.ProbeReq
request = new ProbeReq(config, log, probe, dest);

Now, i have imported both the packages in DBConn.java -

import com.aa.util.*;
import com.aa.central.*;

and have also specified corresponding jars in classpath. I have also verified the constructor in ProbeReq class and it matches with what i am trying to do.

public class ProbeReq extends Thread {
package com.aa.central;
import com.aa.util.*;
....
....
public ProbeReq(Config config, Logging log, Probe probe, Destination dest)
{
this.config = config;
this.log = log;
this.probe = probe;
this.dest = dest;
}
}



To overcome the problem i override the ProbeReq class in MyProbeReq and then compiled. Now it gave same kind of problem for other class call from MyProbeReq -

./MyProbeReq.java:154: cannot resolve symbol
symbol : constructor ProbeTalk (com.aa.util.Logging,int,com.aa.util.Probe,com.aa.util.Destination,java.lang.String)
location: class com.aa.central.ProbeTalk
ProbeTalk talker = new ProbeTalk(log, Constants.USE_HTTP, probe, dest, "-I -f30 -n");
^
./MyProbeReq.java:477: cannot resolve symbol
symbol : constructor ProbeTalk (com.aa.util.Logging,int,com.aa.util.Probe,com.aa.util.Destination)
location: class com.aa.central.ProbeTalk
ProbeTalk talker = new ProbeTalk(log, Constants.USE_HTTP, probe, dest);


i am unable to understand why the same kinf of error is coming again. Is it something to do with packaging or shall i need to declare DBConn.java in a package.

can anyone help me in finding out the reason for getting the error.

Thanks,
Deepak
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 25 2006
Added on Sep 27 2006
9 comments
188 views