Skip to content

java.lang.IllegalArgumentException: Argument condition "entityId" not met (L600) #859

@songchuanyang

Description

@songchuanyang

Issue Basics

  • ObjectBox version : 2.4.1
  • Reproducibility: always

Reproducing the bug

Description

First, I have an older version with Entity Id 1 in default.json under the objectbox-models folder.
When I updated the software this time, I did not use the entity with id 1, so I removed the @entity annotation.
This bug occurs when I run the new version of the app.

Code

 "entities": [
    {
      "id": "1:1713608252193266847",
      "lastPropertyId": "19:765062896145796056",
      "name": "Pay",
      "properties": [...],
      "relations": []
    },
    {
      "id": "2:4735472782432959828",
      "lastPropertyId": "24:179368840521155255",
      "name": "Employee",
      "properties": [...]
    },
   ...
  ]
 "entities": [
    {
      "id": "2:4735472782432959828",
      "lastPropertyId": "24:179368840521155255",
      "name": "Employee",
      "properties": [...]
    },
    ...
  ]

Logs & stackstraces

Caused by: java.lang.IllegalArgumentException: Argument condition "entityId" not met (L600)
        at io.objectbox.BoxStore.nativeCreate(Native Method)
        at io.objectbox.BoxStore.<init>(BoxStore.java:205)
        at io.objectbox.BoxStoreBuilder.build(BoxStoreBuilder.java:383)
        at com.sdby.lcyg.czb.core.db.ObjectBox.init(ObjectBox.java:17)
        at com.sdby.lcyg.czb.core.application.App.onCreate(App.java:71)
        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1190)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6606)
        at android.app.ActivityThread.access$1400(ActivityThread.java:229) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1892) 
        at android.os.Handler.dispatchMessage(Handler.java:107) 
        at android.os.Looper.loop(Looper.java:225) 
        at android.app.ActivityThread.main(ActivityThread.java:7586) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) 

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions