Unable to run lift_basic: error while loading CharSequence from rt.jar

958 views
Skip to first unread message

Dan Pidcock

unread,
Apr 10, 2014, 10:55:16 AM4/10/14
to lif...@googlegroups.com
Hello All,

I'm just trying to get started with Lift, but am unable to get the lift_basic demo app running.

(On Windows 8) I run sbt.bat, but it fails at:
C:\lift-lift_25_sbt-b739b55\scala_29\lift_basic>java -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m -Xmx1024M -Xss2M -jar "C:\lift-lift_25_sbt-b739b55\scala_29\lift_basic\\sbt-launch-0.12.1.jar"
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support wa
s removed in 8.0
error: error while loading CharSequence, class file 'C:\Program Files\Java\jre8\lib\rt.jar(java/lang/CharSequence.class)' is broken
(bad constant pool tag 15 at byte 1470)
[error] Type error in expression

I have tried this with both the Lift 2.5 and 2.6, and with the scala 2.9 and 2.10 variants in Lift 2.5.

I have java 1.8.0 installed, and scala 2.10.4 (although as I understand it, Lift is not dependant on the installed scala)

Googling found me http://stackoverflow.com/questions/18842985/scala-repl-startup-error-class-file-is-broken, which although is not exactly the same behaviour (my installed scala works fine), suggests to me that there is a problem with the version of java installed and the version expected by Lift, although this seems unlikely as the Lift cookbook states Java 1.5 or later.

Any ideas as to what I need to do?

Thanks in advance,

Dan

Diego Medina

unread,
Apr 10, 2014, 11:06:59 AM4/10/14
to Lift
The problem is not lift but sbt. The templates that we provide use sbt 0.12, but I think sbt 0.12 does not support java 8.
 
I have java 1.8.0 installed, and scala 2.10.4 (although as I understand it, Lift is not dependant on the installed scala)



Just to clarify things (as they are not so clear for most new users), it is sbt, the build system that most scala project use, that ignores the scala version you have on your machine

So, if you could, change to java 7 and that will allow you to try out the templates, on the long term, we'll work on getting lift templates that use the newer sbt.

Thank you

Diego

 
Googling found me http://stackoverflow.com/questions/18842985/scala-repl-startup-error-class-file-is-broken, which although is not exactly the same behaviour (my installed scala works fine), suggests to me that there is a problem with the version of java installed and the version expected by Lift, although this seems unlikely as the Lift cookbook states Java 1.5 or later.

Any ideas as to what I need to do?

Thanks in advance,

Dan

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Diego Medina
Lift/Scala consultant
di...@fmpwizard.com
http://fmpwizard.telegr.am

Dan Pidcock

unread,
Apr 10, 2014, 11:37:02 AM4/10/14
to lif...@googlegroups.com
On 10 April 2014 16:06, Diego Medina <di...@fmpwizard.com> wrote:
The problem is not lift but sbt. The templates that we provide use sbt 0.12, but I think sbt 0.12 does not support java 8.
 
I have java 1.8.0 installed, and scala 2.10.4 (although as I understand it, Lift is not dependant on the installed scala)

Just to clarify things (as they are not so clear for most new users), it is sbt, the build system that most scala project use, that ignores the scala version you have on your machine

So, if you could, change to java 7 and that will allow you to try out the templates, on the long term, we'll work on getting lift templates that use the newer sbt. 
 
Thanks Diego, very helpful - I will do that.

Dan 

Viktor Hedefalk

unread,
Apr 10, 2014, 11:47:52 AM4/10/14
to liftweb
I think its invokeDynamic that the Scala compiler couldn't parse until
this commit:

https://github.com/scala/scala/commit/e78896f0ab7#L5R137

which is >= 2.10.2

Some discussion here:

Cheers,
Viktor

Viktor Hedefalk

unread,
Apr 10, 2014, 11:48:32 AM4/10/14
to liftweb
whoops, some weird shortcut in gmail made me send this to early.
Here's the link:

https://groups.google.com/forum/#!topic/scala-user/Nzc2zUTyays

Thanks,
Viktor

phongphan.p

unread,
Apr 10, 2014, 2:25:23 PM4/10/14
to lif...@googlegroups.com
The following configuration (patch) works for me. The sbt-launch-0.12.1.jar must be upgraded to sbt-launch-0.13.1.jar.

-----------------------------------
diff --git a/scala_210/lift_basic/build.sbt b/scala_210/lift_basic/build.sbt
index 7e928f1..2006a10 100644
--- a/scala_210/lift_basic/build.sbt
+++ b/scala_210/lift_basic/build.sbt
@@ -4,14 +4,14 @@ version := "0.0.3"
 
 organization := "net.liftweb"
 
-scalaVersion := "2.10.0"
+scalaVersion := "2.10.4"
 
 resolvers ++= Seq("snapshots"     at "http://oss.sonatype.org/content/repositories/snapshots",
                   "staging"       at "http://oss.sonatype.org/content/repositories/staging",
                   "releases"      at "http://oss.sonatype.org/content/repositories/releases"
                  )
 
-seq(com.github.siasia.WebPlugin.webSettings :_*)
+seq(webSettings :_*)
 
 unmanagedResourceDirectories in Test <+= (baseDirectory) { _ / "src/main/webapp" }
 
@@ -24,6 +24,7 @@ libraryDependencies ++= {
     "net.liftweb"       %% "lift-mapper"        % liftVersion        % "compile",
     "net.liftmodules"   %% "lift-jquery-module_2.6" % "2.5",
     "org.eclipse.jetty" % "jetty-webapp"        % "8.1.7.v20120910"  % "container,test",
+    "org.eclipse.jetty" % "jetty-plus"          % "8.1.7.v20120910"  % "container,test", // For Jetty Config
     "org.eclipse.jetty.orbit" % "javax.servlet" % "3.0.0.v201112011016" % "container,test" artifacts Artifact("javax.servlet", "jar", "jar"),
     "ch.qos.logback"    % "logback-classic"     % "1.0.6",
     "org.specs2"        %% "specs2"             % "1.14"             % "test",
diff --git a/scala_210/lift_basic/project/build.properties b/scala_210/lift_basic/project/build.properties
index f0f72ac..1bb3aa3 100644
--- a/scala_210/lift_basic/project/build.properties
+++ b/scala_210/lift_basic/project/build.properties
@@ -1,2 +1,2 @@
-sbt.version=0.12.4
+sbt.version=0.13.1
 
diff --git a/scala_210/lift_basic/project/plugins.sbt b/scala_210/lift_basic/project/plugins.sbt
index 44fc204..3b34fdb 100644
--- a/scala_210/lift_basic/project/plugins.sbt
+++ b/scala_210/lift_basic/project/plugins.sbt
@@ -1,13 +1,8 @@
-libraryDependencies <+= sbtVersion(v => v match {
-  case "0.11.0" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.0-0.2.8"
-  case "0.11.1" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.1-0.2.10"
-  case "0.11.2" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.2-0.2.10"
-  case "0.11.3" => "com.github.siasia" %% "xsbt-web-plugin" % "0.11.3-0.2.11.1"
-  case x if x startsWith "0.12" => "com.github.siasia" %% "xsbt-web-plugin" % "0.12.0-0.2.11.1"
-})
+//Enable the sbt web plugin
+addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "0.7.0")
 
 //Enable the sbt idea plugin
-addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.3.0")
+addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")
 
 //Enable the sbt eclipse plugin
-addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.2")
+addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.4.0")
-----------------------------------

Cheers,
Phongphan

Antonio Salazar Cardozo

unread,
Apr 10, 2014, 2:40:25 PM4/10/14
to lif...@googlegroups.com
This seems like it would best be provided as a pull request on the appropriate github repository?
Thanks,
Antonio

>> For more options, visit https://groups.google.com/d/optout.

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.

Diego Medina

unread,
Apr 10, 2014, 2:41:56 PM4/10/14
to Lift
This is the kind of contribution that we accept from non-committers of the lift project, would you like to send one?

thanks

phongphan.p

unread,
Apr 10, 2014, 4:12:28 PM4/10/14
to lif...@googlegroups.com
Yes, I do :)
Pull request created here. https://github.com/lift/lift_26_sbt/pull/3

cheers,
phongphan

Peter Petersson

unread,
Apr 10, 2014, 4:37:05 PM4/10/14
to lif...@googlegroups.com
Awesome!
LGTM

best regards Peter Petersson

Diego Medina

unread,
Apr 10, 2014, 9:04:29 PM4/10/14
to Lift
Thanks very much for the pull request!

David Barri

unread,
Apr 10, 2014, 10:33:08 PM4/10/14
to lif...@googlegroups.com
Brilliant!

Dan Pidcock

unread,
Apr 16, 2014, 4:17:33 PM4/16/14
to lif...@googlegroups.com
Thanks Phongphan, I've now had a chance to try it out and the patch (from github) works perfectly!

Dan


On 11 April 2014 03:33, David Barri <japg...@gmail.com> wrote:
Brilliant!
Reply all
Reply to author
Forward
0 new messages