[mule-user] mule app deployment could not create directory error

112 views
Skip to first unread message

Lothar Märkle

unread,
Aug 4, 2011, 1:53:09 PM8/4/11
to us...@mule.codehaus.org
Hello,

maybe a bug or wrong usage pattern:

Steps are
I have an app deployed and running, called store.
For updateing I shut down mule,
copy app store.zip over to MULE_HOME/apps
and restart again.

First start fails on creating directory "lib". However, shutting down and starting again results in an successfull deployment.
I verified it is not a file permission issue.

19:44:47,437  INFO  [module.launcher.DefaultMuleDeployer] Exploding a Mule application archive: file:/opt/mule/mule-standalone-3.1.2/apps/store.zip
19:44:47,446  ERROR [module.launcher.DeploymentService] Failed to install app from archive 'store.zip'
java.io.IOException: Could not create directory: /opt/mule/mule-standalone-3.1.2/apps/store/lib
        at org.mule.util.FileUtils.unzip(FileUtils.java:314)
        at org.mule.module.launcher.DefaultMuleDeployer.installFrom(DefaultMuleDeployer.java:191)
        at org.mule.module.launcher.DefaultMuleDeployer.installFromAppDir(DefaultMuleDeployer.java:134)
        at org.mule.module.launcher.DeploymentService.start(DeploymentService.java:119)
        at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:142)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.mule.module.reboot.MuleContainerWrapper.start(MuleContainerWrapper.java:56)
        at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
19:44:47,470  INFO  [launcher.application.DefaultMuleApplication]
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ New app 'default'                                        +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
19:44:51,571  INFO  [module.launcher.DeploymentService]
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Started app 'default'                                    +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
19:44:51,573  INFO  [module.launcher.StartupSummaryDeploymentListener]

**********************************************************************
*            - - + APPLICATION + - -            * - - + STATUS + - - *
**********************************************************************
* store                                         * FAILED             *
* default                                       * DEPLOYED           *
**********************************************************************

Andrew Perepelytsya

unread,
Aug 4, 2011, 1:57:08 PM8/4/11
to us...@mule.codehaus.org

Guessing, but there's a chance I'm right - verify your zip doesn't contain duplicate lib dir entry. What did you use to package this app? E.g. maven-mule-plugin is guaranteed to create a correct zip.

HTH,
Andrew

Lothar Märkle

unread,
Aug 4, 2011, 2:05:21 PM8/4/11
to us...@mule.codehaus.org
I used the <zip/> ant task to package the app. It also works the second and all further starts of mule (version 3.1.2 btw)
cli unzip works:
$ unzip ../build/dist/store.zip
Archive:  ../build/dist/store.zip
   creating: lib/
  inflating: lib/groovy-ldap.jar    
  inflating: lib/spring-ldap-1.3.1.RELEASE-all.jar 
  inflating: lib/spring-security-ldap-3.0.5.RELEASE.jar 
   creating: classes/
....
  inflating: mule-app.properties    
  inflating: mule-deploy.properties 
  inflating: mule-config.xml        





2011/8/4 Andrew Perepelytsya <aper...@gmail.com>

Lothar Märkle

unread,
Aug 5, 2011, 5:35:27 AM8/5/11
to us...@mule.codehaus.org
A little debug session shows that the deployer on startup does not check for an already deployed app and tries to deploy without undeployment first. No call to org.mule.module.launcher.DeploymentService.undeploy(String).
The deployment fails and all files are removed from the app dir - so that the next start looks like a fresh deployment.

However the hot deployment feature works, it first undeploys an app, then deploy.

Looks like http://www.mulesoft.org/jira/browse/MULE-5133 and should be reproducible with any app.

Regards,
  lothar

2011/8/4 Lothar Märkle <lothar....@googlemail.com>

Pablo Kraan

unread,
Aug 5, 2011, 11:38:44 AM8/5/11
to us...@mule.codehaus.org
Hi Lothar,

There was a problem in the code that unzips the apps files. The issue should be fixed now.

Pablo
Reply all
Reply to author
Forward
0 new messages