- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
ClassFormatError Repetitive method name/signature
Tue, 2009-03-17, 23:23
Hi,
I upgraded my eclipse plugin to the latest nightly (2.8.0.r17317-b2009) and
some of my code now fails to run, generating a ClassFormatError Repetitive
method name/signature
This was an bug reported here: http://lampsvn.epfl.ch/trac/scala/ticket/1368
Is the plugin using an older version of scala or is this a regression?
Channing
Wed, 2009-03-18, 10:47
#2
Re: ClassFormatError Repetitive method name/signature
Miles Sabin wrote:
>
> On Tue, Mar 17, 2009 at 10:22 PM, Channing Walton
> wrote:
>> I upgraded my eclipse plugin to the latest nightly (2.8.0.r17317-b2009)
>> and
>> some of my code now fails to run, generating a ClassFormatError
>> Repetitive
>> method name/signature
>>
>> This was an bug reported here:
>> http://lampsvn.epfl.ch/trac/scala/ticket/1368
>>
>> Is the plugin using an older version of scala or is this a regression?
>
> If you're using a nightly build of the Eclipse plugin then you're
> using a nightly build of the compiler and libraries from trunk.
>
> It's possible that there's been a regression, in which case it'd be
> very helpful if you could verify that by reproducing the problem
> outside Eclipse using the command line tools.
>
> But it's also possible that you're seeing a binary incompatibility
> issue on trunk, in which case a clean build (including any third party
> jar'd Scala libraries) should fix the problem.
>
I've managed to build and run successfully outside eclipse with scala 2.7.3,
and a clean build in eclipse doesn't resolve the issue.
I'll try to produce a test case.
(A major pain for me is eclipse p2 which will not allow me to load a
previously working version of the plugin !!!)
Wed, 2009-03-18, 10:57
#3
Re: ClassFormatError Repetitive method name/signature
On Wed, Mar 18, 2009 at 9:29 AM, Channing Walton wrote:
> I've managed to build and run successfully outside eclipse with scala 2.7.3,
OK, but that's a different compiler and libraries from the ones
embedded in a nightly build of Eclipse.
> I'll try to produce a test case.
If you can do a build outside Eclipse with 2.7.3 then could you just
try that with a nightly build of the command line tools?
Cheers,
Miles
Wed, 2009-03-18, 14:07
#4
Re: ClassFormatError Repetitive method name/signature
Miles Sabin wrote:
>
> If you can do a build outside Eclipse with 2.7.3 then could you just
> try that with a nightly build of the command line tools?
>
Just tried version 2.8.0.r17325-b20090318021723 on the command line which
exhibits the same problem :-(
Wed, 2009-03-18, 14:17
#5
Re: ClassFormatError Repetitive method name/signature
On Wed, Mar 18, 2009 at 1:03 PM, Channing Walton wrote:
> Just tried version 2.8.0.r17325-b20090318021723 on the command line which
> exhibits the same problem :-(
If you can extract out a simple test case which reproduces the problem
then reopen,
http://lampsvn.epfl.ch/trac/scala/ticket/1368
and add it as an attachment.
Cheers,
Mi;es
Wed, 2009-03-18, 22:27
#6
Re: ClassFormatError Repetitive method name/signature
Below is a test case but before posting a bug report I want to make sure I am
not doing something idiotic.
First, a logging trait:
import java.util.logging.Level
import java.util.logging.Logger
trait Logging {
private val log = Logger.getLogger(getClass.getName());
def logSevere(e:Throwable) {
log.log(Level.SEVERE, null, e)
}
}
Now for a class and companion object that both extend the trait:
object Bug extends Logging {
def apply(x:String): Bug = {
new Bug(x)
}
}
class Bug(x: String) extends Logging {
}
When Bug("x") is called, you get java.lang.ClassFormatError: Repetitive
method name/signature in class file bug/Bug...
I tried setting this up in the repl but the problem doesn't exhibit there.
You need to compile this code and run it.
channing
Wed, 2009-03-18, 22:57
#7
Re: ClassFormatError Repetitive method name/signature
On Wed, Mar 18, 2009 at 9:25 PM, Channing Walton wrote:
> Below is a test case but before posting a bug report I want to make sure I am
> not doing something idiotic.
Nothing idiotic ... I don't see quite the same as you, but I do get a
ClassFormatError,
java.lang.ClassFormatError: Duplicate method name&signature in class file Bug
I think a new Trac ticket against the compiler would be in order ...
Cheers,
Miles
Thu, 2009-03-19, 07:37
#8
Re: ClassFormatError Repetitive method name/signature
Ticket created: http://lampsvn.epfl.ch/trac/scala/ticket/1804
On Tue, Mar 17, 2009 at 10:22 PM, Channing Walton
wrote:
> I upgraded my eclipse plugin to the latest nightly (2.8.0.r17317-b2009) and
> some of my code now fails to run, generating a ClassFormatError Repetitive
> method name/signature
>
> This was an bug reported here: http://lampsvn.epfl.ch/trac/scala/ticket/1368
>
> Is the plugin using an older version of scala or is this a regression?
If you're using a nightly build of the Eclipse plugin then you're
using a nightly build of the compiler and libraries from trunk.
It's possible that there's been a regression, in which case it'd be
very helpful if you could verify that by reproducing the problem
outside Eclipse using the command line tools.
But it's also possible that you're seeing a binary incompatibility
issue on trunk, in which case a clean build (including any third party
jar'd Scala libraries) should fix the problem.
Cheers,
Miles