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

Re: Getting NoSuchMethodError when using Actor

7 replies
Manfred Bergmann
Joined: 2010-08-06,
User offline. Last seen 42 years 45 weeks ago.

Yeah, I've read about version mismatch as well.
But I don't know where that would come from. I use Scala-2.8.0.final in both cases.

Manfred

Am 06.08.2010 um 18:07 schrieb Alex Cruise:

> Every time you see a descendant of LinkageError when working with Scala, suspect a version mismatch first. You'll nearly always be right. :)
>
> -0xe1a
>
> On Fri, Aug 6, 2010 at 9:30 AM, Manfred Bergmann wrote:
>
> Hello.
>
> I use OneJAR to bundle my Scala-Swing application together with some
> libraries, including scala-library.jar into one jar file.
> The application itself runs fine until a class that implements Actor is
> used. I get this error:
>
> Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError:
> scala.actors.ReactorCanReply$class.$init$(Lscala/actors/ReactorCanReply;)V
> at de.mabe.taillogger.TailLogger$Tailor.(TailLogger.scala:40)
> at de.mabe.taillogger.TailLogger.createTailor(TailLogger.scala:33)
> at de.mabe.taillogger.TailLogger.startTailor(TailLogger.scala:25)
> at
> de.mabe.xea.ui.frame.TailLoggerFrame.startLogUpdating(TailLoggerFrame.scala:42)
> ...
>
> I found some threads regarding this exception but I'm not sure whether they
> apply for my case.
> Any ideas how I could solve this?
>
>
> Manfred
> --
> View this message in context: http://scala-programming-language.1934581.n4.nabble.com/Getting-NoSuchMe...
> Sent from the Scala - User mailing list archive at Nabble.com.
>

Manfred Bergmann
Joined: 2010-08-06,
User offline. Last seen 42 years 45 weeks ago.
Re: Getting NoSuchMethodError when using Actor

I did some more research and tests.
It looks like this is caused by different compiler options.

I tried running the same simple source (see below) with the same defined classpath, one compiled with Idea and the other compiled using Gradle's Scala plugin.
Both use the same version of the Scala compiler.
The one compiled by Idea works and the other not.
Now the only thing that I think might be different are the compiler options.
I don't know which options Gradle uses and which Idea but I'll investigate further.

Manfred

object SStarter {
def main(args: Array[String]): Unit = {
println("Hello World from main!")
new MyActor().start
}
}

class MyActor extends Actor {
def act: Unit = {
println("Hello world from act")
}
}

Am 07.08.2010 um 08:57 schrieb Bergmann Manfred:

> Yeah, I've read about version mismatch as well.
> But I don't know where that would come from. I use Scala-2.8.0.final in both cases.
>
>
> Manfred
>
>
> Am 06.08.2010 um 18:07 schrieb Alex Cruise:
>
>> Every time you see a descendant of LinkageError when working with Scala, suspect a version mismatch first. You'll nearly always be right. :)
>>
>> -0xe1a
>>
>> On Fri, Aug 6, 2010 at 9:30 AM, Manfred Bergmann wrote:
>>
>> Hello.
>>
>> I use OneJAR to bundle my Scala-Swing application together with some
>> libraries, including scala-library.jar into one jar file.
>> The application itself runs fine until a class that implements Actor is
>> used. I get this error:
>>
>> Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError:
>> scala.actors.ReactorCanReply$class.$init$(Lscala/actors/ReactorCanReply;)V
>> at de.mabe.taillogger.TailLogger$Tailor.(TailLogger.scala:40)
>> at de.mabe.taillogger.TailLogger.createTailor(TailLogger.scala:33)
>> at de.mabe.taillogger.TailLogger.startTailor(TailLogger.scala:25)
>> at
>> de.mabe.xea.ui.frame.TailLoggerFrame.startLogUpdating(TailLoggerFrame.scala:42)
>> ...
>>
>> I found some threads regarding this exception but I'm not sure whether they
>> apply for my case.
>> Any ideas how I could solve this?
>>
>>
>> Manfred
>> --
>> View this message in context: http://scala-programming-language.1934581.n4.nabble.com/Getting-NoSuchMe...
>> Sent from the Scala - User mailing list archive at Nabble.com.
>>
>

