Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-12083

Deployment failure if an explicit bean archive contain a Pojo with @NotNull annotation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • None
    • 17.0.0.Alpha1
    • Bean Validation
    • None
    • Hide

      Build the attached playground.zip with Maven and put the resulting playground-jar.jar into $JBOSS_HOME/standalone/deployments.

      Then start the server and observe the issue.

      Afterwards, the @NotNull annotations could be removed from the PlaygroundToStringUtil class. Rebuild the application, copy it and restart the server. The jar deploys successfully...

      Show
      Build the attached playground.zip with Maven and put the resulting playground-jar.jar into $JBOSS_HOME/standalone/deployments . Then start the server and observe the issue. Afterwards, the @NotNull annotations could be removed from the PlaygroundToStringUtil class. Rebuild the application, copy it and restart the server. The jar deploys successfully...

    Description

      If an exlicit bean archive (META-INF contains an empty beans.xml) contain a Pojo without any Bean defining annotations and it has @NotNull annotations, the deployment of that module fails with:

      ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."playground-jar.jar".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."playground-jar.jar".WeldStartService: Failed to start service
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1730)
      	at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
      	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001436: Type org.jboss.playground.PlaygroundToStringUtil is not proxyable because it has a private constructor [EnhancedAnnotatedConstructorImpl] private org.jboss.playground.PlaygroundToStringUtil() - class org.jboss.playground.PlaygroundToStringUtil.
      	at org.jboss.weld.injection.producer.InterceptionModelInitializer.init(InterceptionModelInitializer.java:117)
      	at org.jboss.weld.injection.producer.BeanInjectionTarget.buildInterceptionModel(BeanInjectionTarget.java:94)
      	at org.jboss.weld.injection.producer.BeanInjectionTarget.initializeInterceptionModel(BeanInjectionTarget.java:89)
      	at org.jboss.weld.injection.producer.BeanInjectionTarget.initializeAfterBeanDiscovery(BeanInjectionTarget.java:99)
      	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:481)
      	at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:86)
      	at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:97)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
      	... 6 more
      

      Attachments

        Issue Links

          Activity

            People

              bstansbe@redhat.com Brian Stansberry
              rhn-support-jbaesner Joerg Baesner
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: