Lifty and MS Windows

22 views
Skip to first unread message

Andrew

unread,
Aug 16, 2010, 5:47:49 PM8/16/10
to Lifty
Hi,

Thanks for all the work on Lifty, it looks like it will be a uesful
addition to the Scala/Lift ecosystem. I thought I'd try it out on
Windows - unfortunately I've hit a problem. I wonder if you have any
advice about how to get it to work. Here is what I've done:

C:\work\myproj>java -Xmx512M -jar "c:\bin\sbt-launch-0.7.4.jar"
Project does not exist, create new project? (y/N/s) y
Name: myproj
Organization: Bobbins
Version [1.0]:
Scala version [2.7.7]:
sbt version [0.7.4]:
Getting Scala 2.7.7 ...
:: retrieving :: org.scala-tools.sbt#boot-scala
confs: [default]
2 artifacts copied, 0 already retrieved (9911kB/2078ms)
Getting org.scala-tools.sbt sbt_2.7.7 0.7.4 ...
:: retrieving :: org.scala-tools.sbt#boot-app
confs: [default]
15 artifacts copied, 0 already retrieved (4096kB/2140ms)
[success] Successfully initialized directory structure.
[info] Building project myproj 1.0 against Scala 2.7.7
[info] using sbt.DefaultProject with sbt 0.7.4 and Scala 2.7.7

I then ran the two commands listed on http://lifty.github.com/Lifty/:

> *ScalaToolsSnapshot at http://scala-tools.org/repo-snapshots/
> *lifty is org.lifty lifty 1.2

which both completed without errors. I then ran:

> lifty create project-blank

and immediately got the error:

java.net.URISyntaxException: Illegal character in opaque part at index
2: C:\wor
k\myproj\_temp_Project.ssp
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.<init>(Unknown Source)
at
org.fusesource.scalate.AbstractCodeGenerator.extractPackageAndClassNa
mes(AbstractCodeGenerator.scala:157)

The full stack trace and the contents of C:\work\myproj
\_temp_Project.ssp are at the foot of this post.

Do you think I need to be using a different combination of scala/sbt/
lift? (I'm a lift and sbt beginner so I'm just trying to use the
defaults). Is there any other setup I need to do? Is lifty even
supposed to work on Windows?

Thanks for any help and advice you can give.

Andrew

______________________________________________________________________

Stack Trace:

