BlackBerry Forums Support Community
              

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

Please Login to Remove!

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.
Offline  
Old 11-03-2009, 11:12 AM   #2
sn0wshrew
Knows Where the Search Button Is
 
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: Verizon
Posts: 24
Default

For reference, I believe something similar may be happening to BeeJive:
BeeJive on New OS - BlackBerry Forums at CrackBerry.com
Offline  
Old 11-03-2009, 11:38 AM   #3
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Default

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).
Offline  
Old 11-05-2009, 10:47 AM   #4
sn0wshrew
Knows Where the Search Button Is
 
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: Verizon
Posts: 24
Default

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!
Offline  
Old 11-05-2009, 11:22 AM   #5
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Default

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?
Offline  
Old 11-05-2009, 12:08 PM   #6
sn0wshrew
Knows Where the Search Button Is
 
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: Verizon
Posts: 24
Default

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!
Offline  
Old 11-05-2009, 06:44 PM   #7
sn0wshrew
Knows Where the Search Button Is
 
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: Verizon
Posts: 24
Default

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.
Offline  
Old 11-05-2009, 07:46 PM   #8
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Default

You are welcome.

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

Appreciate it!
Offline  
Closed Thread



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Intel SE7520JR2  Server Board FOR XEON PROCESSOR W/ BOX picture

Intel SE7520JR2 Server Board FOR XEON PROCESSOR W/ BOX

$150.00



Intel SE7501WV2 SCSI Server Board FOR XEON PROCESSOR W/ BOX picture

Intel SE7501WV2 SCSI Server Board FOR XEON PROCESSOR W/ BOX

$150.00



Intel SE7500WV2 SCSI Server Board FOR XEON PROCESSOR W/ BOX picture

Intel SE7500WV2 SCSI Server Board FOR XEON PROCESSOR W/ BOX

$150.00



INTEL XEON E5 2520V2 E5 2620V2 SR1AN 2.10 GHZ Core Processor 3401A832 picture

INTEL XEON E5 2520V2 E5 2620V2 SR1AN 2.10 GHZ Core Processor 3401A832

$12.00



NETWORK INSTRUMENT GIGASTOR- 2U (2X) XEON E5-2630- 64 GB PC3 RAM picture

NETWORK INSTRUMENT GIGASTOR- 2U (2X) XEON E5-2630- 64 GB PC3 RAM

$293.99



Trenton 92-506313-XXX W/ 2x Intel Xeon Processors & 4GB DDR2 RAM picture

Trenton 92-506313-XXX W/ 2x Intel Xeon Processors & 4GB DDR2 RAM

$110.00







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.