play-1.2.3 javassist.bytecode.DuplicateMemberException: duplicate field: $index0 when starting with play.server.Server

348 views
Skip to first unread message

tunggad

unread,
Oct 28, 2011, 4:11:49 PM10/28/11
to play-framework
Hi,
im experiencing this exception on a fresh created app. With play
console (windows CMD) all work fine, the App starts normally. But when
starting the app within IDE (over the main class play.server.Server)
the following Exception raises:

play.exceptions.UnexpectedException: While applying
play.CorePlugin@1c778255 on controllers.PlayDocumentation
at play.classloading.ApplicationClasses
$ApplicationClass.enhance(ApplicationClasses.java:215)
at
play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:
139)
at
play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:
419)
at play.Play.start(Play.java:416)
at play.Play.detectChanges(Play.java:530)
at play.Invoker$Invocation.init(Invoker.java:100)
at Invocation.HTTP Request(Play!)
Caused by: play.exceptions.UnexpectedException: While applying class
play.classloading.enhancers.LocalvariablesNamesEnhancer on
controllers.PlayDocumentation
at play.CorePlugin.enhance(CorePlugin.java:292)
at play.classloading.ApplicationClasses
$ApplicationClass.enhance(ApplicationClasses.java:212)
... 6 more
Caused by: javassist.bytecode.DuplicateMemberException: duplicate
field: $index0
at javassist.bytecode.ClassFile.testExistingField(ClassFile.java:529)
at javassist.bytecode.ClassFile.addField(ClassFile.java:515)
at javassist.CtClassType.addField(CtClassType.java:1164)
at javassist.CtClass.addField(CtClass.java:878)
at
play.classloading.enhancers.LocalvariablesNamesEnhancer.enhanceThisClass(LocalvariablesNamesEnhancer.java:
119)
at play.CorePlugin.enhance(CorePlugin.java:289)
... 7 more


My IDE run-configuration looks like:
---------------------------------------------------

"C:\Program Files\Java\jdk1.6.0_25\bin\java" -Dapplication.path=D:
\Projects\playLS -javaagent:C:/dev_tools/play-1.2.3/framework/
play-1.2.3.jar -Xdebug -
Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -
Dplay.debug=yes -Dplay.id=localhost -Didea.launcher.port=7534 -
Didea.launcher.bin.path=C:\dev_tools\ideaIU-110.187\bin -
Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.6.0_25\jre
\lib\alt-rt.jar;C:\Program Files\Java\jdk1.6.0_25\jre\lib\alt-
string.jar;C:\Program Files\Java\jdk1.6.0_25\jre\lib\charsets.jar;C:
\Program Files\Java\jdk1.6.0_25\jre\lib\deploy.jar;C:\Program Files
\Java\jdk1.6.0_25\jre\lib\javaws.jar;C:\Program Files\Java
\jdk1.6.0_25\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_25\jre\lib
\jsse.jar;C:\Program Files\Java\jdk1.6.0_25\jre\lib\management-
agent.jar;C:\Program Files\Java\jdk1.6.0_25\jre\lib\plugin.jar;C:
\Program Files\Java\jdk1.6.0_25\jre\lib\resources.jar;C:\Program Files
\Java\jdk1.6.0_25\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_25\jre
\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.6.0_25\jre\lib\ext
\localedata.jar;C:\Program Files\Java\jdk1.6.0_25\jre\lib\ext
\sunjce_provider.jar;C:\dev_tools\play-1.2.3\framework\lib
\activation-1.1.1.jar;C:\dev_tools\play-1.2.3\framework\lib
\antlr-2.7.6.jar;C:\dev_tools\play-1.2.3\framework\lib\asm-
all-3.3.1.jar;C:\dev_tools\play-1.2.3\framework\lib\async-http-
client-1.6.3.jar;C:\dev_tools\play-1.2.3\framework\lib\bcprov-
jdk15-1.45.jar;C:\dev_tools\play-1.2.3\framework\lib
\c3p0-0.9.1.2.jar;C:\dev_tools\play-1.2.3\framework\lib\cglib-
nodep-2.2.jar;C:\dev_tools\play-1.2.3\framework\lib\commons-
beanutils-1.8.3.jar;C:\dev_tools\play-1.2.3\framework\lib\commons-
codec-1.4.jar;C:\dev_tools\play-1.2.3\framework\lib\commons-
collections-3.2.1.jar;C:\dev_tools\play-1.2.3\framework\lib\commons-
email-1.2.jar;C:\dev_tools\play-1.2.3\framework\lib\commons-
fileupload-1.2.2.jar;C:\dev_tools\play-1.2.3\framework\lib\commons-
io-2.0.1.jar;C:\dev_tools\play-1.2.3\framework\lib\commons-
javaflow-1066591.jar;C:\dev_tools\play-1.2.3\framework\lib\commons-
lang-2.6.jar;C:\dev_tools\play-1.2.3\framework\lib\commons-
logging-1.1.1.jar;C:\dev_tools\play-1.2.3\framework\lib
\dom4j-1.6.1.jar;C:\dev_tools\play-1.2.3\framework\lib\ehcache-
core-2.0.0.jar;C:\dev_tools\play-1.2.3\framework\lib
\ezmorph-1.0.3.jar;C:\dev_tools\play-1.2.3\framework\lib\geronimo-
servlet_2.5_spec-1.2.jar;C:\dev_tools\play-1.2.3\framework\lib\groovy-
all-1.7.7.jar;C:\dev_tools\play-1.2.3\framework\lib\gson-1.7.1.jar;C:
\dev_tools\play-1.2.3\framework\lib\h2-1.3.149.jar;C:\dev_tools
\play-1.2.3\framework\lib\hibernate-commons-
annotations-3.2.0.Final.jar;C:\dev_tools\play-1.2.3\framework\lib
\hibernate-core-3.6.1.Final.jar;C:\dev_tools\play-1.2.3\framework\lib
\hibernate-entitymanager-3.6.0.Final.jar;C:\dev_tools
\play-1.2.3\framework\lib\hibernate-jpa-2.0-api-1.0.0.Final.jar;C:
\dev_tools\play-1.2.3\framework\lib\ivy-2.2.0.jar;C:\dev_tools
\play-1.2.3\framework\lib\jamon-2.7.jar;C:\dev_tools
\play-1.2.3\framework\lib\javassist-3.9.0.GA.jar;C:\dev_tools
\play-1.2.3\framework\lib\javax.inject-1.0.jar;C:\dev_tools
\play-1.2.3\framework\lib\jaxen-1.1.jar;C:\dev_tools
\play-1.2.3\framework\lib\jj-imaging.jar;C:\dev_tools
\play-1.2.3\framework\lib\jj-simplecaptcha.jar;C:\dev_tools
\play-1.2.3\framework\lib\jj-textile.jar;C:\dev_tools
\play-1.2.3\framework\lib\jj-wikitext.jar;C:\dev_tools
\play-1.2.3\framework\lib\joda-time-1.6.jar;C:\dev_tools
\play-1.2.3\framework\lib\jregex-1.2_01.jar;C:\dev_tools
\play-1.2.3\framework\lib\jsr107cache-1.0.jar;C:\dev_tools
\play-1.2.3\framework\lib\jta-1.1.jar;C:\dev_tools\play-1.2.3\framework
\lib\junit-4.8.1.jar;C:\dev_tools\play-1.2.3\framework\lib
\log4j-1.2.15.jar;C:\dev_tools\play-1.2.3\framework\lib
\mail-1.4.3.jar;C:\dev_tools\play-1.2.3\framework\lib
\memcached-2.6.jar;C:\dev_tools\play-1.2.3\framework\lib\mysql-
connector-java-5.1.13.jar;C:\dev_tools\play-1.2.3\framework\lib
\netty-3.2.4.Final.jar;C:\dev_tools\play-1.2.3\framework\lib
\org.eclipse.jdt.core-3.6.0.jar;C:\dev_tools\play-1.2.3\framework\lib
\oval-1.50.jar;C:\dev_tools\play-1.2.3\framework\lib
\postgresql-9.0.jar;C:\dev_tools\play-1.2.3\framework\lib\signpost-
core-1.2.jar;C:\dev_tools\play-1.2.3\framework\lib\slf4j-
api-1.6.1.jar;C:\dev_tools\play-1.2.3\framework\lib\slf4j-
log4j12-1.6.1.jar;C:\dev_tools\play-1.2.3\framework\lib
\snakeyaml-1.7.jar;C:\dev_tools\play-1.2.3\framework\lib
\xstream-1.3.jar;C:\dev_tools\play-1.2.3\framework\play.jar;C:
\dev_tools\ideaIU-110.187\lib\idea_rt.jar"
com.intellij.rt.execution.application.AppMain play.server.Server


I think, the run-configuration with all classpath is correct
configured. I have successfull worked with this run-configuration over
versions (1.2, 1.2.1, 1.2.2). Only after upgrade to 1.2.3 i
experienced this problem.

Could someone give me any suggestion?

Thank you!

Matt Hildebrand

unread,
Oct 28, 2011, 4:20:10 PM10/28/11
to play-fr...@googlegroups.com
Does this still occur with Play 1.2.4-RC1?

There have been other reports of this same problem, with varying explanations of the circumstances in which it occurs.  In my own experience this is a bug that manifests whenever Scala controller A contains an abstract member that is overridden in subclass B.  A few days ago I checked the relevant Play code and saw that it had changed a lot on the master branch with respect to the 1.2.3 code, so perhaps this is now fixed in the upcoming 1.2.4 release.

-Matt



--
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.


tunggad

unread,
Oct 28, 2011, 4:23:08 PM10/28/11
to play-framework
The above DuplicateMemberException has now gone after upgrade to
1.2.4-RC1, but the new one come:


No route found (In /app/views/main.html around line 10)
No route able to display file /public/javascripts/jquery-1.5.2. (file
not found) was found.

play.exceptions.NoRouteFoundException: No route found
at play.templates.BaseTemplate.throwException(BaseTemplate.java:80)
at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:
242)
at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:
267)
at play.templates.Template.render(Template.java:26)
at play.templates.GroovyTemplate.render(GroovyTemplate.java:187)
at play.mvc.results.RenderTemplate.<init>(RenderTemplate.java:24)
at play.mvc.Controller.renderTemplate(Controller.java:660)
at play.mvc.Controller.renderTemplate(Controller.java:640)
at play.mvc.Controller.render(Controller.java:695)
at controllers.Application.index(Application.java:13)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:
548)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:502)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:
478)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:
473)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:161)
at Invocation.HTTP Request(Play!)

Nicolas Leroux

unread,
Oct 28, 2011, 4:29:49 PM10/28/11
to play-fr...@googlegroups.com
Can you reproduce it with a simple app and submit an issue to play lighthouse?

Thanks,

Nicolas

Nicolas Leroux

unread,
Oct 28, 2011, 4:30:31 PM10/28/11
to play-fr...@googlegroups.com
Btw, we upgraded jquery to 1.6. It might be your issue.

Nicolas
On Oct 28, 2011, at 10:20 PM, Matt Hildebrand wrote:

tunggad

unread,
Oct 28, 2011, 4:41:23 PM10/28/11
to play-framework
It was a fresh created App by play-1.2.3 then i just tried to start it
from my IDE. The App created by play-1.2.3 still has jquery 1.5.2, is
that the problem?

On 28 Okt., 22:30, Nicolas Leroux <leroux.nico...@gmail.com> wrote:
> Btw, we upgraded jquery to 1.6. It might be your issue.
>
> Nicolas
> On Oct 28, 2011, at 10:20 PM, Matt Hildebrand wrote:
>
>
>
>
>
>
>
> > Does this still occur with Play 1.2.4-RC1?
>
> > There have been other reports of this same problem, with varying explanations of the circumstances in which it occurs.  In my own experience this is a bug that manifests whenever Scala controller A contains an abstract member that is overridden in subclass B.  A few days ago I checked the relevant Play code and saw that it had changed a lot on the master branch with respect to the 1.2.3 code, so perhaps this is now fixed in the upcoming 1.2.4 release.
>
> > -Matt
>
> > For more options, visit this group athttp://groups.google.com/group/play-framework?hl=en.

Nicolas Leroux

unread,
Oct 28, 2011, 4:44:50 PM10/28/11
to play-fr...@googlegroups.com
Well It should not. If you have the jquery file in your app I don't see how it can be the pb. Do you have more information? Can you create an issue with the app in question?

Thanks

Nicolas

tunggad

unread,
Oct 28, 2011, 4:50:32 PM10/28/11
to play-framework
Oh, im very sorry, have wasted your time. It was a typo-error by me.
With 1.2.4-RC1 my App starts now normally within my IDE. Im very sry!

Thank you!

Matt Hildebrand

unread,
Oct 31, 2011, 11:20:29 AM10/31/11
to play-fr...@googlegroups.com
Hi Nicolas,

Done!  The ticket is here (with details & a minimal example project attached):

Essentially, when a controller class overrides an abstract member in its superclass, Play's bytecode enhancement fails and the entire application is unusable.  This greatly limits developers' ability to have controller classes share similar behaviour through inheritance.

The problem still exists in Play 1.2.4-RC1.  It affects both Java & Scala projects.

Thank you,
-Matt
Reply all
Reply to author
Forward
0 new messages