java.net.URISyntaxException: Illegal character in opaque part at index
2: C:\wor
k\myproj\_temp_Project.ssp
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.<init>(Unknown Source)
at
org.fusesource.scalate.AbstractCodeGenerator.extractPackageAndClassNa
mes(AbstractCodeGenerator.scala:157)
at
org.fusesource.scalate.ssp.SspCodeGenerator.generate(SspCodeGenerator
.scala:67)
at
org.fusesource.scalate.TemplateEngine.generate_compile_and_load(Templ
ateEngine.scala:183)
at
org.fusesource.scalate.TemplateEngine.preparePage(TemplateEngine.scal
a:150)
at
org.fusesource.scalate.TemplateEngine.load(TemplateEngine.scala:79)
at org.lifty.engine.Scalate.org$lifty$engine$Scalate$
$processSingleTempl
ate(Scalate.scala:228)
at org.lifty.engine.Scalate$$anonfun$3.apply(Scalate.scala:39)
at org.lifty.engine.Scalate$$anonfun$3.apply(Scalate.scala:39)
at scala.List.map(List.scala:812)
at org.lifty.engine.Scalate.run(Scalate.scala:39)
at org.lifty.engine.Create$class.create(Operations.scala:18)
at org.lifty.processor.BlankLiftProject
$.create(Templates.scala:154)
at org.lifty.engine.Template$class.process(Template.scala:116)
at org.lifty.processor.BlankLiftProject
$.process(Templates.scala:154)
at org.lifty.engine.commands.CreateCommand.run(Commands.scala:
68)
at org.lifty.engine.TemplateProcessor
$class.processInput(Processor.scala
:69)
at
org.lifty.processor.LiftProcessor.processInput(LiftProcessor.scala:11
)
at org.lifty.engine.SBTTemplateProcessor
$class.apply(SBTTemplateProcesso
r.scala:37)
at org.lifty.processor.LiftProcessor.apply(LiftProcessor.scala:
11)
at sbt.processor.BasicProcessor.apply(Processor.scala:28)
at sbt.xMain$$anonfun$process$1$7.apply(Main.scala:248)
at sbt.xMain$$anonfun$process$1$7.apply(Main.scala:248)
at sbt.xMain.tryOrFail$1(Main.scala:146)
at sbt.xMain.process$1(Main.scala:247)
at sbt.xMain$Continue$1.apply(Main.scala:132)
at sbt.xMain.run$1(Main.scala:136)
at sbt.xMain.processArguments(Main.scala:266)
at sbt.xMain.startProject(Main.scala:107)
at sbt.xMain.run(Main.scala:84)
at sbt.xMain.run0$1(Main.scala:35)
at sbt.xMain.run(Main.scala:42)
at xsbt.boot.Launch$.run(Launch.scala:53)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
at xsbt.boot.Launch$.launch(Launch.scala:57)
at xsbt.boot.Launch$.explicit(Launch.scala:42)
at xsbt.boot.Launch$.initialized(Launch.scala:38)
at xsbt.boot.Launch$.parsed(Launch.scala:31)
at xsbt.boot.Launch$.configured(Launch.scala:21)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Launch$.apply(Launch.scala:13)
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.run(Boot.scala:19)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)
org.fusesource.scalate.TemplateException: Could not load template:
java.net.URIS
yntaxException: Illegal character in opaque part at index 2: C:\work
\myproj\_tem
p_Project.ssp
at
org.fusesource.scalate.TemplateEngine.preparePage(TemplateEngine.scal
a:175)
at
org.fusesource.scalate.TemplateEngine.load(TemplateEngine.scala:79)
at org.lifty.engine.Scalate.org$lifty$engine$Scalate$
$processSingleTempl
ate(Scalate.scala:228)
at org.lifty.engine.Scalate$$anonfun$3.apply(Scalate.scala:39)
at org.lifty.engine.Scalate$$anonfun$3.apply(Scalate.scala:39)
at scala.List.map(List.scala:812)
at org.lifty.engine.Scalate.run(Scalate.scala:39)
at org.lifty.engine.Create$class.create(Operations.scala:18)
at org.lifty.processor.BlankLiftProject
$.create(Templates.scala:154)
at org.lifty.engine.Template$class.process(Template.scala:116)
at org.lifty.processor.BlankLiftProject
$.process(Templates.scala:154)
at org.lifty.engine.commands.CreateCommand.run(Commands.scala:
68)
at org.lifty.engine.TemplateProcessor
$class.processInput(Processor.scala
:69)
at
org.lifty.processor.LiftProcessor.processInput(LiftProcessor.scala:11
)
at org.lifty.engine.SBTTemplateProcessor
$class.apply(SBTTemplateProcesso
r.scala:37)
at org.lifty.processor.LiftProcessor.apply(LiftProcessor.scala:
11)
at sbt.processor.BasicProcessor.apply(Processor.scala:28)
at sbt.xMain$$anonfun$process$1$7.apply(Main.scala:248)
at sbt.xMain$$anonfun$process$1$7.apply(Main.scala:248)
at sbt.xMain.tryOrFail$1(Main.scala:146)
at sbt.xMain.process$1(Main.scala:247)
at sbt.xMain$Continue$1.apply(Main.scala:132)
at sbt.xMain.run$1(Main.scala:136)
at sbt.xMain.processArguments(Main.scala:266)
at sbt.xMain.startProject(Main.scala:107)
at sbt.xMain.run(Main.scala:84)
at sbt.xMain.run0$1(Main.scala:35)
at sbt.xMain.run(Main.scala:42)
at xsbt.boot.Launch$.run(Launch.scala:53)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
at xsbt.boot.Launch$.launch(Launch.scala:57)
at xsbt.boot.Launch$.explicit(Launch.scala:42)
at xsbt.boot.Launch$.initialized(Launch.scala:38)
at xsbt.boot.Launch$.parsed(Launch.scala:31)
at xsbt.boot.Launch$.configured(Launch.scala:21)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Launch$.apply(Launch.scala:13)
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.run(Boot.scala:19)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.net.URISyntaxException: Illegal character in opaque
part at inde
x 2: C:\work\myproj\_temp_Project.ssp
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.<init>(Unknown Source)
at
org.fusesource.scalate.AbstractCodeGenerator.extractPackageAndClassNa
mes(AbstractCodeGenerator.scala:157)
at
org.fusesource.scalate.ssp.SspCodeGenerator.generate(SspCodeGenerator
.scala:67)
at
org.fusesource.scalate.TemplateEngine.generate_compile_and_load(Templ
ateEngine.scala:183)
at
org.fusesource.scalate.TemplateEngine.preparePage(TemplateEngine.scal
a:150)
at
org.fusesource.scalate.TemplateEngine.load(TemplateEngine.scala:79)
at org.lifty.engine.Scalate.org$lifty$engine$Scalate$
$processSingleTempl
ate(Scalate.scala:228)
at org.lifty.engine.Scalate$$anonfun$3.apply(Scalate.scala:39)
at org.lifty.engine.Scalate$$anonfun$3.apply(Scalate.scala:39)
at scala.List.map(List.scala:812)
at org.lifty.engine.Scalate.run(Scalate.scala:39)
at org.lifty.engine.Create$class.create(Operations.scala:18)
at org.lifty.processor.BlankLiftProject
$.create(Templates.scala:154)
at org.lifty.engine.Template$class.process(Template.scala:116)
at org.lifty.processor.BlankLiftProject
$.process(Templates.scala:154)
at org.lifty.engine.commands.CreateCommand.run(Commands.scala:
68)
at org.lifty.engine.TemplateProcessor
$class.processInput(Processor.scala
:69)
at
org.lifty.processor.LiftProcessor.processInput(LiftProcessor.scala:11
)
at org.lifty.engine.SBTTemplateProcessor
$class.apply(SBTTemplateProcesso
r.scala:37)
at org.lifty.processor.LiftProcessor.apply(LiftProcessor.scala:
11)
at sbt.processor.BasicProcessor.apply(Processor.scala:28)
at sbt.xMain$$anonfun$process$1$7.apply(Main.scala:248)
at sbt.xMain$$anonfun$process$1$7.apply(Main.scala:248)
at sbt.xMain.tryOrFail$1(Main.scala:146)
at sbt.xMain.process$1(Main.scala:247)
at sbt.xMain$Continue$1.apply(Main.scala:132)
at sbt.xMain.run$1(Main.scala:136)
at sbt.xMain.processArguments(Main.scala:266)
at sbt.xMain.startProject(Main.scala:107)
at sbt.xMain.run(Main.scala:84)
at sbt.xMain.run0$1(Main.scala:35)
at sbt.xMain.run(Main.scala:42)
at xsbt.boot.Launch$.run(Launch.scala:53)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:42)
at xsbt.boot.Launch$.launch(Launch.scala:57)
at xsbt.boot.Launch$.explicit(Launch.scala:42)
at xsbt.boot.Launch$.initialized(Launch.scala:38)
at xsbt.boot.Launch$.parsed(Launch.scala:31)
at xsbt.boot.Launch$.configured(Launch.scala:21)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Launch$.apply(Launch.scala:13)
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.run(Boot.scala:19)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)
[error] org.fusesource.scalate.TemplateException: Could not load
template: java.
net.URISyntaxException: Illegal character in opaque part at index 2: C:
\work\myp
roj\_temp_Project.ssp
________________________________________________________________________

