cannot find symbol

Hi all,

Can anyone please help me with this.....I was stuck with this errors for ages.

the errors is:

C:\folder\MyPeer.java:12: cannot find symbol

symbol : constructor Peer()

location: class com.alltigo.locationtag.sdk.Peer

public class MyPeer extends Peer

My classpath is ok. the Peer.class file is also in the directory. But what is wrong with this source code?

import com.alltigo.locationtag.*;

import com.alltigo.locationtag.sdk.*;

//import com.alltigo.locationtag.PeerFactory;

//import com.alltigo.locationtag.sdk.Peer;

//import com.alltigo.locationtag.sdk.PeerConfiguration;

import org.jivesoftware.smack.*;

import org.hsqldb.*;

import org.hsqldb.jdbc.*;

import org.hsqldb.util.*;

public class MyPeer extends Peer

{

public static void main(String args[])

{

MyPeer myPeer = new MyPeer();

PeerConfiguration peerConfiguration = new PeerConfiguration();

peerConfiguration.setPeerType(MyPeer.class);

myPeer = (MyPeer) PeerFactory.createPeer(peerConfiguration);

myPeer.addConnectionStatusListener(new ConnectionListener());

myPeer.connect("xmpp.alltigo.com");

myPeer.createAccount("user", "test");

myPeer.login("user", "test");

DeviceManager deviceManager = monitorPeer.getDeviceManager();

}

public void MonitorPeer(PeerConfiguration peerConfiguration)

{

super(peerConfiguration);

}

protected void initialize() throws LocationTagException{}

}

Pls. help me.....

[1589 byte] By [inPutDeVa] at [2007-10-2 7:41:59]
# 1

My best guess is, the Peer class does not have a no-argument constructor.

If a class extends another class, a parent class constructor is always called. You can explicitly call a parent constructor using "super();" or "super(arg...);" as the first line of a constructor in the child class. If you do not explicitly call super(), then the compiler will insert a call to a no argument constructor for you.

So in your MyPeer class, the compiler is inserting a default constructor whose first line is "super();" but the Peer class (apparently) does not have a no argument constructor.

atmguya at 2007-7-16 21:26:11 > top of Java-index,Developer Tools,Java Compiler...