Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-2595

WELD-001504 error in development mode

XMLWordPrintable

    • Workaround Exists
    • Hide

      Add the CDI bean to the org.jboss.weld.probe.invocationMonitor.excludeType list:

      <param-name>org.jboss.weld.probe.invocationMonitor.excludeType</param-name>
      <param-value>io.smallrye.health.SmallRyeHealthReporter</param-value>
      
      Show
      Add the CDI bean to the org.jboss.weld.probe.invocationMonitor.excludeType list: <param-name>org.jboss.weld.probe.invocationMonitor.excludeType</param-name> <param-value>io.smallrye.health.SmallRyeHealthReporter</param-value>

      SmallRyeHealthReporter is a CDI bean with a final method:

      https://github.com/smallrye/smallrye-health/blob/master/implementation/src/main/java/io/smallrye/health/SmallRyeHealthReporter.java#L101

      When Weld development mode is enabled, the deployment fails with the error:

      &amp#27;[0m&amp#27;[0m09:54:11,620 INFO  [org.jboss.weld.Event] (MSC service thread 1-6) WELD-000411: Observer method [BackedAnnotatedMethod] public org.jboss.weld.probe.ProbeExtension.processAnnotatedTypes(@Observes ProcessAnnotatedType<?>, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
      &amp#27;[0m&amp#27;[33m09:54:11,663 WARN  [org.jboss.weld.probe.Probe] (MSC service thread 1-6) PROBE-000008: 
      =====================================
       Weld Development Mode: ENABLED
       ------------------------------------
       Disable this mode in production - it may have negative impact on performance and/or represent a potential security risk
      =====================================
      &amp#27;[0m&amp#27;[0m09:54:11,671 INFO  [io.smallrye.metrics] (MSC service thread 1-6) MicroProfile: Metrics activated
      &amp#27;[0m&amp#27;[31m09:54:11,857 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."EarOpenTracingTestCase.ear".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."EarOpenTracingTestCase.ear".WeldStartService: Failed to start service
      	at org.jboss.msc@1.4.9.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1730)
      	at org.jboss.msc@1.4.9.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
      	at org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
      	at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      	at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001504: Intercepted bean method [EnhancedAnnotatedMethodImpl] @SafeVarargs private final transient io.smallrye.health.SmallRyeHealthReporter.getHealth(Instance<HealthCheck>[]) (intercepted by org.jboss.weld.probe.InvocationMonitor) cannot be declared final
      	at org.jboss.weld.core@3.1.2.Final//org.jboss.weld.injection.producer.InterceptionModelInitializer.initInterceptor(InterceptionModelInitializer.java:206)
      	at org.jboss.weld.core@3.1.2.Final//org.jboss.weld.injection.producer.InterceptionModelInitializer.initCdiBusinessMethodInterceptor(InterceptionModelInitializer.java:194)
      	at org.jboss.weld.core@3.1.2.Final//org.jboss.weld.injection.producer.InterceptionModelInitializer.initCdiBusinessMethodInterceptors(InterceptionModelInitializer.java:186)
      	at org.jboss.weld.core@3.1.2.Final//org.jboss.weld.injection.producer.InterceptionModelInitializer.initCdiInterceptors(InterceptionModelInitializer.java:148)
      	at org.jboss.weld.core@3.1.2.Final//org.jboss.weld.injection.producer.InterceptionModelInitializer.init(InterceptionModelInitializer.java:109)
      	at org.jboss.weld.core@3.1.2.Final//org.jboss.weld.injection.producer.BeanInjectionTarget.buildInterceptionModel(BeanInjectionTarget.java:94)
      	at org.jboss.weld.core@3.1.2.Final//org.jboss.weld.injection.producer.BeanInjectionTarget.initializeInterceptionModel(BeanInjectionTarget.java:89)
      	at org.jboss.weld.core@3.1.2.Final//org.jboss.weld.injection.producer.BeanInjectionTarget.initializeAfterBeanDiscovery(BeanInjectionTarget.java:99)
      	at org.jboss.weld.core@3.1.2.Final//org.jboss.weld.injection.producer.InjectionTargetInitializationContext.initialize(InjectionTargetInitializationContext.java:42)
      	at org.jboss.weld.core@3.1.2.Final//org.jboss.weld.injection.producer.InjectionTargetService.initialize(InjectionTargetService.java:63)
      	at org.jboss.weld.core@3.1.2.Final//org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:481)
      	at org.jboss.weld.core@3.1.2.Final//org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:86)
      	at org.jboss.as.weld@18.0.0.Beta1-SNAPSHOT//org.jboss.as.weld.WeldStartService.start(WeldStartService.java:97)
      	at org.jboss.msc@1.4.9.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
      	at org.jboss.msc@1.4.9.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
      	... 6 more
      

      When Weld development mode is switched off, the deployment is achieved.

              manovotn Matěj Novotný
              jmesnil1@redhat.com Jeff Mesnil
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: