facebook

[Closed] Cannot redeploy web project (Tomcat 5.5.15)

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #246784 Reply

    zambizzi
    Member

    I just purchased myeclipse 4.1 and am using it with Eclipse 3.1.2 on Gentoo Linux, Gnome 2.12.2, using Sun JDK 1.5.0_06.

    I simply cannot get a project to redeploy to Tomcat after the first initial deployment. Here’s what I did:

    Created a web project and three regular java projects which are just class libraries. I made all of my associations and references…then set the class lib projects to deploy to the MyEclipse web project as jars when the project is deployed, per the instructions in the docs.

    The first deployment went swimmingly…the application ran the first time, as expected, no problems. So, while Tomcat was running (debug mode – default) I altered a couple of JSPs, and a servlet. I clicked the re-deploy button, got the deployment menu, then clicked the redeploy button on that panel. A dialog pops up showing the progress of the redeployment and the console shows that the app has been reloaded w/ an “INFO” message…

    However, the changes aren’t reflected when I run the application again…the old copy is still there and none of the updates I made show up in either the servlets or the JSPs that I changed.

    I tried stopping the Tomcat server, redeploying again, then re-starting it…no dice.

    How am I supposed to do this?

    The one thing I liked about Netbeans was that I could just right-click the web app in the project explorer, click Deploye Project, and it would reload in Tomcat as expected…I really hope it’s just as simple w/ MyEclipse 🙁

    Any ideas? Thanks!

    #246785

    zambizzi
    Member

    I just realized that this was “required” in your posting guidelines, here’s my configuration summary:

    
    *** Date: Tue Feb 14 21:50:37 MST 2006
    
    *** System properties:
    OS=Linux
    OS version=2.6.15-gentoo-r1
    Java version=1.5.0_06
    
    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    
    Version: 4.1.0 GA
    Build id: 20060122-4.1-GA
    
    *** Eclipse details:
    Eclipse SDK
    
    Version: 3.1.2
    Build id: M20060118-1600
    
    Eclipse Platform
    
    Version: 3.1.2
    Build id: M20060118-1600
    
    Eclipse RCP
    
    Version: 3.1.2
    Build id: M20060118-1600
    
    Eclipse Java Development Tools
    
    Version: 3.1.2
    Build id: M20060118-1600
    
    Eclipse Plug-in Development Environment
    
    Version: 3.1.2
    Build id: M20060118-1600
    
    Eclipse Project SDK
    
    Version: 3.1.2
    Build id: M20060118-1600
    
    Eclipse startup command=-os
    linux
    -ws
    gtk
    -arch
    x86
    -launcher
    /opt/eclipse-3.1.2/eclipse
    -name
    Eclipse
    -showsplash
    600
    -exitdata
    230015
    -vm
    /opt/sun-jdk-1.5.0.06/bin/java
    
    #246804

    Riyad Kalla
    Member

    I would suggest setting up your “dependent java projects” to deploy in “Smart” mode, then I would suggest removing your deployment (after shutting down Tomcat) and creating a new “Exploded” deployment, now your changes will be synced with the server *as* you make them, there is nothing to restart.

    #246817

    zambizzi
    Member

    @support-rkalla wrote:

    I would suggest setting up your “dependent java projects” to deploy in “Smart” mode, then I would suggest removing your deployment (after shutting down Tomcat) and creating a new “Exploded” deployment, now your changes will be synced with the server *as* you make them, there is nothing to restart.

    Ahh, if only it were that easy!

    I’ve got it setup like this, here’s what I did:

    1. Shut down Tomcat

    2. Went to Windows->Preferences->MyEclipse->J2EE Project->Web Project – In the “Deployment” tab I’ve got “Use Smart Deployment for dependent Java projects” checked and below that I’ve got checkboxes 2, 3, and 4 checked in “Library Deployment Policies”.

    3. Clicked the Project Deployments button, removed my project from the list, re-added it as an Exploded Archive, then clicked Redeploy.

    4. Started Tomcat.

    -same old code…my results were *not* picked up.

    I have this same exact problem on Windows XP now…which is what I’m using here at work (evaluating which tool we should go w/ for our future Java projects…we have to use Windows at work.)

    The *only* way (on Linux) I can get my changes to show up in either my JSPs/Servlets or Jar’d classes is by cleaning the project, stopping tomcat, and re-deploying manually. However, even this doesn’t work on Windows and I’m *completely* unable to deploy any changes. 👿

    Also, another new problem – even though I’m launching Tomcat in debug mode, I’m not able to debug. When I set a breakpoint and go to the debug perspective and then run the app…the breakpoints are never hit. I was able to debug yesterday…yeeeeesh!

    There’s no way I can sell MyEclipse to my boss (over Netbeans – $0.00) if it’s not easier to use (and less problematic). There’s gotta be a way…I *really* don’t want to go back to Netbeans! This is a show-stopper for me, unfortunately.

    Thanks again!

    #246818

    Riyad Kalla
    Member

    1) What version of Tomcat? You ahve to be using Tomcat 5 or later for debugging.

    2) Go to Window > Prefs > General > Workbench, do you have “Build automatically checked”? The autodeployment of changed files is part of the build process, so this needs to be checked.

    Now try this. Open up the directory of your deployed project (quick way is to open the deployment tool, select your deployment and hit Browse). Go find a file, say index.jsp. Look at the time stamp on the file. Now go to MyEclipse, make a change and save it, now go look at the timestamp on the file, did it change?

    #246821

    zambizzi
    Member

    @support-rkalla wrote:

    1) What version of Tomcat? You ahve to be using Tomcat 5 or later for debugging.

    The title of this thread is “Cannot redeploy web project (Tomcat 5.5.15)” – so Tomcat 5.5.15. Like I said – I could debug yesterday under this *same* setup…now I can’t. I’ve even tried restarting Eclipse, just for the hell of it.

    @support-rkalla wrote:

    2) Go to Window > Prefs > General > Workbench, do you have “Build automatically checked”? The autodeployment of changed files is part of the build process, so this needs to be checked.

    Yes, “Build automatically” was checked.

    @support-rkalla wrote:

    Now try this. Open up the directory of your deployed project (quick way is to open the deployment tool, select your deployment and hit Browse). Go find a file, say index.jsp. Look at the time stamp on the file. Now go to MyEclipse, make a change and save it, now go look at the timestamp on the file, did it change?

    Yes, the timestamp is updating.

    #246829

    Riyad Kalla
    Member

    Yes, the timestamp is updating.

    Ok then if the timestamp is updating then MyEclipse *is* deploying the files and for whatever reason Tomcat is not picking the changes up. I would suggest checking your context settings for your project’s context in tomcat administrator and making sure you have “reloadable” set to “true” and I believe there is another setting “check for changes” or something to that extent to set to true as well.

    #246839

    zambizzi
    Member

    That’s exactly right…and very, very strange! 😯

    I had just been using the core tomcat distro and not the actual windows installable/executable…only because I didn’t really *need* a full-blown Tomcat service on this machine…just something to develop on…and it has *always* worked fine w/ Netbeans 5.0 in the past (for months now!)

    What’s even more strange is; both the project files (in MyEclipse) and the /webapps deployed files were both updated…where was Tomcat getting this “cache” of old files? How is it I was able to completely undeploy and redeploy and get old files that didn’t even *exist* anymore!? 😕

    Anyhow, I installed the actual windows executable version of 5.5.15 and not only did it *finally* pick up my changes…it appears to be working.

    I’ll mark this as SOLVED if I can keep it working for more than one day…since that’s all I got out of the last successful run!

    Thanks a lot for your help…great product!

    #246840

    Riyad Kalla
    Member

    I had just been using the core tomcat distro and not the actual windows installable/executable…only because I didn’t really *need* a full-blown Tomcat service on this machine…just something to develop on…and it has *always* worked fine w/ Netbeans 5.0 in the past (for months now!)

    This should work fine, I don’t use the windows service here either. Just have multiple unzipped copies of Tomcat that I setup in MyEclipse when testing.

    What’s even more strange is; both the project files (in MyEclipse) and the /webapps deployed files were both updated…where was Tomcat getting this “cache” of old files? How is it I was able to completely undeploy and redeploy and get old files that didn’t even *exist* anymore!? 😕

    This content is compiled to the /work directory of your Tomcat install, if it’s not told to refresh, it won’t look back at the old JSPs and try and recompile them.

    Glad it’s working now, sorry it required so much work though.

    #246843

    zambizzi
    Member

    I looked in the /conf/server.xml but didn’t see anywhere to set this…is it done in the management web app that can be downloaded separately? I hadn’t installed it…maybe I should just do that…I like the flexibility of using the unzipped version.

    #246844

    Riyad Kalla
    Member

    Actually the administrator app which I think comes installed default but you do need to enable the user by adding a new user with role “admin” in your tomcat-users.xml file

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: [Closed] Cannot redeploy web project (Tomcat 5.5.15)

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