Realm file created with OSX 0.96.2 library can't be opened on Android

27 views
Skip to first unread message

Adam Block

unread,
Nov 5, 2015, 11:35:23 AM11/5/15
to Realm, Rom Srinivasan
Good morning.

I have created a Realm db file with an OSX command line script that incorporates the latest (0.96.2 AFAIK) Realm framework. We have not been able to open this file in our Android app built with the most recent Realm Java SDK. Can you advise what are the latest version of both Realm Cocoa and Realm Java that can mutually open a common Realm file?

Thanks!

/afb

JP Simard

unread,
Nov 10, 2015, 5:07:03 PM11/10/15
to Adam Block, realm...@googlegroups.com, r...@breezeworks.com
Both bindings used incompatible primary key formats up until ~2 days before you posted this when a fix was merged into Realm Java. It's very likely the issue you're running into was just fixed by this change.

Could you please confirm this assumption by trying to access the Realm file using Realm Java built from the master branch?

Thanks!
JP

--
JP Simard



--
You received this message because you are subscribed to the Google Groups "Realm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to realm-cocoa...@googlegroups.com.
To post to this group, send email to realm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/realm-cocoa/c32cda2c-9ab1-4840-9ab6-e6cd8f7fde5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



{#HS:136531357-2194#}

Adam Block

unread,
Nov 10, 2015, 8:44:16 PM11/10/15
to Realm, ad...@breezeworks.com, r...@breezeworks.com, he...@realm.io
JP, we just tried loading the Cocoa (0.96.2)-created Realm db file in our app using realm-java built from the master source. It did not work. We continue to get this message:

io.realm.exceptions.RealmMigrationNeededException: RealmMigration must be provided


Any ideas?

Thanks!

/afb

Kenneth Geisshirt

unread,
Nov 11, 2015, 3:56:27 AM11/11/15
to Adam Block, Realm, ad...@breezeworks.com, r...@breezeworks.com, he...@realm.io
Hey Adam,

It sounds like your Android data model classes differ from your iOS model classes. If not, try an empty migration - see https://github.com/realm/realm-java/blob/master/examples/migrationExample/src/main/java/io/realm/examples/realmmigrationexample/MigrationExampleActivity.java (see config1).

Best,
  Kenneth


--
You received this message because you are subscribed to the Google Groups "Realm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to realm-cocoa...@googlegroups.com.
To post to this group, send email to realm...@googlegroups.com.

Adam Block

unread,
Nov 11, 2015, 11:00:16 AM11/11/15
to Realm, adam....@gmail.com, ad...@breezeworks.com, r...@breezeworks.com, he...@realm.io
On Wednesday, November 11, 2015 at 12:56:27 AM UTC-8, Kenneth Geisshirt wrote:

It sounds like your Android data model classes differ from your iOS model classes. If not, try an empty migration - see https://github.com/realm/realm-java/blob/master/examples/migrationExample/src/main/java/io/realm/examples/realmmigrationexample/MigrationExampleActivity.java (see config1).

Kenneth, we have exactly one class/table and four attributes/fields which haven't changed in over a year. However, I will confirm that the class structure is the same between platforms.

Thanks.

/afb

Adam Block

unread,
Nov 14, 2015, 11:45:59 AM11/14/15
to Realm, adam....@gmail.com, ad...@breezeworks.com, r...@breezeworks.com, he...@realm.io

On Wednesday, November 11, 2015 at 12:56:27 AM UTC-8, Kenneth Geisshirt wrote:

It sounds like your Android data model classes differ from your iOS model classes. If not, try an empty migration - see https://github.com/realm/realm-java/blob/master/examples/migrationExample/src/main/java/io/realm/examples/realmmigrationexample/MigrationExampleActivity.java (see config1).



Yes, it turned out the Android classes had @required markers on all the fields. Once removed, the file opened fine. Thanks!
Reply all
Reply to author
Forward
0 new messages