A critical bug in play!

195 views
Skip to first unread message

saeed

unread,
Jun 12, 2011, 9:01:57 AM6/12/11
to play-framework
Hi
I make use of play version 1.2 .

I created a model named Tag and after that added a public field . when
I run play :

play.exceptions.UnexpectedException: While applying
play.CorePlugin@13159f1 on TagDAOImpl
at play.plugins.PluginCollection.enhance(PluginCollection.java:
436)
at play.classloading.ApplicationClasses
$ApplicationClass.enhance(Applica
tionClasses.java:208)
at
play.classloading.ApplicationClassloader.loadApplicationClass(Applica
tionClassloader.java:151)
at
play.classloading.ApplicationClassloader.getAllClasses(ApplicationCla
ssloader.java:409)
at play.Play.start(Play.java:449)
at play.Play.detectChanges(Play.java:558)
at play.Invoker$Invocation.init(Invoker.java:186)
at Invocation.HTTP Request(Play!)
Caused by: play.exceptions.UnexpectedException: While applying class
play.classl
oading.enhancers.PropertiesEnhancer on TagDAOImpl
at play.CorePlugin.enhance(CorePlugin.java:297)
at play.plugins.PluginCollection.enhance(PluginCollection.java:
433)
... 7 more
Caused by: play.exceptions.UnexpectedException: Error in
PropertiesEnhancer
at play.classloading.enhancers.PropertiesEnhancer
$1.edit(PropertiesEnhan
cer.java:171)
at javassist.expr.ExprEditor.loopBody(ExprEditor.java:197)
at javassist.expr.ExprEditor.doit(ExprEditor.java:90)
at javassist.CtBehavior.instrument(CtBehavior.java:618)
at
play.classloading.enhancers.PropertiesEnhancer.enhanceThisClass(Prope
rtiesEnhancer.java:129)
at play.CorePlugin.enhance(CorePlugin.java:294)
... 8 more
Caused by: javassist.NotFoundException: field: usageCount in
models.Tag
at javassist.CtClassType.getField(CtClassType.java:822)
at javassist.expr.FieldAccess.getField(FieldAccess.java:113)
at play.classloading.enhancers.PropertiesEnhancer
$1.edit(PropertiesEnhan
cer.java:136)
... 13 more

I made use of play clean command to delete tmp files but the problem
still exist .
The problem is that play cannot see my modified files (although It
compiles them)
I thought I found my ideal framework , but ...
hope it would be fixed ASAP .

Guillaume Bort

unread,
Jun 12, 2011, 9:28:52 AM6/12/11
to play-fr...@googlegroups.com
Without more informations I don't see how we could fix it. Please elaborate.

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

saeed

unread,
Jun 12, 2011, 10:32:14 AM6/12/11
to play-framework
Hi
really I don't have any special information like you in the case .
I created a model as you said in your doc and after some modification
ran play and get the above exception.
can you tell me how can I disable play application compiler (hot swap
feature) and use eclipse compiler instead .
does the PROD mode do it ?

saeed

unread,
Jun 12, 2011, 10:51:42 AM6/12/11
to play-framework
can you describe your application classloader / compiler life cycle
for me briefly?
what does the BytecodeCache.java do ?

Morten Kjetland

unread,
Jun 12, 2011, 12:42:28 PM6/12/11
to play-fr...@googlegroups.com

Can you show us the source of your Tag class in models?

-morten

GrailsDeveloper

unread,
Jun 12, 2011, 2:02:22 PM6/12/11
to play-framework
Can it be that you start play from inside eclipse with the launcher?
Then it could have to do with the bug
http://play.lighthouseapp.com/projects/57987-play-framework/tickets/180.

Please start the program from command-line and add more information,
this mean

exact play version 1.2.1?
OS: Windows?
Which command do you use for start?
eclipse-version?
Does your application run in dev-mode?

If possible send an example-project.

Be sure there most be something special in your constellation. There
are to many running apps outside, so there is hope that you found your
ideal framework ;-)

Niels


On 12 Jun., 18:42, Morten Kjetland <morten.kjetl...@gmail.com> wrote:
> Can you show us the source of your Tag class in models?
>
> -morten
> On Jun 12, 2011 4:51 PM, "saeed" <saeed.y...@gmail.com> wrote:> can you describe your application classloader / compiler life cycle

saeed

unread,
Jun 12, 2011, 2:31:19 PM6/12/11
to play-framework
Hi

I always start play outside the eclipse with command line .

play v 1.2
OS : win 7
Which command do you use for start ? play run [app name]
eclipse v 3.5
Does your application run in dev-mode? yes

I have a question , how can I switch to PROD mod . may be in that case
it works ?

saeed

unread,
Jun 12, 2011, 2:37:55 PM6/12/11
to play-framework

To morten:

package models;

import javax.persistence.Entity;

@Entity
public class Tag {

@Id
public String name;

/**
* required
*/
public Boolean required;

/**
* usageCount
*/
public Long usageCount;

}


On Jun 12, 8:42 pm, Morten Kjetland <morten.kjetl...@gmail.com> wrote:
> Can you show us the source of your Tag class in models?
>
> -morten
> On Jun 12, 2011 4:51 PM, "saeed" <saeed.y...@gmail.com> wrote:> can you describe your application classloader / compiler life cycle

Julien Tournay

unread,
Jun 12, 2011, 3:16:13 PM6/12/11
to play-fr...@googlegroups.com
Hi,

Can you show us the code of TagDAOImpl ?

jto.
--
Real Programmers don't need comments-- the code is obvious.

Alexander Strebkov

unread,
Jun 13, 2011, 2:02:50 AM6/13/11
to play-framework
If you are using JPA you should extend play.db.jpa.Model, or, in case
you provide your own @Id - play.db.jpa.GenericModel.
Reply all
Reply to author
Forward
0 new messages