[ 
https://issues.apache.org/jira/browse/TOMEE-1521?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Romain Manni-Bucau resolved TOMEE-1521.
---------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.7.2
                   2.0.0-Milestone-1
         Assignee: Romain Manni-Bucau

Ok pushed a change to fix it,

this is not exactly yours since digging into it I saw algorithm was fine and 
ignoring already deployed apps but the issue was by default wars are exploded 
next to .war file so ear unpacked folder last modified data changes.

Just updating it avoids the issue.


> Duplicate App Deployment when autoDeploy="true"
> -----------------------------------------------
>
>                 Key: TOMEE-1521
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1521
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 2.0.0, 1.7.1
>            Reporter: Adam Cornett
>            Assignee: Romain Manni-Bucau
>            Priority: Minor
>             Fix For: 2.0.0-Milestone-1, 1.7.2
>
>         Attachments: tomee-1521.patch
>
>
> When using autoDeploy:
> {code:xml}
>  <tomee>
>       <Deployments dir="apps" autoDeploy="true" />
>  </tomee>
> {code}
> with an ear in the apps folder (lets call it my-app-1.0.ear)  when I start 
> TomEE, it will extract the ear (to $CATALINA_HOME/apps/my-app-1.0) then start 
> deploying the application.
> After tomee finishes deploying my application, I get this oddity in the log:
> {noformat}
>  26-Feb-2015 12:51:39.311 INFO [localhost-startStop-1] 
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans 
> Container has started, it took 816 ms.
>  26-Feb-2015 12:51:39.973 INFO [AutoDeployer] 
> org.apache.openejb.config.AutoDeployer.scan New File: 
> /opt/tomee/apps/my-app-1.0.ear
>  26-Feb-2015 12:51:39.973 INFO [AutoDeployer] 
> org.apache.openejb.config.AutoDeployer.fileAdded Starting Auto-Deployment of: 
> /opt/tomee/apps/my-app-1.0.ear
> {noformat}
> TomEE then tries to deploy the application (which it already started), until 
> (several hundred lines later) gives me: 
> {noformat}
>  26-Feb-2015 12:51:44.288 SEVERE [AutoDeployer] 
> org.apache.openejb.assembler.classic.Assembler.createApplication Application 
> cannot be deployed as it contains deployment-ids which are in use: app: 
> /opt/tomee/apps/my-app-1.0
>  ... (errors for the duplicate IDs on all of my EJB objects already deployed 
> in the now un-zipped ear)
> {noformat}
> It seems that the AutoDeployer is not checking to see if the 'New File' is 
> already deployed.  I can build a minimal working example if needed, but I 
> think this one should be fairly easy to re-create.
> It should be noted that the initial deployment works, and my application 
> seems to function correctly, but start up does take longer (~5 sec) due to 
> the failed deployment attempt.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to