facebook

Redeploying exploded web app removes classes directory

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #309354 Reply

    Robert J. Muller
    Participant

    I upgraded to MyEclipse 8.5 and redeploy behavior seems to have changed dramatically. I deploy my web apps to JBoss 5. Under version 7, everything worked well; my classes deployed hot when I changed them, and the redeploy function redeployed quickly just the changes for JSPs and XHTML (not hot deployed, apparently).

    After the 8.5 upgrade, hot deploy works only sporadically and redeploy always redeploys everything, and therefore takes forever for my large web app. All my files are local to my Mac and use the same time stamping.

    This long wait would be bearable, but apparently it also “builds”, which in this case means deletes the classes folder under WEB-INF. Unfortunately, we use an ant script to write configuration files into the app classes hierarchy, so building wipes these out, and the app crashes when it runs.

    If I turn off the Project–>Build automatically option, redeploy does not wipe out classes. This is very painful, however, as I have to build manually every time I save to see status changes in errors and warnings and changes in Subversion status (and to get hot deploy, which doesn’t actually happen most of the time anyway. And the redeploy still redeploys the entire project, taking forever….

    Is this new behavior intended? If so, it needs work. Please help.

    #309370 Reply

    Brian Fernandes
    Moderator

    arabidopsis,

    We did make some deployment changes last year; before we go further, can you tell me what version of MyEclipse you were using prior to this – exactly version 7.0 or was it 7.5?

    Regarding the hotdeploy changes, I assume you are running the same version of JBoss and have configured it in the same way and are running in debug mode? Can you explain in detail what sort of changes are not making it through? (i.e. changes to Java, JSP, HTML) – and what changes are making it through?

    We are taking this issue very seriously and appreciate your assistance in this matter.

    #309383 Reply

    Robert J. Muller
    Participant

    I was using MyEclipse 7.5.0 for the Mac.

    I run both JBoss 4.2.2 and 5.1.0. The same behavior is exhibited on both servers.

    A little background: when I upgraded, I had a problem with some kind of MyEclipse configuration corruption on my existing installation, documented in this forum topic:

    https://www.genuitec.com/forums/topic/java-lang-negativearraysizeexception-opening-xml-files/&highlight=

    The recommendation was to create a new workspace from scratch and move my projects into it, and to break it up into several smaller workspaces, which is what I’ve done. As a result, I configured the server setup from scratch in the new workspace for my web application, so I can’t guarantee that it is identical in every respect.

    As for hot deploy, as I said in my original email, changes to Java sometimes cause a JBoss redeploy and sometimes don’t (it may possibly be turning off building automatically and I can’t reproduce it). JSP and XHTML (i.e. Faces pages) changes never hot-deploy, either in the 7.5 system or the 8.5, nor do CSS and HTML changes. I’ve lived with that for a long time; it would be nice to have but I can live with it as long as the manual redeploy is smart, but that’s what broke in the new release–and that’s my main concern, the fact that MyEclipse manual redeploy wipes out my classes directory and takes forever by redeploying everything. These two behaviors don’t seem related, either: I turned off the Project->Build automatically option, which fixed the rebuild that deletes classes, but it still redeploys everything, not just the changed items, which takes minutes rather than the seconds it took in 7.5.

    If you have prime suspects on particular option settings, let me know what to change and try and I’ll do that.

    #309404 Reply

    Brian Fernandes
    Moderator

    Thanks for the detailed response, it does not appear that your problem is being caused by an update / MyEclipse configuration issue.

    Our devs are looking into this problem right now, unfortunately there aren’t any options to change this behavior. We will let you know as soon as a fix is available.

    #309447 Reply

    Robert J. Muller
    Participant

    I’ve figured out a workaround for the specific situation I’m in. I generate the files into the classes hierarchy through my ant script, then I copy the generated files into the same locations created in the src structure, but I mark them svn:ignore so they don’t affect Subversion. Then when a build occurs, classes can go away but the build will copy the generated files from src. The downside is that I have to make sure to keep the copied files updated, but in my case there are only three of them and I don’t change them often, if at all, in my Eclipse work.

    No solution for the long redeploy or lack of hot updates, though. 🙁

    #309449 Reply

    Brian Fernandes
    Moderator

    Bob,

    We were unable to replicate both redeploy issues in MyEclipse 8.5 – i.e redeploy rebuilds everything / redeploy pushes everything to server. I have a few questions:

    1) What sort of project is this? I’m assuming you have a single MyEclipse Web project?
    2) Can you paste the .project and .mymetadata files in this thread?
    3) I assume you are deploying in exploded mode and starting the server in debug mode, correct?
    4) How are you redeploying? From the server view or elsewhere? When you redeploy, do you get a dialog box informing you that resources already exist at the destination location? This dialog has typically 3 options for redeploy, which of these do you choose?

    #309450 Reply

    Robert J. Muller
    Participant

    1) The web app is a MyEclipse web project, and there are several Java projects representing included libraries that I use for debugging.
    2a) .project file

    ================================================
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <projectDescription>
    <name>tairwebapp</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
    <buildCommand>
    <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>org.eclipse.jdt.core.javabuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>org.eclipse.wst.validation.validationbuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    </buildSpec>
    <natures>
    <nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature>
    <nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
    <nature>org.eclipse.jdt.core.javanature</nature>
    <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
    </natures>
    </projectDescription>
    ===========================================================

    2b) .mymetadata file

    ===========================================================
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <project-module
    type=”WEB”
    name=”tairwebapp”
    id=”myeclipse.1276644587813″
    context-root=”/tairwebapp”
    j2ee-spec=”1.4″
    archive=”tairwebapp.war”>
    <attributes>
    <attribute name=”webrootdir” value=”WebRoot” />
    </attributes>
    </project-module>

    ============================================================

    3) I am deploying in exploded mode. I start the server in both Run and Debug, mostly Run; the issue happens regardless.
    4) I redeploy by selecting the deployment in the Server view and clicking on the Redeploy icon. I do not get a dialog box.

    #309862 Reply

    Brian Fernandes
    Moderator

    Bob,

    I’m afraid that after a week of trying to reproduce this problem internally, we were unable to do so even with the additional details you specified.

    Occasionally these problems are caused by corrupt workspaces and simply starting with a clean workspace into which you import your projects could fix the issue.

    Another option would be for you to try to create a dummy web project with a few classes and see if it exhibits the same behavior in your current workspace. That could help us narrow down the cause.

    Do you have any additional plugins installed besides MyEclipse 8.5?

    #309863 Reply

    Robert J. Muller
    Participant

    As I noted earlier, upgrading forced me to create completely new workspaces, so the workspace is in fact a clean workspace with just the web app and its source dependency projects.

    I have Subclipse 1.4 and CloverETL plugins installed as well as MyEclipse.

    Which problem can you not reproduce? (1) the Build Automatically removing the classes directory, (2) Redeploy deploying ALL the deployed files not just the changed ones, and/or (3) hot deploy not working for java, xhtml, and jsp files?

    I will try a completely new workspace after my current bugfix cycle gets checked into the trunk. I will also try to reproduce the problems with a smaller test web app.

    #320030 Reply

    Robert J. Muller
    Participant

    An update for this issue: installing 9.1 has fixed both the deployment time issue and the problem with the classes directory as far as I can tell, I don’t have the problem anymore.

    #320038 Reply

    support-swapna
    Moderator

    arabidopsis,

    Glad that it is working.
    Do let us know if you have any other issues.

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Redeploying exploded web app removes classes directory

You must be logged in to post in the forum log in