You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR org.grails.plugins.rx.web.RxResultSubscriber - Async Dispatch Error: No signature of method: grails.rx.web.helper.RxHelper.event() is applicable for argument types: (java.util.LinkedHashMap, grails.converters.JSON) values: [[id:0, comment:hello], {"type":"observable","num":0}]
Possible solutions: event(groovy.lang.Closure), event(groovy.lang.GString), event(groovy.lang.Writable), event(java.lang.CharSequence), event(java.util.Map), event(org.codehaus.groovy.runtime.GStringImpl)
groovy.lang.MissingMethodException: No signature of method: grails.rx.web.helper.RxHelper.event() is applicable for argument types: (java.util.LinkedHashMap, grails.converters.JSON) values: [[id:0, comment:hello], {"type":"observable","num":0}]
Possible solutions: event(groovy.lang.Closure), event(groovy.lang.GString), event(groovy.lang.Writable), event(java.lang.CharSequence), event(java.util.Map), event(org.codehaus.groovy.runtime.GStringImpl)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at rxjava.demo.TickTockController$_observable_closure5.doCall(TickTockController.groovy:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
at groovy.lang.Closure.call(Closure.java:414)
at rxjava.demo.TickTockController$_observable_closure5.call(TickTockController.groovy)
at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:54)
at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:124)
at com.sun.proxy.$Proxy98.apply(Unknown Source)
at io.reactivex.internal.operators.observable.ObservableMap$MapObserver.onNext(ObservableMap.java:59)
at io.reactivex.internal.operators.observable.ObservableDoOnEach$DoOnEachObserver.onNext(ObservableDoOnEach.java:103)
at io.reactivex.internal.observers.DisposableLambdaObserver.onNext(DisposableLambdaObserver.java:58)
at io.reactivex.internal.operators.observable.ObservableInterval$IntervalObserver.run(ObservableInterval.java:83)
at io.reactivex.internal.schedulers.ScheduledDirectPeriodicTask.run(ScheduledDirectPeriodicTask.java:39)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
The text was updated successfully, but these errors were encountered:
Tried using grails 3.2.9 and grails 3.3.0, both with versions of rxjava and rxjava2 of this plugin and worked fine. But it wasn't so simple to get all working.
I used the Grails Guides example. It's instructions are to use Grails 3.2.9 and RxJava version. But some refinements are necessary to use RxJava2, regardless of Grails version.
For instance, in RxJava2 the rx package was rename to io.reactivex, so to use RxJava2 of the plugin you should change from rx.Observer and rx.Observable to io.reactivex.Emitter and io.reactivex.Observable, and of course, do the appropriate changes in the code. Maybe one discussion here is if the RxJava2 version should use Observable or Flowable.
As for the example in this project (https://github.com/grails-plugins/grails-rxjava/tree/master/examples/server-sent-event-example), I think that it needs to be adjusted to work with Grails 3.3.0 and one of the reasons is that Grails Async now is a separeted project from core. The example uses 3.2.x which still uses the old async feature that was based on Reactor 2.x and was also part of Grails core.
grails 3.3.0 , java 8 , default url
ERROR org.grails.plugins.rx.web.RxResultSubscriber - Async Dispatch Error: No signature of method: grails.rx.web.helper.RxHelper.event() is applicable for argument types: (java.util.LinkedHashMap, grails.converters.JSON) values: [[id:0, comment:hello], {"type":"observable","num":0}]
Possible solutions: event(groovy.lang.Closure), event(groovy.lang.GString), event(groovy.lang.Writable), event(java.lang.CharSequence), event(java.util.Map), event(org.codehaus.groovy.runtime.GStringImpl)
groovy.lang.MissingMethodException: No signature of method: grails.rx.web.helper.RxHelper.event() is applicable for argument types: (java.util.LinkedHashMap, grails.converters.JSON) values: [[id:0, comment:hello], {"type":"observable","num":0}]
Possible solutions: event(groovy.lang.Closure), event(groovy.lang.GString), event(groovy.lang.Writable), event(java.lang.CharSequence), event(java.util.Map), event(org.codehaus.groovy.runtime.GStringImpl)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at rxjava.demo.TickTockController$_observable_closure5.doCall(TickTockController.groovy:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
at groovy.lang.Closure.call(Closure.java:414)
at rxjava.demo.TickTockController$_observable_closure5.call(TickTockController.groovy)
at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:54)
at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:124)
at com.sun.proxy.$Proxy98.apply(Unknown Source)
at io.reactivex.internal.operators.observable.ObservableMap$MapObserver.onNext(ObservableMap.java:59)
at io.reactivex.internal.operators.observable.ObservableDoOnEach$DoOnEachObserver.onNext(ObservableDoOnEach.java:103)
at io.reactivex.internal.observers.DisposableLambdaObserver.onNext(DisposableLambdaObserver.java:58)
at io.reactivex.internal.operators.observable.ObservableInterval$IntervalObserver.run(ObservableInterval.java:83)
at io.reactivex.internal.schedulers.ScheduledDirectPeriodicTask.run(ScheduledDirectPeriodicTask.java:39)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
The text was updated successfully, but these errors were encountered: