I can't deploy a war file using wildfly 10 because of missing dependencies

942 views
Skip to first unread message

carlos e

unread,
Nov 14, 2023, 12:54:28 PM11/14/23
to WildFly
Hi

I tried to deploy a war file using Wildfly 10 and Java 8 update 231 but I couldn't.
In order to deploy, I copy the war file to wildfly-10.1.0.Final/standalone/deployments folder. After that, I turn on the Wildfly server by Netbeans on Services tab and then select "Start in Debug Mode".

I show you the following Wildfly error messages:

10:12:09,680 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "app.war")]) - failure description: {
    "WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./app" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./app: java.lang.ArrayIndexOutOfBoundsException: Index 19457 out of bounds for length 10921
    Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 19457 out of bounds for length 10921"},
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.undertow.deployment.default-server.default-host./app"],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined

10:12:09,725 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 37) WFLYSRV0010: Deployed "app.war" (runtime-name : "app.war")
10:12:09,730 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      
  service jboss.undertow.deployment.default-server.default-host./app: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./app: java.lang.ArrayIndexOutOfBoundsException: Index 19457 out of bounds for length 10921

10:12:10,070 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
10:12:10,070 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
10:12:10,070 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started (with errors) in 26090ms - Started 3767 of 4074 services
10:12:10,405 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0028: Stopped deployment app.war (runtime-name: app.war) in 275ms
10:12:10,480 WARN  [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0357: Notification of type deployment-undeployed is not described for the resource at the address []
10:12:10,480 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0009: Undeployed "app.war" (runtime-name: "app.war")
10:12:10,490 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report
WFLYCTL0184:    New missing/unsatisfied dependencies:
service jboss.deployment.unit."app.war".component."com.sun.faces.config.ConfigureListener".START (missing) dependents: [service jboss.deployment.unit."app.war".deploymentCompleteService]
service jboss.deployment.unit."app.war".component."com.sun.jersey.server.impl.container.servlet.Include".START (missing) dependents: [service jboss.deployment.unit."app.war".deploymentCompleteService]
service jboss.deployment.unit."app.war".component."com.sun.jersey.spi.container.servlet.ServletContainer".START (missing) dependents: [service jboss.deployment.unit."app.war".deploymentCompleteService]
service jboss.deployment.unit."app.war".component."javax.faces.webapp.FacetTag".START (missing) dependents: [service jboss.deployment.unit."app.war".deploymentCompleteService]
service jboss.deployment.unit."app.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START (missing) dependents: [service jboss.deployment.unit."app.war".deploymentCompleteService]
service jboss.deployment.unit."app.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (missing) dependents: [service jboss.deployment.unit."app.war".deploymentCompleteService]
WFLYCTL0186:   Services which failed to start:    
            service jboss.undertow.deployment.default-server.default-host./app

10:12:14,870 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found app.war in deployment directory. To trigger deployment create a file called app.war.dodeploy

The application pom file doesn't have something related to javax.servlet, com.sun.faces or javax.faces.webapp.

Pom file dependencies:

    <dependencies>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-server</artifactId>
            <version>1.8</version>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-json</artifactId>
            <version>1.8</version>
        </dependency>
        <dependency>
            <groupId>com.owlike</groupId>
            <artifactId>genson</artifactId>
            <version>1.4</version>
        </dependency>        
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>        
    </dependencies>
 
What can I do?

James Perkins

unread,
Nov 21, 2023, 12:03:11 PM11/21/23
to WildFly
It looks like Jersey is expecting something that might be missing. Is there a reason you're using Jersey instead of the Jakarta REST API? WildFly ships with RESTEasy as its Jakarta REST implememtation.

carlos e

unread,
Nov 22, 2023, 4:05:51 PM11/22/23
to WildFly
Is there a reason you're using Jersey instead of the Jakarta REST API?
- That's the way of programmer to develop Restful webservice choosing Jersey library.

James Perkins

unread,
Nov 22, 2023, 7:03:29 PM11/22/23
to WildFly
On Wednesday, November 22, 2023 at 1:05:51 PM UTC-8 carlos e wrote:
Is there a reason you're using Jersey instead of the Jakarta REST API?
- That's the way of programmer to develop Restful webservice choosing Jersey library.

That's not quite accurate. The Jakarta EE Specifications has a Jakarta RESTful Web Services API. Jersey is an implementation of that specification as is RESTEasy. RESTEasy is part of WildFly as WildFly is a Jakarta EE container. You don't need Jersey to develop REST applications in WildFly.

That said, if you want to use Jersey I think you need to exclude the jaxrs subsystem in a jboss-deployment-structure.xml. You'd need to ensure you have all the correct Jersey dependencies in your deployment too. I'm not sure what those would be though.
Reply all
Reply to author
Forward
0 new messages