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
> Task :run FAILED
09:12:58.946 [main] DEBUG i.m.c.beans.DefaultBeanIntrospector - Found BeanIntrospection for type: class io.micronaut.health.HeartbeatDiscoveryClientCondition
09:12:59.005 [main] DEBUG i.m.c.beans.DefaultBeanIntrospector - Found BeanIntrospection for type: class io.micronaut.health.HeartbeatDiscoveryClientCondition
09:12:59.006 [ForkJoinPool.commonPool-worker-2] DEBUG io.micronaut.core.reflect.ClassUtils - Attempting to dynamically load class io.methvin.watchservice.MacOSXListeningWatchService
09:12:59.008 [ForkJoinPool.commonPool-worker-2] DEBUG io.micronaut.core.reflect.ClassUtils - Class io.methvin.watchservice.MacOSXListeningWatchService is not present
09:12:59.009 [ForkJoinPool.commonPool-worker-2] DEBUG io.micronaut.core.reflect.ClassUtils - Attempting to dynamically load class io.methvin.watchservice.MacOSXListeningWatchService
09:12:59.009 [ForkJoinPool.commonPool-worker-2] DEBUG io.micronaut.core.reflect.ClassUtils - Class io.methvin.watchservice.MacOSXListeningWatchService is not present
09:12:59.082 [Thread-1] DEBUG i.m.c.beans.DefaultBeanIntrospector - Found BeanIntrospection for type: class io.micronaut.scheduling.io.watch.FileWatchCondition
09:12:59.235 [main] ERROR io.micronaut.runtime.Micronaut - Error starting Micronaut server: io.micronaut.configuration.metrics.binder.executor.ExecutorServiceMetricsBinder$1 cannot be cast to io.netty.channel.EventLoopGroup
java.lang.ClassCastException: io.micronaut.configuration.metrics.binder.executor.ExecutorServiceMetricsBinder$1 cannot be cast to io.netty.channel.EventLoopGroup
at io.micronaut.http.server.netty.NettyHttpServer.createWorkerEventLoopGroup(NettyHttpServer.java:480)
at io.micronaut.http.server.netty.NettyHttpServer.start(NettyHttpServer.java:271)
at io.micronaut.http.server.netty.NettyHttpServer.start(NettyHttpServer.java:96)
at io.micronaut.runtime.Micronaut.lambda$start$2(Micronaut.java:70)
at java.util.Optional.ifPresent(Optional.java:159)
at io.micronaut.runtime.Micronaut.start(Micronaut.java:68)
at io.micronaut.runtime.Micronaut.run(Micronaut.java:294)
at io.micronaut.runtime.Micronaut.run(Micronaut.java:280)
at example.micronaut.Application.main(Application.java:8)
FAILURE: Build failed with an exception.
This fix strips any previous instrumentations. I don't think that was intentional. As far as I can see here you should return the original bean (executorService) instead of the unwrapped netty bean (in ExecutionServiceMetricsBinder.onCreate):
if (unwrapped.getClass().getName().startsWith("io.netty")) {
return unwrapped; // this should be: return executionService;
}
With the current code, if we try to instrument a netty EventLoopGroup then we run into 2 failure scenarios:
the above code strips our own instrumentation if we implement InstrumentedExecutionService
re-introduce the original bug if we do not implement InstrumentedExecutionService as the special (and rather ugly) hack for io.netty package match fails.
Micronaut 2.0 doesn't work with Metrics.
Steps to Reproduce
git clone https://github.com/micronaut-graal-tests/micronaut-management-graal
cd micronaut-management-graal
./gradlew run
Expected Behaviour
The application should start.
Actual Behaviour
Environment Information
Example Application
https://github.com/micronaut-graal-tests/micronaut-management-graal
The text was updated successfully, but these errors were encountered: