BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 07-26-2012, 02:43 PM   #1
jwchuah
New Member
 
Join Date: Jun 2012
Model: 9300
PIN: N/A
Carrier: Rogers
Posts: 1
Default Blackberry Facebook SDK throwing exception: NoClassDefFoundError

Please Login to Remove!

I'm coding for a Blackberry app using the BlackBerry Java Plug-in for Eclipse v1.5.2 with JRE 7.1.0. I'm currently trying to integrate Facebook Connect into my app so that the users can log into our app through Facebook. The Blackberry Facebook SDK that I'm using is version 0.8.25 downloaded from here: sourceforge.net/projects/facebook-bb-sdk/ After getting the two jar files, FacebookBlackberrySDK-v0.8.25.jar and Log4B-v0.9.4.jar I first preverified them with eclipse successfully and included them into my project as libraries. The project compiled successfully but then I got a run time error: NoClassDefFoundError. After debugging, I found out that the exception was thrown at this line: fb = Facebook.getInstance(new ApplicationSettings(NEXT_URL, APPLICATION_ID, APPLICATION_SECRET, Facebook.Permissions.ALL_PERMISSIONS)); and I suspect that the program couldn't find the file Facebook.class below is my source code:

package com.nextmobile.ecourage.net;

import com.blackberry.facebook.ApplicationSettings; import com.blackberry.facebook.Facebook;

public class FacebookLogin
{
private final String NEXT_URL = "[the facebook url]"; private final String APPLICATION_ID = "153555168010272"; private final String APPLICATION_SECRET = "354f91a79c8fe5a8de9d65b55ef9aa1b"; private Facebook fb; private Facebook fb4u;

public FacebookLogin()
{
fb = Facebook.getInstance(new ApplicationSettings(NEXT_URL, APPLICATION_ID, APPLICATION_SECRET, Facebook.Permissions.ALL_PERMISSIONS));
fb4u = Facebook.getInstance(new ApplicationSettings(NEXT_URL, APPLICATION_ID, APPLICATION_SECRET, Facebook.Permissions.USER_DATA_PERMISSIONS));
fb4u.addPermission(Facebook.Permissions.OFFLINE_AC CESS);
}
}

p/s: the forum does not allow me to post any url

So I replaced those lines with only this line of code: new ApplicationSettings(NEXT_URL, APPLICATION_ID, APPLICATION_SECRET, Facebook.Permissions.ALL_PERMISSIONS); and it worked without giving any error. It's weird cause both Facebook.class and ApplicationSettings.class were in the same directory and the program could find ApplicationSettings.class but not Facebook.class.

both classes are under the package: com.blackberry.facebook

Does anyone have any idea on this? Thank you!
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

Similar Threads for: Blackberry Facebook SDK throwing exception: NoClassDefFoundError
Thread Thread Starter Forum Replies Last Post
Web Desktop 5 no application loader Walter_Str BES Admin Corner 2 08-27-2009 07:05 AM
Initialize problem with BES and GroupeWise dupere BES Admin Corner 2 07-02-2008 02:09 PM
BES 4.1 for Exchange - Now Available to TSupport Customers jibi BES Admin Corner 86 03-31-2006 12:06 PM
BES 4.0 SP2 for Exchange now available jibi BES Admin Corner 49 08-17-2005 08:51 AM


XEON E5-2680 V3 12-CORE 2.50GHZ PROCESSOR **USED GOOD** picture

XEON E5-2680 V3 12-CORE 2.50GHZ PROCESSOR **USED GOOD**

$12.99



Used INTEL Xeon W3690 Processor CPU 3.46GHz 12M 6.40GT/s picture

Used INTEL Xeon W3690 Processor CPU 3.46GHz 12M 6.40GT/s

$82.88



ASUS Z8PE-D18 Dual Xeon Server Motherboard 2x E5620 CPU 144GB RAM 12x12GB LGA136 picture

ASUS Z8PE-D18 Dual Xeon Server Motherboard 2x E5620 CPU 144GB RAM 12x12GB LGA136

$349.99



Honeywell Vindicator AE VSS Security Server (548-51010-01) - NEW / Intel Xeon picture

Honeywell Vindicator AE VSS Security Server (548-51010-01) - NEW / Intel Xeon

$2750.00



SR1A5 XEON E5-2690V2 10 CORE 3.00GHz 25M 8GT/s 130W PROCESSOR E5-2690V2 *vm picture

SR1A5 XEON E5-2690V2 10 CORE 3.00GHz 25M 8GT/s 130W PROCESSOR E5-2690V2 *vm

$74.47



1PCS Intel Xeon E5-2697V3 Genuine CPU 2.6 GHz 14-core 28-thread SR1XF picture

1PCS Intel Xeon E5-2697V3 Genuine CPU 2.6 GHz 14-core 28-thread SR1XF

$290.00







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