<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Re: error in hot deployement 'Error renaming..'
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/rob.stryker%40jboss.com">Rob Stryker</a> in <i>JBoss Tools</i> - <a href="http://community.jboss.org/message/573404#573404">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>It seems as if you're using a mix of maven commands and wtp publishing. When you click the 'publish' icon inside the servers view, this will do what is called an "Incremental Publish". This means it will only publish whatever files have changed in the workspace since the last publish event. If you right-click on your module in the servers view, however, you can click "FULL PUBLISH" to republish the entire module.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>So, if you do a full publish, you wil note all resources should now be synchronized and all files should have been deployed. All files should have a timestamp of t at that point. If you then wait 1 minute, modify a java file, save it, and use the publish icon or incremental publish buttons, you will note in the deploy folder that *ONLY* your .class file has changed its timestamp, and all other resources have the previous timestamp.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If you then go to the deploy folder and delete all files for this deployment, return to your eclipse workspace, modify a file or two, and click publish again (incremental), you will see that *only* the two changed files have been published. This is in fact a user-error. If the user manually deletes a publish folder and its contents outside of eclipse, there is no way for the tooling to know or expect this. This includes if the user uses some other tool such as maven which may have deleted the module's deploy folder as well. In these cases, the tooling will again try to simply do an incremental publish of only the changed files.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I'll need to look into your first problem, with the error renaming, but it seems like either there was a file lock (which would be a jboss-as problem) or the destination folder did not exist. I really don't think the folder not existing is a problem, however, because for our local copy handler, we have the following code:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160; if (!safeRename(tempFile, file, 10))</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>with safeRename doing the following:</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; File dir = to.getParentFile();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (dir != null &amp;&amp; !dir.exists())<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dir.mkdirs();</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>So if this *is* the problem, that hte folder does not exist, it is a problem with your filesystems permissions, such that jbosstools cannot create these directories without the OS complaining. If that's the case, there doesn't seem to be much I can do. The javadoc for java.io.File.mkdirs() is the following:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>/**<br/>&#160;&#160;&#160;&#160; * Creates the directory named by this abstract pathname, including any<br/>&#160;&#160;&#160;&#160; * necessary but nonexistent parent directories.&#160; Note that if this<br/>&#160;&#160;&#160;&#160; * operation fails it may have succeeded in creating some of the necessary<br/>&#160;&#160;&#160;&#160; * parent directories.<br/>&#160;&#160;&#160;&#160; *<br/>&#160;&#160;&#160;&#160; * @return&#160; &lt;code&gt;true&lt;/code&gt; if and only if the directory was created,<br/>&#160;&#160;&#160;&#160; *&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; along with all necessary parent directories; &lt;code&gt;false&lt;/code&gt;<br/>&#160;&#160;&#160;&#160; *&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; otherwise</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The best I can do here is capture the return value and try to return a slightly more relevant error message, but really the java.io.File api does not tell me WHY the mkdirs failed, or why the renameTo failed... so really there's nothing I can change the error message to to make it more clear than it already is. All *I* can know is that the rename / mkdirs failed... but the API does not allow me to know why.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Hopefully the first half of this post gives you some hint as to what is going on in your current situation, but for the mkdirs / renameto error, there's not much more I can do aside from ask you to look into permissions in the folders.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/573404#573404">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Tools at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>