H-star Development
Joined: 2010-04-14,
User offline. Last seen 2 years 26 weeks ago.
Re: Getting NoSuchMethodError when using Actor

The one compiled by Idea works and the other not.

there you have it. idea rocks.

Am 09.08.2010 19:12, schrieb Bergmann Manfred:
> I did some more research and tests.
> It looks like this is caused by different compiler options.
>
> I tried running the same simple source (see below) with the same defined classpath, one compiled with Idea and the other compiled using Gradle's Scala plugin.
> Both use the same version of the Scala compiler.
> The one compiled by Idea works and the other not.
> Now the only thing that I think might be different are the compiler options.
> I don't know which options Gradle uses and which Idea but I'll investigate further.
>
>
>
> Manfred
>
>
> object SStarter {
> def main(args: Array[String]): Unit = {
> println("Hello World from main!")
> new MyActor().start
> }
> }
>
> class MyActor extends Actor {
> def act: Unit = {
> println("Hello world from act")
> }
> }
>
>
> Am 07.08.2010 um 08:57 schrieb Bergmann Manfred:
>
>> Yeah, I've read about version mismatch as well.
>> But I don't know where that would come from. I use Scala-2.8.0.final in both cases.
>>
>>
>> Manfred
>>
>>
>> Am 06.08.2010 um 18:07 schrieb Alex Cruise:
>>
>>> Every time you see a descendant of LinkageError when working with Scala, suspect a version mismatch first. You'll nearly always be right. :)
>>>
>>> -0xe1a
>>>
>>> On Fri, Aug 6, 2010 at 9:30 AM, Manfred Bergmann wrote:
>>>
>>> Hello.
>>>
>>> I use OneJAR to bundle my Scala-Swing application together with some
>>> libraries, including scala-library.jar into one jar file.
>>> The application itself runs fine until a class that implements Actor is
>>> used. I get this error:
>>>
>>> Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError:
>>> scala.actors.ReactorCanReply$class.$init$(Lscala/actors/ReactorCanReply;)V
>>> at de.mabe.taillogger.TailLogger$Tailor.(TailLogger.scala:40)
>>> at de.mabe.taillogger.TailLogger.createTailor(TailLogger.scala:33)
>>> at de.mabe.taillogger.TailLogger.startTailor(TailLogger.scala:25)
>>> at
>>> de.mabe.xea.ui.frame.TailLoggerFrame.startLogUpdating(TailLoggerFrame.scala:42)
>>> ...
>>>
>>> I found some threads regarding this exception but I'm not sure whether they
>>> apply for my case.
>>> Any ideas how I could solve this?
>>>
>>>
>>> Manfred
>>> --
>>> View this message in context: http://scala-programming-language.1934581.n4.nabble.com/Getting-NoSuchMe...
>>> Sent from the Scala - User mailing list archive at Nabble.com.
>>>
>

Andrew Milkowski
Joined: 2010-07-26,
User offline. Last seen 42 years 45 weeks ago.
Re: Getting NoSuchMethodError when using Actor

Best thing is to synchronize scala-compiler.jar and scala-library.jar between command level and IDE what works best for me is I rely on maven scala plugin to pull required jar's into local maven and then point IDE to very same local maven repository (.m2/repository)
Hope this helps:)
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: HamsterofDeath
Date: Mon, 09 Aug 2010 19:50:40
To:
Subject: Re: [scala-user] Getting NoSuchMethodError when using Actor

The one compiled by Idea works and the other not.

there you have it. idea rocks.