_temp_Project.ssp

import sbt._

class LiftProject(info: ProjectInfo) extends DefaultWebProject(info) {
val mavenLocal = "Local Maven Repository" at
"file://"+Path.userHome+"/.m2/repository"

val scalatoolsSnapshot = "Scala Tools Snapshot" at
"http://scala-tools.org/repo-snapshots/"

val scalatoolsRelease = "Scala Tools Snapshot" at
"http://scala-tools.org/repo-releases/"

val liftVersion = "2.1-SNAPSHOT"

override def libraryDependencies = Set(
"net.liftweb" %% "lift-webkit" % liftVersion % "compile->default",
"net.liftweb" %% "lift-testkit" % liftVersion % "compile-
>default",
"org.mortbay.jetty" % "jetty" % "6.1.22" % "test->default",
"junit" % "junit" % "4.5" % "test->default",
"org.scala-tools.testing" % "specs" % "1.6.1" % "test->default"
) ++ super.libraryDependencies
}






Mads Hartmann

unread,
Aug 17, 2010, 2:37:49 AM8/17/10
to Lifty
Hey Andrew,

Sorry for the inconvenience - I never got around to trying it out on
windows. I just installed Windows on my box so I'll be able reproduce
the error. I'm pretty sure I know what the problem is so I'll fix it
today :)

