6 Replies Latest reply on Apr 26, 2016 12:28 PM by robert.pepersack

    RuntimeException Building WildFly 9.0.2 Final

    robert.pepersack

      Hello all,

       

      I'm trying to downgrade JSF in WildFly 9.0.2 from 2.2 to 2.1.3.  I'm using Windows 7, apache-maven-3.2.3, and JDK 1.8.0_71.  I followed the instructions here Steps to add any new JSF implementation or version to WildFly and downloaded WildFly from here Release 9.0.2.Final · wildfly/wildfly · GitHub

       

      The sub-projects build successfully up through "Full Feature Pack" and the build fails on the "Build" sub-project with this exception when I build using the -e parameter:

       

      [ERROR] Failed to execute goal org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.0.0.Final:build (server-provisioning) on project wildfly-build: Execution server-provisioning of goal org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.0.0.Final:build failed: java.lang.RuntimeException: java.lang.RuntimeException: Failed to process feature pack C:\bit9prog\dev\wildfly-9.0.2.Final.src\wildfly-9.0.2.Final\feature-pack\target\wildfly-9.0.2.Final.zip modules: Could not extract resources from org.apache.cxf:cxf-rt-transports-http-hc: error in opening zip file -> [Help 1]

      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.0.0.Final:build (server-provisioning) on project wildfly-build: Execution server-provisioning of goal org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.0.0.Final:build failed: java.lang.RuntimeException: java.lang.RuntimeException: Failed to process feature pack C:\bit9prog\dev\wildfly-9.0.2.Final.src\wildfly-9.0.2.Final\feature-pack\target\wildfly-9.0.2.Final.zip modules

              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)

              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)

              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)

              at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)

              at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)

              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)

              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)

              at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)

              at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)

              at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)

              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:497)

              at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)

              at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)

              at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)

              at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution server-provisioning of goal org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.0.0.Final:build failed: java.lang.Runtim

      eException: java.lang.RuntimeException: Failed to process feature pack C:\bit9prog\dev\wildfly-9.0.2.Final.src\wildfly-9.0.2.Final\feature-pack\target\wildfly-9.0.2.Final.zip modules

              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)

              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)

              ... 19 more

      Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: Failed to process feature pack C:\bit9prog\dev\wildfly-9.0.2.Final.src\wildfly-9.0.2.Final\feature-pack\t

      arget\wildfly-9.0.2.Final.zip modules

              at org.wildfly.build.plugin.ServerProvisioningMojo.execute(ServerProvisioningMojo.java:124)

              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)

              ... 20 more

      Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Failed to process feature pack C:\bit9prog\dev\wildfly-9.0.2.Final.src\wildfly-9.0.2.Final\feature-pack\target\wildfly-9.0.2.Final.zi

      p modules

              at org.wildfly.build.provisioning.ServerProvisioner.build(ServerProvisioner.java:116)

              at org.wildfly.build.plugin.ServerProvisioningMojo.execute(ServerProvisioningMojo.java:122)

              ... 21 more

      Caused by: java.lang.RuntimeException: Failed to process feature pack C:\bit9prog\dev\wildfly-9.0.2.Final.src\wildfly-9.0.2.Final\feature-pack\target\wildfly-9.0.2.Final.zip modules

              at org.wildfly.build.provisioning.ServerProvisioner.processFeaturePackModules(ServerProvisioner.java:274)

              at org.wildfly.build.provisioning.ServerProvisioner.processModules(ServerProvisioner.java:197)

              at org.wildfly.build.provisioning.ServerProvisioner.build(ServerProvisioner.java:106)

              ... 22 more

      Caused by: java.lang.RuntimeException: Could not extract resources from org.apache.cxf:cxf-rt-transports-http-hc

              at org.wildfly.build.provisioning.ServerProvisioner.processFeaturePackModules(ServerProvisioner.java:257)

              ... 24 more

      Caused by: java.util.zip.ZipException: error in opening zip file

              at java.util.zip.ZipFile.open(Native Method)

              at java.util.zip.ZipFile.<init>(ZipFile.java:219)

              at java.util.zip.ZipFile.<init>(ZipFile.java:149)

              at java.util.zip.ZipFile.<init>(ZipFile.java:163)

              at org.wildfly.build.util.ZipFileSubsystemInputStreamSources.addAllSubsystemFileSourcesFromZipFile(ZipFileSubsystemInputStreamSources.java:67)

              at org.wildfly.build.provisioning.ServerProvisioner.processFeaturePackModules(ServerProvisioner.java:237)

              ... 24 more

       

      I've tried building with build.bat and with these Maven commands:

      • mvn install
      • mvn clean install -Dmaven.test.skip=true
      • mvn clean install -Dmaven.test.skip=true -e
      • mvn clean install -Dmaven.test.skip=true -X

       

      Here is the debug output just before the exception:

       

      [INFO] --- wildfly-server-provisioning-maven-plugin:1.0.0.Final:build (server-provisioning) @ wildfly-build ---

      [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=47, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=29, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, ConflictResolver.conflictItemCount=47, DefaultDependencyCollector.collectTime=32, DefaultDependencyCollector.transformTime=0}

      [DEBUG] org.wildfly.build:wildfly-server-provisioning-maven-plugin:jar:1.0.0.Final:

      [DEBUG]    org.apache.maven:maven-model:jar:3.1.0:compile

      [DEBUG]       org.codehaus.plexus:plexus-utils:jar:3.0.10:compile

      [DEBUG]    org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.3:compile

      [DEBUG]    org.wildfly.build:wildfly-feature-pack-build-maven-plugin:jar:1.0.0.Final:compile

      [DEBUG]       org.wildfly.build:wildfly-server-provisioning:jar:1.0.0.Final:compile

      [DEBUG]          org.apache.maven:maven-aether-provider:jar:3.1.0:compile

      [DEBUG]             org.apache.maven:maven-model-builder:jar:3.1.0:compile

      [DEBUG]                org.codehaus.plexus:plexus-interpolation:jar:1.16:compile

      [DEBUG]             org.apache.maven:maven-repository-metadata:jar:3.1.0:compile

      [DEBUG]             org.eclipse.aether:aether-api:jar:1.0.0.v20140518:provided

      [DEBUG]             org.eclipse.aether:aether-spi:jar:1.0.0.v20140518:compile

      [DEBUG]             org.eclipse.aether:aether-util:jar:1.0.0.v20140518:compile

      [DEBUG]             org.eclipse.aether:aether-impl:jar:1.0.0.v20140518:compile

      [DEBUG]             org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.0.0.M2a:compile

      [DEBUG]                javax.enterprise:cdi-api:jar:1.0:compile

      [DEBUG]                   javax.annotation:jsr250-api:jar:1.0:compile

      [DEBUG]                   javax.inject:javax.inject:jar:1:compile

      [DEBUG]                com.google.guava:guava:jar:10.0.1:compile

      [DEBUG]                   com.google.code.findbugs:jsr305:jar:1.3.9:compile

      [DEBUG]                org.sonatype.sisu:sisu-guice:jar:no_aop:3.1.0:compile

      [DEBUG]                   aopalliance:aopalliance:jar:1.0:compile

      [DEBUG]                org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.0.0.M2a:compile

      [DEBUG]                   asm:asm:jar:3.3.1:compile

      [DEBUG]                org.codehaus.plexus:plexus-classworlds:jar:2.4:compile

      [DEBUG]             org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile

      [DEBUG]          org.jboss:jandex:jar:1.2.1.Final:compile

      [DEBUG]       org.jboss.logging:jboss-logging:jar:3.1.4.GA:compile

      [DEBUG]    org.jboss:staxmapper:jar:1.1.0.Final:compile

      [DEBUG] Created new class realm plugin>org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.0.0.Final

      [DEBUG] Importing foreign packages into class realm plugin>org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.0.0.Final

      [DEBUG]   Imported:  < project>org.wildfly:wildfly-parent:9.0.2.Final

      [DEBUG] Populating class realm plugin>org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.0.0.Final

      [DEBUG]   Included: org.wildfly.build:wildfly-server-provisioning-maven-plugin:jar:1.0.0.Final

      [DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.0.10

      [DEBUG]   Included: org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.3

      [DEBUG]   Included: org.wildfly.build:wildfly-feature-pack-build-maven-plugin:jar:1.0.0.Final

      [DEBUG]   Included: org.wildfly.build:wildfly-server-provisioning:jar:1.0.0.Final

      [DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.16

      [DEBUG]   Included: org.eclipse.aether:aether-util:jar:1.0.0.v20140518

      [DEBUG]   Included: javax.enterprise:cdi-api:jar:1.0

      [DEBUG]   Included: javax.annotation:jsr250-api:jar:1.0

      [DEBUG]   Included: javax.inject:javax.inject:jar:1

      [DEBUG]   Included: com.google.guava:guava:jar:10.0.1

      [DEBUG]   Included: com.google.code.findbugs:jsr305:jar:1.3.9

      [DEBUG]   Included: org.sonatype.sisu:sisu-guice:jar:no_aop:3.1.0

      [DEBUG]   Included: aopalliance:aopalliance:jar:1.0

      [DEBUG]   Included: org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.0.0.M2a

      [DEBUG]   Included: asm:asm:jar:3.3.1

      [DEBUG]   Included: org.codehaus.plexus:plexus-component-annotations:jar:1.5.5

      [DEBUG]   Included: org.jboss:jandex:jar:1.2.1.Final

      [DEBUG]   Included: org.jboss.logging:jboss-logging:jar:3.1.4.GA

      [DEBUG]   Included: org.jboss:staxmapper:jar:1.1.0.Final

      [DEBUG]   Excluded: org.apache.maven:maven-model:jar:3.1.0

      [DEBUG]   Excluded: org.apache.maven:maven-aether-provider:jar:3.1.0

      [DEBUG]   Excluded: org.apache.maven:maven-model-builder:jar:3.1.0

      [DEBUG]   Excluded: org.apache.maven:maven-repository-metadata:jar:3.1.0

      [DEBUG]   Excluded: org.eclipse.aether:aether-api:jar:1.0.0.v20140518

      [DEBUG]   Excluded: org.eclipse.aether:aether-spi:jar:1.0.0.v20140518

      [DEBUG]   Excluded: org.eclipse.aether:aether-impl:jar:1.0.0.v20140518

      [DEBUG]   Excluded: org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.0.0.M2a

      [DEBUG]   Excluded: org.codehaus.plexus:plexus-classworlds:jar:2.4

      [DEBUG] Configuring mojo org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.0.0.Final:build from plugin realm ClassRealm[plugin>org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.0.0.Final, parent: sun.misc.Launcher$AppClassLoader@70dea4e]

      [DEBUG] Configuring mojo 'org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.0.0.Final:build' with basic configurator -->

      [DEBUG]   (f) buildName = C:\wildfly-9.0.2.Final.release\wildfly-9.0.2.Final\build\target

      [DEBUG]   (f) configDir = C:\wildfly-9.0.2.Final.release\wildfly-9.0.2.Final\build

      [DEBUG]   (f) configFile = server-provisioning.xml

      [DEBUG]   (f) project = MavenProject: org.wildfly:wildfly-build:9.0.2.Final @ C:\wildfly-9.0.2.Final.release\wildfly-9.0.2.Final\build\pom.xml

      [DEBUG]   (f) remoteRepos = [jboss-public-repository-group (http://repository.jboss.org/nexus/content/groups/public/, releases+snapshots), central (https://repo.maven.apache.org/maven2, releases)]

      [DEBUG]   (f) repoSession = org.eclipse.aether.DefaultRepositorySystemSession@6647c2fc

      [DEBUG]   (f) serverName = wildfly-9.0.2.Final

      [DEBUG]   (f) systemPropertyVersionOverrides = false

      [DEBUG] -- end configuration --

       

      Can anyone help?

       

      Thanks.

        • 1. Re: RuntimeException Building WildFly 9.0.2 Final
          rhusar

          Hm, error opening zip file, kind of sounds like the file was not downloaded correctly? Maybe try deleting rm -rf ~/.m2/repository/org/apache/cxf/ and retry mvn install or better yet use the bat file to build: build.bat in project root directory.

          • 2. Re: RuntimeException Building WildFly 9.0.2 Final
            robert.pepersack

            I deleted /org/apache/cxf/, /org/apache/mina/, and /org/wildfly/ from my Maven repository.  It built successfully!  So I continued trying to downgrade JSF.  But, I get this error message after I start WildFly and try to connect to jboss-cli:

             

            The controller is not available at localhost:9990: java.net.ConnectException: WFLYPRT0053: Could not connect to http-remoting://localhost:9990. The connection failed: WFLYPRT0053: Could not connect to http-remoting://localhost:9990. The connection failed: Connection

            refused: no further information

             

            I have tried these commands in jboss-cli:

            • connect
            • connect localhost:9990
            • connect localhost:9990
            • connect mycomputername:9990
            • connect mycomputername:9999

             

            Thanks

            • 3. Re: RuntimeException Building WildFly 9.0.2 Final
              robert.pepersack

              I got jboss-cli to connect and I changed the default version of JSF to 2.1.3 with this command:  mvn -Djsf-version=2.1.3 -Pmojarra-2.1.3 clean assembly:single

               

              But, when I start WildFly, I get this exception:

               

              ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."fwa-sso-server-18.0.0-SNAPSHOT.war".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."my-webapp-1.0.0-SNAPSHOT.war".DEPENDENCIES: WFLYSRV0153: Failed to process phase DEPENDENCIES of deployment "my-webapp-1.0.0-SNAPSHOT.war"

                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:163)

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

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

                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.as.server.deployment.DeploymentUnitProcessingException: WFLYJSF0014: Default JSF implementation slot 'mojarra-2.1.3' is invalid

                at org.jboss.as.jsf.deployment.JSFDependencyProcessor.deploy(JSFDependencyProcessor.java:81)

                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156)

                ... 5 more

               

              This seems to indicate that my version number, 2.1.3, in my mvn command is incorrect.  I looked in Maven Central for the right version, but couldn't find it.  Can anyone tell me the right version number?

               

              Thanks.

              • 4. Re: RuntimeException Building WildFly 9.0.2 Final
                rhusar

                Look at that pom.xml, there is no such profile "-Pmojarra-2.1.3" but you should use "-Pmojarra-2.x" in conjunction with -Djsf-version=2.1.3. The wiki hasn't been updated since 2013 so I am not even sure if its up to date and whether it works for WF 9 (I assume it does).

                 

                Also it doesn't sound like you have completed steps 4 to 8. The maven command is not entered into the CLI but builds a module later deployed into WildFly.

                • 5. Re: RuntimeException Building WildFly 9.0.2 Final
                  robert.pepersack

                  I did follow steps 4 to 8.  I understand that some of the steps are in mvn and others are in jboss-cli.

                   

                  I tried this command in maven:

                  • mvn -Djsf-version=2.1.3 -Pmojarra-2.x clean assembly:single

                   

                  and I tried these commands in jboss-cli with the new .cli file:

                  • /subsystem=jsf/:write-attribute(name=default-jsf-impl-slot,value=mojarra-2.1.3)
                  • /subsystem=jsf/:write-attribute(name=default-jsf-impl-slot,value=mojarra-2.1.x)


                  I still get the same exception telling me that the version number is invalid.


                  I've looked in several pom.xml files for a mojarra profile, but can't find it.  Which pom.xml do you mean?

                  • 6. Re: RuntimeException Building WildFly 9.0.2 Final
                    robert.pepersack

                    I've gotten mojarra 2.1.3 to start when my application deploys:

                     

                    INFO  [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 79) Initializing Mojarra 2.1.3 (FCS 20110908) for context '/mycontext'

                     

                    But, I get this exception a few lines later in my log:

                     

                    FINE  [javax.enterprise.resource.webcontainer.jsf.application] (ServerService Thread Pool -- 79) java.lang.NoSuchMethodException: org.jboss.as.jsf.injection.JandexAnnotationProvider.<init>(javax.servlet.ServletContext, com.sun.faces.spi.AnnotationProvider): java.lang.NoSuchMethodException: org.jboss.as.jsf.injection.JandexAnnotationProvider.<init>(javax.servlet.ServletContext, com.sun.faces.spi.AnnotationProvider)

                     

                    Then I also get this exception:

                     

                    SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 79) Critical error during deployment: : com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null

                      at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:375)

                      at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)

                      at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)

                      at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:195)

                      at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)

                      at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)

                      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

                      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)

                    Caused by: java.lang.NullPointerException

                      at com.sun.faces.application.annotation.ComponentConfigHandler.collect(ComponentConfigHandler.java:94)

                      at com.sun.faces.application.annotation.AnnotationManager.applyConfigAnnotations(AnnotationManager.java:197)

                      at com.sun.faces.config.processor.AbstractConfigProcessor.processAnnotations(AbstractConfigProcessor.java:326)

                      at com.sun.faces.config.processor.ComponentConfigProcessor.process(ComponentConfigProcessor.java:99)

                      at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)

                      at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:340)

                      at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)

                      at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116)

                      at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)

                      at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:222)

                      at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:360)

                      ... 11 more

                     

                    Thanks.