Am 09.08.2010 19:12, schrieb Bergmann Manfred:
> I did some more research and tests.
> It looks like this is caused by different compiler options.
>
> I tried running the same simple source (see below) with the same defined classpath, one compiled with Idea and the other compiled using Gradle's Scala plugin.
> Both use the same version of the Scala compiler.
> The one compiled by Idea works and the other not.
> Now the only thing that I think might be different are the compiler options.
> I don't know which options Gradle uses and which Idea but I'll investigate further.
>
>
>
> Manfred
>
>
> object SStarter {
> def main(args: Array[String]): Unit = {
> println("Hello World from main!")
> new MyActor().start
> }
> }
>
> class MyActor extends Actor {
> def act: Unit = {
> println("Hello world from act")
> }
> }
>
>
> Am 07.08.2010 um 08:57 schrieb Bergmann Manfred:
>
>> Yeah, I've read about version mismatch as well.
>> But I don't know where that would come from. I use Scala-2.8.0.final in both cases.
>>
>>
>> Manfred
>>
>>
>> Am 06.08.2010 um 18:07 schrieb Alex Cruise:
>>
>>> Every time you see a descendant of LinkageError when working with Scala, suspect a version mismatch first. You'll nearly always be right. :)
>>>
>>> -0xe1a
>>>
>>> On Fri, Aug 6, 2010 at 9:30 AM, Manfred Bergmann wrote:
>>>
>>> Hello.
>>>
>>> I use OneJAR to bundle my Scala-Swing application together with some
>>> libraries, including scala-library.jar into one jar file.
>>> The application itself runs fine until a class that implements Actor is
>>> used. I get this error:
>>>
>>> Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError:
>>> scala.actors.ReactorCanReply$class.$init$(Lscala/actors/ReactorCanReply;)V
>>> at de.mabe.taillogger.TailLogger$Tailor.(TailLogger.scala:40)
>>> at de.mabe.taillogger.TailLogger.createTailor(TailLogger.scala:33)
>>> at de.mabe.taillogger.TailLogger.startTailor(TailLogger.scala:25)
>>> at
>>> de.mabe.xea.ui.frame.TailLoggerFrame.startLogUpdating(TailLoggerFrame.scala:42)
>>> ...
>>>
>>> I found some threads regarding this exception but I'm not sure whether they
>>> apply for my case.
>>> Any ideas how I could solve this?
>>>
>>>
>>> Manfred
>>> --
>>> View this message in context: http://scala-programming-language.1934581.n4.nabble.com/Getting-NoSuchMe...
>>> Sent from the Scala - User mailing list archive at Nabble.com.
>>>
>

Manfred Bergmann
Joined: 2010-08-06,
User offline. Last seen 42 years 45 weeks ago.
Re: Getting NoSuchMethodError when using Actor

Well, yeah :)
But I don't want to start Idea just to compile my stuff. :)

Manfred

Am 09.08.2010 um 18:50 schrieb HamsterofDeath:

>
>
> The one compiled by Idea works and the other not.
>
> there you have it. idea rocks.
>
>
>
> Am 09.08.2010 19:12, schrieb Bergmann Manfred:
>> I did some more research and tests.
>> It looks like this is caused by different compiler options.
>>
>> I tried running the same simple source (see below) with the same defined classpath, one compiled with Idea and the other compiled using Gradle's Scala plugin.
>> Both use the same version of the Scala compiler.
>> The one compiled by Idea works and the other not.
>> Now the only thing that I think might be different are the compiler options.
>> I don't know which options Gradle uses and which Idea but I'll investigate further.
>>
>>
>>
>> Manfred
>>
>>
>> object SStarter {
>> def main(args: Array[String]): Unit = {
>> println("Hello World from main!")
>> new MyActor().start
>> }
>> }
>>
>> class MyActor extends Actor {
>> def act: Unit = {
>> println("Hello world from act")
>> }
>> }
>>
>>
>> Am 07.08.2010 um 08:57 schrieb Bergmann Manfred:
>>
>>> Yeah, I've read about version mismatch as well.
>>> But I don't know where that would come from. I use Scala-2.8.0.final in both cases.
>>>
>>>
>>> Manfred
>>>
>>>
>>> Am 06.08.2010 um 18:07 schrieb Alex Cruise:
>>>
>>>> Every time you see a descendant of LinkageError when working with Scala, suspect a version mismatch first. You'll nearly always be right. :)
>>>>
>>>> -0xe1a
>>>>
>>>> On Fri, Aug 6, 2010 at 9:30 AM, Manfred Bergmann wrote:
>>>>
>>>> Hello.
>>>>
>>>> I use OneJAR to bundle my Scala-Swing application together with some
>>>> libraries, including scala-library.jar into one jar file.
>>>> The application itself runs fine until a class that implements Actor is
>>>> used. I get this error:
>>>>
>>>> Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError:
>>>> scala.actors.ReactorCanReply$class.$init$(Lscala/actors/ReactorCanReply;)V
>>>> at de.mabe.taillogger.TailLogger$Tailor.(TailLogger.scala:40)
>>>> at de.mabe.taillogger.TailLogger.createTailor(TailLogger.scala:33)
>>>> at de.mabe.taillogger.TailLogger.startTailor(TailLogger.scala:25)
>>>> at
>>>> de.mabe.xea.ui.frame.TailLoggerFrame.startLogUpdating(TailLoggerFrame.scala:42)
>>>> ...
>>>>
>>>> I found some threads regarding this exception but I'm not sure whether they
>>>> apply for my case.
>>>> Any ideas how I could solve this?
>>>>
>>>>
>>>> Manfred
>>>> --
>>>> View this message in context: http://scala-programming-language.1934581.n4.nabble.com/Getting-NoSuchMe...
>>>> Sent from the Scala - User mailing list archive at Nabble.com.
>>>>
>>
>

Manfred Bergmann
Joined: 2010-08-06,
User offline. Last seen 42 years 45 weeks ago.
Re: Getting NoSuchMethodError when using Actor

Replying to myself.

Overriding the Gradle compileScala task and doing it with Ant works.
Now I guess I have to go to the Gradle guys. :|

Manfred

Am 09.08.2010 um 18:12 schrieb Bergmann Manfred:

> I did some more research and tests.
> It looks like this is caused by different compiler options.
>
> I tried running the same simple source (see below) with the same defined classpath, one compiled with Idea and the other compiled using Gradle's Scala plugin.
> Both use the same version of the Scala compiler.
> The one compiled by Idea works and the other not.
> Now the only thing that I think might be different are the compiler options.
> I don't know which options Gradle uses and which Idea but I'll investigate further.
>
>
>
> Manfred
>
>
> object SStarter {
> def main(args: Array[String]): Unit = {
> println("Hello World from main!")
> new MyActor().start
> }
> }
>
> class MyActor extends Actor {
> def act: Unit = {
> println("Hello world from act")
> }
> }
>
>
> Am 07.08.2010 um 08:57 schrieb Bergmann Manfred:
>
>> Yeah, I've read about version mismatch as well.
>> But I don't know where that would come from. I use Scala-2.8.0.final in both cases.
>>
>>
>> Manfred
>>
>>
>> Am 06.08.2010 um 18:07 schrieb Alex Cruise:
>>
>>> Every time you see a descendant of LinkageError when working with Scala, suspect a version mismatch first. You'll nearly always be right. :)
>>>
>>> -0xe1a
>>>
>>> On Fri, Aug 6, 2010 at 9:30 AM, Manfred Bergmann wrote:
>>>
>>> Hello.
>>>
>>> I use OneJAR to bundle my Scala-Swing application together with some
>>> libraries, including scala-library.jar into one jar file.
>>> The application itself runs fine until a class that implements Actor is
>>> used. I get this error:
>>>
>>> Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError:
>>> scala.actors.ReactorCanReply$class.$init$(Lscala/actors/ReactorCanReply;)V
>>> at de.mabe.taillogger.TailLogger$Tailor.(TailLogger.scala:40)
>>> at de.mabe.taillogger.TailLogger.createTailor(TailLogger.scala:33)
>>> at de.mabe.taillogger.TailLogger.startTailor(TailLogger.scala:25)
>>> at
>>> de.mabe.xea.ui.frame.TailLoggerFrame.startLogUpdating(TailLoggerFrame.scala:42)
>>> ...
>>>
>>> I found some threads regarding this exception but I'm not sure whether they
>>> apply for my case.
>>> Any ideas how I could solve this?
>>>
>>>
>>> Manfred
>>> --
>>> View this message in context: http://scala-programming-language.1934581.n4.nabble.com/Getting-NoSuchMe...
>>> Sent from the Scala - User mailing list archive at Nabble.com.
>>>
>>
>

H-star Development
Joined: 2010-04-14,
User offline. Last seen 2 years 26 weeks ago.
Re: Getting NoSuchMethodError when using Actor

