0

I downloaded UnboundID LDAP SDK and imported it to my Eclipse Android project. It make use of existing LDAPClient supplied with the SDK.

Build was successful. However, when I attempt to launch the application, it gives below run-time error and application would not launch.

I am new to Android and Eclipse. Hence, any help or tips shall be appreciated.

If there are any details required, please let me know. I can add it.

11-20 19:36:38.395: I/dalvikvm(636): Could not find method com.unboundid.ldap.sdk.Filter.create, referenced from method people.finder.PeopleFinder.goSearch
11-20 19:36:38.395: W/dalvikvm(636): VFY: unable to resolve static method 3247: Lcom/unboundid/ldap/sdk/Filter;.create (Ljava/lang/String;)Lcom/unboundid/ldap/sdk/Filter;
11-20 19:36:38.395: D/dalvikvm(636): VFY: replacing opcode 0x71 at 0x00d4
11-20 19:36:38.395: W/dalvikvm(636): VFY: unable to resolve exception class 451 (Lcom/unboundid/ldap/sdk/LDAPException;)
11-20 19:36:38.395: W/dalvikvm(636): VFY: unable to find exception handler at addr 0x113
11-20 19:36:38.405: W/dalvikvm(636): VFY:  rejected people/finder/PeopleFinder;.goSearch (Landroid/view/View;)V
11-20 19:36:38.405: W/dalvikvm(636): VFY:  rejecting opcode 0x0d at 0x0113
11-20 19:36:38.405: W/dalvikvm(636): VFY:  rejected /people/finder/PeopleFinder;.goSearch (Landroid/view/View;)V
11-20 19:36:38.405: W/dalvikvm(636): Verifier rejected class people/finder/PeopleFinder;
11-20 19:36:38.405: W/dalvikvm(636): Class init failed in newInstance call (people/finder/PeopleFinder;)
11-20 19:36:38.405: D/AndroidRuntime(636): Shutting down VM
11-20 19:36:38.405: W/dalvikvm(636): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
11-20 19:36:38.415: E/AndroidRuntime(636): FATAL EXCEPTION: main
11-20 19:36:38.415: E/AndroidRuntime(636): java.lang.VerifyError: people/finder/PeopleFinder
11-20 19:36:38.415: E/AndroidRuntime(636):  at java.lang.Class.newInstanceImpl(Native Method)
11-20 19:36:38.415: E/AndroidRuntime(636):  at java.lang.Class.newInstance(Class.java:1319)
11-20 19:36:38.415: E/AndroidRuntime(636):  at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
11-20 19:36:38.415: E/AndroidRuntime(636):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
11-20 19:36:38.415: E/AndroidRuntime(636):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
11-20 19:36:38.415: E/AndroidRuntime(636):  at android.app.ActivityThread.access$600(ActivityThread.java:130)
11-20 19:36:38.415: E/AndroidRuntime(636):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
11-20 19:36:38.415: E/AndroidRuntime(636):  at android.os.Handler.dispatchMessage(Handler.java:99)
11-20 19:36:38.415: E/AndroidRuntime(636):  at android.os.Looper.loop(Looper.java:137)
11-20 19:36:38.415: E/AndroidRuntime(636):  at android.app.ActivityThread.main(ActivityThread.java:4745)
11-20 19:36:38.415: E/AndroidRuntime(636):  at java.lang.reflect.Method.invokeNative(Native Method)
11-20 19:36:38.415: E/AndroidRuntime(636):  at java.lang.reflect.Method.invoke(Method.java:511)
11-20 19:36:38.415: E/AndroidRuntime(636):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
11-20 19:36:38.415: E/AndroidRuntime(636):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
11-20 19:36:38.415: E/AndroidRuntime(636):  at dalvik.system.NativeStart.main(Native Method)
Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
user1829067
  • 143
  • 1
  • 1
  • 6

1 Answers1

0

You need to make sure that the jar is exported when building .apk file.

In project properties, go to Java Build Path > Order and Export : fill the checkbox corresponding to the LDAP sdk

sdabet
  • 18,360
  • 11
  • 89
  • 158
  • Thanks for your inputs. I checked the box, however, error still persist. Am I missing anything more? – user1829067 Nov 21 '12 at 07:54
  • I see a `java.lang.VerifyError: people/finder/PeopleFinder` in your trace. Maybe the target android version is more recent that the version of your test device ? – sdabet Nov 21 '12 at 08:08
  • Thanks. I do not have any targetSDKversion defined in my Android Manifest file and my test device emulator is on latest SDK version. – user1829067 Nov 21 '12 at 08:37
  • I made all the changes suggested by fiddler and did a restart of Eclipse (not sure if it has any influence) and it worked. It is able to recognize the jar methods and now stuck at other issue. Thanks fiddler for your help. – user1829067 Nov 21 '12 at 09:17