[GRADLE-2564] Gradle 1.3 wrapper java.io.UnsupportedEncodingException Created: 22/Nov/12  Updated: 01/Mar/13  Resolved: 01/Mar/13

Status: Resolved
Project: Gradle
Affects Version/s: 1.3-rc-1, 1.3, 1.4
Fix Version/s: 1.5-rc-1

Type: Bug
Reporter: Gradle Forums Assignee: Unassigned
Resolution: Fixed Votes: 1


 Description   

Just tried 1.3 via the wrapper and it fails with:

% ./gradlew clean

FAILURE: Build aborted because of an internal error.

  • What went wrong:
    Build aborted because of an unexpected internal error. Please file an issue at: http://forums.gradle.org.
  • Try:
    Run with --debug option to get additional debug info.
  • Exception is:
    java.io.UnsupportedEncodingException:
    at java.lang.StringCoding.decode(StringCoding.java:190)
    at java.lang.String.<init>(String.java:416)
    at java.lang.String.<init>(String.java:481)
    at net.rubygrapefruit.platform.internal.jni.TerminfoFunctions.initTerminal(Native Method)
    at net.rubygrapefruit.platform.internal.TerminfoTerminal.init(TerminfoTerminal.java:27)
    at net.rubygrapefruit.platform.internal.WrapperTerminal.init(WrapperTerminal.java:25)
    at net.rubygrapefruit.platform.internal.AbstractTerminals.getTerminal(AbstractTerminals.java:19)
    at org.gradle.internal.nativeplatform.console.NativePlatformConsoleDetector.getConsole(NativePlatformConsoleDetector.java:42)
    at org.gradle.logging.internal.ConsoleConfigureAction.execute(ConsoleConfigureAction.java:32)
    at org.gradle.logging.internal.ConsoleConfigureAction.execute(ConsoleConfigureAction.java:27)
    at org.gradle.logging.internal.OutputEventRenderer.attachConsole(OutputEventRenderer.java:68)
    at org.gradle.logging.internal.DefaultLoggingManager.attachConsole(DefaultLoggingManager.java:149)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:168)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:48)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.Main.main(Main.java:39)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)


 Comments   
Comment by Gradle Forums [ 22/Nov/12 ]

can you give us more information about your environment (perhaps run "gradle -v" with a prior gradle version) ?

cheers,
René

Comment by Gradle Forums [ 22/Nov/12 ]

% gradle -v

------------------------------------------------------------
Gradle 1.2
------------------------------------------------------------

Gradle build time: mercoled? 12 settembre 2012 10.46.02 UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.7.0_07 (Oracle Corporation 23.3-b01)
OS: Mac OS X 10.8.2 x86_64

Comment by Adam Murdoch [ 22/Nov/12 ]

Could you give us the values of your $LANG, $LC_ALL, and $LC_CTYPE environment variables, please?

Comment by Phill [ 22/Nov/12 ]

% locale
LANG="en_GB"
LC_COLLATE="en_GB"
LC_CTYPE="en_GB"
LC_MESSAGES="en_GB"
LC_MONETARY="en_GB"
LC_NUMERIC="en_GB"
LC_TIME="en_GB"
LC_ALL=

Comment by Phill [ 22/Nov/12 ]

Just checked my shell startup scripts and I've got "LC_MONETARY=it_IT", if I remove this then I do not get the encoding exception.

'locale' output above is slightly misleading as if I echo the individual variables I get:

% echo $LANG
en_GB
% echo $LC_CTYPE

% echo $LC_ALL

% echo $LC_MONETARY
it_IT

Generated at Wed Jun 30 12:25:21 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.