Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8442973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:59:38+00:00 2026-06-10T08:59:38+00:00

when I use extends OrmLiteBaseActivity<Database> instead of extends Activity I get following errors in

  • 0

when I use extends OrmLiteBaseActivity<Database> instead of extends Activity
I get following errors in my logcat.

08-17 17:05:28.497: W/dalvikvm(8818): Unable to resolve superclass of Lcom/example/sample/MainActivity; (427)
08-17 17:05:28.537: W/dalvikvm(8818): Link of class 'Lcom/example/sample/MainActivity;' failed
08-17 17:05:28.537: D/AndroidRuntime(8818): Shutting down VM
08-17 17:05:28.568: W/dalvikvm(8818): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
08-17 17:05:28.608: E/AndroidRuntime(8818): FATAL EXCEPTION: main
08-17 17:05:28.608: E/AndroidRuntime(8818): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.sample/com.example.sample.MainActivity}: java.lang.ClassNotFoundException: com.example.sample.MainActivity
08-17 17:05:28.608: E/AndroidRuntime(8818):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)
08-17 17:05:28.608: E/AndroidRuntime(8818):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
08-17 17:05:28.608: E/AndroidRuntime(8818):     at android.app.ActivityThread.access$600(ActivityThread.java:123)
08-17 17:05:28.608: E/AndroidRuntime(8818):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
08-17 17:05:28.608: E/AndroidRuntime(8818):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-17 17:05:28.608: E/AndroidRuntime(8818):     at android.os.Looper.loop(Looper.java:137)
08-17 17:05:28.608: E/AndroidRuntime(8818):     at android.app.ActivityThread.main(ActivityThread.java:4424)
08-17 17:05:28.608: E/AndroidRuntime(8818):     at java.lang.reflect.Method.invokeNative(Native Method)
08-17 17:05:28.608: E/AndroidRuntime(8818):     at java.lang.reflect.Method.invoke(Method.java:511)
08-17 17:05:28.608: E/AndroidRuntime(8818):     at  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
08-17 17:05:28.608: E/AndroidRuntime(8818):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
08-17 17:05:28.608: E/AndroidRuntime(8818):     at dalvik.system.NativeStart.main(Native Method)
08-17 17:05:28.608: E/AndroidRuntime(8818): Caused by: java.lang.ClassNotFoundException: com.example.sample.MainActivity
08-17 17:05:28.608: E/AndroidRuntime(8818):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
08-17 17:05:28.608: E/AndroidRuntime(8818):     at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
08-17 17:05:28.608: E/AndroidRuntime(8818):     at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
08-17 17:05:28.608: E/AndroidRuntime(8818):     at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
08-17 17:05:28.608: E/AndroidRuntime(8818):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
08-17 17:05:28.608: E/AndroidRuntime(8818):     ... 11 more
08-17 17:05:28.678: I/dalvikvm(8818): threadid=3: reacting to signal 3
08-17 17:05:28.847: I/dalvikvm(8818): Wrote stack traces to '/data/anr/traces.txt'
08-17 17:05:29.177: I/dalvikvm(8818): threadid=3: reacting to signal 3
08-17 17:05:29.217: I/dalvikvm(8818): Wrote stack traces to '/data/anr/traces.txt'
08-17 17:05:29.397: I/dalvikvm(8818): threadid=3: reacting to signal 3
08-17 17:05:29.417: I/dalvikvm(8818): Wrote stack traces to '/data/anr/traces.txt'
08-17 17:05:30.738: I/Process(8818): Sending signal. PID: 8818 SIG: 9

but if I use activity i don’t get any error as such and app runs well
here is code for my main class

  public class MainActivity extends OrmLiteBaseActivity<Database> {
Button fromdatabase, fromsdcard;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    fromdatabase = (Button) findViewById(R.id.loadfromdatabase);
    fromsdcard = (Button) findViewById(R.id.loadfromsd);

    fromdatabase.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            Intent in = new Intent(MainActivity.this, ListViewer.class);
            startActivity(in);
        }
    });
    fromsdcard.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            Intent in = new Intent(MainActivity.this, ListViewer.class);
            startActivity(in);
        }
    });
}
  }

Database class

public class Database extends OrmLiteSqliteOpenHelper {

private static final String DATABASE_NAME = "imagetester";

private static final int DATABASE_VERSION = 1;

public Database(Context context) {
    super(context, DATABASE_NAME, null, DATABASE_VERSION);
}

@Override
public void onCreate(SQLiteDatabase db, ConnectionSource connectionSource) {
    try {
        Log.i(Database.class.getName(), "onCreate");
        TableUtils.createTable(connectionSource, image.class);

    } catch (SQLException e) {
        Log.e(Database.class.getName(), "Can't create database", e);
        throw new RuntimeException(e);
    }
    RuntimeExceptionDao<image, Integer> dao = getSimpleDataDao();
    for(int i=0;i<5;i++)
    {
    image simple = new image(i);
    dao.create(simple);
    }

}
private RuntimeExceptionDao<image, Integer> getSimpleDataDao() {
    return getRuntimeExceptionDao(image.class);
}

@Override
public void onUpgrade(SQLiteDatabase arg0, ConnectionSource arg1, int arg2,
        int arg3) {
    // TODO Auto-generated method stub

}
 }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:59:41+00:00Added an answer on June 10, 2026 at 8:59 am

    there was problem with external Jar
    creating folder named libs
    &
    copy and paste all needed jar files in that folder.
    worked!!!
    this link helped

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If use MongoRepository, You can have following code: @Repository public interface UserRepo extends MongoRepository<User,
Consider the following: package MyApp::CGI; use Moose; use MooseX::NonMoose; use Data::Dumper; extends 'CGI::Application'; BEGIN
Can I use getCacheDir() only in a class that extends Activity? I would like
I have a backgorund thread that extends AsyncTask and which I use in activity
I have the following class: class DerivedMap extends Hashmap<String,Object> {} Which I use because
I have a actionSave class which extends AbstractAction.I use it for save button. somewhere
I'm trying to use mezzanine's overextends tag to both override and extends the existing
I've defined a class MarkerView which extends ImageView and to use this View, I
Im trying to use a onclick method. My class has.. Public class Homework extends
Here's my use case : public class User extends Model {} public class TableA

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.