Bug 71017 - Conflicting classpaths causes continuous autobuild loop
Summary: Conflicting classpaths causes continuous autobuild loop
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.1 M1   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-28 15:44 EDT by William R. Burdick Jr. CLA
Modified: 2005-01-11 11:02 EST (History)
0 users

See Also:


Attachments
The utilities project classpath (1.65 KB, text/plain)
2004-07-29 10:42 EDT, William R. Burdick Jr. CLA
no flags Details
Classpath for the J2ME project that uses some of the utilities (732 bytes, text/plain)
2004-07-29 10:45 EDT, William R. Burdick Jr. CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description William R. Burdick Jr. CLA 2004-07-28 15:44:12 EDT
I have two projects with conflicting classpaths.  The first is a standard Java
project containing utility code.  The second is a Java project that uses a J2ME
class library (in its own folder) and does not use JDK libraries.  The J2ME
project uses the utility project.  I accidentally made a class in the utility
project import IdentityHashMap.  I am using that utility class in the J2ME
project and there is no IdentityHashMap in the J2ME lib that I'm using.

This caused the autobuild facility to continuously attempt to rebuild the
workspace.  Removing the dependency on IdentityHashMap stopped the rebuilding.
Comment 1 Kent Johnson CLA 2004-07-28 17:19:08 EDT
Can you please paste in the .classpath files of the 2 projects.
Comment 2 William R. Burdick Jr. CLA 2004-07-29 10:42:12 EDT
Created attachment 13665 [details]
The utilities project classpath
Comment 3 William R. Burdick Jr. CLA 2004-07-29 10:45:35 EDT
Created attachment 13666 [details]
Classpath for the J2ME project that uses some of the utilities

note that this uses its own classes.zip file instead of rt.jar, but it also
references AR-Utilities, which uses rt.jar.
Comment 4 Kent Johnson CLA 2004-07-29 11:33:12 EDT
All I see is a source folder:
	<classpathentry kind="src" path="/AR-Utilities" exported="true" />

Where is the reference to rt.jar in the J2ME project?
Comment 5 Kent Johnson CLA 2004-07-29 11:35:36 EDT
Can you also try not exporting the libraries to see if that changes anything?

Go to the Java Build Path->Order And Export page & deselect the libraries.
Comment 6 William R. Burdick Jr. CLA 2004-07-29 13:03:41 EDT
The J2ME project intentionally does not reference rt.jar (comment #3).  That is
the J2SE class library and it would be incorrect for a J2ME project to reference
it.  The J2ME project uses a J2ME classes.zip library in its libs folder instead
of rt.jar.  This creates an implicit requirement that any classes which the J2ME
project uses from the utilities project must only use the subset of J2SE which
is contained in J2ME.  The violation of this requirement apparently triggered
the continuous rebuild problem.

Also, the AR-Utilities project exports the correct libraries -- these are needed
by the projects that use the utilities project and would cause many compilation
problems if they were eliminated.  The exports from J2ME project are also
required by other projects.
Comment 7 Kent Johnson CLA 2004-07-29 14:04:10 EDT
I understand J2ME projects do not want to reference rt.jar... but you 
said : "note that this uses its own classes.zip file instead of rt.jar, but it 
also references AR-Utilities, which uses rt.jar.".

The confusion is over the name AR-Utilities.

Is it both a source folder & a project?
Comment 8 Kent Johnson CLA 2004-07-29 14:06:29 EDT
To speed things up, please try making 2 small projects (based on your current 
2 projects) that duplicate the problem.
Comment 9 Kent Johnson CLA 2004-07-29 14:12:26 EDT
Forget about comment #7

I missed the '/' in front of the name.
Comment 10 Kent Johnson CLA 2004-08-03 14:56:09 EDT
So any chance of making 2 small projects that duplicate your problem?
Comment 11 William R. Burdick Jr. CLA 2004-08-03 16:01:24 EDT
I've been trying -- so far no joy.  You may have to write me off as a crackpot
Comment 12 Kent Johnson CLA 2004-08-03 16:16:55 EDT
No I believe you have found a problem, but we need to duplicate it to track it 
down.

Do you have a cycle between any of your projects?
Comment 13 William R. Burdick Jr. CLA 2004-08-04 12:55:14 EDT
No cycles; the wierdness is that the project I'm working on has to run in both
J2SE and J2ME, so I'm using the J2ME PPro class lib to make sure that I'm not
using any J2SE-only features.  I'm also using SWT, with the main GUI stuff being
PPC compliant, but with subclasses that use extra J2SE features (like drag and
drop, styled text, etc.).

There are two projects that use the core J2ME/J2SE project, one that uses J2SE
and one that uses J2ME.

The Utilities project makes things worse, because it is a J2SE project and it
does use/supply non J2ME-compliant code.

Despite this one problem (and having to use custom class paths in the
launchers), we have been very successful so far with this approach.  We have an
app that runs both on the Pocket PC (using J9) and on regular desktops.
Comment 14 Kent Johnson CLA 2004-08-04 13:13:18 EDT
Is everybody else experiencing the same problem(s)?
Comment 15 William R. Burdick Jr. CLA 2004-08-04 16:11:44 EDT
No one else has seen this problem and I can't reproduce it anymore.  I tried
making a few test projects with similar dependencies, but no joy there.
Comment 16 Kent Johnson CLA 2004-08-04 16:39:58 EDT
So you cannot reproduce it with your normal projects anymore?

If so, we'll close this & you can reopen it if the problem comes back.
Comment 17 Kent Johnson CLA 2004-08-06 12:41:02 EDT
Closing until we get a reproduceable case.