I'll keep you posted on my progress

Thanks,
Mads Hartmann
> > *ScalaToolsSnapshot athttp://scala-tools.org/repo-snapshots/

Andrew

unread,
Aug 17, 2010, 4:33:48 PM8/17/10
to Lifty
Hi Mads,

Thanks for looking into this, much appreciated! I get the impression
that Windows isn't the OS of choice for the Lift community :)

Andrew
> ...
>
> read more »

Mads Hartmann

unread,
Aug 18, 2010, 5:17:21 AM8/18/10
to Lifty
Hey Andrew,

Just to keep you in the loop - I'm still trying to solve this but the
problem might be out of my hands. I'm using an old version of Scalate
for the rendering (because I have to use scala 2.7.7) and Scalate
can't seem to locate the file properly when running on windows. I'm
talking to the Scalate community about this and hope to resolve the
issue soon :)
> ...
>
> read more »

ejc

unread,
Aug 18, 2010, 2:24:43 PM8/18/10
to li...@googlegroups.com
On Tue, Aug 17, 2010 at 3:33 PM, Andrew <andrewm...@gmail.com> wrote:
> Hi Mads,
>
> Thanks for looking into this, much appreciated! I get the impression
> that Windows isn't the OS of choice for the Lift community :)

I don't claim to be an expert, nor to speak for the Lift community,
but I'm giving up on Lift on Windows via cygwin. Linux seems to work
much better. I've run into many problems mostly related to spaces in
paths. I think that issue was fixed, but
java/scala/sbt/lift/maven/etc. all seem to get a little confused as to
whether their environment is *nix or windows. Just my experience.

Thanks,
Eric

Andrew

unread,
Sep 15, 2010, 6:14:51 AM9/15/10
to Lifty
Thanks for looking into this Mads. Has there been any progress with
Scalate?
> ...
>
> read more »

Mads Hartmann Jensen

unread,
Sep 15, 2010, 6:18:18 AM9/15/10
to li...@googlegroups.com
No progress yet but I've been told that SBT won't support 2.8 for quite some time so if I get time over the weekend I'll fix the issue in a custom build of Scalate and use that instead. Hopefully you'll be able to play around with Lifty early next week :)

Andrew

unread,
Sep 16, 2010, 5:06:38 AM9/16/10
to Lifty
Cool, originally I just wanted to use lifty to create a blank project
so had to copy the zip file project from the lift website instead to
get started. So I'm not really waiting for lifty to work as such, I'm
now just interested in how it can help once I have my project already
set up. Don't rush to fix this on my account if you have more
important things to be doing!
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages