Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClasscastException on Observable Command Call #987

Closed
ghost opened this issue Nov 19, 2015 · 5 comments
Closed

ClasscastException on Observable Command Call #987

ghost opened this issue Nov 19, 2015 · 5 comments

Comments

@ghost
Copy link

ghost commented Nov 19, 2015

When I try to call a method that is annotated with @HystrixCommand and returns a ObservableResult I get the following exception:
java.lang.ClassCastException: rx.subjects.ReplaySubject cannot be cast to com.netflix.hystrix.contrib.javanica.command.ObservableResult.

Hystrix/javanic version: 1.4.21
rxjava-Version: 1.0.14
aspectJ-Version: `1.8.7``
WeavingMode: LoadTime

@HystrixCommand
public ObservableResult<Data> get(@NotNull final String id) {
    return new ObservableResult<Data>() {
        @Override
        public CarportData invoke() {
           return new Data();
        }
    };
}
@dmgcodevil
Copy link
Contributor

@lukaseichler there is open issue for it.
PL is going to be merged soon. Collapser for observable commands is one thing is left to do

@ghost
Copy link
Author

ghost commented Nov 19, 2015

@dmgcodevil Thanks for the fast reply. This there a there a timeline for this?

I want to use javanic outside of Spring Cloud and it doesn't seem possible because of this issue and the ctw-jar not being available in maven central.

@dmgcodevil
Copy link
Contributor

@lukaseichler you don't need ctw-jar if you're not using compile time weaving. PL with fix for observable is going to be close by the end of the week I guess (note it will not include collapser feature for observable commands).

@dmgcodevil
Copy link
Contributor

@lukaseichler please use >= 1.4.25 version, class cast error should go away.

@mattrjacobs
Copy link
Contributor

This should be fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants