Deploying an EAR with Tomcat

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Deploying an EAR with Tomcat

jgallimore
Hi,

I just gave this:
http://www.nabble.com/Tomcat-hot-deployment-td13287215.html a go, and I
encountered a minor problem where all my beans were being deployed
twice, and I was getting this error:

org.apache.openejb.DuplicateDeploymentIdException: Application cannot be
deployed as it contains deployment-ids which are in use: app (and a list
of all my EJBs)

Looking at what was going on with a debugger attached it looked like the
app was actually being deployed twice, once with the name of the
directory that the ear is expanded into, and once with the name of the
actual ear itself.

If I stop Tomcat, delete the ear file from the webapps folder, and leave
the folder the ear was expanded into alone, and restart Tomcat, it works
perfectly.

Am I doing something wrong?

Cheers

Jon
Reply | Threaded
Open this post in threaded view
|

Re: Deploying an EAR with Tomcat

dblevins
Administrator

On Feb 21, 2008, at 3:14 PM, Jonathan Gallimore wrote:

> Hi,
>
> I just gave this: http://www.nabble.com/Tomcat-hot-deployment-td13287215.html 
>  a go, and I encountered a minor problem where all my beans were  
> being deployed twice, and I was getting this error:
>
> org.apache.openejb.DuplicateDeploymentIdException: Application  
> cannot be deployed as it contains deployment-ids which are in use:  
> app (and a list of all my EJBs)
>
> Looking at what was going on with a debugger attached it looked like  
> the app was actually being deployed twice, once with the name of the  
> directory that the ear is expanded into, and once with the name of  
> the actual ear itself.
>
> If I stop Tomcat, delete the ear file from the webapps folder, and  
> leave the folder the ear was expanded into alone, and restart  
> Tomcat, it works perfectly.
>
> Am I doing something wrong?

Hmm... Sounds like the directory watching code is clearly getting  
triggered while we are in the process of (or right after) we deploy  
the ear file.  The outcome is good as a second copy will not be  
deployed, just the error message is annoying and we should find some  
way to prevent that second deploy.  Not quite sure how.

-David