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
We would like to leverage a Spring Camel context in our grails services. We can do this just fine in a regular Grails service. However, as soon as a Grails service implements the Micronaut ApplicationEventListener, the server application fails to start up with the following error:
Caused by: io.micronaut.context.exceptions.NoSuchBeanException: No bean of type [com.xyz.SomeService] exists. Make sure the bean is not disabled by bean requirements (enable trace logging for 'io.micronaut.context.condition' to check) and if the bean is enabled then ensure the class is declared a bean and annotation processing is enabled (for Java and Kotlin the 'micronaut-inject-java' dependency should be configured as an annotation processor).
As soon as I remove the camel context declaration, server application starts up again. There seem to be 2 issues here:
Spring events are coming across to a Grails service even if it implements Spring's ApplicationListener interface. When looking into the code, it looks like Micronaut's ContextEventAdapter swallows the event because the Grails service doesn't get registered as a valid event listener for whatever reason. Again, this had all worked fine Grails 3.3.8.
If I create a plain vanilla listener for the application that extends ApplicationEventListener and does not look to utliize an injected Camel Context, it is able to listen to events. However, injecting a Camel context even with adding annotationProcessor("io.micronaut:micronaut-inject-java") into the build.gradle fails on injecting the Camel context. I have compile "org.apache.camel:camel-spring:${camelVersion}" in the build.gradle as well.
Appreciate any help on this.
Thanks
The text was updated successfully, but these errors were encountered:
We would like to leverage a Spring Camel context in our grails services. We can do this just fine in a regular Grails service. However, as soon as a Grails service implements the Micronaut ApplicationEventListener, the server application fails to start up with the following error:
As soon as I remove the camel context declaration, server application starts up again. There seem to be 2 issues here:
Appreciate any help on this.
Thanks
The text was updated successfully, but these errors were encountered: