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 6862237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:38:13+00:00 2026-05-27T02:38:13+00:00

I’m trying to populate a listviewactivity’s list with objects returned from an DB40 database,

  • 0

I’m trying to populate a listviewactivity’s list with objects returned from an DB40 database, but my app keeps crashing and I’m not entirely sure why.

It would help if I knew how to read LogCat and be able to go from what it says -.- I can get a rough understanding I just don’t know what exactly is going wrong.

public class AndrochieveActivity extends ListActivity { 
private List<Achievement> achieves;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    ObjectContainer db = Db4oEmbedded.openFile("achievements.db4o");

    try{
        achieves = db.query(Achievement.class);
    } finally {
        db.close();
    }

    setListAdapter(new ArrayAdapter<Achievement>(this, R.layout.achievelist, achieves) {
        @Override
        public View getView(int pos, View cView, ViewGroup parent) {
            View row = mInflater.inflate(R.layout.achievelist, null);

            TextView title = (TextView) row.findViewById(R.id.title);
            title.setText(getItem(pos).GetTitle());

            TextView desc = (TextView)row.findViewById(R.id.desc);
            desc.setText(getItem(pos).GetDescription());

            TextProgressBar prog = (TextProgressBar)row.findViewById(R.id.prog);
            prog.setProgress(0);
            prog.setMax(getItem(pos).GetMax());

            return row;
        }
    });


}

I’m not seeing anything that would inherently screw it up. Db4oEmbedded.openFile should create the file if it doesn’t exit, but I keep getting a bunch of file read errors in logcat, from what it looks like:

11-29 14:21:44.359: D/AndroidRuntime(19396): Shutting down VM
11-29 14:21:44.359: W/dalvikvm(19396): threadid=1: thread exiting with uncaught exception (group=0x4001d5a0)
11-29 14:21:44.389: E/AndroidRuntime(19396): FATAL EXCEPTION: main
11-29 14:21:44.389: E/AndroidRuntime(19396): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.megalon.androchieve/com.megalon.androchieve.AndrochieveActivity}: com.db4o.ext.Db4oIOException: /achievements.db4o (Read-only file system)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1849)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1870)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at android.app.ActivityThread.access$1500(ActivityThread.java:132)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1051)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at android.os.Handler.dispatchMessage(Handler.java:99)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at android.os.Looper.loop(Looper.java:150)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at android.app.ActivityThread.main(ActivityThread.java:4312)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at java.lang.reflect.Method.invokeNative(Native Method)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at java.lang.reflect.Method.invoke(Method.java:507)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at dalvik.system.NativeStart.main(Native Method)
11-29 14:21:44.389: E/AndroidRuntime(19396): Caused by: com.db4o.ext.Db4oIOException: /achievements.db4o (Read-only file system)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.db4o.io.RandomAccessFileFactory.newRandomAccessFile(RandomAccessFileFactory.java:26)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.db4o.io.FileStorage$FileBin.<init>(FileStorage.java:43)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.db4o.io.FileStorage.open(FileStorage.java:22)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.db4o.io.StorageDecorator.open(StorageDecorator.java:27)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.db4o.io.CachingStorage.open(CachingStorage.java:52)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.db4o.internal.IoAdaptedObjectContainer.openImpl(IoAdaptedObjectContainer.java:57)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.db4o.internal.ObjectContainerBase$1.run(ObjectContainerBase.java:140)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.db4o.foundation.DynamicVariable.with(DynamicVariable.java:54)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.db4o.foundation.Environments.runWith(Environments.java:28)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.db4o.internal.ObjectContainerBase.withEnvironment(ObjectContainerBase.java:161)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.db4o.internal.ObjectContainerBase.open(ObjectContainerBase.java:131)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.db4o.internal.IoAdaptedObjectContainer.<init>(IoAdaptedObjectContainer.java:35)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.db4o.internal.ObjectContainerFactory.openObjectContainer(ObjectContainerFactory.java:18)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.db4o.Db4oEmbedded.openFile(Db4oEmbedded.java:65)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.db4o.Db4oEmbedded.openFile(Db4oEmbedded.java:76)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.megalon.androchieve.AndrochieveActivity.onCreate(AndrochieveActivity.java:45)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1813)
11-29 14:21:44.389: E/AndroidRuntime(19396):    ... 11 more
11-29 14:21:44.389: E/AndroidRuntime(19396): Caused by: java.io.FileNotFoundException: /achievements.db4o (Read-only file system)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:232)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:132)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:173)
11-29 14:21:44.389: E/AndroidRuntime(19396):    at com.db4o.io.RandomAccessFileFactory.newRandomAccessFile(RandomAccessFileFactory.java:19)
11-29 14:21:44.389: E/AndroidRuntime(19396):    ... 28 more
11-29 14:21:44.419: D/dalvikvm(19396): GC_CONCURRENT freed 308K, 49% free 2900K/5639K, external 0K/0K, paused 2ms+3ms
11-29 14:21:46.310: D/Process(19396): killProcess, pid=19396
11-29 14:21:46.310: D/Process(19396): dalvik.system.VMStack.getThreadStackTrace(Native Method)
11-29 14:21:46.320: D/Process(19396): java.lang.Thread.getStackTrace(Thread.java:745)
11-29 14:21:46.320: D/Process(19396): android.os.Process.killProcess(Process.java:797)
11-29 14:21:46.320: D/Process(19396): com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:108)
11-29 14:21:46.320: D/Process(19396): java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:854)
  • 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-05-27T02:38:13+00:00Added an answer on May 27, 2026 at 2:38 am

    look at this code (for sqlite)

                String currentTimeString = new SimpleDateFormat(
                        "yyyy.MM.dd.'at'.hhaaa").format(new Date());
                Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
                File file = new File(Environment.getExternalStorageDirectory(),
                        currentTimeString + ".jpg");
                outputFileUri = Uri.fromFile(file);
                intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
                startActivityForResult(intent, TAKE_PICTURE);
    

    see how my new file statement gives the specific directory, you need to do this as well.
    also look here as it is exactly the same problem Getting Access denied trying to read a file in App_Data in a ASP.NET project – Any pointers?
    if none of this helps you need to post the code for Db4oEmbedded

    whooops didnt realize that post was asp.net o well if none of this works like i said post the code for that other class

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

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.