New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalArgumentException: No enum const class com.google.gwt.dev.js.JsStackEmulator$StackMode.NATİVE #5564

Closed
dankurka opened this Issue Jun 10, 2015 · 10 comments

Comments

Projects
None yet
2 participants
@dankurka
Member

dankurka commented Jun 10, 2015

Originally reported on Google Code with ID 5565


Found in GWT Release (2.1.0):

Encountered on Windows 7 Ultimate

After upgrading to GWT 2.1.0 from RC1 when I tried to GWT compile project or try to
Deploy App Engine Project I get the following error. I'm using Turkish as the regional
settings and because of one line in error message (java.lang.IllegalArgumentException:
No enum const class com.google.gwt.dev.js.JsStackEmulator$StackMode.NATİVE). After
some searching I found that StackMode has 3 properties; STRIP, NATIVE, EMULATED which
makes me thing something about regional settings transform NATIVE --> NATİVE. I had
no problems in RC1.

Compiling module com.quasau.gwt.mobile.MobileApplication
   Compiling 6 permutations
      Compiling permutation 0...
      [ERROR] Unexpected internal compiler error
java.lang.IllegalArgumentException: No enum const class com.google.gwt.dev.js.JsStackEmulator$StackMode.NATİVE
    at java.lang.Enum.valueOf(Unknown Source)
    at com.google.gwt.dev.js.JsStackEmulator$StackMode.valueOf(JsStackEmulator.java:808)
    at com.google.gwt.dev.js.JsStackEmulator.getStackMode(JsStackEmulator.java:831)
    at com.google.gwt.dev.jjs.impl.GenerateJavaScriptAST.<init>(GenerateJavaScriptAST.java:2116)
    at com.google.gwt.dev.jjs.impl.GenerateJavaScriptAST.exec(GenerateJavaScriptAST.java:2019)
    at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation(JavaToJavaScriptCompiler.java:304)
    at com.google.gwt.dev.jjs.UnifiedAst.compilePermutation(UnifiedAst.java:122)
    at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:192)
    at com.google.gwt.dev.ThreadedPermutationWorkerFactory$ThreadedPermutationWorker.compile(ThreadedPermutationWorkerFactory.java:49)
    at com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:75)
    at java.lang.Thread.run(Unknown Source)
      [ERROR] Unrecoverable exception, shutting down
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
    at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.logAndTranslateException(JavaToJavaScriptCompiler.java:1082)
    at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation(JavaToJavaScriptCompiler.java:430)
    at com.google.gwt.dev.jjs.UnifiedAst.compilePermutation(UnifiedAst.java:122)
    at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:192)
    at com.google.gwt.dev.ThreadedPermutationWorkerFactory$ThreadedPermutationWorker.compile(ThreadedPermutationWorkerFactory.java:49)
    at com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:75)
    at java.lang.Thread.run(Unknown Source)
      [ERROR] Not all permutation were compiled , completed (0/6)


Workaround
I changed the regional settings to English(USA), compiled and uploaded successfully,
no more errors

Reported by nomerhamzaoglu on 2010-11-08 23:40:51

@dankurka

This comment has been minimized.

Show comment
Hide comment
@dankurka

dankurka Jun 10, 2015

Member
Yup, it's a common issue with Java applications using the Turkish Locale.  The basic
problem is described here:

http://bugs.sun.com/view_bug.do?bug_id=6208680
http://nikolajlindberg.blogspot.com/2008/03/beware-of-java-comparing-turkish.html
http://java.sys-con.com/node/46241
http://cafe.elharo.com/blogroll/turkish/

The bottom line:
* For internal code (non-UI-related), consider the following changes:
String.toUpperCase(String) -> String.toUpperCase(String,Locale.ENGLISH)
String.toLowerCase(String) -> String.toLowerCase(String,Locale.ENGLISH)

These should also be reviewed:
String.equalsIgnoreCase(String)
String.compareToIgnoreCase(String)

To see the problem, run GWT with these properties:
-Duser.language=tr -Duser.region=TR

Reported by jdougla@basis.com on 2010-11-09 00:23:17

Member

dankurka commented Jun 10, 2015

Yup, it's a common issue with Java applications using the Turkish Locale.  The basic
problem is described here:

http://bugs.sun.com/view_bug.do?bug_id=6208680
http://nikolajlindberg.blogspot.com/2008/03/beware-of-java-comparing-turkish.html
http://java.sys-con.com/node/46241
http://cafe.elharo.com/blogroll/turkish/

The bottom line:
* For internal code (non-UI-related), consider the following changes:
String.toUpperCase(String) -> String.toUpperCase(String,Locale.ENGLISH)
String.toLowerCase(String) -> String.toLowerCase(String,Locale.ENGLISH)

These should also be reviewed:
String.equalsIgnoreCase(String)
String.compareToIgnoreCase(String)

To see the problem, run GWT with these properties:
-Duser.language=tr -Duser.region=TR

Reported by jdougla@basis.com on 2010-11-09 00:23:17

@dankurka

This comment has been minimized.

Show comment
Hide comment
@dankurka

dankurka Jun 10, 2015

Member
It looks like this particular issue is here:

dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java:831:

    StackMode stackMode = StackMode.valueOf(value.toUpperCase());

should be:

    StackMode stackMode = StackMode.valueOf(value.toUpperCase(java.util.Locale.ENGLISH));

See notes about Turkish here:

http://download.oracle.com/javase/6/docs/api/java/lang/String.html#toUpperCase(java.util.Locale)

Reported by jdougla@basis.com on 2010-11-09 00:36:43

Member

dankurka commented Jun 10, 2015

It looks like this particular issue is here:

dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java:831:

    StackMode stackMode = StackMode.valueOf(value.toUpperCase());

should be:

    StackMode stackMode = StackMode.valueOf(value.toUpperCase(java.util.Locale.ENGLISH));

See notes about Turkish here:

http://download.oracle.com/javase/6/docs/api/java/lang/String.html#toUpperCase(java.util.Locale)

Reported by jdougla@basis.com on 2010-11-09 00:36:43

@dankurka

This comment has been minimized.

Show comment
Hide comment
@dankurka

dankurka Jun 10, 2015

Member
Any solutions?

Reported by ogunduz on 2011-08-10 16:27:08

Member

dankurka commented Jun 10, 2015

Any solutions?

Reported by ogunduz on 2011-08-10 16:27:08

@dankurka

This comment has been minimized.

Show comment
Hide comment
@dankurka

dankurka Jun 10, 2015

Member
@rluble looks like an easy fix, do you mind?

Reported by dankurka@google.com on 2013-06-03 12:36:28

  • Status changed: NeedsInfo
Member

dankurka commented Jun 10, 2015

@rluble looks like an easy fix, do you mind?

Reported by dankurka@google.com on 2013-06-03 12:36:28

  • Status changed: NeedsInfo
@dankurka

This comment has been minimized.

Show comment
Hide comment
@dankurka

dankurka Jun 10, 2015

Member
Should this be marked as a duplicate of issue 7890?

Reported by t.broyer on 2013-06-03 13:16:33

Member

dankurka commented Jun 10, 2015

Should this be marked as a duplicate of issue 7890?

Reported by t.broyer on 2013-06-03 13:16:33

@dankurka

This comment has been minimized.

Show comment
Hide comment
@dankurka

dankurka Jun 10, 2015

Member
https://gwt-review.googlesource.com/#/c/6395/

Reported by goktug@google.com on 2014-02-13 22:43:45

  • Status changed: ReviewPending
  • Labels added: Type-Defect, Category-Other
Member

dankurka commented Jun 10, 2015

https://gwt-review.googlesource.com/#/c/6395/

Reported by goktug@google.com on 2014-02-13 22:43:45

  • Status changed: ReviewPending
  • Labels added: Type-Defect, Category-Other
@dankurka

This comment has been minimized.

Show comment
Hide comment
@dankurka

dankurka Jun 10, 2015

Member

Reported by goktug@google.com on 2014-02-19 03:47:08

  • Status changed: FixedNotReleased
Member

dankurka commented Jun 10, 2015

Reported by goktug@google.com on 2014-02-19 03:47:08

  • Status changed: FixedNotReleased
@dankurka

This comment has been minimized.

Show comment
Hide comment
@dankurka

dankurka Jun 10, 2015

Member
Batch-assigning all FixedNotReleased issues to Milestone-2_7.
Some might have been actually fixed in 2.6; chime in if that's the case.

Reported by t.broyer on 2014-05-13 11:12:55

  • Labels added: Milestone-2_7
Member

dankurka commented Jun 10, 2015

Batch-assigning all FixedNotReleased issues to Milestone-2_7.
Some might have been actually fixed in 2.6; chime in if that's the case.

Reported by t.broyer on 2014-05-13 11:12:55

  • Labels added: Milestone-2_7
@dankurka

This comment has been minimized.

Show comment
Hide comment
@dankurka

dankurka Jun 10, 2015

Member
Issue 8872 has been merged into this issue.

Reported by t.broyer on 2014-10-02 08:06:56

Member

dankurka commented Jun 10, 2015

Issue 8872 has been merged into this issue.

Reported by t.broyer on 2014-10-02 08:06:56

@dankurka

This comment has been minimized.

Show comment
Hide comment
@dankurka

dankurka Jun 10, 2015

Member
Bulk edit: Released since GWT 2.7.0 RC1

Reported by dankurka@google.com on 2014-10-30 10:42:48

  • Status changed: Fixed
Member

dankurka commented Jun 10, 2015

Bulk edit: Released since GWT 2.7.0 RC1

Reported by dankurka@google.com on 2014-10-30 10:42:48

  • Status changed: Fixed

@dankurka dankurka closed this Jun 10, 2015

tomas-muller added a commit to UniTime/unitime that referenced this issue Sep 9, 2015

Ant Build
- GWT compiler: added -Duser.language=en parameter to avoid isssues with non-English operating systems
  (see gwtproject/gwt#5564 for more details about the issue)

tomas-muller added a commit to UniTime/unitime that referenced this issue Sep 9, 2015

Ant Build
- GWT compiler: added -Duser.language=en parameter to avoid isssues with non-English operating systems
  (see gwtproject/gwt#5564 for more details about the issue)

tomas-muller added a commit to UniTime/unitime that referenced this issue Sep 9, 2015

Ant Build
- GWT compiler: added -Duser.language=en parameter to avoid isssues with non-English operating systems
  (see gwtproject/gwt#5564 for more details about the issue)

@tbroyer tbroyer modified the milestone: 2.7 Apr 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment