This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Does sbt use Scala 2.7.x? I'm having problems...

6 replies
Kenneth McDonald
Joined: 2009-01-11,
User offline. Last seen 42 years 45 weeks ago.

I'm trying to use sbt 0.7.4 with scalatest 1.2 and having some problems. The 'compile' target works, but 'test' fails with the error, "java.lang.NoClassDefFoundError: org/scalatools/testing/Framework". I can find a Jave interface for org.scalatools.testing.Framework in "test-interface-0.5.jar" which is in my set of external libraries (as identified in IDEA 10).

When I start sbt, I get the messages:

[info] Building project Rex 0.5 against Scala 2.8.1
[info] using Rex with sbt 0.7.4 and Scala 2.7.7

Also, sbt has downloaded a bunch of 2.7.x stuff. However, I believe scalatest 1.2 requires 2.8.x. Is there a possibility I'm having a problem due to sbt using 2.7 while scalatest needs 2.8?

Very confused at the moment...

Thanks,
Ken

John Stevenson
Joined: 2011-01-21,
User offline. Last seen 42 years 45 weeks ago.
Re: Does sbt use Scala 2.7.x? I'm having problems...
On 21 January 2011 17:04, Kenneth McDonald <kenneth [dot] m [dot] mcdonald [at] sbcglobal [dot] net> wrote:
I'm trying to use sbt 0.7.4 with scalatest 1.2 and having some problems. The 'compile' target works, but 'test' fails with the error, "java.lang.NoClassDefFoundError: org/scalatools/testing/Framework". I can find a Jave interface for org.scalatools.testing.Framework in "test-interface-0.5.jar" which is in my set of external libraries (as identified in IDEA 10).

When I start sbt, I get the messages:

       [info] Building project Rex 0.5 against Scala 2.8.1
       [info]    using Rex with sbt 0.7.4 and Scala 2.7.7

Also, sbt has downloaded a bunch of 2.7.x stuff. However, I believe scalatest 1.2 requires 2.8.x. Is there a possibility I'm having a problem due to sbt using 2.7 while scalatest needs 2.8?

Hello Kenneth,
SBT uses Scala 2.7.7 in order to run itself.

SBT will run project on what ever (available) version of Scala you tell it to do when you create the SBT project by running SBT in an empty folder.  So it seems from your output that the project is using Scala 2.8.1 to compile.

SBT does not automatically download all the dependencies unless you ask it to do so.  When you run SBT and are in the shell (you have a > prompt) then you can use the command update to resolve your dependencies.  In this case, after typing in update, SBT will download the ScalaTest libraries - assuming you are connected to the Internet.

SBT will put the scalatest libraries in a folder called lib_managed.

Thank you
--
John Stevenson
Lean Agile Consultant / Coach
jr0cket.com  |  leanagilemachine.com

Kenneth McDonald
Joined: 2009-01-11,
User offline. Last seen 42 years 45 weeks ago.
Re: Does sbt use Scala 2.7.x? I'm having problems...
Hi John, thanks for the response. I should've made clear that I've done 'reload' (and also restarted sbt) to make sure that it picked up any relevant changes to the project config file, and also done an 'update' to pick up everything necessary. Unfortunately, I'm still having the problem.
Yes, I'm using 2.8.1 to compile my project. I'd thought that sbt required 2.7 to run itself, but wanted to check.
It seems that no one else is having this problem, so hopefully I'll stumble across the solution sometime soon. It can't be that difficult... :-)
Cheers,Ken
On Jan 21, 2011, at 11:34 AM, John Stevenson wrote:
On 21 January 2011 17:04, Kenneth McDonald <kenneth [dot] m [dot] mcdonald [at] sbcglobal [dot] net> wrote:
I'm trying to use sbt 0.7.4 with scalatest 1.2 and having some problems. The 'compile' target works, but 'test' fails with the error, "java.lang.NoClassDefFoundError: org/scalatools/testing/Framework". I can find a Jave interface for org.scalatools.testing.Framework in "test-interface-0.5.jar" which is in my set of external libraries (as identified in IDEA 10).

When I start sbt, I get the messages:

       [info] Building project Rex 0.5 against Scala 2.8.1
       [info]    using Rex with sbt 0.7.4 and Scala 2.7.7

