question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with Jackson and RxJava

See original GitHub issue

Goal

Use Realm and Jackson without RxJava dependency.

Actual Results

The Realm docs suggest to add empty Observable and Flowable classes but Realm checks the existence of io.reactivex.Flowable to determine if rx is available and crashes. Here is the relevant line.

java.lang.NoClassDefFoundError: Failed resolution of: Lio/reactivex/BackpressureStrategy;
at io.realm.rx.RealmObservableFactory.<clinit>(RealmObservableFactory.java:79)
at io.realm.RealmConfiguration$Builder.build(RealmConfiguration.java:806)
at io.realm.Realm.init(Realm.java:247)
...

Version of Realm and tooling

Realm version(s): 4.1.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

7reactions
Zhuindencommented, Oct 27, 2017

Well, we are getting there 😄

I guess the solution will be

package io.reactivex;

class Observable {
}

and

package io.reactivex;

class Flowable {
}

and

package io.reactivex;

enum BackpressureStrategy {
    LATEST;
}

And then it should work.

1reaction
mimoccccommented, Dec 29, 2017

Does not work : java.lang.IllegalAccessError: Illegal class access: ‘io.realm.rx.RealmObservableFactory’ attempting to access ‘io.reactivex.BackpressureStrategy’ (declaration of ‘io.realm.rx.RealmObservableFactory’ appears in /data/app/eu.mjdev.mediaplayer.debug-1/base.apk) at io.realm.rx.RealmObservableFactory.<clinit>(RealmObservableFactory.java:79) at io.realm.RealmConfiguration$Builder.build(RealmConfiguration.java:805) at io.realm.Realm.init(Realm.java:248) at eu.mjdev.mediaplayer.application.Application.onCreate(Application.java:16) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4586) at android.app.ActivityThread.access$1600(ActivityThread.java:154) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1378) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5296) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:707)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Retrofit2 + RxJava + Jackson fails silently - Stack Overflow
Retrofit's JacksonConverterFactory does NOT ignore unknown properties by default (in contrast to e.g. Feign's JacksonDecoder ). ... i'm having the same problem.
Read more >
RxJava and Error Handling - Baeldung
In this article, we'll take a look at how to handle exceptions and errors using RxJava. First, keep in mind that the Observable...
Read more >
Web on Reactive Stack - Spring
@ResponseBody supports reactive types, which means you can return Reactor or RxJava types and have the asynchronous values they produce rendered ...
Read more >
RX For Your Collins | Collinsradio
RX For Your Collins ... YOU TO A DOWNLOAD OF A COMPLETE MAGAZINE ISSUE. FOR THE LATER YEARS, ... Receiver Sensitivity theory and...
Read more >
RxJava - 2.0.0-rc-1 - Ratpack
A key feature of the RxJava integration is the implicit error handling. All observable sequences have an implicit default error handling strategy of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found