• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins 1.625.2, wildfly-deployer-plugin 1.0.1, installed on turnkey Linux debian 14.0

      I installed this plugin using the Jenkins manage plugins section. My initial error was
      FATAL: Unable to initialize command context. because I had not installed wildfly-cli 8.2.1.Final
      This file was difficult find and also find the location for it to be installed. It would helpful if the instruction assisted this process. Eventually I found that the WEB-INF/lib dir is actually in two locations, one is in the /var/cache/jenkins/war dir and the others is in jenkins.war in /usr/share/jenkins. The .war must get expanded to /var/cache on regular basis so the files will need to be in both places.

      I then had succession of
      FATAL: org/wildfly/security/manager/WildFlySecurityManagerjava.lang.NoClassDefFoundError:
      Caused by: java.lang.ClassNotFoundException. for a missing class
      Every time I would find the required jar containing the missing class and install in the /var/cache and restart.

      Eventually I created a blank maven project with org.wildlfy wildlfy-cli 8.2.1.Final as the only dependency and created a war file and then copied all the jars (19 of them) in the war file to the Jenkins WEB-INF/lib dir. and restarted.

      Only after I did this did the the wildfly deployer pugin successfully deploy my war file to my wildfly server.

      I have now successfully deployed to both wildfly 8.1.0 and 10.0.0

      This issue may have only been with my installation of Jenkins as it was prebuilt Turnkey Linux virtual machine and I write this so that others who have similar issues may be able solve them easier than I did

      Graham

          [JENKINS-33504] FATAL: missing dependencies

          John Redwood added a comment -

          I'm getting the same issue:
          Jenkins : 1.651.2
          WildFly Deployer Plugin: 1.0.2
          OpenJDK Runtime Environment1.8.0_91-8u91-b14-0ubuntu4~15.10.1-b14

          I didn't go through your effort, i just ignored the plugin all together and added a post step of maven to run command wildfly:deploy with the appropriate login details for deploy access. and that works a treat.

          John Redwood added a comment - I'm getting the same issue: Jenkins : 1.651.2 WildFly Deployer Plugin: 1.0.2 OpenJDK Runtime Environment1.8.0_91-8u91-b14-0ubuntu4~15.10.1-b14 I didn't go through your effort, i just ignored the plugin all together and added a post step of maven to run command wildfly:deploy with the appropriate login details for deploy access. and that works a treat.

          Daniel Whatshisname added a comment - - edited

          I'm too stuck with FATAL: Unable to initialize command context. , although I have placed wildfly-cli 8.2.1.Final.jar in every place mentioned here.
          (I'm running Jenkins on x64 RedHat 7.0.1)
          Can't understand why it is not possible for the deployer to fire up...

          Daniel Whatshisname added a comment - - edited I'm too stuck with FATAL: Unable to initialize command context. , although I have placed wildfly-cli 8.2.1.Final.jar in every place mentioned here. (I'm running Jenkins on x64 RedHat 7.0.1) Can't understand why it is not possible for the deployer to fire up...

          ivan cho added a comment -

          Same problem here. Tried everything mentioned above, but no success yet.

          ivan cho added a comment - Same problem here. Tried everything mentioned above, but no success yet.

          Alvaro Donaire added a comment - if you added the next lib https://search.maven.org/remotecontent?filepath=org/wildfly/wildfly-cli/8.2.1.Final/wildfly-cli-8.2.1.Final-client.jar you can finished deploy fase

          Tomas Hermanek added a comment - - edited

          Hi,

          for quick fix "FATAL: Unable to initialize command context" on centos 7 you can run:

          cp /var/lib/jenkins/plugins/wildfly-deployer/WEB-INF/lib/* /var/cache/jenkins/war/WEB-INF/lib

          systemctl restart jenkins

          (copy plugins libs and restart)

          PS: After update you need run this fix again.

           

          Tom

          Tomas Hermanek added a comment - - edited Hi, for quick fix "FATAL: Unable to initialize command context" on centos 7 you can run: cp /var/lib/jenkins/plugins/wildfly-deployer/WEB-INF/lib/* /var/cache/jenkins/war/WEB-INF/lib systemctl restart jenkins (copy plugins libs and restart) PS: After update you need run this fix again.   Tom

          I was having the exact problem described in this ticket by graham_stewart, on a different platform than others.

          Windows Server 2012 R2 x64
          Jenkins 2.73.1
          Wildfly Deployer Plugin 1.0.2

          I tried the suggestion from hermanekt, which amounted to copying just 2 files:

          "C:\Program Files (x86)\Jenkins\plugins\wildfly-deployer\WEB-INF\lib\wildfly-cli-8.2.1.Final.jar"
          "C:\Program Files (x86)\Jenkins\plugins\wildfly-deployer\WEB-INF\lib\wildfly-deployer.jar"

          I put these both in

          "C:\Program Files (x86)\Jenkins\war\WEB-INF\lib"

          restarted Jenkins, and received a different error

          Deploying src\DataBackend-ear\target\DataBackend-ear-1.0-SNAPSHOT.ear ...
          FATAL: Error handling command: deploy C:\Program Files (x86)\Jenkins\workspace\DataBackend\src\DataBackend-ear\target\DataBackend-ear-1.0-SNAPSHOT.ear
          Build step 'Deploy WAR/EAR to WildFly' marked build as failure

          I believe that this is a different problem than the one reported here, and is likely due to a failure to surround the full path of the deployment in quotes. I haven't yet tried reinstalling Jenkins to a path that doesn't contain spaces.

          Michael Repucci added a comment - I was having the exact problem described in this ticket by graham_stewart , on a different platform than others. Windows Server 2012 R2 x64 Jenkins 2.73.1 Wildfly Deployer Plugin 1.0.2 I tried the suggestion from hermanekt , which amounted to copying just 2 files: "C:\Program Files (x86)\Jenkins\plugins\wildfly-deployer\WEB-INF\lib\wildfly-cli-8.2.1.Final.jar" "C:\Program Files (x86)\Jenkins\plugins\wildfly-deployer\WEB-INF\lib\wildfly-deployer.jar" I put these both in "C:\Program Files (x86)\Jenkins\war\WEB-INF\lib" restarted Jenkins, and received a different error Deploying src\DataBackend-ear\target\DataBackend-ear-1.0-SNAPSHOT.ear ... FATAL: Error handling command: deploy C:\Program Files (x86)\Jenkins\workspace\DataBackend\src\DataBackend-ear\target\DataBackend-ear-1.0-SNAPSHOT.ear Build step 'Deploy WAR/EAR to WildFly' marked build as failure I believe that this is a different problem than the one reported here, and is likely due to a failure to surround the full path of the deployment in quotes. I haven't yet tried reinstalling Jenkins to a path that doesn't contain spaces.

          Hi Michael,

           

          i know windows is different but.. Please check file if exist and system firewall or permission is ok?

           

          Tom

          Tomas Hermanek added a comment - Hi Michael,   i know windows is different but.. Please check file if exist and system firewall or permission is ok?   Tom

          Michael Repucci added a comment - - edited

          hermanekt the file does exist. I'm not certain which firewall/permissions are required by this plugin. But Jenkins and Wildfly are running on the same system, and I'm able to deploy using the Wildfly Maven Plugin. I simply setup my POM files to use the plugin, and added a new top-level Maven target of wildfly:redeploy to Jenkins.

          Michael Repucci added a comment - - edited hermanekt the file does exist. I'm not certain which firewall/permissions are required by this plugin. But Jenkins and Wildfly are running on the same system, and I'm able to deploy using the Wildfly Maven Plugin . I simply setup my POM files to use the plugin, and added a new top-level Maven target of wildfly:redeploy to Jenkins.

          GABRIEL COSTA added a comment -

          Just wish to thanks hermanekt for the solution, i did what he told and the problem stops. Thanks a lot m8.

          GABRIEL COSTA added a comment - Just wish to thanks hermanekt for the solution, i did what he told and the problem stops. Thanks a lot m8.

            ddilling Dan Dillingham
            graham_stewart Graham Stewart
            Votes:
            2 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: