Hi I tried to download lift 2.4 from http://liftweb.net/download .I'm following exactly the steps but I have the following error
C:>cd lift
C:\lift>cd scala_28
C:\lift\scala_28>cd lift_basic
C:\lift\scala_28\lift_basic>sbt update ~jetty-run
C:\lift\scala_28\lift_basic>set SCRIPT_DIR=C:\lift\scala_28\lift_basic\
C:\lift\scala_28\lift_basic>java -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=2 56m -Xmx512M -Xss2M -jar "C:\lift\scala_28\lift_basic\sbt-launcher.jar" update ~jetty-run java.lang.NoClassDefFoundError: scala/ScalaObject at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14 1) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14 1) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at xsbt.boot.Provider$.classMissing$1(Provider.scala:71) at xsbt.boot.Provider$$anonfun$getMissing$1.apply(Provider.scala:72) at xsbt.boot.Provider$$anonfun$getMissing$1.apply(Provider.scala:72) at scala.List.filter(List.scala:859) at xsbt.boot.Provider$.getMissing(Provider.scala:72) at xsbt.boot.Provider$initialize.call(Provider.scala:37) at xsbt.boot.Provider$initialize.call(Provider.scala:32) at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:63) at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala: 67) at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala: 67) at xsbt.boot.Using$.withResource(Using.scala:11) at xsbt.boot.Using$.apply(Using.scala:10) at xsbt.boot.Locks$GlobalLock.withFileLock(Locks.scala:67) at xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:45) at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:45) at xsbt.boot.Locks$.apply(Locks.scala:31) at xsbt.boot.Provider$class.$init$(Provider.scala:31) at xsbt.boot.Launch$ScalaProvider.(Launch.scala:80) at xsbt.boot.Launch$$anonfun$1.apply(Launch.scala:72) at xsbt.boot.Launch$$anonfun$1.apply(Launch.scala:72) at xsbt.boot.Cache.newEntry(Cache.scala:17) at xsbt.boot.Cache.getFromReference(Cache.scala:13) at xsbt.boot.Cache.apply(Cache.scala:12) at xsbt.boot.Launch.getScala(Launch.scala:73) at xsbt.boot.Launch$.run(Launch.scala:48) 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.lang.ClassNotFoundException: scala.ScalaObject at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 62 more
Error during sbt execution: java.lang.NoClassDefFoundError: scala/ScalaObject
Do you know what's going wrong with the last line?Maybe something in my PATH?
My path is C:\Java\scala;%JAVA_HOME%\bin
JAVA_HOME C:\Java\jdk1.6.0_22
Where in 'scala' I have scala 2.8.0 final.
Try lift 2.4-M1 with Scala 2.9.0-1.
File in your project directory .../project/build.properties may contain next configuration
project.organization=Home
project.name=scala-lift
sbt.version=0.7.7
project.version=1.0
build.scala.versions=2.9.0-1
project.initialize=false
Run
sbt update
I've got working Scala 2.9.0-1, SBT 0.7.7, Lift 2.4-M1 (Maven helps a lot with dependencies)
My maven file pom.xml (maybe verbose but it works for me):
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>by.degree</groupId>
<artifactId>scala-sbt-lift</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>Scala-Sbt-Lift</name>
<inceptionYear>2010</inceptionYear>
<properties>
<scala.version>2.9.0-1</scala.version>
<jetty.version>6.1.26</jetty.version>
<net.liftweb.version>2.4-M1</net.liftweb.version>
<scala.specs.version>1.6.8</scala.specs.version>
<!-- Common plugin settings -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding>
<!-- vscaladoc settings -->
<maven.scaladoc.vscaladocVersion>1.2-m1</maven.scaladoc.vscaladocVersion>
<vscaladoc.links.liftweb.pathsufix>scaladocs/</vscaladoc.links.liftweb.pathsufix>
<vscaladoc.links.liftweb.baseurl>http://scala-tools.org/mvnsites/liftweb</vscaladoc.links.liftweb.baseurl>
</properties>
<repositories>
<repository>
<id>scala-tools.org</id>
<name>Scala-Tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</repository>
<repository>
<id>scala-tools.releases</id>
<name>Scala-Tools Dependencies Repository for Releases</name>
<url>http://scala-tools.org/repo-releases</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>scala-tools.org</id>
<name>Scala-Tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</pluginRepository>
<pluginRepository>
<id>scala-tools.releases</id>
<name>Scala-Tools Plugins Repository for Releases</name>
<url>http://scala-tools.org/repo-releases</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>net.liftweb</groupId>
<artifactId>lift-mapper_${scala.version}</artifactId>
<version>${net.liftweb.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>0.9.26</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.2.138</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scala-tools.testing</groupId>
<artifactId>specs_${scala.version}</artifactId>
<version>${scala.specs.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>
<!-- for LiftConsole -->
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
<version>${scala.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/scala</sourceDirectory>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.14.3</version>
<configuration>
<charset>${project.build.sourceEncoding}</charset>
<jvmArgs>
<jvmArg>-Xmx1024m</jvmArg>
<jvmArg>-DpackageLinkDefs=file://${project.build.directory}/packageLinkDefs.properties</jvmArg>
</jvmArgs>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.2</version>
<executions>
<execution>
<id>default-copy-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<overwrite>true</overwrite>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/src</directory>
<includes>
<include>packageLinkDefs.properties</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>${jetty.version}</version>
<configuration>
<contextPath>/</contextPath>
<scanIntervalSeconds>5</scanIntervalSeconds>
</configuration>
</plugin>
<plugin>
<groupId>net.sf.alchim</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>0.7.1</version>
<executions>
<execution>
<goals>
<goal>compress</goal>
</goals>
</execution>
</executions>
<configuration>
<nosuffix>true</nosuffix>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-idea-plugin</artifactId>
<version>2.2</version>
<configuration>
<downloadSources>true</downloadSources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.7</version>
<configuration>
<downloadSources>true</downloadSources>
<additionalProjectnatures>
<projectnature>ch.epfl.lamp.sdt.core.scalanature</projectnature>
</additionalProjectnatures>
<additionalBuildcommands>
<buildcommand>ch.epfl.lamp.sdt.core.scalabuilder</buildcommand>
</additionalBuildcommands>
<classpathContainers>
<classpathContainer>ch.epfl.lamp.sdt.launching.SCALA_CONTAINER</classpathContainer>
<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
</classpathContainers>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.14.3</version>
<configuration>
<charset>${project.build.sourceEncoding}</charset>
<jvmArgs>
<jvmArg>-Xmx1024m</jvmArg>
<jvmArg>-DpackageLinkDefs=file://${project.build.directory}/packageLinkDefs.properties</jvmArg>
</jvmArgs>
</configuration>
</plugin>
</plugins>
</reporting>
精彩评论