Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-3252

Unable to bundle camunda-webapp/engine-rest classes in CDI context on Wildfly 8

XMLWordPrintable

      Reproduce steps:

      Deploy the attached EAR to Wildfly 8.

      Problem:

      Won't start because CDI scans all bean archives and stumbles across a public-Field in AbstractProcessEngineRestServiceImpl in engine-rest.

      2014-12-19 17:30:25,466 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."test1.ear".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."test1.ear".WeldStartService: Failed to start service
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_67]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]
      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
      Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-000075: Normal scoped managed bean implementation class has a public field: [EnhancedAnnotatedFieldImpl] @Context public org.camunda.bpm.engine.rest.impl.DefaultProcessEngineRestServiceImpl.providers
      at org.jboss.weld.bean.ManagedBean.checkBeanImplementation(ManagedBean.java:218)
      at org.jboss.weld.bean.AbstractClassBean.internalInitialize(AbstractClassBean.java:74)
      at org.jboss.weld.bean.ManagedBean.internalInitialize(ManagedBean.java:96)
      at org.jboss.weld.bean.RIBean.initialize(RIBean.java:65)
      at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$5.doWork(ConcurrentBeanDeployer.java:114)
      at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$5.doWork(ConcurrentBeanDeployer.java:112)
      at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
      at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_67]
      ... 3 more

      Expected behavior:

      Works with CDI and embedded in an EAR.

      Workaround:

      Add to EAR - META-INF/jboss-all.xml with content:

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss xmlns="urn:jboss:1.0">
      <weld xmlns="urn:jboss:weld:1.0" require-bean-descriptor="true"/>
      </jboss>

      This disables implicit bean archive scanning and requires a beans.xml for each Bean archive to be valid.

        This is the controller panel for Smart Panels app

          1. test.ear
            15.01 MB
            Christian

              smirnov Roman Smirnov
              lipphardt Christian
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: