[2.0] Java class enhancement issue

42 views
Skip to first unread message

Raphael André Bauer

unread,
Jun 7, 2012, 8:02:28 AM6/7/12
to play-fr...@googlegroups.com
Hi,


I am getting a:
[info] Compiling 1 Java source to /backend/target/scala-2.9.1/classes...
javassist.bytecode.DuplicateMemberException: duplicate method:
setSubject in MockMailerApi
at javassist.bytecode.ClassFile.testExistingMethod(ClassFile.java:637)
at javassist.bytecode.ClassFile.addMethod(ClassFile.java:613)
at javassist.CtClassType.addMethod(CtClassType.java:1320)
at play.core.enhancers.PropertiesEnhancer.generateAccessors(PropertiesEnhancer.java:104)

I have no idea why the play enhancer would like to enhance my class.
The only thing I can think of might be a strange issue with scala
interop, as my class is extending MailerAPI trait from
https://github.com/typesafehub/play-plugins/blob/master/mailer/src/main/scala/com/typesafe/plugin/MailerPlugin.scala
.

But essentially I don't have an idea...


Is that a known issue?

Thanks!


Cheers,

Raphael

GrailsDeveloper

unread,
Jun 7, 2012, 9:33:21 AM6/7/12
to play-fr...@googlegroups.com
Possible workaround is to write the getter and setter in java and overwrite the one from the scala-class.

Niels

Guillaume Bort

unread,
Jun 7, 2012, 9:54:46 AM6/7/12
to play-fr...@googlegroups.com
What is MockMailerApi? Is it a Java class from your application right?
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>



--
Guillaume Bort, http://guillaume.bort.fr

Raphael André Bauer

unread,
Jun 7, 2012, 9:59:11 AM6/7/12
to play-fr...@googlegroups.com
On Thu, Jun 7, 2012 at 3:54 PM, Guillaume Bort <guillau...@gmail.com> wrote:
> What is MockMailerApi? Is it a Java class from your application right?
Yes...
inc: http://ars-machina.raphaelbauer.com
tech: http://ars-codia.raphaelbauer.com
web: http://raphaelbauer.com
Reply all
Reply to author
Forward
0 new messages