| Author |
Message |
|
|
Post subject: MyEclipse stops generated compiled classes for src
Posted: Jan 02, 2008 - 11:37 AM
|
|
Joined: Jan 02, 2008
Posts: 7
|
|
I have had the problem twice now whereby MyEclipse stops creating compiled classes under WEB-INF for my Web App project.
The first time it happened was after MyEclipse crashed.
The log file was showing that the crash had happened and I followed the instructions on this forum to recreate the workspace and the project. Just before Christmas I had the same problem again.
To my knowledge on the more recent occasion there was no similar crash, the log file was not showing any errors at all on startup but the class files were not being generated when the files were saved or modified.
A clean and rebuild fails to re-generate the class files and I again had to rebuild the workspace.
Is there any other way to solve or diagnose this issue aswe about to embark on a major new project and this sort of thing scares me to death?!
Cheers Steve |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: MyEclipse stops generated compiled classes for src
Posted: Jan 02, 2008 - 06:21 PM
|
|
Registered Member


Joined: Apr 18, 2007
Posts: 5662
|
|
|
|
|
 |
|
|
Post subject:
Posted: Jan 02, 2008 - 07:39 PM
|
|
Joined: Jan 02, 2008
Posts: 7
|
|
Thanks, but I already tried that the first time around and was still in place during the second instance. My eclipse.ini currently looks like:
-showsplash
-clean
com.genuitec.myeclipse.product
--launcher.XXMaxPermSize
256m
-vmargs
-Xms128m
-Xmx512m
-Duser.language=en
-XX:PermSize=128M
-XX:MaxPermSize=256M |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 06, 2008 - 08:41 PM
|
|
Moderator


Joined: Jan 06, 2004
Posts: 23307
|
|
Steve,
What kind of projects is this? If you open the project properties and go to the MyEclipse node, which icons are highlighted?
Also how are you verifying that the source files are not being compiled to the /classes directory?
And lastly, under your project properties, under Java Build Path and then Source tab, what directory or directories are set as your source folder, and which dir (At the bottom) is set as your output folder? |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 09, 2008 - 08:52 AM
|
|
Joined: Jan 02, 2008
Posts: 7
|
|
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 |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 09, 2008 - 03:07 PM
|
|
Moderator


Joined: Jan 06, 2004
Posts: 23307
|
|
| Quote: |
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). |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 09, 2008 - 03:10 PM
|
|
Joined: Jan 02, 2008
Posts: 7
|
|
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. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 09, 2008 - 03:54 PM
|
|
Moderator


Joined: Jan 06, 2004
Posts: 23307
|
|
| Quote: |
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.
| Quote: |
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. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: class files still not generated under \web-inf\classes\ for
Posted: Aug 29, 2008 - 11:03 PM
|
|

Joined: Aug 29, 2008
Posts: 1
|
|
| 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.. |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: class files still not generated under \web-inf\classes\
Posted: Sep 04, 2008 - 09:28 PM
|
|
Moderator


Joined: Jan 06, 2004
Posts: 23307
|
|
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. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: Re: RE: class files still not generated under \web-inf\class
Posted: Sep 23, 2008 - 10:36 PM
|
|
Registered Member


Joined: May 18, 2005
Posts: 6
|
|
| 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 |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Re: RE: class files still not generated under \web-inf\c
Posted: Sep 26, 2008 - 05:49 PM
|
|
Moderator


Joined: Jan 06, 2004
Posts: 23307
|
|
| Quote: |
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. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|