java.lang.NoClassDefFoundError: org.appcelerator.titanium.util.Log

Appcelerator JIRA | Shannon Hicks | 5 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    I'm using a custom C2DM module that calls Log.d() to send some stuff to the debug console. With 2.1.0GA everything works fine. With 2.2CI I see this stack dump: {code} W/System.err( 5628): java.lang.NoClassDefFoundError: org.appcelerator.titanium.util.Log W/System.err( 5628): at com.findlaw.c2dm.C2dmModule.registerC2dm(C2dmModule.java:57) W/System.err( 5628): at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) W/System.err( 5628): at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:140) W/System.err( 5628): at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:284) W/System.err( 5628): at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:166) W/System.err( 5628): at android.os.Handler.dispatchMessage(Handler.java:95) W/System.err( 5628): at android.os.Looper.loop(Looper.java:137) W/System.err( 5628): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:108) {code} Here's the first 57 lines of C2dmModule.java: {code} /** * This file was auto-generated by the Titanium Module SDK helper for Android * Appcelerator Titanium Mobile * Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved. * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. * */ package com.findlaw.c2dm; import org.appcelerator.kroll.KrollInvocation; import org.appcelerator.kroll.KrollDict; import org.appcelerator.kroll.KrollModule; import org.appcelerator.kroll.annotations.Kroll; import org.appcelerator.titanium.ITiAppInfo; import org.appcelerator.titanium.TiContext; import org.appcelerator.titanium.TiApplication; import org.appcelerator.titanium.util.Log; import java.util.HashMap; import org.appcelerator.kroll.KrollFunction; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import com.google.android.c2dm.C2DMessaging; import android.app.AlertDialog; import android.content.DialogInterface; @Kroll.module(name="C2dm", id="com.findlaw.c2dm") public class C2dmModule extends KrollModule { // Standard Debugging variables private static final String LCAT = "C2dmModule"; private static C2dmModule _THIS; private KrollFunction successCallback; private KrollFunction errorCallback; private KrollFunction messageCallback; public C2dmModule() { super(); _THIS = this; } // Methods @Kroll.method public void registerC2dm(String senderId, HashMap options) { Log.d(LCAT, "registerC2dm called"); {code}

    Appcelerator JIRA | 5 years ago | Shannon Hicks
    java.lang.NoClassDefFoundError: org.appcelerator.titanium.util.Log
  2. 0

    I'm using a custom C2DM module that calls Log.d() to send some stuff to the debug console. With 2.1.0GA everything works fine. With 2.2CI I see this stack dump: {code} W/System.err( 5628): java.lang.NoClassDefFoundError: org.appcelerator.titanium.util.Log W/System.err( 5628): at com.findlaw.c2dm.C2dmModule.registerC2dm(C2dmModule.java:57) W/System.err( 5628): at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) W/System.err( 5628): at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:140) W/System.err( 5628): at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:284) W/System.err( 5628): at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:166) W/System.err( 5628): at android.os.Handler.dispatchMessage(Handler.java:95) W/System.err( 5628): at android.os.Looper.loop(Looper.java:137) W/System.err( 5628): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:108) {code} Here's the first 57 lines of C2dmModule.java: {code} /** * This file was auto-generated by the Titanium Module SDK helper for Android * Appcelerator Titanium Mobile * Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved. * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. * */ package com.findlaw.c2dm; import org.appcelerator.kroll.KrollInvocation; import org.appcelerator.kroll.KrollDict; import org.appcelerator.kroll.KrollModule; import org.appcelerator.kroll.annotations.Kroll; import org.appcelerator.titanium.ITiAppInfo; import org.appcelerator.titanium.TiContext; import org.appcelerator.titanium.TiApplication; import org.appcelerator.titanium.util.Log; import java.util.HashMap; import org.appcelerator.kroll.KrollFunction; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import com.google.android.c2dm.C2DMessaging; import android.app.AlertDialog; import android.content.DialogInterface; @Kroll.module(name="C2dm", id="com.findlaw.c2dm") public class C2dmModule extends KrollModule { // Standard Debugging variables private static final String LCAT = "C2dmModule"; private static C2dmModule _THIS; private KrollFunction successCallback; private KrollFunction errorCallback; private KrollFunction messageCallback; public C2dmModule() { super(); _THIS = this; } // Methods @Kroll.method public void registerC2dm(String senderId, HashMap options) { Log.d(LCAT, "registerC2dm called"); {code}

    Appcelerator JIRA | 5 years ago | Shannon Hicks
    java.lang.NoClassDefFoundError: org.appcelerator.titanium.util.Log

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      org.appcelerator.titanium.util.Log

      at com.findlaw.c2dm.C2dmModule.registerC2dm()
    2. com.findlaw.c2dm
      C2dmModule.registerC2dm
      1. com.findlaw.c2dm.C2dmModule.registerC2dm(C2dmModule.java:57)
      1 frame
    3. org.appcelerator.kroll
      V8Runtime.handleMessage
      1. org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
      2. org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:140)
      3. org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:284)
      4. org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:166)
      4 frames
    4. Android Platform
      Looper.loop
      1. android.os.Handler.dispatchMessage(Handler.java:95)
      2. android.os.Looper.loop(Looper.java:137)
      2 frames
    5. org.appcelerator.kroll
      KrollRuntime$KrollRuntimeThread.run
      1. org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:108)
      1 frame