[jbosstools-issues] [JBoss JIRA] Updated: (JBIDE-8863) Error deploying EAR with a module having a sub-module in its component descriptor.

Philippe Guinot (JIRA) jira-events at lists.jboss.org
Thu May 5 11:55:18 EDT 2011


     [ https://issues.jboss.org/browse/JBIDE-8863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Philippe Guinot updated JBIDE-8863:
-----------------------------------

    Description: 
h3.Context:
For some reasons I have to deploy an EAR webapp with (in its libs) a jar containing itself another jar.

h3.Environment:
For this I have a first Java project with the following component descriptor:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="project1">
        <wb-resource deploy-path="/" source-path="/src/main/java"/>
    </wb-module>
</project-modules>
{code}

Then, the second Java project has the component descriptor:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="project2">
        <wb-resource deploy-path="/" source-path="/src/main/java"/>
        <dependent-module archiveName="project1.jar" deploy-path="/lib" handle="module:/resource/project1/project1">
            <dependency-type>uses</dependency-type>
        </dependent-module>
    </wb-module>
</project-modules>
{code}

Then, in Eclipse when exporting the *project2* as a *Module Archive*, I obtain a .jar file featuring both classes from *project2* and a *lib* folder with the project1 compiled jar.

Now, in the ear project I have the following lines in the component descriptor:
{code:xml}
        <dependent-module archiveName=" project1.jar" deploy-path="/lib" handle="module:/resource/ project1/ project1">
            <dependency-type>uses</dependency-type>
        </dependent-module>
        <dependent-module archiveName=" project2.jar" deploy-path="/lib" handle="module:/resource/ project2/ project2">
            <dependency-type>uses</dependency-type>
        </dependent-module>
{code}
(The EAR needs the 2 jars as well)

h3.Problem:
Then, when deployed into my *JBoss 4.2 Runtime* server in Eclipse, I got the following error:

{code}Error renaming C:\DEV\jboss\server\default\tmp\jbosstoolsTemp\tmp7021855122707247750.jar to C:\DEV\jboss\server\default\deploy\EAR_Project.ear\lib\project2.jar\lib\project1.jar{code}


After some research, I think an exception is thrown at *org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.LocalCopyCallback.moveTempFile(File, File)* during the safe rename.
However, when I look to the error message I got the feeling that the publishing process want to copy the tmp jar file into a folder called "C:\DEV\jboss\server\default\deploy\EAR_Project.ear\lib\project2.jar\lib\" which can not work because "C:\DEV\jboss\server\default\deploy\EAR_Project.ear\lib\project2.jar" is a file.




  was:
h3.Context:
For some reasons I have to deploy an EAR webapp with (in its libs) a jar containing itself another jar.

h3.Environment:
For this I have a first Java project with the following component descriptor:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="project1">
        <wb-resource deploy-path="/" source-path="/src/main/java"/>
    </wb-module>
</project-modules>
{code}

Then, the second Java project has the component descriptor:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="project2">
        <wb-resource deploy-path="/" source-path="/src/main/java"/>
        <dependent-module archiveName="project1.jar" deploy-path="/lib" handle="module:/resource/project1/project1">
            <dependency-type>uses</dependency-type>
        </dependent-module>
    </wb-module>
</project-modules>
{code}

Then, in Eclipse when exporting the *project2* as a *Module Archive*, I obtain a .jar file featuring both classes from *project2* and a *lib* folder with the project1 compiled jar.

Now, in the ear project I have the following lines in the component descriptor:
{code:xml}
        <dependent-module archiveName=" project1.jar" deploy-path="/lib" handle="module:/resource/ project1/ project1">
            <dependency-type>uses</dependency-type>
        </dependent-module>
        <dependent-module archiveName=" project2.jar" deploy-path="/lib" handle="module:/resource/ project2/ project2">
            <dependency-type>uses</dependency-type>
        </dependent-module>
{code}
(The EAR needs the 2 jars as well)

h3.Problem:
Then, when deployed into my *JBoss 4.2 Runtime* server in Eclipse, I got the following error:

{code}Error renaming C:\DEV\jboss\server\default\tmp\jbosstoolsTemp\tmp7021855122707247750.jar to C:\DEV\jboss\server\default\deploy\EAR_Project.ear\lib\project2.jar\lib\project1.jar{code}


After some research, I think an exception is thrown at *org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.LocalCopyCallback.moveTempFile(File, File)* during the safe rename.
However, when I look to the error message I got the feeling that the publishing process want to copy the tmp jar file into a folder called "*C:\DEV\jboss\server\default\deploy\EAR_Project.ear\lib\project2.jar\lib\*" which can not work because "*C:\DEV\jboss\server\default\deploy\EAR_Project.ear\lib\project2.jar*" is a file.






> Error deploying EAR with a module having a sub-module in its component descriptor.
> ----------------------------------------------------------------------------------
>
>                 Key: JBIDE-8863
>                 URL: https://issues.jboss.org/browse/JBIDE-8863
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.0.Final
>         Environment: Tested with Eclipse Indigo Release 20110319-2305 with latest nightly build trunk of JBoss Tools.
> Deploying on a JBoss 4.2 server.
>            Reporter: Philippe Guinot
>            Assignee: Max Rydahl Andersen
>              Labels: component, deployment, descriptor, ear, eclipse, jar, module
>
> h3.Context:
> For some reasons I have to deploy an EAR webapp with (in its libs) a jar containing itself another jar.
> h3.Environment:
> For this I have a first Java project with the following component descriptor:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project-modules id="moduleCoreId" project-version="1.5.0">
>     <wb-module deploy-name="project1">
>         <wb-resource deploy-path="/" source-path="/src/main/java"/>
>     </wb-module>
> </project-modules>
> {code}
> Then, the second Java project has the component descriptor:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project-modules id="moduleCoreId" project-version="1.5.0">
>     <wb-module deploy-name="project2">
>         <wb-resource deploy-path="/" source-path="/src/main/java"/>
>         <dependent-module archiveName="project1.jar" deploy-path="/lib" handle="module:/resource/project1/project1">
>             <dependency-type>uses</dependency-type>
>         </dependent-module>
>     </wb-module>
> </project-modules>
> {code}
> Then, in Eclipse when exporting the *project2* as a *Module Archive*, I obtain a .jar file featuring both classes from *project2* and a *lib* folder with the project1 compiled jar.
> Now, in the ear project I have the following lines in the component descriptor:
> {code:xml}
>         <dependent-module archiveName=" project1.jar" deploy-path="/lib" handle="module:/resource/ project1/ project1">
>             <dependency-type>uses</dependency-type>
>         </dependent-module>
>         <dependent-module archiveName=" project2.jar" deploy-path="/lib" handle="module:/resource/ project2/ project2">
>             <dependency-type>uses</dependency-type>
>         </dependent-module>
> {code}
> (The EAR needs the 2 jars as well)
> h3.Problem:
> Then, when deployed into my *JBoss 4.2 Runtime* server in Eclipse, I got the following error:
> {code}Error renaming C:\DEV\jboss\server\default\tmp\jbosstoolsTemp\tmp7021855122707247750.jar to C:\DEV\jboss\server\default\deploy\EAR_Project.ear\lib\project2.jar\lib\project1.jar{code}
> After some research, I think an exception is thrown at *org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.LocalCopyCallback.moveTempFile(File, File)* during the safe rename.
> However, when I look to the error message I got the feeling that the publishing process want to copy the tmp jar file into a folder called "C:\DEV\jboss\server\default\deploy\EAR_Project.ear\lib\project2.jar\lib\" which can not work because "C:\DEV\jboss\server\default\deploy\EAR_Project.ear\lib\project2.jar" is a file.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list