Java Eclipse dissecting Java Exception

I would appreciate some help with figuring out what exactly this exception message is saying to me. I was able to using the debugger narrow down the problem to a particular line in code. However, I think more information to better figure out what the actual problem is in the code.

   public static List<ParsedNdefRecord> getRecords(NdefRecord[] records) 
    {
        List<ParsedNdefRecord> elements = new ArrayList<ParsedNdefRecord>();
        for (NdefRecord record : records) {
            if (UriRecord.isUri(record)) {
                elements.add(UriRecord.parse(record));
            } else if (TextRecord.isText(record)) {
                elements.add(TextRecord.parse(record));
            } else if (SmartPoster.isPoster(record)) {
                elements.add(SmartPoster.parse(record));
            }
        }
        return elements;
    }



09-10 13:47:38.207: D/dalvikvm(332): VFY: replacing opcode 0x71 at 0x000c
09-10 13:47:38.207: D/dalvikvm(332): VFY: dead code 0x000f-004f in Lcom/example/android/nfc/record/UriRecord;.parseWellKnown (Landroid/nfc/NdefRecord;)Lcom/example/android/nfc/record/UriRecord;
09-10 13:47:49.617: W/dalvikvm(332): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/example/android/nfc/record/UriRecord;
09-10 13:48:28.971: D/AndroidRuntime(332): Shutting down VM
09-10 13:48:28.971: W/dalvikvm(332): threadid=1: thread exiting with uncaught exception (group=0x40015560)
09-10 13:48:29.178: E/AndroidRuntime(332): FATAL EXCEPTION: main
09-10 13:48:29.178: E/AndroidRuntime(332): java.lang.ExceptionInInitializerError
09-10 13:48:29.178: E/AndroidRuntime(332):  at com.example.android.nfc.NdefMessageParser.getRecords(NdefMessageParser.java:48)
09-10 13:48:29.178: E/AndroidRuntime(332):  at com.example.android.nfc.NdefMessageParser.parse(NdefMessageParser.java:41)
09-10 13:48:29.178: E/AndroidRuntime(332):  at com.example.android.nfc.TagViewer.buildTagViews(TagViewer.java:105)
09-10 13:48:29.178: E/AndroidRuntime(332):  at com.example.android.nfc.TagViewer.resolveIntent(TagViewer.java:86)
09-10 13:48:29.178: E/AndroidRuntime(332):  at com.example.android.nfc.TagViewer.onCreate(TagViewer.java:59)
09-10 13:48:29.178: E/AndroidRuntime(332):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
09-10 13:48:29.178: E/AndroidRuntime(332):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
09-10 13:48:29.178: E/AndroidRuntime(332):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
09-10 13:48:29.178: E/AndroidRuntime(332):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
09-10 13:48:29.178: E/AndroidRuntime(332):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
09-10 13:48:29.178: E/AndroidRuntime(332):  at android.os.Handler.dispatchMessage(Handler.java:99)
09-10 13:48:29.178: E/AndroidRuntime(332):  at android.os.Looper.loop(Looper.java:123)
09-10 13:48:29.178: E/AndroidRuntime(332):  at android.app.ActivityThread.main(ActivityThread.java:3683)
09-10 13:48:29.178: E/AndroidRuntime(332):  at java.lang.reflect.Method.invokeNative(Native Method)
09-10 13:48:29.178: E/AndroidRuntime(332):  at java.lang.reflect.Method.invoke(Method.java:507)
09-10 13:48:29.178: E/AndroidRuntime(332):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
09-10 13:48:29.178: E/AndroidRuntime(332):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
09-10 13:48:29.178: E/AndroidRuntime(332):  at dalvik.system.NativeStart.main(Native Method)
09-10 13:48:29.178: E/AndroidRuntime(332): Caused by: java.lang.NoClassDefFoundError: com.google.common.collect.ImmutableBiMap
09-10 13:48:29.178: E/AndroidRuntime(332):  at com.example.android.nfc.record.UriRecord.<clinit>(UriRecord.java:51)
09-10 13:48:29.178: E/AndroidRuntime(332):  ... 18 more
09-10 13:48:39.069: I/Process(332): Sending signal. PID: 332 SIG: 9

Answers


 Caused by: java.lang.NoClassDefFoundError: com.google.common.collect.ImmutableBiMap

It seems you dont have valid guava libraries in runtime classpath. Make sure you have added them to lib folder.


Need Your Help

code for highlighting current page with CSS not working on IE

html css internet-explorer

the following code for highlighting current page works fine in FF but no luck with IE.

set SESSION variable when clicking an <a href>

php session post href

I have a php script which prints href links on the page like this:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.