Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-13678

Failure to deploy XWiki in WildFly 10.x

    XMLWordPrintable

Details

    • Unknown

    Description

      The error displayed is:

      19:12:10,134 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) WFLYWELD0003: Processing weld deployment xwiki.war
      19:12:10,254 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-1) HV000001: Hibernate Validator 5.2.4.Final
      19:12:10,849 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0004: Deploying JDBC-compliant driver class org.hsqldb.jdbc.JDBCDriver (version 2.3)
      19:12:10,911 INFO  [org.jboss.weld.Version] (MSC service thread 1-4) WELD-000900: 2.3.5 (Final)
      19:12:10,969 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) WFLYJCA0018: Started Driver service with driver-name = xwiki.war_org.hsqldb.jdbc.JDBCDriver_2_3
      
      
      
      19:12:11,626 WARN  [org.jboss.modules] (Weld Thread Pool -- 8) Failed to define class org.apache.hadoop.hdfs.web.resources.UserProvider in Module "deployment.xwiki.war:main" from Service Module Loader: java.lang.NoClassDefFoundError: Failed to link org/apache/hadoop/hdfs/web/resources/UserProvider (Module "deployment.xwiki.war:main" from Service Module Loader): com/sun/jersey/spi/inject/InjectableProvider
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:446)
      	at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:274)
      	at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:78)
      	at org.jboss.modules.Module.loadModuleClass(Module.java:606)
      	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
      	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
      	at org.jboss.as.weld.WeldModuleResourceLoader.classForName(WeldModuleResourceLoader.java:68)
      	at org.jboss.weld.bootstrap.AnnotatedTypeLoader.loadClass(AnnotatedTypeLoader.java:65)
      	at org.jboss.weld.bootstrap.AnnotatedTypeLoader.loadAnnotatedType(AnnotatedTypeLoader.java:60)
      	at org.jboss.weld.bootstrap.FastAnnotatedTypeLoader.loadAnnotatedType(FastAnnotatedTypeLoader.java:96)
      	at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:98)
      	at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$1.doWork(ConcurrentBeanDeployer.java:65)
      	at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$1.doWork(ConcurrentBeanDeployer.java:62)
      	at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
      	at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	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)
      	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      
      19:12:11,628 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 8) WELD-000119: Not generating any bean definitions from org.apache.hadoop.hdfs.web.resources.UserProvider because of underlying class loading error: Type Failed to link org.apache.hadoop.hdfs.web.resources.UserProvider (Module "deployment.xwiki.war:main" from Service Module Loader): com.sun.jersey.spi.inject.InjectableProvider not found.  If this is unexpected, enable DEBUG logging to see the full error.
      19:12:12,023 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 9) WELD-001125: Illegal bean type interface javax.ws.rs.ext.MessageBodyWriter<javax.xml.bind.JAXBElement<?>> ignored on [EnhancedAnnotatedTypeImpl] public @ApplicationScoped @Provider @Produces @Consumes class org.restlet.ext.jaxrs.internal.provider.JaxbElementProvider
      19:12:12,024 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 9) WELD-001125: Illegal bean type class org.restlet.ext.jaxrs.internal.provider.AbstractProvider<javax.xml.bind.JAXBElement<?>> ignored on [EnhancedAnnotatedTypeImpl] public @ApplicationScoped @Provider @Produces @Consumes class org.restlet.ext.jaxrs.internal.provider.JaxbElementProvider
      19:12:12,024 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 9) WELD-001125: Illegal bean type interface javax.ws.rs.ext.MessageBodyReader<javax.xml.bind.JAXBElement<?>> ignored on [EnhancedAnnotatedTypeImpl] public @ApplicationScoped @Provider @Produces @Consumes class org.restlet.ext.jaxrs.internal.provider.JaxbElementProvider
      19:12:12,024 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 9) WELD-001125: Illegal bean type org.restlet.ext.jaxrs.internal.provider.AbstractJaxbProvider<javax.xml.bind.JAXBElement<?>> ignored on [EnhancedAnnotatedTypeImpl] public @ApplicationScoped @Provider @Produces @Consumes class org.restlet.ext.jaxrs.internal.provider.JaxbElementProvider
      19:12:12,269 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."xwiki.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."xwiki.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.DefinitionException: WELD-000075: Normal scoped managed bean implementation class has a public field:  [EnhancedAnnotatedFieldImpl] public org.restlet.ext.jaxrs.internal.provider.JaxbProvider.contextResolver
      	at org.jboss.weld.bean.ManagedBean.checkBeanImplementation(ManagedBean.java:228)
      	at org.jboss.weld.bean.AbstractClassBean.internalInitialize(AbstractClassBean.java:74)
      	at org.jboss.weld.bean.ManagedBean.internalInitialize(ManagedBean.java:105)
      	at org.jboss.weld.bean.RIBean.initialize(RIBean.java:69)
      	at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$5.doWork(ConcurrentBeanDeployer.java:121)
      	at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$5.doWork(ConcurrentBeanDeployer.java:118)
      	at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
      	at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	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)
      	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      

      The issue is that WildFly supports CDI 1.1 implicit bean archives and thus parses the XWiki JARs and tries to deploy the beans it finds. However XWiki doesn't use CDI/Weld so we need to disable this, see https://docs.jboss.org/author/display/WFLY10/CDI+Reference

      Namely add a META-INF/jboss-all.xml file with:

      <jboss xmlns="urn:jboss:1.0">
          <weld xmlns="urn:jboss:weld:1.0" require-bean-descriptor="true"/>
      </jboss>
      

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: