Deployments Share JAR Files in WildFly 10

Viewed 4903

I have a fully functioning web application packaged in a WAR format which I am trying to remove the *.jar files from /WEB-INF/lib and place into WildFly 10.

What I have done so far (unsuccessfully) and the resources I have referenced are below.

  1. Copy *.jar from /WEB-INF/lib to C:...\wildfly-10.0.0.Final\standalone\deployments
  2. Deployed the copied JAR files successfully.
  3. Created a /WEB-INF/jboss-deployment-structure.xml (found below) to reference the jars in the deployments directory

The above attempt was in response to Share util jar file with war deployments in Wildfly

I am also open to attempting to try other methods. I would think it would be possible to jar all the jars in my WEB-INF/lib into one jar and have WildFly 10 create an id for the jar. Then my war file would specify this id somewhere. The issue is I'm not quite sure how to google what I have just said with specific Wildfly/J2EE terminology. Referencing https://docs.jboss.org/author/display/WFLY8/Class+Loading+in+WildFly doesn't really give me specific examples to help me.

jboss-deployment-structure.xml

<jboss-deployment-structure>
  <!-- Make sub deployments isolated by default, so they cannot see each others classes without a Class-Path entry -->
  <ear-subdeployments-isolated>false</ear-subdeployments-isolated>
  <!-- This corresponds to the top level deployment. For a war this is the war's module, for an ear -->
  <!-- This is the top level ear module, which contains all the classes in the EAR's lib folder     -->
  <deployment>
     <!-- exclude-subsystem prevents a subsystems deployment unit processors running on a deployment -->
     <!-- which gives basically the same effect as removing the subsystem, but it only affects single deployment -->
    <!-- This allows you to define additional dependencies, it is the same as using the Dependencies: manifest attribute -->
    <dependencies>
        <module name="deployment.aesh-0.33.11.jar" />
        <module name="deployment.aether-api-1.13.1.jar" />
        <module name="deployment.aether-impl-1.13.1.jar" />
        <module name="deployment.aether-spi-1.13.1.jar" />
        <module name="deployment.aether-util-1.13.1.jar" />
        <module name="deployment.angular2-2.0.0-beta.7.jar" />
        <module name="deployment.antlr-2.7.7.jar" />
        <module name="deployment.antlr4-runtime-4.5.2-1.jar" />
        <module name="deployment.aopalliance-1.0.jar" />
        <module name="deployment.bcpkix-jdk15on-1.48.jar" />
        <module name="deployment.bcprov-jdk15on-1.48.jar" />
        <module name="deployment.bootstrap-3.3.6.jar" />
        <module name="deployment.cglib-nodep-2.1_3.jar" />
        <module name="deployment.checkstyle-6.16.1.jar" />
        <module name="deployment.commons-beanutils-1.9.2.jar" />
        <module name="deployment.commons-cli-1.3.1.jar" />
        <module name="deployment.commons-codec-1.10.jar" />
        <module name="deployment.commons-collections-3.2.1.jar" />
        <module name="deployment.commons-compress-1.5.jar" />
        <module name="deployment.commons-exec-1.3.jar" />
        <module name="deployment.commons-io-2.4.jar" />
        <module name="deployment.commons-lang3-3.4.jar" />
        <module name="deployment.commons-logging-1.2.jar" />
        <module name="deployment.dom4j-1.6.1.jar" />
        <module name="deployment.gson-2.3.1.jar" />
        <module name="deployment.guava-19.0.jar" />
        <module name="deployment.hibernate-commons-annotations-4.0.5.Final.jar" />
        <module name="deployment.hibernate-core-4.3.11.Final.jar" />
        <module name="deployment.hibernate-jpa-2.1-api-1.0.0.Final.jar" />
        <module name="deployment.httpclient-4.3.5.jar" />
        <module name="deployment.httpcore-4.3.2.jar" />
        <module name="deployment.jackson-core-asl-1.9.13.jar" />
        <module name="deployment.jackson-mapper-asl-1.9.13.jar" />
        <module name="deployment.jandex-1.1.0.Final.jar" />
        <module name="deployment.jansi-1.9.jar" />
        <module name="deployment.javassist-3.12.1.GA.jar" />
        <module name="deployment.javassist-3.18.1-GA.jar" />
        <module name="deployment.javax.servlet.jsp-api-2.3.1.jar" />
        <module name="deployment.javax.servlet-api-3.1.0.jar" />
        <module name="deployment.jboss-dmr-1.2.0.Final.jar" />
        <module name="deployment.jboss-logging-3.1.3.GA.jar" />
        <module name="deployment.jboss-logging-annotations-1.2.0.Beta1.jar" />
        <module name="deployment.jboss-marshalling-1.4.2.Final.jar" />
        <module name="deployment.jboss-marshalling-river-1.4.2.Final.jar" />
        <module name="deployment.jboss-remoting-4.0.3.Final.jar" />
        <module name="deployment.jboss-sasl-1.0.4.Final.jar" />
        <module name="deployment.jboss-threads-2.1.1.Final.jar" />
        <module name="deployment.jboss-transaction-api_1.2_spec-1.0.0.Final.jar" />
        <module name="deployment.jboss-vfs-3.2.5.Final.jar" />
        <module name="deployment.jcip-annotations-1.0.jar" />
        <module name="deployment.jcommander-1.48.jar" />
        <module name="deployment.jetty-rc-repacked-5.jar" />
        <module name="deployment.jetty-repacked-9.2.13.v20150730.jar" />
        <module name="deployment.jna-4.1.0.jar" />
        <module name="deployment.jna-platform-4.1.0.jar" />
        <module name="deployment.jquery-1.11.1.jar" />
        <module name="deployment.jstl-1.2.jar" />
        <module name="deployment.log4j-api-2.0.jar" />
        <module name="deployment.log4j-core-2.0.jar" />
        <module name="deployment.log4j-slf4j-impl-2.5.jar" />
        <module name="deployment.maven-aether-provider-3.0.5.jar" />
        <module name="deployment.maven-artifact-3.0.5.jar" />
        <module name="deployment.maven-core-3.0.5.jar" />
        <module name="deployment.maven-model-3.0.5.jar" />
        <module name="deployment.maven-model-builder-3.0.5.jar" />
        <module name="deployment.maven-plugin-annotations-3.2.jar" />
        <module name="deployment.maven-plugin-api-3.0.5.jar" />
        <module name="deployment.maven-repository-metadata-3.0.5.jar" />
        <module name="deployment.maven-settings-3.0.5.jar" />
        <module name="deployment.maven-settings-builder-3.0.5.jar" />
        <module name="deployment.mx4j-tools-3.0.1.jar" />
        <module name="deployment.mysql-connector-java-5.1.38.jar" />
        <module name="deployment.netty-3.5.7.Final.jar" />
        <module name="deployment.plexus-cipher-1.4.jar" />
        <module name="deployment.plexus-classworlds-2.4.jar" />
        <module name="deployment.plexus-component-annotations-1.5.5.jar" />
        <module name="deployment.plexus-interpolation-1.14.jar" />
        <module name="deployment.plexus-sec-dispatcher-1.3.jar" />
        <module name="deployment.plexus-utils-3.0.10.jar" />
        <module name="deployment.remoting-jmx-2.0.0.Final.jar" />
        <module name="deployment.selenium-api-2.53.0.jar" />
        <module name="deployment.selenium-chrome-driver-2.53.0.jar" />
        <module name="deployment.selenium-edge-driver-2.53.0.jar" />
        <module name="deployment.selenium-firefox-driver-2.53.0.jar" />
        <module name="deployment.selenium-ie-driver-2.53.0.jar" />
        <module name="deployment.selenium-java-2.53.0.jar" />
        <module name="deployment.selenium-leg-rc-2.53.0.jar" />
        <module name="deployment.selenium-remote-driver-2.53.0.jar" />
        <module name="deployment.selenium-safari-driver-2.53.0.jar" />
        <module name="deployment.selenium-server-2.53.0.jar" />
        <module name="deployment.selenium-support-2.53.0.jar" />
        <module name="deployment.sisu-guava-0.9.9.jar" />
        <module name="deployment.sisu-guice-3.1.0-no_aop.jar" />
        <module name="deployment.sisu-inject-bean-2.3.0.jar" />
        <module name="deployment.sisu-inject-plexus-2.3.0.jar" />
        <module name="deployment.slf4j-api-1.7.18.jar" />
        <module name="deployment.snakeyaml-1.8.jar" />
        <module name="deployment.spring-aop-4.1.6.RELEASE.jar" />
        <module name="deployment.spring-beans-4.1.6.RELEASE.jar" />
        <module name="deployment.spring-context-4.1.6.RELEASE.jar" />
        <module name="deployment.spring-core-4.1.6.RELEASE.jar" />
        <module name="deployment.spring-expression-4.1.6.RELEASE.jar" />
        <module name="deployment.spring-jdbc-4.2.4.RELEASE.jar" />
        <module name="deployment.spring-security-acl-4.0.3.RELEASE.jar" />
        <module name="deployment.spring-security-config-4.0.1.RELEASE.jar" />
        <module name="deployment.spring-security-core-4.0.1.RELEASE.jar" />
        <module name="deployment.spring-security-taglibs-4.0.3.RELEASE.jar" />
        <module name="deployment.spring-security-web-4.0.1.RELEASE.jar" />
        <module name="deployment.spring-tx-4.2.4.RELEASE.jar" />
        <module name="deployment.spring-web-4.1.6.RELEASE.jar" />
        <module name="deployment.spring-webmvc-4.1.6.RELEASE.jar" />
        <module name="deployment.stacks-client-1.0.2.Final.jar" />
        <module name="deployment.staxmapper-1.1.0.Final.jar" />
        <module name="deployment.wildfly-build-config-8.1.0.Final.jar" />
        <module name="deployment.wildfly-cli-8.1.0.Final.jar" />
        <module name="deployment.wildfly-controller-client-8.1.0.Final.jar" />
        <module name="deployment.wildfly-maven-plugin-1.0.2.Final.jar" />
        <module name="deployment.wildfly-protocol-8.1.0.Final.jar" />
        <module name="deployment.wildfly-security-manager-1.0.0.Final.jar" />
        <module name="deployment.xml-apis-1.0.b2.jar" />
        <module name="deployment.xnio-api-3.2.2.Final.jar" />
        <module name="deployment.xnio-nio-3.2.2.Final.jar" />
        <module name="deployment.xz-1.2.jar" />
    </dependencies>
    <!-- These add additional classes to the module. In this case it is the same as including the jar in the EAR's lib directory -->
    <resources>
      <resource-root path="md.jar" />
    </resources>
  </deployment>
</jboss-deployment-structure>

The error log from WildFly indicating it cannot deploy my ROOT.war

13:27:30,977 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "antlr4-runtime-4.5.2-1.jar" (runtime-name : "antlr4-runtime-4.5.2-1.jar")
13:27:30,978 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "antlr-2.7.7.jar" (runtime-name : "antlr-2.7.7.jar")
13:27:30,978 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "angular2-2.0.0-beta.7.jar" (runtime-name : "angular2-2.0.0-beta.7.jar")
13:27:30,979 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "aether-util-1.13.1.jar" (runtime-name : "aether-util-1.13.1.jar")
13:27:30,979 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "aether-spi-1.13.1.jar" (runtime-name : "aether-spi-1.13.1.jar")
13:27:30,979 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "aether-impl-1.13.1.jar" (runtime-name : "aether-impl-1.13.1.jar")
13:27:30,979 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "aether-api-1.13.1.jar" (runtime-name : "aether-api-1.13.1.jar")
13:27:30,981 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "aesh-0.33.11.jar" (runtime-name : "aesh-0.33.11.jar")
13:27:30,983 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0184:    New missing/unsatisfied dependencies:
      service jboss.deployment.unit."ROOT.war".beanmanager (missing) dependents: [service jboss.deployment.unit."ROOT.war".weld.weldClassIntrospector, service jboss.deployment.unit."ROOT.war".batch.environment] 
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."ROOT.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."ROOT.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "ROOT.war"

13:27:31,234 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
13:27:31,234 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
13:27:31,234 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) started (with errors) in 47550ms - Started 4867 of 5891 services (3 services failed or missing dependencies, 1357 services are lazy, passive or on-demand)
13:27:44,221 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0028: Stopped deployment ROOT.war (runtime-name: ROOT.war) in 11969ms
13:27:44,285 INFO  [org.jboss.as.repository] (DeploymentScanner-threads - 2) WFLYDR0002: Content removed from location C:\home\toazi\apps\wildfly-10.0.0.Final\standalone\data\content\71\0188d928a988dddca670dade8e87ac9ec64b57\content
13:27:44,285 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0009: Undeployed "ROOT.war" (runtime-name: "ROOT.war")
13:27:44,286 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."ROOT.war".INSTALL
1 Answers
Related