PredictionIO / template-scala-parallel-universal-recommendation

PredictiionIO Template for Universal Recommender
111 stars 48 forks source link

sbt: java.io.UnsupportedEncodingException: UTF-8" #30

Closed xiwenc closed 8 years ago

xiwenc commented 8 years ago

I'm getting the following error when I try to import the engine into Intellij 15.0.2.

[info] Loading project definition from /home/../predictionio/engine/project
[info] Set current project to engine (in build file:/home/.../predictionio/engine/)
java.io.UnsupportedEncodingException: UTF-8"
        at sun.nio.cs.StreamEncoder.forOutputStreamWriter(StreamEncoder.java:61)
        at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:100)
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:228)
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:219)
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:207)
        at sbt.JLine$$anonfun$createReader$1.apply(LineReader.scala:100)
        at sbt.JLine$$anonfun$createReader$1.apply(LineReader.scala:99)
        at sbt.JLine$$anonfun$usingTerminal$1.apply(LineReader.scala:95)
        at sbt.JLine$$anonfun$usingTerminal$1.apply(LineReader.scala:93)
        at sbt.JLine$.withTerminal(LineReader.scala:86)
        at sbt.JLine$.usingTerminal(LineReader.scala:93)
        at sbt.JLine$.createReader(LineReader.scala:99)
        at sbt.FullReader.<init>(LineReader.scala:129)
        at sbt.BasicCommands$$anonfun$shell$1.apply(BasicCommands.scala:163)
        at sbt.BasicCommands$$anonfun$shell$1.apply(BasicCommands.scala:160)
        at sbt.Command$$anonfun$command$1$$anonfun$apply$1.apply(Command.scala:29)
        at sbt.Command$$anonfun$command$1$$anonfun$apply$1.apply(Command.scala:29)
        at sbt.Command$.process(Command.scala:92)
        at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
        at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
        at sbt.State$$anon$1.process(State.scala:184)
        at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
        at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
        at sbt.MainLoop$.next(MainLoop.scala:98)
        at sbt.MainLoop$.run(MainLoop.scala:91)
        at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:70)
        at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:65)
        at sbt.Using.apply(Using.scala:24)
        at sbt.MainLoop$.runWithNewLog(MainLoop.scala:65)
        at sbt.MainLoop$.runAndClearLast(MainLoop.scala:48)
        at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:32)
        at sbt.MainLoop$.runLogged(MainLoop.scala:24)
        at sbt.StandardMain$.runManaged(Main.scala:53)
        at sbt.xMain.run(Main.scala:28)
        at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
        at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
        at xsbt.boot.Launch$.run(Launch.scala:109)
        at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
        at xsbt.boot.Launch$.launch(Launch.scala:117)
        at xsbt.boot.Launch$.apply(Launch.scala:18)
        at xsbt.boot.Boot$.runImpl(Boot.scala:41)
        at xsbt.boot.Boot$.main(Boot.scala:17)
        at xsbt.boot.Boot.main(Boot.scala)
[error] java.io.UnsupportedEncodingException: UTF-8"
[error] Use 'last' for the full log.

Can't figure out why or where it is getting UTF-8" (notice the double quote) from. It would be great if someone could help me out here.

pferrel commented 8 years ago

Are you following the instructions here? https://docs.prediction.io/resources/intellij/

What is the template you are trying to import, your OS and language? I haven't seen this and use IntelliJ all the time.

BTW if you go to the PredictionIO Google Group will may get other user's help

xiwenc commented 8 years ago

Yeah I did follow above instructions.

For future reference: I solved the issue by unset-ting all my locale exports prior to starting intelliJ:

$ env | grep UTF
LC_MESSAGES="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LANG=en_US.UTF-8
LC_NAME="en_US.UTF-8"
LC_CTYPE=en_US.UTF-8
LC_ALL=en_US.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
$ for i in $(env | grep UTF-8 | awk -F= '{print $1}'); do unset $i; done
$ idea.sh