8

I am getting a weird error when trying to run an EAR on my Wildfly 10 Server. It says .session is already registered, which other similar bugs have supposedly been caused by multiple applications using the same context-root. But I am just deploying a single EAR so I'm confused.

09:57:30,654 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.subunit."********.ear"."*********.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."***********.ear"."**********".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of subdeployment "******.war" of deployment "*******.ear"
    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.DuplicateServiceException: Service jboss.undertow.deployment.default-server.default-host./******.session is already registered
acm
  • 2,086
  • 3
  • 16
  • 34
pasquers
  • 772
  • 1
  • 8
  • 24
  • 2
    This happened when you change the version number of your package and Wildfly tries to deploy two systems with the same context root. Remove the old package as suggested by @Devrim. – ℛɑƒæĿᴿᴹᴿ Feb 20 '19 at 14:59

5 Answers5

18

I had the same issue. It is fixed by removing wars under:

<jboss or wildfly home>\standalone\deployments

directory.

Edit: Another solution: Remove defined deployments at <jboss or wildfly home>\standalone\configuration\standalone.xml

Standalone.xml content, after deployments are removed:

<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:4.2">
    ...
    <deployments></deployments>
</server>
Devrim
  • 15,345
  • 4
  • 66
  • 74
3

Possible Fix, previously I had had other errors with my files that I consequently fixed. I looked in my standalone directory and it contained a .failed EAR, and I believe the 'DuplicateServiceException' came from the server trying to deploy both of them. So recreating the server seemed to solve the problem. Hope that helps anyone with a similar problem

pasquers
  • 772
  • 1
  • 8
  • 24
2

In my case, I deleted all the files in the server's deploy folder, cleaned the server and restart it. It works well after that.

Toe
  • 564
  • 4
  • 11
  • Thanks! That worked for me! I had this issue because I was going back and forth between the terminal and eclipse running my Jboss server. – jade290 Jun 10 '19 at 17:53
0

facing same issue clearing temp folder in home\standalone\tmp worked for me

0

Please check your application.xml file it may be have duplicate context defined for multiple modules

deva
  • 15
  • 6