realm

Android Realm - Accessing Realm Object from Service

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a realm object that is created in my activity. I need to be able to access this object within a service that I created. However I'm getting the error when creating the Realm object within the service mRealm = Realm.getInstance(getApplicationContext()); java.lang.IllegalStateException: Realm access from incorrect thread. Realm objects can only be accessed on the thread they were created Now I understand this means that because the realm object was created on my activity, I cannot access it from a background thread. However, I'm not

apache tomcat 7.0.30 datasourcerealm javax.naming.NameNotFoundException: Name [jdbc/proto] is not bound in this Context. Unable to find [jdbc]

匿名 (未验证) 提交于 2019-12-03 02:24:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: let me describe the environment first: environment: - mac os x (java build 1.6.0_35-b10-428-11M3811) - apache tomcat 7.0.30 - mysql 5.5.27 - tomcat/lib --> mysql-connector-java-5.1.22-bin.jar i've implemented successfully a JDBCRealm and want to switch to a DataSourceRealm because it is recommended for production environments. i use form-based authentication. I did everything described here: http://tomcat.apache.org/tomcat-7.0-doc/realm-howto.html#DataSourceRealm and here: http://tomcat.apache.org/tomcat-7.0-doc/jndi-datasource-examples

Realm access from incorrect thread

匿名 (未验证) 提交于 2019-12-03 02:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an application with a LoginActivity , that when the user login correctly, I register to receive messages. And the LoginActivity jumps to MainActivity . The arriving messages are supposed to be stored in database (Realm), to recover from a Realm instance in Main. But when the message arrives It crash realm launching this errror: Exception in packet listener java.lang.IllegalStateException: Realm access from incorrect thread. Realm objects can only be accessed on the thread they were created. at io.realm.BaseRealm.checkIfValid(BaseRealm

how to implement filterable in RealmRecyclerViewAdapter

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using well RealmRecyclerViewAdapter. My problem is to implement a Filterable that not works. This is the code: private class AirportAdapter extends RealmRecyclerViewAdapter implements Filterable { Context context; OrderedRealmCollection listAirports; public AirportAdapter(Context activity, OrderedRealmCollection airports) { super(activity,airports, true); this.context = activity; this.listAirports = airports; } @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View view = LayoutInflater.from

Is there a realm browser for Linux?

匿名 (未验证) 提交于 2019-12-03 01:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I would like to browse a realm database using a browser. I'm a Linux user and I know the realm browser is only for MacOS. I also have knowledge about Stetho by Facebook and I read about this project https://github.com/uPhyca/stetho-realm too. However I don't want to add unnecessary libraries in my project and I install Google Chrome to browse a database, this is odd for me. So, do you know if there's a realm browser for Linux? Thanks in advance. 回答1: I am happy to say that my previous answer is now obsolete. Realm Studio ( https:/

NoClassDefFoundError: Failed resolution of: Lio/realm/internal/LinkView

匿名 (未验证) 提交于 2019-12-03 01:39:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using Realm. I installed Stetho-Realm to view realm data. This is what i have done. buildscript { ... repositories { google() jcenter() ... } dependencies { classpath 'com.android.tools.build:gradle:3.1.3' ... classpath "io.realm:realm-gradle-plugin:5.1.0" } } allprojects { repositories { google() jcenter() maven { url 'https://maven.google.com/' } maven { url 'https://github.com/uPhyca/stetho-realm/raw/master/maven-repo' } } } App gradle stetho:1.5.0 stetho_realm:2.1.0 multidex:1.0.3 multiDexEnabled true This is gradle code. apply

Realm migration not called

匿名 (未验证) 提交于 2019-12-03 01:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've added a value to a realm object (I've added dynamic var inspectorName = "" to the WeekReport object), and I'm trying to migrate the realm database to contain that value. I'm trying to call the migration block in func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) like this: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { print("HERE") Realm.Configuration

Android Realm + RxJava - Realm access from incorrect thread. Realm objects can only be accessed on the thread they were created

匿名 (未验证) 提交于 2019-12-03 01:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to implement RxJava + Realm + Retrofit + Repository Pattern Here's my local implementation: @Override public Observable<Page> search(@NonNull final String query) { return Realm.getDefaultInstance().where(Page.class) .equalTo("query", query) .findAll() .asObservable() .cast(Page.class); } Here's my remote implementation: @Override public Observable<Page> search(@NonNull String query) { return mWikiServices.search(query).map(new Func1<Result, Page>() { @Override public Page call(Result result) { final List<Page> pages = new

Realm - Realm.init(this) failed in onCreate?

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I put Realm.init(this) in the onCreate of my Application class. But it throws an exception while I'm calling Realm.getDefaultInstance() in the onCreate of my Activity. at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2511) at android.app.ActivityThread.-wrap11(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1360) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5480) at java

Realm Object returning nil (Swift)

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a custom polygon object so I can save map overlays to Realm. I'm able to create this objects successfully, but when I want to retrieve the var polygon object it returns nil. When I print the polygon object, it prints it out fine, with all the data. This is a sample of what it prints out. CustomPolygon { name = Polygon1; id = p1; polygon = Polygon { coordinates = RLMArray <0x7f928ef36230> ( [0] Coordinate { latitude = -36.914167; longitude = 174.904722; }, [1] Coordinate { latitude = -36.9325; longitude = 174.957222; }, . . . ); }; }