Skip to Main Content

Java APIs

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!

Caught NoSuchMethod

843810Jan 9 2006 — edited Jan 9 2006
Cant someone understand and tell me whats wrong with the code below? when I compile it, there isn't any error. But when I run it, "Caught NoSuchMethod: MyPeer.<init><com.alltigo.location.sdk.PeerConfiguration>" and I know tat e error is at Peer myPeer = PeerFactory.createPeer(peerConfiguration);

import com.alltigo.locationtag.*;
import com.alltigo.locationtag.sdk.*;
import com.alltigo.locationtag.util.gui.ProgressDialog;

import java.lang.reflect.InvocationTargetException;

public class MyPeer
{
public static void main(String args[])
{
System.out.println("Trying to connect...");

ConnectionListener l = new ConnectionListener();


PeerConfiguration peerConfiguration = new PeerConfiguration();
peerConfiguration.setPeerType(MyPeer.class);
System.out.println("Please wait.");

try
{
Peer myPeer = PeerFactory.createPeer(peerConfiguration);
System.out.println("It takes awhile...");
try
{
myPeer.addConnectionStatusListener(l);
myPeer.connect("xmpp.alltigo.com");

//myPeer.createAccount("user", "test");
myPeer.login("sg123", "nexwave");

DeviceManager deviceManager = myPeer.getDeviceManager();
}
catch(LocationTagException e)
{
System.out.println("Caught LocationTagException: " + e.getMessage());
}
}
catch(NoSuchMethodException e)
{
System.out.println("Caught NoSuchMethod: " + e.getMessage());
}
catch (IllegalAccessException e)
{
System.out.println("Caught IllegalAccess: " + e.getMessage());
}
catch (InstantiationException e)
{
System.out.println("Caught Instantiation: " + e.getMessage());
}
catch (InvocationTargetException e)
{
System.out.println("Caught InvocationTarget: " + e.getMessage());
}
}//main

protected void initialize() throws LocationTagException{}

public void addConnectionStatusListener(ConnectionStatusListener c)
{}

public void MyPeer()
{}

static class ConnectionListener implements ConnectionStatusListener
{
public void connectionChanged(ConnectionStatus c)
{}

public void ConnectionListener()
{}
}

}//class
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 6 2006
Added on Jan 9 2006
1 comment
144 views