Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 11
Registered: ‎05-15-2012
My Device: Various
My Carrier: Various
Accepted Solution

Error starting Foo: Class 'net.rim.device.api.system.WLANListener' not found

I'm new to Blackberry development and have come across something I don't understand. I have an application that I have been working on it supports Blackberry OS 5 to 7.1 and works on them all apart from OS 6. For some strange reason I get:

Error starting Foo: Class 'net.rim.device.api.system.WLANListener' not found

on Blackberry OS 6 only! There is no OS specific code (as far as I know). This is after I have cleaned both code and Simulator (using Eclipse) and signed the code. Most of the time the application refuses to install on the OS 6 device - of course, it works perfectly fine on other OS versions. What could be causing this?

 

Debug in simulator is showing -

AM: Error starting Foo: Class 'net.rim.device.api.system.WLANListener' not found.

[0.0] VM:LINK Foo

[0.0] Class 'net.rim.device.api.system.WLANListener' not found.

[0.0] [0.0] Linker error: 'VerifyError' for Foo

[0.0] VM:CLRCv=0 [0.0]

 

I did try to implement something very simple that also used WLANListener and it appeared to work (or at least not error).


Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Error starting Foo: Class 'net.rim.device.api.system.WLANListener' not found

This is unusual.  I take it you are compiling the code in OS 5.0 and using it in the later level Simulators?

 

Just a quick question. Why are you using LANListener.  it doesn't actually give yo anything does it.  Yo ureally want to implement WLANConnectionListener instead. 

New Developer
Posts: 11
Registered: ‎05-15-2012
My Device: Various
My Carrier: Various

Re: Error starting Foo: Class 'net.rim.device.api.system.WLANListener' not found

Thanks for the reply. For OS 5, I compile the code with JRE System Library 5 in Eclipse, with the Eclipse plugin and it works on an OS 5 device or simulator fine. The same for OS 7 and OS 7.10 (using their respective JRE System Libraries). But when I compile with JRE System Library 6 - it gives me this error both in the simulator and in the device. I have also tried uninstalling and re-installing the Blackberry OS 6 SDK. It seems like I am linker errors, not sure how or why.

 

I am not actually implementing WLANListener - I am implementing net.rim.device.api.system.WLANConnectionListener.

 

I have also tried using BBSAK to make sure that the COD has been removed and that the new one is the correct OS 6 COD as opposed to the ALX file just in case.

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Error starting Foo: Class 'net.rim.device.api.system.WLANListener' not found

Sounds like a bug to me then.

 

Can you quickly make a very small application that demos the problem?  That will make it easy for others to test.  Also might be useful to note the Simulator and device, and associated OS levels, that demonstrate the problem. 

 

You might like to try the OS 5.0 compile in OS 6.0 Simulator to see if that gets you round the problem in the short term. 

New Developer
Posts: 11
Registered: ‎05-15-2012
My Device: Various
My Carrier: Various

Re: Error starting Foo: Class 'net.rim.device.api.system.WLANListener' not found

Once again thanks, I will create a small test application.

I've tried using the OS 5 COD in the OS 6 simulator - but it fails to start with "Error starting Foo: Class 'net.rim.device.api.math.Fixed32' not found.", but not a problem as the OS 7 version works just fine.
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Error starting Foo: Class 'net.rim.device.api.system.WLANListener' not found

So your OS 6.0 Simulator is missing that as well!  Sounds like a dodgy Simulator to me.  What is it and what level is it?

New Developer
Posts: 11
Registered: ‎05-15-2012
My Device: Various
My Carrier: Various

Re: Error starting Foo: Class 'net.rim.device.api.system.WLANListener' not found

I think you miss understood me - the errors that I get are consistent on the Simulator and Device. Torch 9800 (Simulator 3.0.0.118)
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Error starting Foo: Class 'net.rim.device.api.system.WLANListener' not found

I think I understand correctly.  I just wanted to know what Simulator you were having problems with so that I could download that Simulator and see if I can replicate it missing the

'net.rim.device.api.math.Fixed32'

 

Do you think that is a worthwhile thing to me to do?

New Developer
Posts: 11
Registered: ‎05-15-2012
My Device: Various
My Carrier: Various

Re: Error starting Foo: Class 'net.rim.device.api.system.WLANListener' not found

Nah - complete red herring. The next thing to do is for me (as soon as I get a chance) to create a little application that uses the same connection logic as the application that I am having problems with so that I can demo the problem as you suggested earlier. Good advice, I'll get onto it in a little while.
Highlighted
New Developer
Posts: 11
Registered: ‎05-15-2012
My Device: Various
My Carrier: Various

Re: Error starting Foo: Class 'net.rim.device.api.system.WLANListener' not found

OK, now I'm completely baffled.....Smiley Wink I have implemented a smaller app with the same connection logic as the other app - and it works!

 

The main app still doesn't work with OS 6 - ONLY. OS 5/7/7.10 all fine just not OS 6 with the same error on the device and simulator even when cleaned.

 

What on Earth could cause exactly the same code to be OS specific like that?