6 Replies Latest reply on Feb 11, 2015 2:49 AM by mkouba

    3.0.0.Alpha4 breaks DeltaSpike 1.2.1

    juergen.zimmermann

      I'm using the latest snapshot of WildFly 9.2.0 and applied the patch for Weld (in the ZIP file I edited patch.xml and changed the WildFly version number to 9.0.0.Alpha2-SNAPSHOT). When I deploy my WAR which contains DeltaSpike I get the following stacktrace. Is this a failure of DeltaSpike (see hints below) or of Weld?

       

      ERROR [org.jboss.msc.service.fail] MSC000001: Failed to start service jboss.deployment.unit."shop.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."shop.war".WeldStartService: Failed to start service

      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)

      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: org.jboss.weld.exceptions.DeploymentException: WELD-001436: Normal scoped bean class org.apache.deltaspike.core.util.ExceptionUtils$ExceptionHelper is not proxyable because it has a private constructor [EnhancedAnnotatedConstructorImpl] private org.apache.deltaspike.core.util.ExceptionUtils$ExceptionHelper() - class org.apache.deltaspike.core.util.ExceptionUtils$ExceptionHelper.

      at org.jboss.weld.injection.producer.InterceptionModelInitializer.init(InterceptionModelInitializer.java:113)

      at org.jboss.weld.injection.producer.BeanInjectionTarget.buildInterceptionModel(BeanInjectionTarget.java:92)

      at org.jboss.weld.injection.producer.BeanInjectionTarget.initializeInterceptionModel(BeanInjectionTarget.java:87)

      at org.jboss.weld.injection.producer.BeanInjectionTarget.initializeAfterBeanDiscovery(BeanInjectionTarget.java:97)

      at org.jboss.weld.injection.producer.InjectionTargetInitializationContext.initialize(InjectionTargetInitializationContext.java:42)

      at org.jboss.weld.injection.producer.InjectionTargetService.initialize(InjectionTargetService.java:63)

      at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:429)

      at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:83)

      at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:95)

      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

      ... 3 more

       

      This is the relevant part of DeltaSpike's ExceptionUtil:

      @Typed()

      public abstract class ExceptionUtils

      {

          private ExceptionUtils()

          {

              // prevent instantiation

          }

       

      The inner class ExceptionUtils.ExceptionHelper is "private static" and has just 1 private method.

        • 1. Re: 3.0.0.Alpha4 breaks DeltaSpike 1.2.1
          juergen.zimmermann

          Weld Probe is causing the problem. When I change the context parameter (in web.xml) org.jboss.weld.development to false, then the issue is gone.

          • 2. Re: 3.0.0.Alpha4 breaks DeltaSpike 1.2.1
            mkouba

            Hi Juergen,

            thanks for reporting. This is a known issue. We have fixed the detection of unproxyable types in this commit (https://github.com/weld/core/pull/852, not merged in master yet). There is another workaround (aside from disabling the dev mode) - exclude the deltaspike types from monitoring via org.jboss.weld.probe.invocationMonitorExclude Weld configuration property. E.g. place a weld.properties file which contains a line org.jboss.weld.probe.invocationMonitorExclude=.*deltaspike.* in WEB-INF/classes.  However, this key only works for  3.0.0.Alpha4, in the next Alpha this property will have a slightly different key.

            • 3. Re: Re: 3.0.0.Alpha4 breaks DeltaSpike 1.2.1
              juergen.zimmermann

              I created weld.properties with this line because PicketLink classes also caused problems:
              org.jboss.weld.probe.invocationMonitorExclude = .*deltaspike.* .*picketlink.*

               

              But now I'm getting again a stacktrace because of DeltaSpike:
              ERROR [org.jboss.msc.service.fail] MSC000001: Failed to start service jboss.deployment.unit."shop.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."shop.war".WeldStartService: Failed to start service
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
              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: org.jboss.weld.exceptions.DeploymentException: WELD-001504: Intercepted bean method [EnhancedAnnotatedMethodImpl] public final org.apache.deltaspike.core.api.interpreter.BasePropertyExpressionInterpreter.evaluate(String) (intercepted by org.jboss.weld.probe.InvocationMonitor) cannot be declared final
              at org.jboss.weld.injection.producer.InterceptionModelInitializer.initInterceptor(InterceptionModelInitializer.java:196)
              at org.jboss.weld.injection.producer.InterceptionModelInitializer.initCdiBusinessMethodInterceptor(InterceptionModelInitializer.java:188)
              at org.jboss.weld.injection.producer.InterceptionModelInitializer.initCdiBusinessMethodInterceptors(InterceptionModelInitializer.java:180)
              at org.jboss.weld.injection.producer.InterceptionModelInitializer.initCdiInterceptors(InterceptionModelInitializer.java:142)
              at org.jboss.weld.injection.producer.InterceptionModelInitializer.init(InterceptionModelInitializer.java:105)
              at org.jboss.weld.injection.producer.BeanInjectionTarget.buildInterceptionModel(BeanInjectionTarget.java:92)
              at org.jboss.weld.injection.producer.BeanInjectionTarget.initializeInterceptionModel(BeanInjectionTarget.java:87)
              at org.jboss.weld.injection.producer.BeanInjectionTarget.initializeAfterBeanDiscovery(BeanInjectionTarget.java:97)
              at org.jboss.weld.injection.producer.InjectionTargetInitializationContext.initialize(InjectionTargetInitializationContext.java:42)
              at org.jboss.weld.injection.producer.InjectionTargetService.initialize(InjectionTargetService.java:63)
              at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:429)
              at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:83)
              at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:95)
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
              ... 3 more

              • 4. Re: Re: 3.0.0.Alpha4 breaks DeltaSpike 1.2.1
                mkouba

                Try org.jboss.weld.probe.invocationMonitorExclude = .*deltaspike.*|.*picketlink.* instead. You can use http://www.ocpsoft.org/tutorials/regular-expressions/java-visual-regex-tester/ to test the regex.

                • 5. Re: Re: 3.0.0.Alpha4 breaks DeltaSpike 1.2.1
                  juergen.zimmermann

                  Thank you, Martin. Weld Probe is working fine!

                  • 6. Re: Re: 3.0.0.Alpha4 breaks DeltaSpike 1.2.1
                    mkouba

                    I'm glad it's working! Note that for the next release (Alpha5) this shouldn't be necessary. Also this property will have a slightly different key and there will be other "exclude" possibilities, e.g. to allow to skip JavaBean accessor methods.