BlackBerryForums.com : Your Number One BlackBerry Community
     

»Sponsored Links


BlackBerryApps.com Best Sellers



Reply
 
LinkBack Thread Tools
  (#1 (permalink)) Old
sn0wshrew Offline
Knows Where the Search Button Is
 
Posts: 24
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: Verizon
Default NoClassDefFoundError happens only on OS 5.0 - 11-03-2009, 11:11 AM

I have an application that ran flawlessly on OSes 4.2.1, 4.5, 4.6, and 4.7. Unfortunately, it is having a problem on OS 5.0 - it mostly works, but whenever the user tries to go to a particular screen, nothing happens in the UI and the BlackBerry's event log shows the following error:

NoClassDefFoundError

Can anyone think of a reason why the screen's class would not be found in OS 5.0 only? Or a suggestion for how I might work around this?

For reference, the application is compiled using RAPC on the command line, and is distributed using OTA deployment.
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
sn0wshrew Offline
Knows Where the Search Button Is
 
Posts: 24
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: Verizon
Default 11-03-2009, 11:12 AM

For reference, I believe something similar may be happening to BeeJive:
BeeJive on New OS - BlackBerry Forums at CrackBerry.com
   
Reply With Quote
  (#3 (permalink)) Old
Dougsg38p Online
CrackBerry Addict
 
Posts: 793
Join Date: Mar 2008
Location: Austin, TX
Model: 8320
PIN: N/A
Carrier: T-Mobile
Default 11-03-2009, 11:38 AM

You need to pull the event log from the device and get the full stack trace.

My guess is that the application uses a deprecated constructor which was removed in 5.0 (there are several).
   
Reply With Quote
  (#4 (permalink)) Old
sn0wshrew Offline
Knows Where the Search Button Is
 
Posts: 24
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: Verizon
Default 11-05-2009, 10:47 AM

Thanks for the suggestion, Dougsg38p! I did pull a stack trace. The odd thing is, it's definitely throwing the error when I try to instantiate *one of my own classes*. I have a particular Screen that, whenever I try to use it (in several different places in the app), my app bombs out with this NoClassDefFoundError. I added some logging to verify that the error is definitely happening when I try to instantiate this class, not before or after.

It's very odd to me that one of my own classes could "go missing" from an app that works as-is on OS 4.7 and earlier. I added some logging in the constructor for this class - the constructor is not even being called (and is not present in the stack trace).

Any ideas would be very helpful!
   
Reply With Quote
  (#5 (permalink)) Old
Dougsg38p Online
CrackBerry Addict
 
Posts: 793
Join Date: Mar 2008
Location: Austin, TX
Model: 8320
PIN: N/A
Carrier: T-Mobile
Default 11-05-2009, 11:22 AM

Perhaps you screen is throwing the exception because it is attempting to instantiate a text field using a constructor that no longer exists?

The only other suggestion is that you are missing a COD file?
   
Reply With Quote
  (#6 (permalink)) Old
sn0wshrew Offline
Knows Where the Search Button Is
 
Posts: 24
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: Verizon
Default 11-05-2009, 12:08 PM

Indeed - when I remove all the interesting contents of that screen, it runs fine (although of course it's empty) - no error occurs. I will have to try re-adding elements to the screen one by one until it breaks again, ugh!
   
Reply With Quote
  (#7 (permalink)) Old
sn0wshrew Offline
Knows Where the Search Button Is
 
Posts: 24
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: Verizon
Default 11-05-2009, 06:44 PM

For the record, in case it helps anyone else, here is the deprecated constructor that I was calling that throws this NoClassDefFoundError on OS 5.0:

TextField(String label, String value, int maxLength, long style)

I changed it to an EditField, and now everything works fine:

EditField(String label, String value, int maxLength, long style)

I wish that RAPC would catch this at compile time.
   
Reply With Quote
  (#8 (permalink)) Old
Dougsg38p Online
CrackBerry Addict
 
Posts: 793
Join Date: Mar 2008
Location: Austin, TX
Model: 8320
PIN: N/A
Carrier: T-Mobile
Default 11-05-2009, 07:46 PM

You are welcome.

   
Reply With Quote
  (#9 (permalink)) Old
sn0wshrew Offline
Knows Where the Search Button Is
 
Posts: 24
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: Verizon
Default 11-05-2009, 07:49 PM

Appreciate it!
   
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright © 2004-2009 BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.