MyEclipse stops generated compiled classes for src

  1. MyEclipse IDE > General Development

This topic contains 12 replies, has 6 voices, and was last updated by  axel-osorio 5 months, 1 week ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #280140 Reply

    This message has not been recovered.

    #280165 Reply

    Loyal Water
    Member

    This message has not been recovered.

    #280185 Reply

    This message has not been recovered.

    #280309 Reply

    Riyad Kalla
    Member

    This message has not been recovered.

    #280442 Reply

    Since your response we have had another instance whereby another user had had the same issue – i.e. no compiled classes are generated.

    The project is a Web Project, although we have had the same error on a Java Project.

    In terms of icons highlighted under Project->Properties->MyEclipse we have just ‘WEB’ as an installed capability.

    We are verifying that the files are not compiled by looking under the Tomcat work directory after deployment. We have tried removing the deployment, doing all manner of project cleans and rebuilds and no classes get generated.

    Obviously the developer is working at some point i.e. code changes are being effected and then at some undetermined point the classes stop getting recompiled so new changes and new files are not compiled as classes.

    In terms of source directories (for project Jasper) we have

    Build Path = Jasper/src
    Default output folder = Jasper/WebRoot/WEB-INF/Classes

    As I said the project is OK, and then at some point it stops working so I know that the settings are at least at some point valid.

    Thanks Steve

    #280455 Reply

    Riyad Kalla
    Member

    We are verifying that the files are not compiled by looking under the Tomcat work directory after deployment. We have tried removing the deployment, doing all manner of project cleans and rebuilds and no classes get generated.

    This is 3 level disconnected from the build process. I would encourage you to instead, open the Navigator view, and then drill down to your compile dir and see for sure if your class files are getting generated or not (in the package view, output dirs are hidden by default, so you will have to open the Navigator view).

    #280457 Reply

    OK I can do next time this occurs… However it still doesn’t explain why the app development runs OK under MyEclipse / TomCat for days and then suddenly any changes we make do not get picked up and the old classes are used instead?!

    If we go to the location the classes are compiled to and remove them they are not regenerated yet on a system that is OK they “are” compiled.

    Only a project rebuild solves the issue.

    #280459 Reply

    Riyad Kalla
    Member

    However it still doesn’t explain why the app development runs OK under MyEclipse / TomCat for days and then suddenly any changes we make do not get picked up and the old classes are used instead?!

    There are so many moving parts involved with this process that I think saying “The classes aren’t getting compiled” is a red herring. Let me explain:

    With an exploded deployment project, the order of operations for a changed file is:
    1. Save a changed file
    2. Saving will compile the class in ME to the output dir (e.g. /WebRoot/WEB-INF/classes)
    3. MyEclipse then ties into the build cycle and copies the changed class out to the deployed location, overwriting the existing class.
    **4. If possible, MyEclipse will also try and hot-sync the class inside the running VM for Tomcat. The JVM has strict requirements on classes that can/can’t be replaced during run time, so it’s entirely possible this will fail. The debugger *will* show you an error unless you have turned this off.
    5. Regardless of if #4 succeeded, Tomcat can be configured to “notice” changed classes or libraries and reload the specific web context when it sees them, this might take place as well. Allowing you to see your changes right away and continue working.

    So between steps #4 and 5 the onus of reloading the class switches from MyEclipse to Tomcat. So when you say you are working for days and suddenly you stop seeing your changes being loaded *changes are* that Tomcat needs to get restarted or the work dir cleaned or something else done on the Tomcat side to kick it into gear again as it’s stopped reloading the changes MyEclipse is still deploying.

    If we go to the location the classes are compiled to and remove them they are not regenerated yet on a system that is OK they “are” compiled.

    That depends on how you have your project setup. Simply erasing the classes won’t trigger the build cycle in MyEclipse and you shouldn’t ever need to do this (just blow away your build directory manually). You can always go to Project > Clean to clean the project (that’s Eclipse terminology for “Rebuild my project”).

    You might also want to go to Window > Preferences > General > Workspace and make sure your workspace is set to automatically build changed resources. That may help things be more “automatic” in nature.

    #288692 Reply

    Deepinder Singh
    Participant

    I have spent a day trying to figure out why class files are not generated under the WEB-INF\classes folder. The folder just remains empty. I am using MyEclipse Enterprise Workbench 6.5.1 with Java 6 and Eclipse 3.3 Classic. This is really very frustrating. Can you PLEASE help with some pointers to fix this..

    #288803 Reply

    Riyad Kalla
    Member

    deepinder.singh,

    If you open your project properties, and go to the Java Build Path > Source (tab), make sure that your output dir is set accordingly to the WEB-INF/classes output dir. Also make sure that the “Allow output folders for source folders” is unchecked, so all source dirs go to the single output dir.

    Also make sure that your source dirs are all registered.

    #289298 Reply

    cschofld
    Member

    @support-rkalla wrote:

    deepinder.singh,

    If you open your project properties, and go to the Java Build Path > Source (tab), make sure that your output dir is set accordingly to the WEB-INF/classes output dir. Also make sure that the “Allow output folders for source folders” is unchecked, so all source dirs go to the single output dir.

    Also make sure that your source dirs are all registered.

    Is “Allow output folders for source folders” no longer an option?

    I have some existing projects that have a different structure. Using past versions of myeclipse I have been able to check “Allow output folders for source folders” and have it deploy based on the output settings for the source folder. For example the project has web/images, web/includes, and web/jsp folders. Setting these as source folders with output to “WebRoot” would deploy just fine.

    I’m now getting an error whenever a source folder is set to output other than the default.

    I’ve tried cleaning the project, creating a new workspace. Should this work?

    Here is the error:
    org.eclipse.core.internal.resources.ResourceException: Resource ‘/oat/WebRoot/WEB-INF/classes’ does not exist.
    at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:310)
    at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:193)
    at org.eclipse.core.internal.resources.Container.members(Container.java:181)
    at org.eclipse.core.internal.resources.Container.members(Container.java:164)
    at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.cleanOutputFolders(BatchImageBuilder.java:98)
    at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:45)
    at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:269)
    at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:183)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:624)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:166)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:197)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:246)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:249)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:302)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:334)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:137)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

    Here is my installation:
    *** Date:
    Tuesday, September 23, 2008 3:33:23 PM MDT

    ** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.5.0_11

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 6.5.1 GA
    Build id: 6.5.1-GA-20080715

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 6.5.1 GA
    Build id: 6.5.1-GA-20080715

    Eclipse Platform

    Version: 3.3.3.r33x_r20080129-_19UEl7Ezk_gXF1kouft
    Build id: M20080221-1800

    Eclipse RCP

    Version: 3.3.3.r33x_r20080129-8y8eE9UEUWI6qujeED0xT7bc
    Build id: M20080221-1800

    Eclipse Java Development Tools

    Version: 3.3.2.r33x_r20080129-7o7jE7_EDhYDiyVEnjb1pFd7ZGD7
    Build id: M20080221-1800

    Eclipse Plug-in Development Environment

    Version: 3.3.3.r33x_r20080129-7N7M5DQVIA_6oJsEFkEL
    Build id: M20080221-1800

    Eclipse Project SDK

    Version: 3.3.3.r33x_r20080129-7M7J7LB-u3aphGW6o3_VmiVfGXWO
    Build id: M20080221-1800

    Eclipse Graphical Editing Framework

    Version: 3.3.2.v20080129
    Build id: 20080221-1602

    Eclipse startup command=-data
    C:\Vision\eclipse-ws\wls7
    -os
    win32
    -ws
    win32
    -arch
    x86
    -showsplash
    -launcher
    C:\Program Files\MyEclipse 6.5\eclipse\eclipse.exe
    -name
    Eclipse
    –launcher.library
    C:\Program Files\MyEclipse 6.5\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.3.R33x_v20080118\eclipse_1023.dll
    -startup
    C:\Program Files\MyEclipse 6.5\eclipse\plugins\org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar
    -exitdata
    dc8_68
    -clean
    -vm
    C:\Program Files\MyEclipse 6.5\jre\bin\javaw.exe

    #289434 Reply

    Riyad Kalla
    Member

    Here is the error:
    org.eclipse.core.internal.resources.ResourceException: Resource ‘/oat/WebRoot/WEB-INF/classes’ does not exist.

    That is a core builder issue, just double check your settings under your source tab, it looks like you have that directory set somewhere, but it doesn’t actually exist. Try and create it and see if the project is happy again.

    #643762 Reply

    axel-osorio
    Participant

    I had this problem, I tried the clean, the build manually, open, closing the project, deleting and open, etc, nothing works, and after 4 hours I get a workaround what works for me.

    0.- Please, Make a RAR, ZIP or copy from your entire project folder as a backup if it doesn’t works and you mess around, ok, now:
    1.- Clean the Project. It cleaned all my class files from the output folder, but doesn’t generate the class files after the clean with the building (but we already know that)
    2.- Delete the project (warning, make sure the Delete contents is not selected or your project will dissapear). For me it says something about that desincronysation with code mix, and hibernate, blabla)
    3.- Close myEclipse
    4.- Restart your computer.
    5.- Open myEclipse
    6.- Import the project with the option “Projects from folder or Archive”, not with the “existing projects into workspace” option.
    7.- Myeclipse start to build the class files, I don’t know why, but works for me, I hope this helps somebody else.

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: MyEclipse stops generated compiled classes for src

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