Service jboss.web.deployment.default-host./.realm is already registered
Solution 1
Generally the containers such as Jboss have a context root of
<context-root>/</context-root>
to intercept all the incoming requests and pass on to the application server. In your I suspect the conflicting app is JBoss AppServer root itself, you can disable that using the following (enable-welcome-root="false")
<subsystem xmlns="urn:jboss:domain:web:1.0">
<connector name="http" protocol="HTTP/1.1" socket-binding="http" scheme="http"/>
<virtual-server name="localhost" enable-welcome-root="false">
<alias name="example.com"/>
</virtual-server>
</subsystem>
Solution 2
Try to remove .war
archive from web server, then deploy again. You can do this through jboss management console. It also could be that you have deployed another application with same value of <context-root>
element in jboss-web.xml
.
diminuta
Updated on September 17, 2020Comments
-
diminuta almost 4 years
I'm trying to deploy three different ear files to the same Jboss server...
One of them doesn't have a context root, and the other two have it, but it's different. I mean, let's take the three ears as one.ear, two.ear and three.ear:
one.ear has:
<?xml version="1.0" encoding="UTF-8"?> <jboss-web> <context-root>/</context-root> </jboss-web>
two.ear has:
<?xml version="1.0" encoding="UTF-8"?> <jboss-web> <context-root>/two</context-root> </jboss-web>
three.ear has none.
When I try to star Jboss (7 AS), I got this:
16:01:31,962 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.subunit."one-ear.ear"."one.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."one-ear.ear"."one.war".INSTALL: Failed to process phase INSTALL of subdeployment "one.war" of deployment "one-ear.ear" at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_45] at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_45] Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018027: Failed to add JBoss Web deployment service at org.jboss.as.web.deployment.WarDeploymentProcessor.processDeployment(WarDeploymentProcessor.java:320) at org.jboss.as.web.deployment.WarDeploymentProcessor.deploy(WarDeploymentProcessor.java:114) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] ... 5 more Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.web.deployment.default-host./.realm is already registered at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:154) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:227) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:560) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2228) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2228) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.as.web.deployment.WarDeploymentProcessor.processDeployment(WarDeploymentProcessor.java:269) ... 7 more
I have read that this error could be thrown when two apps in the same server have the same context root, but this is not the case... what is happening?