Windows IllegalCharsetNameException using liftsh #1083

Closed
kevinpeno opened this Issue Aug 5, 2011 · 7 comments

Projects

None yet

3 participants

Contributor

When trying to invoke liftsh (liftsh.cmd technically) using the 2.4-M3 I get this error:

cmd> .\liftsh
Error occurred during initialization of VM
java.nio.charset.IllegalCharsetNameException: UTF-8 -Xss8M -Xmx1G -noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMa
rkSweepGC -XX:MaxPermSize=512M
at java.nio.charset.Charset.checkName(Unknown Source)
at java.nio.charset.Charset.lookup2(Unknown Source)
at java.nio.charset.Charset.lookup(Unknown Source)
at java.nio.charset.Charset.defaultCharset(Unknown Source)
at sun.nio.cs.StreamEncoder.forOutputStreamWriter(Unknown Source)
at java.io.OutputStreamWriter.(Unknown Source)
at java.io.PrintStream.(Unknown Source)
at java.lang.System.initializeSystemClass(Unknown Source)

This appears to not be a new issue, see http://groups.google.com/group/liftweb/browse_thread/thread/cbfc41f7175d4836

I'm no java guy, but after messing around, it appears to be an issue with how your options are set prior to making the call to java. If I remove the @echo off I see that the call to java is set as: java "-Dfile.encoding=UTF-8 -Xss8M -Xmx1G -noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=512M" DEFAULT_OPTS -jar "C:\Users\Kevin\Desktop\lift-framework-2.4-M3-release-0-ga048847\lift-framework-a048847\project\sbt-launch-0.7.7.jar"

Obviously java seems to parse this just fine because we end up with the exception, but when passed like this it must screw up how it checks the value of -Dfile.encoding because it sees the encoding being set as: UTF-8 -Xss8M -Xmx1G -noverify -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=512M

Attached is a patch that should resolve these issues (remove the quotes from the assignments). There was another side issue that the assignment below is also broken, so that is included. After this fix I was able to run the cmd, build, and ended up in the liftsh console.

Contributor

Oh, I should mention that my issues and testing were done using Win7 + powershell.

Contributor

Added pull request #7

Owner

(In [[r:b1852b95d0c4c952e3e1dffac8ff701c14285e5d]]) Fix shell script for Windows (thanks to @kevinpeno). Closes #1083.

Branch: master

Owner

(In [[r:95e6dc5f3a4a38cb6ba5bfc7c2e55f6d0cea8af8]]) Fix shell script for Windows (thanks to @kevinpeno). Closes #1083.

Branch: master

Owner

(In [[r:8194fb09a0f44ffc4081e10eb779689ef1e3b7d9]]) Fix shell script for Windows (thanks to @kevinpeno). Closes #1083.

Branch: master

Owner

(In [[r:52dcc2b11618ccac731391328248bcb587610c07]]) Merge pull request #7 from kevinpeno/master

Fix for windows version of liftsh script. Fixes #1083.

Branch: master

@indrajitr indrajitr was assigned Mar 1, 2012
@etorreborre etorreborre pushed a commit to etorreborre/framework that referenced this issue Dec 3, 2014
@kevinpeno kevinpeno fixes #1083 d139670
@etorreborre etorreborre pushed a commit to etorreborre/framework that referenced this issue Dec 3, 2014
@indrajitr indrajitr Fix shell script for Windows (thanks to @kevinpeno). Closes #1083. b1852b9
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment