[1.3.0] Play 1.3.0 Release

2,180 views
Skip to first unread message

Alex

unread,
Jan 15, 2015, 2:42:05 AM1/15/15
to play-fr...@googlegroups.com
Hi everyone,

Play 1.3.0 has been released. Here are the main changes:


The changes in this release are listed in the Play 1.3.0 milestone on Lighthouse, including 453 resolved tickets. Play 1.3.0 is a maintenance release so it mostly contains bug fixes. The most important are:
  • fixed multiple continuations/await bugs
  • revamped dependency management for better and consistent resolving
  • fixed multiple test bugs (auto-test/async/htmlunit)
  • numerous libraries upgraded (a.o. netty, hibernate, etc)
  • numerous i18n fixes
  • experimental java 8 support (however, hibernate does not support it, so some edge cases might now work)
  • improved intellij support
Next to these, there are also some new features in this release:
  • multiple databases support
  • customisable netty pipeline
  • customisable template name resolving
  • introduce filters in the plugin API
  • project documentation viewer in dev mode
  • improved Job support – added afterRequest() support
  • improved Mailer

Migration notes
  • Java 1.5 is no longer supported
  • run ‘play deps’ to make sure your dependencies are up-to-date
Thanks to everyone who contributed to this release!

Regards,
Alex

p...@semlab.nl

unread,
Jan 15, 2015, 6:03:56 AM1/15/15
to play-fr...@googlegroups.com
Let me first say: congratulations on the release, it's great to have a new version!

However, it won't run for me :( I've used clean, deps --sync and then tried to run it, only to get a "NoClassDefFoundError". I also created a new application and running that, which didn't throw an error. Though that clean application has very little content in its controller, which might be the reason. I'll see if I can figure out what part of my controller triggers this...
The complete stacktrace:
Oops: NoClassDefFoundError
An unexpected error occured caused by exception NoClassDefFoundError: Could not initialize class org.apache.commons.javaflow.bytecode.transformation.asm.AsmClassTransformer

play.exceptions.UnexpectedException: Unexpected Error
        at play.Invoker$Invocation.onException(Invoker.java:244)
        at play.Invoker$Invocation.run(Invoker.java:306)
        at Invocation.HTTP Request(Play!)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.javaflow.bytecode.transformation.asm.AsmClassTransformer
        at play.classloading.enhancers.ContinuationEnhancer.enhanceThisClass(ContinuationEnhancer.java:76)
        at play.CorePlugin.enhance(CorePlugin.java:297)
        at play.plugins.PluginCollection.enhance(PluginCollection.java:551)
        at play.classloading.ApplicationClasses$ApplicationClass.enhance(ApplicationClasses.java:239)
        at play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:165)
        at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:433)
        at play.Play.start(Play.java:527)
        at play.Play.detectChanges(Play.java:641)
        at play.Invoker$Invocation.init(Invoker.java:198)
        ... 1 more

Op donderdag 15 januari 2015 08:42:05 UTC+1 schreef Alex:

p...@semlab.nl

unread,
Jan 15, 2015, 9:14:39 AM1/15/15
to play-fr...@googlegroups.com
Nevermind, found a rogue asm dependency on my side. Stupid thing where `asm-3.3.1.jar` does not get rejected because `asm-all-5.0.3.jar` is a different component instead of a different revision of the same component... >_<" Oh well, at least it is working now!

Scott Rippee

unread,
Jan 15, 2015, 1:22:26 PM1/15/15
to play-fr...@googlegroups.com
Hello Alex,

I noticed that the file name contains RC3.  Is this a release candidate or a final release?

Thanks

Alex

unread,
Jan 15, 2015, 7:32:37 PM1/15/15
to play-fr...@googlegroups.com
Hi Scott,

   Sorry my link is bad, the final release is here http://downloads.typesafe.com/play/1.3.0/play-1.3.0.zip

Thanks

Fong Huang Yee

unread,
Jan 15, 2015, 10:46:26 PM1/15/15
to play-fr...@googlegroups.com
Great! Thanks for not giving up Play 1! Appreciate it!

Fong Huang Yee

unread,
Jan 15, 2015, 11:20:25 PM1/15/15
to play-fr...@googlegroups.com
By the way, is there any way to remove the default "docviewer"? 


On Thursday, January 15, 2015 at 3:42:05 PM UTC+8, Alex wrote:

Arne Zelasko

unread,
Jan 16, 2015, 2:40:14 AM1/16/15
to play-fr...@googlegroups.com
Great Work. Thanks to all commiters an helpers!

Johan Vosloo

unread,
Jan 20, 2015, 3:47:00 AM1/20/15
to play-fr...@googlegroups.com
Excellent news! Thanks you very much for this.

I must say that I completely missed the announcement though (stumbled upon this by accident).... perhaps it could be reported a bit wider?
I will be trying it straight away and report back with hopefully no issues :)

Johan Vosloo

unread,
Jan 20, 2015, 6:36:51 AM1/20/15
to play-fr...@googlegroups.com
Hmmm... it's going a little rough so far.

Issues encountered so far:

1. What happened to "http://localhost:9000/@documentation" ? If I hit that, I get the following error: 
JPA error

A JPA error occurred (No active EntityManager for name [default], transaction not started?): 


play.exceptions.JPAException: No active EntityManager for name [default], transaction not started?

at play.db.jpa.JPA.em(JPA.java:84)

at play.db.jpa.JPA.em(JPA.java:110)

at play.modules.jpastats.JPAStatsPlugin.beforeActionInvocation(JPAStatsPlugin.java:36)

at play.plugins.PluginCollection.beforeActionInvocation(PluginCollection.java:639)

at play.mvc.ActionInvoker.invoke(ActionInvoker.java:133)

at Invocation.HTTP Request(Play!)


2. Weird Hibernate autoflushing on read is causing stackoverflow errors. Basically I'm using javax.persistence.PreUpdate annotion for updating "lastUpdated" meta fields, but for some reason I don't understand yet, the method annotated with @PrePersist is being called on a read transaction, which is effectively causing an endless loop.
I suspect that this particular issue I'm going to have to battle out between Hibernate and myself, since it is probably not a Play issue... anybody with anything to say on autoflushing behaviour changes (or relationship cascades) between Hib3 vs 4 is most welcome to chime in :) I just had a look at the bug list for 1.3.1 and lo and behold... http://play.lighthouseapp.com/projects/57987/tickets/1907-add-hibernate-patch-missing-file . Could this be it?
3. Loads of "Deprecated positional parameter" warmings still
4. Well...right now the Hibernate thing is causing havoc, so I'm having to untangle before I can report anything further

p...@semlab.nl

unread,
Jan 20, 2015, 7:29:54 AM1/20/15
to play-fr...@googlegroups.com
Number one is probably because of the (JPAStats)Plugin you're using. Documentation is using @NoTransaction now, because it has no reason to set up a database connection. If the plugin doesn't check for the annotation and tries to get the entitymanager, it will fail because the whole JPA / DB part of Play hasn't been initialized.
Number 2 is not caused by the bug you're referencing, that one is only about adding the used path file so others can build their own version of play, including patching Hibernate. But the bundled version of Hibernate is already patched.

Op dinsdag 20 januari 2015 12:36:51 UTC+1 schreef Johan Vosloo:

Johan Vosloo

unread,
Jan 20, 2015, 2:56:18 PM1/20/15
to play-fr...@googlegroups.com
Thanks - that helps a lot!
I should have noticed the JPAStats plugin in the stacktrace - thanks for pointing that out.
Also - thanks for clearing up that my Hibernate issues have nothing to do with the patch added to the 1.3.x master.
I will have a closer look as to what's cooking with Hibernate.

