facebook

sync-on-demand not working

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #255768 Reply

    dtoalrossi
    Member

    Here’s my configuration:
    Eclipse:
    Version: 3.2.0
    Build id: M20060629-1905
    MyEclipse: 5.0M2
    Tomcat: 5

    I have checked Help -> Preferences -> General -> Workspace -> Build Automatically

    JSP files sync fine.

    Java files do not.

    Any ideas?

    #255777 Reply

    Riyad Kalla
    Member

    There is a lot at play here and chances are it’s working as specified but you aren’t seeing the errors.

    1) As long as Eclipse and Tomcat are running with JDK 1.4+ AND you are running Tomcat in debug mode, Hot syncing of changed class files is supported and automatic. However, the specification only allows for classes who’s method bodies have changed, you cannot change the *shape* of a class like add methods, members, etc. That will fail.

    2) Check the timestamp on your project to see if the Class file timestamps are changing. If the JSP ones are, chances are the Class files are working as well.

    3) You can set your context to reloadable=true to tell Tomcat to reload your web app context when files change, this isn’t as nice as hot sync changes, but it’s a sure fire way to reload after every change.

    #255833 Reply

    dtoalrossi
    Member

    Thanks for the response. Here’s mine:

    1) The “shape” is not changing, so that’s not it.

    2) JSP timestamps are changing, but class files are not.

    3) If all else fails, I will try that!

    I suppose that “reloadable=true” is probably the best bet, seing as my classfiles are not being updated. Seems strange that the JSP files are deploying automatically, but not the new classfiles. When I save a .java file, it thinks for about half a second, but I can’t see what the dialog says.

    #255837 Reply

    Riyad Kalla
    Member

    2) So in the deployed folder, the timestamps on your JSP pages are updating but the class files aren’t… weird. Is this a simple Web Project setup, or is this some custom project layout with a certain number of dependent projects or something like that?

    #255848 Reply

    dtoalrossi
    Member

    It is a simple project. There are no dependant projects, nor does this project depend on another. About the only thing that could possibly be “non-standard” would be that it’s a project checked out from a Subversion repository (though local .property files are fixed). Ant “Build” and “Deploy” works just fine.

    #255850 Reply

    Riyad Kalla
    Member

    wait, is this even a MyEclipse Web Project? You said Ant “build” and “deploy” work fine but MyEclipse makes no use of Ant, so how are you building and deploying this app? Are you using MyEclipse to handle the deployment of the project? What about the running of the app server?

    To check if this is a web project, right click and go to your project properties, do you have a “MyEclipse-Web” preference panel for the project?

    #255851 Reply

    dtoalrossi
    Member

    My reference to using Ant (as an alternative build/delploy strategy) is simply to show that the error does not have to do with the build and deploy settings for the file. I was trying to use MyEclipse for the deployment (set up server, deploy to server), but that wasn’t working so in the mean time I am using Ant to build and deploy the project (I have to get work done).

    I do have all the “MyEclipse-XXX” preference panels for this project.

    #255852 Reply

    Riyad Kalla
    Member

    I have a few ideas for testing what is going on if you have the time/motivation to try them. Lastly I am certainly happy to look at this project if you can/want to email it to me to see if this is possibly a setup issue.

    Let me know which way you want to go (whichever is easier)

    #255853 Reply

    dtoalrossi
    Member

    I can’t send it to you, but would be willing to do some tests. No guarantee I can get to them in a timely manner, but I would like to get sync-on-demand working, as I think it’s a pretty cool feature.

    Again, thanks for your time on this!

    #255855 Reply

    Riyad Kalla
    Member

    Ok so the first thing to check is if there is something wrong with the project.

    1) Create a new MyEclipse Web Project, name it TestWeb
    2) Add a package “com.test” to the /src dir. Add a single class called “Test” to the com.test package
    3) Add a single jsp page using the default JSP template to the WebRoot directory
    4) Deploy the project as an exploded project to your tomcat application server. Use windows explorer to navigate to your Tomcat/webapps/TestWeb/WEB-INF/classes/com/test folder.
    5) Wait a minute or two then edit the Test class by adding a line like “public String name;” and save it. Now switch back to windows explorer, did the time stamp up date?
    6) Do the same for the JSP page, did the time stamp update?

    I NO for either question, create a new workspace (File > Switch Workspace) wth a new TestWeb2 project in it and try the steps over again, did those timestamps update?

    #255879 Reply

    dtoalrossi
    Member

    The answer is “Yes” to both: Hot Replace works for both classes and jsp files for the newly created project. Still not working for the real project with which I’m having trouble.

    #255880 Reply

    Riyad Kalla
    Member

    Can you simply move all the resources from the old project into the new one? Did you try recreating the deployment for the troubled project after removing the deployment, cleaning the project, then recreating it?

    #255898 Reply

    dtoalrossi
    Member

    I’m not sure how to copy resources from old to new without messing up the SVN stuff.

    I’m now wondering if the problem is that this project’s files were downloaded (via “checkout”) from a Subversion repository. I replaced information in the proper build and .properties files so it will build manually using Ant, so it seems like the file structure is fine and the problem lies with some bug/configuration error with either Eclipse or MyEclipse. Hmmm.

    #255905 Reply

    dtoalrossi
    Member

    Are there any other configuration settings I should check to try and fix this? This feature would be a big selling point for me, so if there’s any way to get it working with my configuration, I’d love to know!

    #255917 Reply

    Riyad Kalla
    Member

    I have to admit I’m very confused about the absolute setup of your project (not clear yet if you are testing Ant or using Ant, not clear if this original report was against a pure web project or one where Ant played a big roll in it’s compilation etc.)

    But I just had a thought… if you refresh your project after compiling, do the class files get updated then? It’s possible that if you are using Ant to build the class files into the dir, MyEclipse isn’t seeing them because that’s an out-of-eclipse-process. You can fix this by going to Window > Prefs > Workspace > Automatically refresh, that should notice changes and update Eclipse right away, which will trigger the build cycle and MyEclipse deployment cycle.

Viewing 15 posts - 1 through 15 (of 16 total)
Reply To: sync-on-demand not working

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