I'm having troubles setting up Eclipse + Maven to work with Lift. I've
searched the archives for eclipse/maven and read through most recent
posts but none seem to address this problem.
I've installed
- Scala, version 2.7.5
- Eclipse, version 3.5
- IAM, version 0.11.0
- Scala-ide plugin, version 2.8.0
What I'm trying:
- File / New Project / Maven 2 Project Creation Wizard
- Settings
Group ID: net.liftweb
Artifact ID: lift-archetype-basic
Version: 1.0
Repository: http://scala-tools.org/repo-releases
- Execute mvn clean (otherwise I get an error saying "Boot is not a
member of _root_.bootstrap.liftweb")
- Execute mvn jetty:run
- Webpages works fine in browser
- Change "Welcome to..." string into "lorem ipsum"
- Save ("Bulding workspace..." shows up briefely)
- Nothing happens...
The class file does not seem to get updated. If I manually compile the
HelloWorld.scala and paste it into the
target/classes/lavatest4/snippet/ directory, I get a bunch of
exceptions from jetty and a page with the updated string, but with "No
Navigation Defined." instead of a menu.
What am I doing wrong? Do I need to use the rebel-thingy?
Best regards,
Andreas Lundblad
Point at the snapshot repo instead, and use 2.0-scala280-SNAPSHOT as your version.
Cheers, Tim
> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
>
>
Hi, and thanks for your replies.
I've dug a bit further now, guided by your advices.
Question: Can I / should I specify which version of scala libs to use
when creating the project? It seems when I use the archetype version
2.0-RC1 it downloads 2.7.7 for me, and the last recommendation I can
find is the one David Pollaks mentions, just a week ago or so:
------------------
mvn archetype:generate -U -DarchetypeGroupId=net.liftweb
-DarchetypeArtifactId=lift-archetype-basic -DarchetypeVersion=2.0-RC1
-DremoteRepositories=http://scala-tools.org/repo-releases-DgroupId=ar.testspecs2
-DartifactId=testspecs2 -Dversion=0.1
The archetype defines which Scala version it works with (2.7.7)
------------------
When I try creating the project with the command above, and run "mvn
jetty:run" I get a few various, disapponting results
With Suns Java 6
............
[INFO] /home/aioobe/tmp/lift/lava/src/main/scala:-1: info: compiling
[INFO] Compiling 4 source files to
/home/aioobe/tmp/lift/lava/target/classes at 1277467610784
[INFO] #
[ERROR] # A fatal error has been detected by the Java Runtime Environment:
[INFO] #
[ERROR] # Internal Error (exceptions.cpp:364), pid=27930, tid=139784761522448
[ERROR] # Error: ExceptionMark destructor expects no pending exceptions
[INFO] #
[INFO] # JRE version: 6.0_20-b02
[INFO] # Java VM: Java HotSpot(TM) 64-Bit Server VM (16.3-b01 mixed
mode linux-amd64 )
.............
[INFO] wrap: org.apache.commons.exec.ExecuteException: Process exited
with an error: 134(Exit value: 134)
I thought, wops.. I ran into an error in the JVM. I thought, hey, I'll
just try with anoher JVM.
Result with Open JDK 6
[ERROR] Error occurred during initialization of VM
[ERROR] java/lang/ClassNotFoundException: error in opening JAR file
/home/aioobe/.m2/repository/org/scala-lang/scala-library/2.7.7/scala-library-2.7.7.jar
Same error with with Java version 7...
With Suns Java 5.
java.lang.NoClassDefFoundError: scala/ScalaObject
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
Does someone recognize any of this? Any suggestions to what I should try next?
The tutorial at
http://wiki.liftweb.net/index.php/Using_eclipse_hotdeploy is
out-dated. Is there any plans on updating it? If I manage to figure
out how to solve this and how to do it the proper way, I'd be glad to
update the wiki.
Best regards,
Andreas Lundblad