Bug 17503 - JavaModelException attempting to save cu with Japanese characters
Summary: JavaModelException attempting to save cu with Japanese characters
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 F3   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-23 16:50 EDT by Darin Swanson CLA
Modified: 2002-05-30 13:15 EDT (History)
0 users

See Also:


Attachments
CompilationUnit containing Japanese characters (627 bytes, text/plain)
2002-05-23 16:53 EDT, Darin Swanson CLA
no flags Details
Zip of CopyOf.java (412 bytes, application/zip)
2002-05-28 15:10 EDT, Darin Swanson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Swanson CLA 2002-05-23 16:50:42 EDT
F1
Win2000 Japanese

I have created a compilation unit that is named with Japanese characters.
The cu has a public main type with the same name.
I will attach the cu.

Attempting to save this cu results in the following exception:

Java Model Exception: Java Model Status [?? does not exist.]
        at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(Java
Element.java:501)
        at org.eclipse.jdt.internal.core.JavaElement.openHierarchy(JavaElement.j
ava:530)
        at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.
java:309)
        at org.eclipse.jdt.internal.core.SourceType.getSuperclassName(SourceType
.java:250)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.subtypesInclude
SupertypeOf(TypeHierarchy.java:1161)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffectedByTyp
e(TypeHierarchy.java:1032)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffectedByOpe
nable(TypeHierarchy.java:983)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffected(Type
Hierarchy.java:807)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffectedByChi
ldren(TypeHierarchy.java:820)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffectedByPac
kageFragment(TypeHierarchy.java:889)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffected(Type
Hierarchy.java:804)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffectedByChi
ldren(TypeHierarchy.java:820)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffectedByPac
kageFragmentRoot(TypeHierarchy.java:939)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffected(Type
Hierarchy.java:802)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffectedByChi
ldren(TypeHierarchy.java:820)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffectedByJav
aProject(TypeHierarchy.java:871)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffected(Type
Hierarchy.java:800)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffectedByChi
ldren(TypeHierarchy.java:820)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffectedByJav
aModel(TypeHierarchy.java:836)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffected(Type
Hierarchy.java:798)
        at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.elementChanged(
TypeHierarchy.java:321)
        at org.eclipse.jdt.internal.core.JavaModelManager.fire(JavaModelManager.
java:657)
        at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaPro
cessor.java:1097)
        at org.eclipse.core.internal.events.NotificationManager$1.run(Notificati
onManager.java:128)
        at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatfo
rm.java:802)
        at org.eclipse.core.runtime.Platform.run(Platform.java:416)
        at org.eclipse.core.internal.events.NotificationManager.notify(Notificat
ionManager.java:143)
        at org.eclipse.core.internal.events.NotificationManager.broadcastChanges
(NotificationManager.java:67)
        at org.eclipse.core.internal.resources.Workspace.broadcastChanges(Worksp
ace.java:133)
        at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.
java:741)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1366
)
        at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOp
eration.java:78)
        at org.eclipse.ui.texteditor.AbstractTextEditor.performSaveOperation(Abs
tractTextEditor.java:2019)
        at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.performS
aveOperation(CompilationUnitEditor.java:614)
        at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSave(C
ompilationUnitEditor.java:662)
        at org.eclipse.ui.internal.EditorManager$10.run(EditorManager.java:960)
        at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalCont
ext.java:296)
        at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:249)
        at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDi
alog.java:335)
        at org.eclipse.ui.internal.EditorManager.runProgressMonitorOperation(Edi
torManager.java:838)
        at org.eclipse.ui.internal.EditorManager.saveEditor(EditorManager.java:9
65)
        at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:1
945)
        at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:32)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:590)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:407)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(Act
ionContributionItem.java:361)
        at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContri
butionItem.java:352)
        at org.eclipse.jface.action.ActionContributionItem$ActionListener.handle
Event(ActionContributionItem.java:47)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1085)
        at org.eclipse.ui.internal.Workbench.run(Workbench.java:1068)
        at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoa
der.java:739)
        at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:200)
        at org.eclipse.core.launcher.Main.run(Main.java:643)
        at org.eclipse.core.launcher.Main.main(Main.java:476)
Comment 1 Darin Swanson CLA 2002-05-23 16:53:15 EDT
Created attachment 1018 [details]
CompilationUnit containing Japanese characters
Comment 2 Darin Swanson CLA 2002-05-23 17:04:01 EDT
C:\jdk1.4.1_b11\jdk1.4.1\bin>java -version
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-
Java HotSpot(TM) Client VM (build 1.4.1-beta-b11, mixed mode)
Comment 3 Olivier Thomann CLA 2002-05-23 18:19:20 EDT
Could you please zip this cu and provide the zip file? I think there is a conversion encoding 
problem with the attachment. The name of the CU is ??. We lost the Japanese characters in this 
conversion.
Are you using a Japanese encoding as the platform default encoding?
Comment 4 Olivier Thomann CLA 2002-05-25 19:52:03 EDT
In order to reproduce this PR, we need your test case in a zip file. Please attach the zip file to this 
PR. Thanks.
Comment 5 Darin Swanson CLA 2002-05-25 21:44:25 EDT
I will get the zip on Tuesday.
Comment 6 Olivier Thomann CLA 2002-05-28 12:30:54 EDT
Please attach the zip file as soon as you get it. Without a valid test case, I cannot reproduce it.
Comment 7 Darin Swanson CLA 2002-05-28 14:27:52 EDT
Winzip will not accept the file to add to an archive...I will see what I can do.
Comment 8 Olivier Thomann CLA 2002-05-28 15:08:06 EDT
What encoding are you using in Window>Preferences>Workbench>Work in progress>Text File 
Encoding?
Comment 9 Darin Swanson CLA 2002-05-28 15:10:22 EDT
Created attachment 1092 [details]
Zip of CopyOf.java
Comment 10 Olivier Thomann CLA 2002-05-30 10:35:18 EDT
Did you try again with the latest integration build? If yes, did you get the same problem?
Comment 11 Darin Swanson CLA 2002-05-30 11:40:33 EDT
Still does work on build 20020529.

Two test cases:
On a Japanese win 2000 machine, create a shortcut to eclipse.exe
Copy the first 2 Japanese characters after the eclipse name (first one looks 
like a big ^)
Create a method in a class with this name

Will not compile (errors shown in task list)

Create a class called A
Refactor to rename using the Japanese characters
Paste the japanese characters into the name of the class (they had been changed 
to ?? on creation)
Save
You have errors (Syntax error on token ?)
Paste some methods from another class
Java model exception
Comment 12 Darin Swanson CLA 2002-05-30 11:55:31 EDT
That should be does NOT work on 20020529
Comment 13 Olivier Thomann CLA 2002-05-30 12:26:21 EDT
Which encoding are you using in the Workbench preferences?
Comment 14 Darin Swanson CLA 2002-05-30 12:48:55 EDT
The problem has changed...the machine we had was using the wrong locale.
The encoding is the default encoding (MS932).

The current problem is the compilation units are created on disk, but no editor 
can be opened on them as you get "****.java does not exist.

John W and I are working on the problem...appears to be further down then your 
stuff.  We will likely move this bug.
Comment 15 Darin Swanson CLA 2002-05-30 13:15:11 EDT
Appears to be a problem with our install...sorry about the wasted time.