Windows IllegalCharsetNameException using liftsh
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.<init>(Unknown Source)
at java.io.PrintStream.<init>(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.
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.<init>(Unknown Source)
at java.io.PrintStream.<init>(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.
Leave a comment
Added pull request https://github.com/lift/framework/pull/7
on 2011-08-21 15:01 *
By Indrajit Raychaudhuri
Assigned to set to Indrajit Raychaudhuri
Status changed from New to Fixed
(In revision:b1852b95d0c4c952e3e1dffac8ff701c14285e5d) Fix shell script for Windows (thanks to @kevinpeno). Closes #1083.
Branch: master
Branch: master
on 2011-09-03 14:18 *
By Indrajit Raychaudhuri
(In revision:95e6dc5f3a4a38cb6ba5bfc7c2e55f6d0cea8af8) Fix shell script for Windows (thanks to @kevinpeno). Closes #1083.
Branch: master
Branch: master
on 2011-09-03 14:19 *
By Indrajit Raychaudhuri
(In revision:8194fb09a0f44ffc4081e10eb779689ef1e3b7d9) Fix shell script for Windows (thanks to @kevinpeno). Closes #1083.
Branch: master
Branch: master
on 2011-11-09 17:38 *
By Indrajit Raychaudhuri
Component changed from None to Build
Milestone set to 2.4-M5
on 2011-11-09 17:45 *
By Indrajit Raychaudhuri
(In revision:52dcc2b11618ccac731391328248bcb587610c07) Merge pull request #7 from kevinpeno/master
Fix for windows version of liftsh script. Fixes #1083.
Branch: master
Fix for windows version of liftsh script. Fixes #1083.
Branch: master