RxJavaHook onCreate throwing --> java.lang.NoSuchMethodError: rx.plugins.RxJavaPlugins.getCompletableExecutionHook()Lrx/plugins/RxJavaCompletableExecutionHook;
See original GitHub issueHi,
I am trying to use the Completable.fromAction() method. But getting exception in the RxJavaHook.onCreate method. Below are the details -
Code Snippet -
Completable completable1 = Completable.fromAction(() -> {
try {
assignActionsToUser(actions, newUserId, start.getTime(), end.getTime(), "EXTTMS");
} catch (EUMException e) {
e.printStackTrace();
}
}).subscribeOn(Schedulers.io());_
private void assignActionsToUser(List<String> actions, String newUserId, Date startTime,
Date endTime, String lastUpdUserId) throws
externalUserManagementService.assignActionsToUser(actions, newUserId, startTime, endTime,
}
Maven dependency -
<dependency>
<groupId>io.reactivex</groupId>
<artifactId>rxjava</artifactId>
<version>1.3.6</version>
</dependency>
Exception -
java.lang.NoSuchMethodError: rx.plugins.RxJavaPlugins.getCompletableExecutionHook()Lrx/plugins/RxJavaCompletableExecutionHook;
/**
* Hook to call when a Completable is created.
* @param onSubscribe the original OnSubscribe logic
* @return the original or replacement OnSubscribe instance
*/
public static Completable.OnSubscribe onCreate(Completable.OnSubscribe onSubscribe) {
Func1<Completable.OnSubscribe, Completable.OnSubscribe> f = onCompletableCreate;
if (f != null) {
return f.call(onSubscribe); // exception thrown here
}
return onSubscribe;
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
FATAL EXCEPTION: main java.lang.NoClassDefFoundError ...
In my application after successfully login, loading data through retrofit library. from last two days i founded one major issue in my ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please create a fresh project with only RxJava as a dependency and a plain old Java
main(String[] args)
method with the basicCompletable.create
. If that works, your other project is likely not cleaned up properly after a version upgrade.@akarnokd - Apologize its a project issue. I was able to make it work with a new project. My bad. Thanks.