i've been programming for about 15 years now and i NEVER ran a compiler
by myself even once except when i've been force to in school:
teacher: "javac"
me: "why?"
teacher: "so that you learn"
me: "you also want me to focus on breathing while living, yes?"

Am 09.08.2010 21:37, schrieb Bergmann Manfred:
> Well, yeah :)
> But I don't want to start Idea just to compile my stuff. :)
>
>
> Manfred
>
> Am 09.08.2010 um 18:50 schrieb HamsterofDeath:
>
>>
>> The one compiled by Idea works and the other not.
>>
>> there you have it. idea rocks.
>>
>>
>>
>> Am 09.08.2010 19:12, schrieb Bergmann Manfred:
>>> I did some more research and tests.
>>> It looks like this is caused by different compiler options.
>>>
>>> I tried running the same simple source (see below) with the same defined classpath, one compiled with Idea and the other compiled using Gradle's Scala plugin.
>>> Both use the same version of the Scala compiler.
>>> The one compiled by Idea works and the other not.
>>> Now the only thing that I think might be different are the compiler options.
>>> I don't know which options Gradle uses and which Idea but I'll investigate further.
>>>
>>>
>>>
>>> Manfred
>>>
>>>
>>> object SStarter {
>>> def main(args: Array[String]): Unit = {
>>> println("Hello World from main!")
>>> new MyActor().start
>>> }
>>> }
>>>
>>> class MyActor extends Actor {
>>> def act: Unit = {
>>> println("Hello world from act")
>>> }
>>> }
>>>
>>>
>>> Am 07.08.2010 um 08:57 schrieb Bergmann Manfred:
>>>
>>>> Yeah, I've read about version mismatch as well.
>>>> But I don't know where that would come from. I use Scala-2.8.0.final in both cases.
>>>>
>>>>
>>>> Manfred
>>>>
>>>>
>>>> Am 06.08.2010 um 18:07 schrieb Alex Cruise:
>>>>
>>>>> Every time you see a descendant of LinkageError when working with Scala, suspect a version mismatch first. You'll nearly always be right. :)
>>>>>
>>>>> -0xe1a
>>>>>
>>>>> On Fri, Aug 6, 2010 at 9:30 AM, Manfred Bergmann wrote:
>>>>>
>>>>> Hello.
>>>>>
>>>>> I use OneJAR to bundle my Scala-Swing application together with some
>>>>> libraries, including scala-library.jar into one jar file.
>>>>> The application itself runs fine until a class that implements Actor is
>>>>> used. I get this error:
>>>>>
>>>>> Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError:
>>>>> scala.actors.ReactorCanReply$class.$init$(Lscala/actors/ReactorCanReply;)V
>>>>> at de.mabe.taillogger.TailLogger$Tailor.(TailLogger.scala:40)
>>>>> at de.mabe.taillogger.TailLogger.createTailor(TailLogger.scala:33)
>>>>> at de.mabe.taillogger.TailLogger.startTailor(TailLogger.scala:25)
>>>>> at
>>>>> de.mabe.xea.ui.frame.TailLoggerFrame.startLogUpdating(TailLoggerFrame.scala:42)
>>>>> ...
>>>>>
>>>>> I found some threads regarding this exception but I'm not sure whether they
>>>>> apply for my case.
>>>>> Any ideas how I could solve this?
>>>>>
>>>>>
>>>>> Manfred
>>>>> --
>>>>> View this message in context: http://scala-programming-language.1934581.n4.nabble.com/Getting-NoSuchMe...
>>>>> Sent from the Scala - User mailing list archive at Nabble.com.
>>>>>
>

Randall R Schulz
Joined: 2008-12-16,
User offline. Last seen 1 year 29 weeks ago.
Re: Getting NoSuchMethodError when using Actor

On Monday August 9 2010, HamsterofDeath wrote:
> i've been programming for about 15 years now and i NEVER ran a
> compiler by myself even once except when i've been force to in
> school: teacher: "javac"
> me: "why?"
> teacher: "so that you learn"
> me: "you also want me to focus on breathing while living, yes?"

Master: Cut this plank to 58 cm in length.
Apprentice: Why?
Master: Because we need a 58-cm plank, you dumb-ass!

RRS

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