Scala-Lift project in Eclipse Scala IDE errors

95 views
Skip to first unread message

folone

unread,
Jul 14, 2010, 8:24:27 AM7/14/10
to Scala IDE User
Hello.

I installed Scala IDE for Eclipse, and it seems to be working okay. So
now I'm trying to import a Lift project (specifically -- autogenerated
Lift project from Stax.net application platform), and now I'm having
four errors at my workspace:

value net is not a member of package <root> Boot.scala /rss2lj/src/
scala/bootstrap/liftweb line [3..6] Scala Problem

At lines:

import _root_.net.liftweb.util._
import _root_.net.liftweb.http._
import _root_.net.liftweb.sitemap._
import _root_.net.liftweb.sitemap.Loc._

Could anyone please help me out with it?

Miles Sabin

unread,
Jul 14, 2010, 8:29:20 AM7/14/10
to scala-i...@googlegroups.com

Could you post the contents of your .project and .classpath files?

(I'm guessing that the lift jars aren't on your classpath for some reason).

Cheers,


Miles

--
Miles Sabin
tel: +44 7813 944 528
gtalk: mi...@milessabin.com
skype: milessabin
http://www.chuusai.com/
http://twitter.com/milessabin

folone

unread,
Jul 14, 2010, 8:41:07 AM7/14/10
to Scala IDE User
.claspath:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con"
path="ch.epfl.lamp.sdt.launching.SCALA_CONTAINER"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/servlet-api-2.5.jar"/>
<classpathentry kind="lib" path="webapp/WEB-INF/lib/jstl-1.2.jar"/>
<classpathentry kind="lib" path="webapp/WEB-INF/lib/scala-
library-2.7.3.jar"/>
<classpathentry kind="output" path="webapp/WEB-INF/classes"/>
</classpath>

.project:

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>rss2lj</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>ch.epfl.lamp.sdt.core.scalabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>ch.epfl.lamp.sdt.core.scalanature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

folone

unread,
Jul 14, 2010, 8:56:30 AM7/14/10
to Scala IDE User
So how do I add them?
I have lift-mapper-1.0.jar, lift-util-1.0.jar and lift-webkit-1.0.jar
in my webapp/WEB-INF/lib directory. Is this jars I need?

On 14 июл, 15:29, Miles Sabin <mi...@milessabin.com> wrote:

Stefan Langer

unread,
Jul 14, 2010, 9:08:24 AM7/14/10
to scala-i...@googlegroups.com
Yes. click right on your project in eclipse and choose Build Path ->
Configure Build Path

Go to the tab libraries and press add jar and navigate to your jars.
Select them and press ok and they should be available.

-Stefan

2010/7/14 folone <fol...@gmail.com>:

folone

unread,
Jul 14, 2010, 9:14:29 AM7/14/10
to Scala IDE User
The previous errors disappeared, but the new one appeared on the same
lines:

error while loading Helpers, Scala signature Helpers has wrong version
expected: 5.0
found: 4.1 in /home/gleontiev/workspace/rss2lj/webapp/WEB-INF/lib/
lift-util-1.0.jar(net/liftweb/util/Helpers.class) rss2lj Unknown
Scala Problem
error while loading LiftRules, Scala signature LiftRules has wrong
version
expected: 5.0
found: 4.1 in /home/gleontiev/workspace/rss2lj/webapp/WEB-INF/lib/
lift-webkit-1.0.jar(net/liftweb/http/LiftRules.class) rss2lj Unknown
Scala Problem
error while loading Loc, Scala signature Loc has wrong version
expected: 5.0
found: 4.1 in /home/gleontiev/workspace/rss2lj/webapp/WEB-INF/lib/
lift-webkit-1.0.jar(net/liftweb/sitemap/Loc.class) rss2lj Unknown
Scala Problem
error while loading Menu, Scala signature Menu has wrong version
expected: 5.0
found: 4.1 in /home/gleontiev/workspace/rss2lj/webapp/WEB-INF/lib/
lift-webkit-1.0.jar(net/liftweb/sitemap/Menu.class) rss2lj Unknown
Scala Problem

Do I have to download a new version of Lift?

Stefan Langer

unread,
Jul 14, 2010, 9:16:06 AM7/14/10
to scala-i...@googlegroups.com
I assume the lift jars are compiled with a different scala version
then the nightly update.
You have to make sure that the version of the scalaIDE and the version
lift was compiled against match.

-Stefan

2010/7/14 folone <fol...@gmail.com>:

folone

unread,
Jul 14, 2010, 9:26:43 AM7/14/10
to Scala IDE User
So.. What should I do now? Try to compile those jars from the sources
(http://github.com/lift/lift) with my scala compiler?

Stefan Langer

unread,
Jul 14, 2010, 9:32:06 AM7/14/10
to scala-i...@googlegroups.com
Do you know which version of scala was used to compile your lift jars?

2010/7/14 folone <fol...@gmail.com>:

folone

unread,
Jul 14, 2010, 10:00:28 AM7/14/10
to Scala IDE User
No actully.

Richard Dallaway

unread,
Jul 14, 2010, 10:46:21 AM7/14/10
to scala-i...@googlegroups.com
On 14 July 2010 15:00, folone <fol...@gmail.com> wrote:
> No actully.
>
> On 14 июл, 16:32, Stefan Langer <mailtolan...@googlemail.com> wrote:
>> Do you know which version of scala was used to compile your lift jars?

I'd recommend Lift 2.0, which is Scala 2.7.7 based.

But for that you'd need to use the old 2.7 version of the Scala IDE
(which there was a recent thread on for the update site).

Richard

Stefan Langer

unread,
Jul 14, 2010, 10:50:00 AM7/14/10
to scala-i...@googlegroups.com
Your best bet is to obtain one of the stable ide branches from
http://download.scala-ide.org/ and then make sure that your lift jars
are build against that same RC release.
If in doubt ask on the lift mailing list. Nightlies are not too great
as you never know against which version of the scala compiler they use
as they are build against head trunk as far as I know.

-Stefan

2010/7/14 folone <fol...@gmail.com>:

David Bernard

unread,
Jul 14, 2010, 1:57:27 PM7/14/10
to scala-i...@googlegroups.com
From the configuration files you provide : you use lift-1.0 (old
version) and scala-2.7.7
That is not compatible with ScalaIDE (work only for scala 2.8.0(-xx))
Scala is very sensible to version number.
currently there is no released version of lift that run under scala 2.8.0.

see following links to have acces to a sample lift project
http://github.com/sonatype/m2eclipse-scala/tree/master/samples/prj-liftbased/

from http://www.assembla.com/wiki/show/scala-ide/With_M2Eclipse

/davidB

folone

unread,
Jul 16, 2010, 8:17:53 AM7/16/10
to Scala IDE User
I was finally able to download lift binaries, compiled with 2.8 here:
http://scala-tools.org/repo-snapshots/net/liftweb/
But I now have another error:

class file needed by LiftRules is missing.
reference value common of package net.liftweb refers to nonexisting
symbol.



On 14 июл, 20:57, David Bernard <david.bernard...@gmail.com> wrote:
> From the configuration files you provide : you use lift-1.0 (old
> version) and scala-2.7.7
> That is not compatible with ScalaIDE (work only for scala 2.8.0(-xx))
> Scala is very sensible to version number.
> currently there is no released version of lift that run under scala 2.8.0.
>
> see following links to have acces to a sample lift projecthttp://github.com/sonatype/m2eclipse-scala/tree/master/samples/prj-li...
>
> fromhttp://www.assembla.com/wiki/show/scala-ide/With_M2Eclipse
>
> /davidB
>
> On Wed, Jul 14, 2010 at 16:50, Stefan Langer
>
>
>
> <mailtolan...@googlemail.com> wrote:
> > Your best bet is to obtain one of the stable ide branches from
> >http://download.scala-ide.org/and then make sure that your lift jars

folone

unread,
Jul 16, 2010, 8:35:24 AM7/16/10
to Scala IDE User
Sorry, I was in a hyrry. This one was resolved by adding
http://scala-tools.org/repo-snapshots/net/liftweb/lift-common/2.0-scala280-SNAPSHOT/
to buildpath.

On 16 июл, 15:17, folone <fol...@gmail.com> wrote:
> I was finally able to download lift binaries, compiled with 2.8 here:http://scala-tools.org/repo-snapshots/net/liftweb/
> But I now have another error:
>
> class file needed by LiftRules is missing.
> reference value common of package net.liftweb refers to nonexisting
> symbol.
>
> On 14 июл, 20:57, David Bernard <david.bernard...@gmail.com> wrote:
>
>
>
> > From the configuration files you provide : you use lift-1.0 (old
> > version) and scala-2.7.7
> > That is not compatible with ScalaIDE (work only for scala 2.8.0(-xx))
> > Scala is very sensible to version number.
> > currently there is no released version of lift that run under scala 2.8.0.
>
> > see following links to have acces to a sample lift projecthttp://github.com/sonatype/m2eclipse-scala/tree/master/samples/prj-li...
>
> > fromhttp://www.assembla.com/wiki/show/scala-ide/With_M2Eclipse
>
> > /davidB
>
> > On Wed, Jul 14, 2010 at 16:50, Stefan Langer
>
> > <mailtolan...@googlemail.com> wrote:
> > > Your best bet is to obtain one of the stable ide branches from
> > >http://download.scala-ide.org/andthen make sure that your lift jars
Reply all
Reply to author
Forward
0 new messages