Johan Vosloo

unread,
Jan 21, 2015, 9:12:25 AM1/21/15
to play-fr...@googlegroups.com
FWIW: I still have no idea why I didn't have this behaviour with Play 1.2.7 (i.e. Hib3), but for some reason loading another entity in a Hibernate @PreUpdate or @PrePersist annotated method can cause Hibernate to trigger a flush (due to FlushMode.Auto), which causes an infinite loop and eventual stack overflow.
The (crummy) solution I settled on was to change the FlushMode to FlushMode.COMMIT just prior to loading the query.

I still have loads of "[DEPRECATION] Encountered positional parameter near line..."  warnings.
I'm trying to isolate the Play code where the index is NOT being added to the positional param (?) indicator... because I really hope to NOT have to go change all my ? to ?1 etc.
Any opinions on this?

Other than that, I haven't encountered any other issues (besides having to update the odd plugin code to work with Hibernate 4).
Looking good :)

Grzegorz Słowikowski

unread,
Jan 28, 2015, 3:54:33 AM1/28/15
to play-fr...@googlegroups.com
Hi

Play! 1.3.0 was 'mavenized' and is ready for usage with Maven plugin for Play! Framework.
https://code.google.com/p/maven-play-plugin/ (see 'News' section).

Regards
Grzegorz Slowikowski
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

fraser

unread,
Feb 12, 2015, 4:30:48 AM2/12/15
to play-fr...@googlegroups.com
Hi,
 
We're having a few problems with Play 1.3 in production due to upstart getting an incorrect PID since Play 1.3. Does anyone have any ideas on this topic? : https://groups.google.com/forum/#!topic/play-framework/qdH7r6rTECk


Thanks, 
Fraser 

corneil....@gmail.com

unread,
Feb 12, 2015, 5:55:54 AM2/12/15
to play-fr...@googlegroups.com
According to JPA Spec:
“In general, the lifecycle method of a portable application should not invoke EntityManager or Query operations, access other entity instances, or modify relationships within the same persistence context. A lifecycle callback method may modify the non-relationship state of the entity on which it is invoked.”

This means that saving or loading other entities in @PreUpdate or @PrePersist isn't a good idea.

The questions arises: 'What are these lifecycle methods for?' I have used them to create audit trails of changes which meant 'invoking EntityManager' in any case.



--

Johan Vosloo

unread,
Feb 16, 2015, 12:31:34 PM2/16/15
to play-fr...@googlegroups.com
Hi Corneil!

I use the lifestyle hooks for exactly that purpose: created by, updated by etc updates.

It worked fine (and still works fine), I just had to change the way I obtain the user who is creating / updating the model, since that's the part that now breaks with Hib4.

Mason Wang

unread,
Jun 2, 2016, 3:34:52 PM6/2/16
to play-framework
Hello, I have the same error - can you tell me how you fixed it? On play, I installed cobertura 2.5, then installed cobertura 2.4, then synced. Now, I have

Oops: NoClassDefFoundError

An unexpected error occured caused by exception NoClassDefFoundError:
Could not initialize class org.apache.commons.javaflow.bytecode.transformation.asm.AsmClassTransformer


when I try to play test.

Mason Wang

unread,
Jun 2, 2016, 3:37:12 PM6/2/16
to play-framework
Hello, I have the same error as you.I was doing the play tutorial, and I installed cobertura 2.5 on play, then seeing that it didn't work, installed cobertura 2.4 and did the dependencies --sync. Now, I have this error.

Oops: NoClassDefFoundError

An unexpected error occured caused by exception NoClassDefFoundError:
Could not initialize class org.apache.commons.javaflow.bytecode.transformation.asm.AsmClassTransformer


Can you help me fix it?

On Thursday, January 15, 2015 at 8:14:39 AM UTC-6, p...@semlab.nl wrote:
Reply all
Reply to author
Forward
0 new messages