Also, sbt has downloaded a bunch of 2.7.x stuff. However, I believe scalatest 1.2 requires 2.8.x. Is there a possibility I'm having a problem due to sbt using 2.7 while scalatest needs 2.8?

Hello Kenneth,
SBT uses Scala 2.7.7 in order to run itself.

SBT will run project on what ever (available) version of Scala you tell it to do when you create the SBT project by running SBT in an empty folder.  So it seems from your output that the project is using Scala 2.8.1 to compile.

SBT does not automatically download all the dependencies unless you ask it to do so.  When you run SBT and are in the shell (you have a > prompt) then you can use the command update to resolve your dependencies.  In this case, after typing in update, SBT will download the ScalaTest libraries - assuming you are connected to the Internet.

SBT will put the scalatest libraries in a folder called lib_managed.

Thank you
--
John Stevenson
Lean Agile Consultant / Coach
jr0cket.com  |  leanagilemachine.com


Alexandre Martins
Joined: 2009-04-24,
User offline. Last seen 3 years 24 weeks ago.
Re: Does sbt use Scala 2.7.x? I'm having problems...

Hi Ken

Just to make sure the problem does not come from the scala 2.7.7 used
by sbt, update it to 2.8.1.

To do that add the following line to project/build.properties
def.scala.version="2.8.1"

Good luck
Alexandre Martins

On Jan 21, 6:05 pm, Kenneth McDonald
wrote:
> Hi John, thanks for the response. I should've made clear that I've done 'reload' (and also restarted sbt) to make sure that it picked up any relevant changes to the project config file, and also done an 'update' to pick up everything necessary. Unfortunately, I'm still having the problem.
>
> Yes, I'm using 2.8.1 to compile my project. I'd thought that sbt required 2.7 to run itself, but wanted to check.
>
> It seems that no one else is having this problem, so hopefully I'll stumble across the solution sometime soon. It can't be that difficult... :-)
>
> Cheers,
> Ken
>
> On Jan 21, 2011, at 11:34 AM, John Stevenson wrote:
>
> > On 21 January 2011 17:04, Kenneth McDonald wrote:
> > I'm trying to use sbt 0.7.4 with scalatest 1.2 and having some problems. The 'compile' target works, but 'test' fails with the error, "java.lang.NoClassDefFoundError: org/scalatools/testing/Framework". I can find a Jave interface for org.scalatools.testing.Framework in "test-interface-0.5.jar" which is in my set of external libraries (as identified in IDEA 10).
>
> > When I start sbt, I get the messages:
>
> >        [info] Building project Rex 0.5 against Scala 2.8.1
> >        [info]    using Rex with sbt 0.7.4 and Scala 2.7.7
>
> > Also, sbt has downloaded a bunch of 2.7.x stuff. However, I believe scalatest 1.2 requires 2.8.x. Is there a possibility I'm having a problem due to sbt using 2.7 while scalatest needs 2.8?
>
> > Hello Kenneth,
> > SBT uses Scala 2.7.7 in order to run itself.
>
> > SBT will run project on what ever (available) version of Scala you tell it to do when you create the SBT project by running SBT in an empty folder.  So it seems from your output that the project is using Scala 2.8.1 to compile.
>
> > SBT does not automatically download all the dependencies unless you ask it to do so.  When you run SBT and are in the shell (you have a > prompt) then you can use the command update to resolve your dependencies.  In this case, after typing in update, SBT will download the ScalaTest libraries - assuming you are connected to the Internet.
>
> > SBT will put the scalatest libraries in a folder called lib_managed.
>
> > Thank you
> > --
> > John Stevenson
> > Lean Agile Consultant / Coach
> > jr0cket.com  |  leanagilemachine.com
>
>

Alexandre Martins
Joined: 2009-04-24,
User offline. Last seen 3 years 24 weeks ago.
Re: Re: Does sbt use Scala 2.7.x? I'm having problems...

The right format for the line is:
def.scala.version=2.8.1
and not what I wrote, by heart, in the previous email.

