Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 178156 - [mis-compilation] Cannot create basic java class
[mis-compilation] Cannot create basic java class
Product: Fedora
Classification: Fedora
Component: eclipse (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Andrew Overholt
: 179070 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2006-01-17 22:14 EST by Ricky Ng-Adam
Modified: 2007-11-30 17:11 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-07 11:37:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
screenshot from clean workspace (99.84 KB, image/png)
2006-01-19 19:28 EST, Ricky Ng-Adam
no flags Details

  None (edit)
Description Ricky Ng-Adam 2006-01-17 22:14:53 EST
Description of problem:

cannot create HelloWorld program:

Creation of element failed.

HelloWorld [in [Working copy] HelloWorld.java [in <default> [in <project root>
[in test2]]]] does not exist

and after that, when I click finish:

Creation of element failed.
Reason: /test2/HelloWorld.java already exists in target

Version-Release number of selected component (if applicable):


How reproducible:

Steps to Reproduce:
1. New java project
2. New class
3. HelloWorld with main()
Actual results:

inability to close wizard with finish (must press cancel)
empty HelloWorld.java file

Expected results:

A simple Java program

Additional info:
Comment 1 Andrew Overholt 2006-01-19 16:48:46 EST
I can't duplicate this.  Did you try with a clean workspace?  You can use a
different workspace with:

eclipse -data <new workspace location ex. workspace2>
Comment 2 Ricky Ng-Adam 2006-01-19 19:28:50 EST
Created attachment 123465 [details]
screenshot from clean workspace
Comment 3 Andrew Overholt 2006-01-20 10:12:39 EST
Hmm.  Can you temporarily move ~/.eclipse out of the way?

mv ~/.eclipse{,.beforetest178156}
eclipse -data <newworkspace>
mv ~/.eclipse{.beforetest178156,}

(or something like that)

Also, can you give me the output of the following, please:

which java
java -version
which javac
javac -version
uname -a
rpm -q java-1.4.2-gcj-compat{,-devel}
rpm -q gcc-java
Comment 4 Andrew Overholt 2006-01-20 14:02:32 EST
I am getting this now as well.  This is what is in <workspace>/.metadata/.log:

Java Model Exception: Java Model Status [Test2 [in [Working copy] Test2.java [in
<default> [in src [in Test]]]] does not exist]
   at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException
   at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed
   at org.eclipse.jdt.internal.core.JavaElement.getElementInfo
   at org.eclipse.jdt.internal.core.JavaElement.getElementInfo
   at org.eclipse.jdt.internal.core.JavaElement.getChildren (JavaElement.java:173)
   at org.eclipse.jdt.internal.core.JavaElement.getChildrenOfType
   at org.eclipse.jdt.internal.core.SourceType.getMethods (SourceType.java:355)
   at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.createInheritedMethods
   at org.eclipse.jdt.ui.wizards.NewClassWizardPage.createTypeMembers
   at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.createType
   at org.eclipse.jdt.internal.ui.wizards.NewClassCreationWizard.finishPage
   at org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run
   at org.eclipse.jdt.internal.core.BatchOperation.executeOperation
   at org.eclipse.jdt.internal.core.JavaModelOperation.run
   at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1719)
   at org.eclipse.jdt.core.JavaCore.run (JavaCore.java:3761)
   at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run
   at org.eclipse.jface.operation.ModalContext$ModalContextThread.run

We will try to come up with a test case that is reproduceable.

Thanks for bringing this to my attention, Ricky.
Comment 5 Andrew Overholt 2006-01-20 14:26:46 EST
Removing /usr/lib/gcj/eclipse/org.eclipse.jdt.core_3.1.1.jar.so{,.db} and then
doing a rebuild-gcj-db works around this issue so it appears to be one of native
compilation and not a class library issue.
Comment 6 Andrew Overholt 2006-01-20 14:37:30 EST
I haven't tried any other arches, but this happens on at least i386.

Updating summary.

This should probably be added as an FC blocker.
Comment 7 Anthony Green 2006-01-27 20:09:38 EST
(In reply to comment #6)
> I haven't tried any other arches, but this happens on at least i386.

This happens on x86-64 as well.
Comment 8 Anthony Green 2006-01-28 12:57:39 EST
*** Bug 179070 has been marked as a duplicate of this bug. ***
Comment 9 Andrew Haley 2006-01-30 12:50:55 EST
I'm debugging this.
Comment 10 Andrew Overholt 2006-02-07 11:37:25 EST
This is fixed in eclipse-3.1.2-1jpp_4fc which hit rawhide today.  It was
compiled against gcc-4.1.0-0.23 which contains Andrew (H)'s fix.  Thanks again,
Andrew (H)!

Note You need to log in before you can comment on or make changes to this bug.