Eclipse / Maven (IAM) setup with automatic update of webpage

18 views
Skip to first unread message

Andreas Lundblad

unread,
Jun 24, 2010, 8:23:46 AM6/24/10
to lif...@googlegroups.com
Hi all,

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

Timothy Perrett

unread,
Jun 24, 2010, 9:12:57 AM6/24/10
to lif...@googlegroups.com
Why are you using version 1.0 of lift? If you really have read the other posts you would know that scala is very binary sensitive, and Scala 2.8 only works a branch of what is currently 2.0; there is a build of Lift on scala-tools that will work with 2.8.

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.
>
>

Kevin Wright

unread,
Jun 24, 2010, 9:42:16 AM6/24/10
to lif...@googlegroups.com
To clarify further, you don't just want ANY Scala 2.8 build, you'll need scala 2.8.0.RC6

So...


That version of lift is currently targeting 2.8.0.RC6, but you should expect it to track newer release candidates as they are released.  The same goes for the eclipse plugin.


--
Kevin Wright

mail/google talk: kev.lee...@gmail.com
wave: kev.lee...@googlewave.com
skype: kev.lee.wright
twitter: @thecoda

Naftoli Gugenheim

unread,
Jun 24, 2010, 3:51:00 PM6/24/10
to liftweb
Hey, he didn't say he read every single post, just that he didn't find any post that seemed to address his problem! :)

Andreas Lundblad

unread,
Jun 26, 2010, 2:34:46 AM6/26/10
to lif...@googlegroups.com


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

Naftoli Gugenheim

unread,
Jun 28, 2010, 5:25:25 PM6/28/10
to liftweb
wiki.liftweb.net is deprecated. The updated wiki is on the assembla space.
I think as soon as someone can say that there's is nothing left on the old wiki that should be copied to the new one then it will be taken offline (or pointed to assembla?).
Reply all
Reply to author
Forward
0 new messages