On 22 January 2011 03:22, Alexandre Martins wrote:
> Hi Ken
>
> Just to make sure the problem does not come from the scala 2.7.7 used
> by sbt, update it to 2.8.1.
>
> To do that add the following line to project/build.properties
>  def.scala.version="2.8.1"
>
> Good luck
> Alexandre Martins
>
>
> On Jan 21, 6:05 pm, Kenneth McDonald
> wrote:
>> Hi John, thanks for the response. I should've made clear that I've done 'reload' (and also restarted sbt) to make sure that it picked up any relevant changes to the project config file, and also done an 'update' to pick up everything necessary. Unfortunately, I'm still having the problem.
>>
>> Yes, I'm using 2.8.1 to compile my project. I'd thought that sbt required 2.7 to run itself, but wanted to check.
>>
>> It seems that no one else is having this problem, so hopefully I'll stumble across the solution sometime soon. It can't be that difficult... :-)
>>
>> Cheers,
>> Ken
>>
>> On Jan 21, 2011, at 11:34 AM, John Stevenson wrote:
>>
>> > On 21 January 2011 17:04, Kenneth McDonald wrote:
>> > I'm trying to use sbt 0.7.4 with scalatest 1.2 and having some problems. The 'compile' target works, but 'test' fails with the error, "java.lang.NoClassDefFoundError: org/scalatools/testing/Framework". I can find a Jave interface for org.scalatools.testing.Framework in "test-interface-0.5.jar" which is in my set of external libraries (as identified in IDEA 10).
>>
>> > When I start sbt, I get the messages:
>>
>> >        [info] Building project Rex 0.5 against Scala 2.8.1
>> >        [info]    using Rex with sbt 0.7.4 and Scala 2.7.7
>>
>> > Also, sbt has downloaded a bunch of 2.7.x stuff. However, I believe scalatest 1.2 requires 2.8.x. Is there a possibility I'm having a problem due to sbt using 2.7 while scalatest needs 2.8?
>>
>> > Hello Kenneth,
>> > SBT uses Scala 2.7.7 in order to run itself.
>>
>> > SBT will run project on what ever (available) version of Scala you tell it to do when you create the SBT project by running SBT in an empty folder.  So it seems from your output that the project is using Scala 2.8.1 to compile.
>>
>> > SBT does not automatically download all the dependencies unless you ask it to do so.  When you run SBT and are in the shell (you have a > prompt) then you can use the command update to resolve your dependencies.  In this case, after typing in update, SBT will download the ScalaTest libraries - assuming you are connected to the Internet.
>>
>> > SBT will put the scalatest libraries in a folder called lib_managed.
>>
>> > Thank you
>> > --
>> > John Stevenson
>> > Lean Agile Consultant / Coach
>> > jr0cket.com  |  leanagilemachine.com
>>
>>

Ismael Juma 2
Joined: 2011-01-22,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: Does sbt use Scala 2.7.x? I'm having problems...

On Sat, Jan 22, 2011 at 3:22 AM, Alexandre Martins
wrote:
> Just to make sure the problem does not come from the scala 2.7.7 used
> by sbt, update it to 2.8.1.

That's not a good idea as SBT 0.7.x is meant to run with Scala 2.7.7.
SBT will use Scala 2.8.1 from 0.9.0 onwards.

Best,
Ismael

Naftoli Gugenheim
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: Does sbt use Scala 2.7.x? I'm having problems...
Is that jar inside lib or lib_managed?

On Fri, Jan 21, 2011 at 12:04 PM, Kenneth McDonald <kenneth [dot] m [dot] mcdonald [at] sbcglobal [dot] net> wrote:
I'm trying to use sbt 0.7.4 with scalatest 1.2 and having some problems. The 'compile' target works, but 'test' fails with the error, "java.lang.NoClassDefFoundError: org/scalatools/testing/Framework". I can find a Jave interface for org.scalatools.testing.Framework in "test-interface-0.5.jar" which is in my set of external libraries (as identified in IDEA 10).

When I start sbt, I get the messages:

       [info] Building project Rex 0.5 against Scala 2.8.1
       [info]    using Rex with sbt 0.7.4 and Scala 2.7.7

Also, sbt has downloaded a bunch of 2.7.x stuff. However, I believe scalatest 1.2 requires 2.8.x. Is there a possibility I'm having a problem due to sbt using 2.7 while scalatest needs 2.8?

Very confused at the moment...


Thanks,
Ken


Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland