Tomcat / "Application cannot be deployed as it contains deployment-ids" error
Asked Answered
B

3

6

I am facing a problem connected with deploying two application on Tomcat 5 server. When deploying and running the server I receive an error message, which also prevents the second application to be properly run.

Unable to deploy collapsed ear in war /my-app: Exception: Application cannot be deployed as it contains deployment-ids which are in use: 

And after that there is a list of all duplicated ids. The second application is a smaller one, which is added to an already existing one managing all the entities. The project is build by Eclipse nad Maven. Is there a way to add dependency which should be included in the second application ( that what I intend to do right now ) so the second application will be able to know/use already exsiting packages?

Thank you in adnvace for any support,

Regards

Brierroot answered 24/11, 2010 at 10:30 Comment(0)
F
11

Quoting from the FAQ

DuplicateDeploymentIdException:

If you try to deploy the same ejb in two different web applications, then you will get the following exception (in conf/openejb.log):

org.apache.openejb.DuplicateDeploymentIdException: Application cannot be deployed as it contains deployment-ids which are in use:

To fix the issue, do the following:

  1. Create a file named system.properties under the conf directory
  2. Add the following to the system.properties file and save

    openejb.deploymentId.format={moduleId}/{ejbName}

From the JIRA, this fix should apply to OpenEJB 3.1

Frecklefaced answered 24/11, 2010 at 11:21 Comment(1)
It has solved the problem, unfortunately fixing this one revealed another cascade of exceptions but that is not the main point. Thank you.Brierroot
B
3

I ran into the same problem with apache-tomee-plume-7.0.4, after adding liquibase to more than one web-apps deployed in the same container.

this version comes with it's own system.properties file, all I had to do was to uncomment the line which defines the property shown above.

# openejb.deploymentId.format = {appId}/{ejbJarId}/{ejbName}

After uncommenting this line and rebuilding, I found that the problem went away and I experienced no other residual errors.

Blueness answered 5/9, 2018 at 15:49 Comment(0)
E
0

I don't know what that notion of an EAR file is, but Tomcat is not a full Java EE app server. It's a servlet/JSP engine; it has no way to deal with EARs. If you're deploying an EAR, or your WAR has an EAR inside it for some reason, you'll have to add something like OpenEJB to your Tomcat deployment.

Expunction answered 24/11, 2010 at 10:38 Comment(1)
Sorry, I have forgotten to add, of course we have also OpenEJB 3.1 added with TomcatBrierroot

© 2022 - 2024 — McMap. All rights reserved.