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

3.1.5 Compatibility #5

Closed
helgew opened this issue Jun 27, 2016 · 3 comments
Closed

3.1.5 Compatibility #5

helgew opened this issue Jun 27, 2016 · 3 comments
Assignees
Labels

Comments

@helgew
Copy link
Contributor

helgew commented Jun 27, 2016

The plugin does not work under grails 3.1.5 . After recompilation and declaring a runtime dependency on 'org.grails:grails-datastore-rest-client:5.0.0.RC2', the following error is produced when trying to send a message:
ERROR reactor.bus.EventBus - Could not write request: no suitable HttpMessageConverter found for request type [grails.converters.JSON] and content type [application/json;charset=UTF-8]; nested exception is reactor.core.support.Exceptions$ValueCause: Exception while signaling value: reactor.bus.Event.class : Event{id=null, headers=null, replyTo=null, key=user.new, data=example.User : 4} org.springframework.web.client.RestClientException: Could not write request: no suitable HttpMessageConverter found for request type [grails.converters.JSON] and content type [application/json;charset=UTF-8]; nested exception is reactor.core.support.Exceptions$ValueCause: Exception while signaling value: reactor.bus.Event.class : Event{id=null, headers=null, replyTo=null, key=user.new, data=example.User : 4} at org.springframework.web.client.RestTemplate$HttpEntityRequestCallback.doWithRequest(RestTemplate.java:810) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:594) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:565) at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:484) at grails.plugins.rest.client.RestBuilder.invokeRestTemplate(RestBuilder.groovy:310) at grails.plugins.rest.client.RestBuilder.doRequestInternal(RestBuilder.groovy:274) at grails.plugins.rest.client.RestBuilder.doRequestInternal(RestBuilder.groovy:262) at grails.plugins.rest.client.RestBuilder.post(RestBuilder.groovy:148) at grails.plugins.rest.client.RestBuilder$post.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133) at grails.plugin.slack.SlackService.send(SlackService.groovy:35) at grails.plugin.slack.SlackService$$FastClassBySpringCGLIB$$1a9b6f8a.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655) at grails.plugin.slack.SlackService$$EnhancerBySpringCGLIB$$55ee8b3b.send(<generated>) at grails.plugin.slack.SlackService$send.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at MySlackService.onNewUser(MySlackService.groovy:16) at MySlackService$$FastClassBySpringCGLIB$$41451afb.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655) at MySlackService$$EnhancerBySpringCGLIB$$94dca18c.onNewUser(<generated>) 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:497) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426) at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:216) at reactor.spring.context.config.ConsumerBeanAutoConfiguration$Invoker.apply(ConsumerBeanAutoConfiguration.java:351) at reactor.spring.context.config.ConsumerBeanAutoConfiguration$ServiceConsumer.accept(ConsumerBeanAutoConfiguration.java:297) at reactor.spring.context.config.ConsumerBeanAutoConfiguration$ServiceConsumer.accept(ConsumerBeanAutoConfiguration.java:284) at reactor.bus.EventBus$3.accept(EventBus.java:317) at reactor.bus.EventBus$3.accept(EventBus.java:310) at reactor.bus.routing.ConsumerFilteringRouter.route(ConsumerFilteringRouter.java:72) at reactor.bus.EventBus.accept(EventBus.java:591) at reactor.bus.EventBus.accept(EventBus.java:63) at reactor.core.dispatch.AbstractLifecycleDispatcher.route(AbstractLifecycleDispatcher.java:160) at reactor.core.dispatch.MultiThreadDispatcher$MultiThreadTask.run(MultiThreadDispatcher.java:74) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: reactor.core.support.Exceptions$ValueCause: Exception while signaling value: reactor.bus.Event.class : Event{id=null, headers=null, replyTo=null, key=user.new, data=example.User : 4} at reactor.core.support.Exceptions.addValueAsLastCause(Exceptions.java:127) at reactor.bus.routing.ConsumerFilteringRouter.route(ConsumerFilteringRouter.java:77) ... 7 common frames omitted

Commenting out line 33 in SlackService.groovy solved the issue.

@mathifonseca mathifonseca self-assigned this Jun 27, 2016
@mathifonseca
Copy link
Owner

Hi @helgew, I have to confess that I didn't test this plugin so much in Grails 3.x since I'm still using 2.x for my projects. I'll have a look at the bug and try to publish a new version soon.

@mathifonseca
Copy link
Owner

@helgew there seems to be a problem when converting a grails.converters.JSON, so I passed a good old String and fixed it. Please try version 3.0.1 and let me know if you run into any other issues.

@helgew
Copy link
Contributor Author

helgew commented Jul 2, 2016

Thank you!

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

No branches or pull requests

2 participants