drJava
drJava

Reputation: 797

I cannot deploy a war file to the wildfly 10

I am currently learning the Java EE and wanted to follow a tutorial, who uses cargo tracker as an example.

I could import the maven project to the eclipse successfully and can build it with mvn clean install successfully.

At the end of the day, there is a war file in the target folder of the project but wildfly 10 could not start it.

In the readme of the project, I have read such a sentence and would like to issue it;

mvn -Pwildfly package cargo:run

however, in this case, maven gives the following error;

[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.14:run (default-cli) on project cargo-tracker: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.14:run failed: Failed to create a GlassFish 4.x standalone configuration: GlassFish admin command with args (--interactive=false --user admin --passwordfile /home/laptop/Schreibtisch/cargo-tracker-ee-master/target/cargo/configurations/glassfish4x/password.properties create-domain --adminport 4848 --instanceport 8080 --domainproperties jms.port=7676:orb.listener.port=3700:orb.ssl.port=3820:http.ssl.port=8181:orb.mutualauth.port=3920:domain.jmxPort=8686:java.debugger.port=9009:osgi.shell.telnet.port=6666
--domaindir /home/laptop/Schreibtisch/cargo-tracker-ee-master/target/cargo/configurations/glassfish4x cargo-domain) failed: asadmin exited 1 -> [Help 1]

If you need more info, I can supply.

Edit

When I deploy the war file manually as K5 mentioned in this comment, I get the following error from wildfly;

19:18:36,042 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."cargo-tracker.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."cargo-tracker.war".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment "cargo-tracker.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
    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.msc.service.ServiceNotFoundException: Service service jboss.ejb.default-resource-adapter-name-service not found
    at org.jboss.msc.service.ServiceContainerImpl.getRequiredService(ServiceContainerImpl.java:669)
    at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.getDefaultResourceAdapterName(MessageDrivenComponentDescriptionFactory.java:274)
    at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processMessageBeans(MessageDrivenComponentDescriptionFactory.java:154)
    at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processAnnotations(MessageDrivenComponentDescriptionFactory.java:81)
    at org.jboss.as.ejb3.deployment.processors.AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.processAnnotations(AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.java:57)
    at org.jboss.as.ejb3.deployment.processors.AbstractDeploymentUnitProcessor.deploy(AbstractDeploymentUnitProcessor.java:76)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
    ... 5 more

19:18:36,050 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "cargo-tracker.war")]) - failure description: {
    "WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"cargo-tracker.war\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"cargo-tracker.war\".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment \"cargo-tracker.war\"
    Caused by: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.ejb.default-resource-adapter-name-service not found"},
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"cargo-tracker.war\".PARSE"],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
19:18:36,080 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "cargo-tracker.war" (runtime-name : "cargo-tracker.war")
19:18:36,083 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."cargo-tracker.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."cargo-tracker.war".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment "cargo-tracker.war"

Upvotes: 1

Views: 3378

Answers (2)

Ad Infinitum
Ad Infinitum

Reputation: 3706

On the download page of the wildfly, there are several download options. It is possible that you have downloaded a version, which does not have the needed service for your application. In order to find if the problem is because of your wildfly version, download the Java EE7 Full & Web Distribution and see if something will change.

Upvotes: 2

Anshul Sharma
Anshul Sharma

Reputation: 3512

add dependency :

<dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derby</artifactId>
    <version>10.12.1.1</version>
    <scope>test</scope>
</dependency>

update maven project and built it and recreate the jar file and try to deploy.

Upvotes: 0

Related Questions