objectbox / objectbox/objectbox-java
Caused by: java.lang.IllegalStateException: No DB catalog present
Open
Nobody has claimed this yet.
bug
- Dominant language
- Java
- Stars
- 4.6k
- Forks
- 311
- PR merge metrics
- No merged PRs in 30d
Description
Code:
val file = File(SDCardUtils.getSDCardPathByEnvironment() + "/CustomFile/dbFile")
if (!file.exists()) {
file.exists()
}
MyObjectBox.builder()
.androidContext(context.applicationContext)
.directory(file)
.build()
Error:
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3909)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4062)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2415)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:211)
at android.os.Looper.loop(Looper.java:300)
at android.app.ActivityThread.main(ActivityThread.java:8401)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
Caused by: java.lang.IllegalStateException: No DB catalog present
at io.objectbox.BoxStore.nativeCreateWithFlatOptions(Native Method)
at io.objectbox.BoxStore.(BoxStore.java:271)
at io.objectbox.BoxStoreBuilder.build(BoxStoreBuilder.java:591)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the MyObjectBox.builder() entry point and inspect the SDCardUtils.getSDCardPathByEnvironment() result, the directory passed to .directory(file), and the reported stack trace. Reproduce the Android startup failure if possible and document a verified cause and fix for the “No DB catalog present” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, kotlin
- Domain
- database, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100