I've switched to my Linux box with maven 2.1.0 and Java 1.6.0_13, followed the same steps and it all works as intended. So whatever is wrong is something to do with the particular setup on my mac.
Julian On Apr 21, 2:45 pm, Timothy Perrett <timo...@getintheloop.eu> wrote: > Im working on Mac and have no problems at all: > > :~ timperrett$ $JAVA_HOME > -bash: /Library/Java/Home: is a directory > :~ timperrett$ java -version > java version "1.5.0_16" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284) > Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing) > > You should also have this JAVA_HOME right? > > Cheers, Tim > > On 21/04/2009 14:40, "Julian Howarth" <howar...@freenet.co.uk> wrote: > > > > > Ha! Upgrading the JDK is easier said than done. 1.6.0_07 *is* the > > latest version as far as macs are concerned. Is there a way of > > specifying a version of scala that is compatible with that JDK > > version? > > > On Apr 21, 1:54 pm, David Bernard <david.bernard...@gmail.com> wrote: > >> Thanks, I resquest it, just to check which version of java is used to run > >> scalac. > >> IMHO the problem is that scala was compiled with a more recent version of > >> java than your => ClassVersionNumber unknown by your jdk and the .class > > >> try to upgrade your jdk. > > >> On Tue, Apr 21, 2009 at 14:38, Julian Howarth > >> <howar...@freenet.co.uk>wrote: > > >>>> mvn compile -Dmaven.scala.displayCmd=true > >>> [INFO] Scanning for projects... > >>> [INFO] > >>> ------------------------------------------------------------------------ > >>> [INFO] Building helloworld > >>> [INFO] task-segment: [compile] > >>> [INFO] > >>> ------------------------------------------------------------------------ > >>> [INFO] [resources:resources] > >>> [INFO] Using default encoding to copy filtered resources. > >>> [INFO] [yuicompressor:compress {execution: default}] > >>> [INFO] nb warnings: 0, nb errors: 0 > >>> [INFO] [compiler:compile] > >>> [INFO] Nothing to compile - all classes are up to date > >>> [INFO] [scala:compile {execution: default}] > >>> [INFO] Checking for multiple versions of scala > >>> [INFO] Compiling 2 source files to /Users/julian/NetBeansProjects/ > >>> lifttest/helloworld/target/classes > >>> [INFO] cmd: /System/Library/Frameworks/JavaVM.framework/Versions/ > >>> 1.6.0/Home/bin/java -classpath /Users/julian/.m2/repository/org/scala- > >>> lang/scala-compiler/2.7.3/scala-compiler-2.7.3.jar:/Users/julian/.m2/ > >>> repository/org/scala-lang/scala-library/2.7.3/scala-library-2.7.3.jar - > >>> Xbootclasspath/a:/Users/julian/.m2/repository/org/scala-lang/scala- > >>> library/2.7.3/scala-library-2.7.3.jar scala.tools.nsc.Main -classpath / > >>> Users/julian/NetBeansProjects/lifttest/helloworld/target/classes:/ > >>> Users/julian/.m2/repository/org/scala-lang/scala-library/2.7.3/scala- > >>> library-2.7.3.jar:/Users/julian/.m2/repository/net/liftweb/lift-util/ > >>> 1.0/lift-util-1.0.jar:/Users/julian/.m2/repository/log4j/log4j/1.2.14/ > >>> log4j-1.2.14.jar:/Users/julian/.m2/repository/javax/mail/mail/1.4/ > >>> mail-1.4.jar:/Users/julian/.m2/repository/javax/activation/activation/ > >>> 1.1/activation-1.1.jar:/Users/julian/.m2/repository/commons-httpclient/ > >>> commons-httpclient/3.1/commons-httpclient-3.1.jar:/Users/julian/.m2/ > >>> repository/commons-logging/commons-logging/1.0.4/commons- > >>> logging-1.0.4.jar:/Users/julian/.m2/repository/commons-codec/commons- > >>> codec/1.3/commons-codec-1.3.jar:/Users/julian/.m2/repository/commons- > >>> fileupload/commons-fileupload/1.2.1/commons-fileupload-1.2.1.jar:/ > >>> Users/julian/.m2/repository/commons-collections/commons-collections/ > >>> 3.2.1/commons-collections-3.2.1.jar:/Users/julian/.m2/repository/net/ > >>> liftweb/lift-webkit/1.0/lift-webkit-1.0.jar:/Users/julian/.m2/ > >>> repository/net/liftweb/lift-mapper/1.0/lift-mapper-1.0.jar:/Users/ > >>> julian/.m2/repository/javax/servlet/servlet-api/2.5/servlet- > >>> api-2.5.jar -d /Users/julian/NetBeansProjects/lifttest/helloworld/ > >>> target/classes /Users/julian/NetBeansProjects/lifttest/helloworld/src/ > >>> main/scala/bootstrap/liftweb/Boot.scala /Users/julian/NetBeansProjects/ > >>> lifttest/helloworld/src/main/scala/demo/helloworld/snippet/ > >>> HelloWorld.scala > >>> [WARNING] Exception in thread "main" java.lang.ClassFormatError: > >>> Unknown constant tag 84 in class file scala/tools/nsc/transform/ > >>> TypingTransformers$TypingTransformer > >>> [WARNING] at java.lang.ClassLoader.defineClass1(Native Method) > >>> [WARNING] at java.lang.ClassLoader.defineClass(ClassLoader.java:675) > >>> [WARNING] at java.security.SecureClassLoader.defineClass > >>> (SecureClassLoader.java:124) > >>> [WARNING] at > >>> java.net.URLClassLoader.defineClass(URLClassLoader.java: > >>> 260) > >>> [WARNING] at java.net.URLClassLoader.access$000(URLClassLoader.java: > >>> 56) > >>> [WARNING] at java.net.URLClassLoader$1.run(URLClassLoader.java:195) > >>> [WARNING] at java.security.AccessController.doPrivileged(Native > >>> Method) > >>> [WARNING] at java.net.URLClassLoader.findClass(URLClassLoader.java: > >>> 188) > >>> [WARNING] at java.lang.ClassLoader.loadClass(ClassLoader.java:316) > >>> [WARNING] at > >>> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java: > >>> 288) > >>> [WARNING] at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > >>> [WARNING] at > >>> java.lang.ClassLoader.loadClassInternal(ClassLoader.java: > >>> 374) > >>> [WARNING] at java.lang.ClassLoader.defineClass1(Native Method) > >>> [WARNING] at java.lang.ClassLoader.defineClass(ClassLoader.java:675) > >>> [WARNING] at java.security.SecureClassLoader.defineClass > >>> (SecureClassLoader.java:124) > >>> [WARNING] at > >>> java.net.URLClassLoader.defineClass(URLClassLoader.java: > >>> 260) > >>> [WARNING] at java.net.URLClassLoader.access$000(URLClassLoader.java: > >>> 56) > >>> [WARNING] at java.net.URLClassLoader$1.run(URLClassLoader.java:195) > >>> [WARNING] at java.security.AccessController.doPrivileged(Native > >>> Method) > >>> [WARNING] at java.net.URLClassLoader.findClass(URLClassLoader.java: > >>> 188) > >>> [WARNING] at java.lang.ClassLoader.loadClass(ClassLoader.java:316) > >>> [WARNING] at > >>> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java: > >>> 288) > >>> [WARNING] at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > >>> [WARNING] at > >>> java.lang.ClassLoader.loadClassInternal(ClassLoader.java: > >>> 374) > >>> [WARNING] at scala.tools.nsc.Global.superAccessors(Global.scala:287) > >>> [WARNING] at scala.tools.nsc.Global.builtInPhaseDescriptors > >>> (Global.scala:403) > >>> [WARNING] at scala.tools.nsc.plugins.Plugins > >>> $class.computePhaseDescriptors(Plugins.scala:154) > >>> [WARNING] at scala.tools.nsc.Global.computePhaseDescriptors > >>> (Global.scala:34) > >>> [WARNING] at scala.tools.nsc.Global.phaseDescriptors(Global.scala: > >>> 442) > >>> [WARNING] at scala.tools.nsc.Global$Run.<init>(Global.scala:490) > >>> [WARNING] at scala.tools.nsc.Main$.process(Main.scala:72) > >>> [WARNING] at scala.tools.nsc.Main$.main(Main.scala:87) > >>> [WARNING] at scala.tools.nsc.Main.main(Main.scala) > >>> [INFO] > >>> ------------------------------------------------------------------------ > >>> [ERROR] BUILD FAILURE > >>> [INFO] > >>> ------------------------------------------------------------------------ > >>> [INFO] command line returned non-zero value:1 > >>> [INFO] > >>> ------------------------------------------------------------------------ > >>> [INFO] For more information, run Maven with the -e switch > >>> [INFO] > >>> ------------------------------------------------------------------------ > >>> [INFO] Total time: 6 seconds > >>> [INFO] Finished at: Tue Apr 21 13:35:56 BST 2009 > >>> [INFO] Final Memory: 21M/50M > >>> [INFO] > >>> ------------------------------------------------------------------------ > > >>> On Apr 21, 1:28 pm, David Bernard <david.bernard...@gmail.com> wrote: > >>>> hi, > > >>>> Can you run (and report the output) : > >>>> mvn compile -Dmaven.scala.displayCmd=true > > >>>> /davidB > > >>>> On Tue, Apr 21, 2009 at 14:22, Julian Howarth <howar...@freenet.co.uk > >>>> wrote: > > >>>>> On Apr 21, 12:56 pm, Timothy Perrett <timo...@getintheloop.eu> wrote: > >>>>>> Can you try with maven 2.0.9... > > >>>>> I've now switched to maven 2.0.9 but the error is exactly the same as > >>>>> before. I removed the directories and reran the mvn archetype:generate > >>>>> command. This was successful again. It was the jetty command that > >>>>> failed again. > > >>>>>> Also, I think your java version would be 6 > >>>>>> for the JRE, but 1.5.0 for the JDK that ships with OSX? > > >>>>> I'm fairly confident that the Java JDK is set to 1.6 as I've been > >>>>> using it for 6 months. Both java -version and javac -version give > >>>>> 1.6.0_07 as the version number. My JAVA_HOME is also set there. > > >>>>>> Cheers, Tim > > >>>>>> On 21/04/2009 11:29, "Julian Howarth" <howar...@freenet.co.uk> > >>> wrote: > > >>>>>>> I'm getting started with Lift and am trying to run the examples > >>> from > >>>>>>> the Exploring Lift book but get errors when I try to run the > >>>>>>> application on Jetty. I have also tried following the examples from > >>>>>>> Getting Started Guide and the wiki, but always end up with similar > >>>>>>> errors. > > >>>>>>> So I run: > > >>>>>>> mvn archetype:generate -U -DarchetypeGroupId=net.liftweb - > >>>>>>> DarchetypeArtifactId=lift-archetype-blank -DarchetypeVersion=1.0 > >>> - > >>>>>>> DremoteRepositories=http://scala-tools.org/repo-releases- > >>>>>>> DgroupId=demo.helloworld -DartifactId=helloworld -Dversion=1.0 > > >>>>>>> confirm the defaults and get a build success message at the end. I > >>>>>>> then run: > > >>>>>>> cd helloworld > >>>>>>> mvn jetty:run > > >>>>>>> and get the following: > > >>>>>>> [INFO] Scanning for projects... > >>>>>>> [INFO] > > >>> ------------------------------------------------------------------------ > >>>>>>> [INFO] Building helloworld > >>>>>>> [INFO] task-segment: [jetty:run] > > ... > > read more » --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---