2 Replies Latest reply on Aug 21, 2016 3:43 PM by mauriclaudio

    Wildfly-swarm fails to start: exception while loading modules

    mauriclaudio Newbie

      Hi there,

       

      I'm just trying out wildfly microprofile, and immediately I ran into troubles.

      I have a very simple POM file (by the way, I generated this via web utility on Wildfly Swarm website)

       

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      
      
        <modelVersion>4.0.0</modelVersion>
        <groupId>org.sample</groupId>
        <artifactId>microprofiletest</artifactId>
        <name>Wildfly Swarm Example</name>
        <version>1.0.0-SNAPSHOT</version>
        <packaging>war</packaging>
      
      
        <properties>
          <version.wildfly.swarm>2016.8.1</version.wildfly.swarm>
          <maven.compiler.source>1.8</maven.compiler.source>
          <maven.compiler.target>1.8</maven.compiler.target>
          <failOnMissingWebXml>false</failOnMissingWebXml>
          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        </properties>
      
      
        <dependencyManagement>
          <dependencies>
            <dependency>
              <groupId>org.wildfly.swarm</groupId>
              <artifactId>bom-all</artifactId>
              <version>${version.wildfly.swarm}</version>
              <scope>import</scope>
              <type>pom</type>
            </dependency>
          </dependencies>
        </dependencyManagement>
      
      
        <build>
          <finalName>microprofiletest</finalName>
          <plugins>
            <plugin>
              <groupId>org.wildfly.swarm</groupId>
              <artifactId>wildfly-swarm-plugin</artifactId>
              <version>${version.wildfly.swarm}</version>
              <executions>
                <execution>
                  <goals>
                    <goal>package</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </build>
      
      
        <dependencies>
        
          <!-- Java EE 7 dependency -->
          <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <version>7.0</version>
            <scope>provided</scope>
          </dependency>
          <!-- Wildfly Swarm Fractions -->
          <dependency>
            <groupId>org.wildfly.swarm</groupId>
            <artifactId>microprofile</artifactId>
          </dependency>
        </dependencies>
      </project>
      

       

      and I wrote a very simple entry point class:

       

      public class WFStarter {
        public static void main(String ... args) throws Exception {
             Swarm swarm  = new Swarm();
             swarm.start();
             swarm.deploy();
        }
      }
      

      When I run this simple code, both from Eclipse Ide and via Maven (mvn package, followed by java -jar xxx-fat.jar) I got this Exception:

       

      org.jboss.modules.ModuleLoadException: Error loading module from modules/org/apache/cxf/impl/main/module.xml
        at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:228)
        at org.wildfly.swarm.bootstrap.modules.BootstrapClasspathModuleFinder.findModule(BootstrapClasspathModuleFinder.java:58)
        at org.jboss.modules.ModuleLoader.findModule(ModuleLoader.java:439)
        at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:342)
        at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:289)
        at org.jboss.modules.Module.addExportedPaths(Module.java:1229)
        at org.jboss.modules.Module.addPaths(Module.java:1121)
        at org.jboss.modules.Module.link(Module.java:1448)
        at org.jboss.modules.Module.relinkIfNecessary(Module.java:1476)
        at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:225)
        at org.wildfly.swarm.container.runtime.xmlconfig.StandaloneXMLParserProducer.setupFactory(StandaloneXMLParserProducer.java:67)
        at java.lang.Iterable.forEach(Iterable.java:75)
        at org.wildfly.swarm.container.runtime.xmlconfig.StandaloneXMLParserProducer.setupFactories(StandaloneXMLParserProducer.java:42)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:83)
        at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:66)
        at org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:126)
        at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:171)
        at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
        at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
        at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:140)
        at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:692)
        at org.jboss.weld.injection.producer.AbstractMemberProducer.getReceiver(AbstractMemberProducer.java:123)
        at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:158)
        at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:180)
        at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
        at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
        at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:140)
        at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:692)
        at org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:792)
        at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92)
        at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:335)
        at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:346)
        at org.jboss.weld.injection.producer.ResourceInjector$1.proceed(ResourceInjector.java:69)
        at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)
        at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:71)
        at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:121)
        at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:159)
        at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
        at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
        at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:140)
        at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
        at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)
        at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:125)
        at org.wildfly.swarm.container.runtime.marshal.XMLMarshaller$Proxy$_$$_WeldClientProxy.marshal(Unknown Source)
        at org.wildfly.swarm.container.runtime.marshal.DMRMarshaller.marshal(DMRMarshaller.java:50)
        at org.wildfly.swarm.container.runtime.marshal.DMRMarshaller$Proxy$_$$_WeldClientProxy.marshal(Unknown Source)
        at org.wildfly.swarm.container.runtime.RuntimeServer.start(RuntimeServer.java:160)
        at org.wildfly.swarm.container.runtime.ServerBootstrapImpl.bootstrap(ServerBootstrapImpl.java:87)
        at org.wildfly.swarm.Swarm.start(Swarm.java:325)
        at org.wildfly.swarm.Swarm.start(Swarm.java:303)
        at it.liminf.microprofile.WFStarter.main(WFStarter.java:9)
      Caused by: org.jboss.modules.xml.XmlPullParserException: Failed to add artifact 'org.apache.cxf:cxf-rt-frontend-jaxws:3.1.4' (position: END_TAG seen ...\n    <artifact name="org.apache.cxf:cxf-rt-frontend-jaxws:3.1.4"/>... @13:66) caused by: java.util.zip.ZipException: error in opening zip file
        at org.jboss.modules.xml.ModuleXmlParser.parseArtifact(ModuleXmlParser.java:836)
        at org.jboss.modules.xml.ModuleXmlParser.parseResources(ModuleXmlParser.java:739)
        at org.jboss.modules.xml.ModuleXmlParser.parseModuleContents(ModuleXmlParser.java:535)
        at org.jboss.modules.xml.ModuleXmlParser.parseDocument(ModuleXmlParser.java:340)
        at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:226)
        ... 56 more
      Exception in thread "main" org.jboss.weld.exceptions.WeldException: WELD-000049: Unable to invoke public void org.wildfly.swarm.container.runtime.xmlconfig.StandaloneXMLParserProducer.setupFactories() on org.wildfly.swarm.container.runtime.xmlconfig.StandaloneXMLParserProducer@66b7550d
        at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:85)
        at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:66)
        at org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:126)
        at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:171)
        at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
        at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
        at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:140)
        at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:692)
        at org.jboss.weld.injection.producer.AbstractMemberProducer.getReceiver(AbstractMemberProducer.java:123)
        at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:158)
        at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:180)
        at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
        at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
        at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:140)
        at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:692)
        at org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:792)
        at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92)
        at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:335)
        at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:346)
        at org.jboss.weld.injection.producer.ResourceInjector$1.proceed(ResourceInjector.java:69)
        at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)
        at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:71)
        at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:121)
        at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:159)
        at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
        at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
        at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:140)
        at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
        at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)
        at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:125)
        at org.wildfly.swarm.container.runtime.marshal.XMLMarshaller$Proxy$_$$_WeldClientProxy.marshal(Unknown Source)
        at org.wildfly.swarm.container.runtime.marshal.DMRMarshaller.marshal(DMRMarshaller.java:50)
        at org.wildfly.swarm.container.runtime.marshal.DMRMarshaller$Proxy$_$$_WeldClientProxy.marshal(Unknown Source)
        at org.wildfly.swarm.container.runtime.RuntimeServer.start(RuntimeServer.java:160)
        at org.wildfly.swarm.container.runtime.ServerBootstrapImpl.bootstrap(ServerBootstrapImpl.java:87)
        at org.wildfly.swarm.Swarm.start(Swarm.java:325)
        at org.wildfly.swarm.Swarm.start(Swarm.java:303)
        at it.liminf.microprofile.WFStarter.main(WFStarter.java:9)
      Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:83)
        ... 39 more
      Caused by: java.lang.RuntimeException: org.jboss.modules.ModuleLoadException: Error loading module from modules/org/apache/cxf/impl/main/module.xml
        at org.wildfly.swarm.container.runtime.xmlconfig.StandaloneXMLParserProducer.setupFactory(StandaloneXMLParserProducer.java:99)
        at java.lang.Iterable.forEach(Iterable.java:75)
        at org.wildfly.swarm.container.runtime.xmlconfig.StandaloneXMLParserProducer.setupFactories(StandaloneXMLParserProducer.java:42)
        ... 44 more
      Caused by: org.jboss.modules.ModuleLoadException: Error loading module from modules/org/apache/cxf/impl/main/module.xml
        at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:228)
        at org.wildfly.swarm.bootstrap.modules.BootstrapClasspathModuleFinder.findModule(BootstrapClasspathModuleFinder.java:58)
        at org.jboss.modules.ModuleLoader.findModule(ModuleLoader.java:439)
        at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:342)
        at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:289)
        at org.jboss.modules.Module.addExportedPaths(Module.java:1229)
        at org.jboss.modules.Module.addPaths(Module.java:1121)
        at org.jboss.modules.Module.link(Module.java:1448)
        at org.jboss.modules.Module.relinkIfNecessary(Module.java:1476)
        at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:225)
        at org.wildfly.swarm.container.runtime.xmlconfig.StandaloneXMLParserProducer.setupFactory(StandaloneXMLParserProducer.java:67)
        ... 46 more
      Caused by: org.jboss.modules.xml.XmlPullParserException: Failed to add artifact 'org.apache.cxf:cxf-rt-frontend-jaxws:3.1.4' (position: END_TAG seen ...\n    <artifact name="org.apache.cxf:cxf-rt-frontend-jaxws:3.1.4"/>... @13:66) caused by: java.util.zip.ZipException: error in opening zip file
        at org.jboss.modules.xml.ModuleXmlParser.parseArtifact(ModuleXmlParser.java:836)
        at org.jboss.modules.xml.ModuleXmlParser.parseResources(ModuleXmlParser.java:739)
        at org.jboss.modules.xml.ModuleXmlParser.parseModuleContents(ModuleXmlParser.java:535)
        at org.jboss.modules.xml.ModuleXmlParser.parseDocument(ModuleXmlParser.java:340)
        at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:226)
        ... 56 more
      11:47:49,247 INFO  [org.jboss.weld.Bootstrap] (Thread-3) WELD-ENV-002001: Weld SE container STATIC_INSTANCE shut down
      Weld SE container STATIC_INSTANCE shut down by shutdown hook
      

       

      and I have absolutely no idea where may the culprit be... Any hints ?