-
-
Notifications
You must be signed in to change notification settings - Fork 971
Open
Milestone
Description
Adding Spring Boot Dev Tools may cause breaking Class.isInstanceof(Object) method which is for example used by Micronaut introspection.
The Grails 3 template should either not contain the Spring Boot Dev Tools as a dependency
or
There should be a warning (ideally inside the build.gradle file directly) to remove the dependency if the problem with introspection or any similar issue appears.
Steps to Reproduce
- Generate a new Grails 4 project
- Add dependency to
micronaut-newrelichttps://github.com/agorapulse/micronaut-newrelic - Add dependency to
grails-consolehttps://plugins.grails.org/plugin/sheehan/console - Create
UserDigestInsightEventevent (see below) - Run the application
- Run the script in the Grails console
UserDigestInsightEvent
class UserDigestInsightEvent implements NewRelicInsightsEvent {
final String eventType = 'BarometerUserDigestEvent'
Long userId
String email
String status
}Test Script
ctx.newRelicInsightsService.createEvent(
new UserDigestInsightEvent(userId: 1, email: "test", status: "TEST")
)
Expected Behaviour
The code is executed without any errors and logs the event into the console.
Actual Behaviour
Micronaut exception is thrown:
java.lang.IllegalArgumentException: Invalid bean [agorapulse.newrelic.UserDigestInsightEvent@3c3edaa8] for type: class agorapulse.newrelic.UserDigestInsightEvent
io.micronaut.core.beans.AbstractBeanProperty.get(AbstractBeanProperty.java:111)
com.agorapulse.micronaut.newrelic.BeanIntrospectionEventPayloadExtractor.lambda$extractPayload$1(BeanIntrospectionEventPayloadExtractor.java:46)
java.util.Optional.map(Optional.java:215)
com.agorapulse.micronaut.newrelic.BeanIntrospectionEventPayloadExtractor.extractPayload(BeanIntrospectionEventPayloadExtractor.java:46)
com.agorapulse.micronaut.newrelic.AsyncNewRelicInsightsService.createEvent(AsyncNewRelicInsightsService.java:51)
io.micronaut.context.AbstractExecutableMethod.invoke(AbstractExecutableMethod.java:147)
io.micronaut.aop.chain.MethodInterceptorChain.proceed(MethodInterceptorChain.java:60)
io.micronaut.validation.ValidatingInterceptor.intercept(ValidatingInterceptor.java:123)
io.micronaut.aop.chain.MethodInterceptorChain.proceed(MethodInterceptorChain.java:69)
Script1.run(Script1.groovy:12)
Environment Information
- Operating System: Darwin 19.6.0
- Grails Version: 4.0.1
- Micronaut Version: 1.2.11
- JDK Version: Java(TM) SE Runtime Environment (build 1.8.0_212-b10)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status