JBoss ON bundle deployment fails with "Failed to create new parent directory for raw file" when entire bundle contents is deployed outside of destination using relative paths

Solution Unverified - Updated -

Issue

  • Deployment issue of bundle files
  • Deploy a bundle is failing as it cannot create the directory it needs to deploy to.
  • The server is reporting back the following error:

    ERROR [ResourceContainer.invoker.nonDaemon-1] (org.rhq.plugins.ant.AntBundlePluginComponent)- Failed to deploy bundle [class org.rhq.core.pluginapi.bundle.BundleDeployRequest: deployment=[BundleResourceDeployment: bdd=[BundleDeployment[id=10001, name=Deployment [1] of Version [1.1.1] to [EAP Test Destination]]], resource=[Resource[id=10003, uuid=13f61b64-7f4a-4c25-a8df-c917f3e01bc9, type={JBossAS5}JBossAS Server, key=/opt/jboss/jboss-eap-5.2.0/jboss-as/server/all, name=EAP ashost:1099 all, version=EAP 5.2.0]]], full-deploy-directory=[/opt/jboss/jboss-eap-5.2.0/jboss-as/server/all/deploy/myapp.deployment], clean=[false], revert=[false]]
    java.lang.Exception: Failed to execute the bundle Ant script
        at org.rhq.plugins.ant.AntBundlePluginComponent.deployBundle(AntBundlePluginComponent.java:159)
        ...
    Caused by: java.lang.RuntimeException: Failed to execute bundle deploy file [/opt/jboss/rhq-agent/data/tmp/bundle-versions/10001/ant-bundle-recipe2293873009064600317.xml]. Cause: /opt/jboss/rhq-agent/data/tmp/bundle-versions/10001/ant-bundle-recipe2293873009064600317.xml:2: Failed to deploy bundle [fxmpDatasource] version [1.1.1]: java.lang.Exception: Failed to create new parent directory for raw file [/opt/jboss/jboss-eap-5.2.0/jboss-as/server/all/deploy/myapp.deployment/../../conf/app.properties]
        at org.rhq.bundle.ant.AntLauncher.executeBundleDeployFile(AntLauncher.java:118)
        at org.rhq.plugins.ant.AntBundlePluginComponent.executeDeploymentPhase(AntBundlePluginComponent.java:306)
        at org.rhq.plugins.ant.AntBundlePluginComponent.deployBundle(AntBundlePluginComponent.java:139)
        ... 10 more
    Caused by: /opt/jboss/rhq-agent/data/tmp/bundle-versions/10001/ant-bundle-recipe2293873009064600317.xml:2: Failed to deploy bundle [fxmpDatasource] version [1.1.1]: java.lang.Exception: Failed to create new parent directory for raw file [/opt/jboss/jboss-eap-5.2.0/jboss-as/server/all/deploy/myapp.deployment/../../conf/app.properties]
        at org.rhq.bundle.ant.type.DeploymentUnitType.install(DeploymentUnitType.java:218)
        at org.rhq.bundle.ant.task.BundleTask.execute(BundleTask.java:148)
        ...
        at org.rhq.bundle.ant.AntLauncher.executeBundleDeployFile(AntLauncher.java:111)
        ... 12 more
    Caused by: java.lang.Exception: Failed to create new parent directory for raw file [/opt/jboss/jboss-eap-5.2.0/jboss-as/server/all/deploy/myapp.deployment/../../conf/app.properties]
        at org.rhq.core.util.updater.Deployer.extractZipAndRawFiles(Deployer.java:822)
        at org.rhq.core.util.updater.Deployer.performInitialDeployment(Deployer.java:340)
        at org.rhq.core.util.updater.Deployer.deploy(Deployer.java:181)
        at org.rhq.bundle.ant.type.DeploymentUnitType.install(DeploymentUnitType.java:202)
        ... 24 more
    

Environment

  • JBoss Operations Network (ON) 3.1, 3.1.1, 3.1.2
  • JBoss ON provisioning bundle
  • Bundle deployment recipe deploys all content above the destination directory utilizing relative paths. For example:

        ...
        <rhq:bundle name="fxmpDatasource" version="1.1.1" description="first ldn-fxmp-reporting-qa deployment">
            <rhq:deployment-unit name="Datasource">
                <rhq:file name="app.properties" destinationFile="../../conf/app.properties" replace="false"/>
            </rhq:deployment-unit>
        </rhq:bundle>
        ...
    

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.