Results 1 to 2 of 2
Thread: j2me exception
- 04-19-2010, 12:27 PM #1
Member
- Join Date
- Apr 2010
- Posts
- 4
- Rep Power
- 0
j2me exception
on client side:
private static final UUID uuid =new UUID("A55665EE9F9146109085C2055C888B39", false);
int[] attributes = {0x0001,0x0003,0x0008,0x000C,0x0100,0x000F,0x1101, 0x1000,0x1001,0x1002,0x1115,0x1116,0x1117};
UUID[] uuids = new UUID[1];
//uuids[0] = new UUID(0x0003);
uuids[0] = uuid;
try
{
agent_client.searchServices(null,uuids,RemoteDevic e_array[m],this);
}
catch (Exception e)
{
System.out.println("exception generated before searching for service");
// Error handling code here
}
on server side:
private static final UUID uuid =new UUID("A55665EE9F9146109085C2055C888B39", false);
StringBuffer url = new StringBuffer("btspp://");
url.append("localhost").append(':');
url.append(uuid.toString());
//url.append(";name=Picture Server");
//url.append(";authorize=false");
try {
server = (StreamConnectionNotifier)Connector.open(url.toStr ing());
record = Device.getRecord(server);
DataElement base = new DataElement(DataElement.DATSEQ);
record.setAttributeValue(IMAGES_NAMES_ATTRIBUTE_ID , base);
}
catch (IOException e1)
{
System.out.println("problem while assigning connection string");
// Error handling code here
}
when I search for service then I m getting a null pointer exception.
assuming that all variables are declared & initialized properly then what can be the problem in the code?
- 04-19-2010, 01:12 PM #2
Senior Member
- Join Date
- Mar 2010
- Posts
- 953
- Rep Power
- 4
Please use CODE tags when posting code.
Seems to me there's not enough to go on here. When you say "when I search for service" I presume you mean this call:
But I don't know where that method is declared, what it does, what the parameters are supposed to be, what is in RemoteDevice_array... You'll need to give us a few more hints.Java Code:agent_client.searchServices(null, uuids, RemoteDevice_array[m], this);
-Gary-
Similar Threads
-
Exception in thread "main" java.lang Exception In InitializerError
By kenzo2009 in forum New To JavaReplies: 4Last Post: 10-25-2010, 07:42 PM -
Sending J2ME application by blue tooth (by J2ME application). Very URGENT!!!
By maruffaiz in forum CLDC and MIDPReplies: 0Last Post: 04-22-2009, 01:30 PM -
J2me
By Renjini in forum CLDC and MIDPReplies: 1Last Post: 08-14-2008, 10:58 AM -
Trouble with factory method - unhandled exception type Exception
By desmond5 in forum New To JavaReplies: 1Last Post: 03-08-2008, 06:41 PM -
J2me
By kuttyniti@gmail.com in forum Sun Java Wireless ToolkitReplies: 0Last Post: 11-24-2007, 06:27 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks