Bug 178156

Summary: [mis-compilation] Cannot create basic java class
Product: [Fedora] Fedora Reporter: Ricky Ng-Adam <rngadam>
Component: eclipseAssignee: Andrew Overholt <overholt>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: aph, green, ifoox, mckinlay, tromey
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-07 16:37:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot from clean workspace none

Description Ricky Ng-Adam 2006-01-18 03:14:53 UTC
Description of problem:

cannot create HelloWorld program:

Creation of element failed.

Reason:
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):

eclipse-platform-3.1.1-1jpp_15fc
eclipse-platform-devel-3.1.1-1jpp_15fc
eclipse-pde-devel-3.1.1-1jpp_15fc
eclipse-pydev-0.9.3_fc-13
eclipse-ecj-3.1.1-1jpp_15fc
eclipse-jdt-3.1.1-1jpp_15fc
eclipse-rcp-devel-3.1.1-1jpp_15fc
eclipse-pde-3.1.1-1jpp_15fc
eclipse-changelog-2.0.1_fc-23
eclipse-cdt-3.0.1-1jpp_3fc
eclipse-bugzilla-0.1.1_fc-6
eclipse-rcp-3.1.1-1jpp_15fc
eclipse-jdt-devel-3.1.1-1jpp_15fc

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 21:48:46 UTC
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-20 00:28:50 UTC
Created attachment 123465 [details]
screenshot from clean workspace

Comment 3 Andrew Overholt 2006-01-20 15:12:39 UTC
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 19:02:32 UTC
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
(JavaElement.java:468)
   at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed
(JavaElement.java:499)
   at org.eclipse.jdt.internal.core.JavaElement.getElementInfo
(JavaElement.java:232)
   at org.eclipse.jdt.internal.core.JavaElement.getElementInfo
(JavaElement.java:218)
   at org.eclipse.jdt.internal.core.JavaElement.getChildren (JavaElement.java:173)
   at org.eclipse.jdt.internal.core.JavaElement.getChildrenOfType
(JavaElement.java:187)
   at org.eclipse.jdt.internal.core.SourceType.getMethods (SourceType.java:355)
   at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.createInheritedMethods
(NewTypeWizardPage.java:2227)
   at org.eclipse.jdt.ui.wizards.NewClassWizardPage.createTypeMembers
(NewClassWizardPage.java:249)
   at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.createType
(NewTypeWizardPage.java:1852)
   at org.eclipse.jdt.internal.ui.wizards.NewClassCreationWizard.finishPage
(NewClassCreationWizard.java:58)
   at org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run
(NewElementWizard.java:117)
   at org.eclipse.jdt.internal.core.BatchOperation.executeOperation
(BatchOperation.java:39)
   at org.eclipse.jdt.internal.core.JavaModelOperation.run
(JavaModelStatus.java:718)
   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
(WorkbenchRunnableAdapter.java:87)
   at org.eclipse.jface.operation.ModalContext$ModalContextThread.run
(ModalContext.java:113)

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 19:26:46 UTC
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 19:37:30 UTC
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-28 01:09:38 UTC
(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 17:57:39 UTC
*** Bug 179070 has been marked as a duplicate of this bug. ***

Comment 9 Andrew Haley 2006-01-30 17:50:55 UTC
I'm debugging this.


Comment 10 Andrew Overholt 2006-02-07 16:37:25 UTC
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)!