[1.2.7] NoSuchMethodError on "org.hibernate.readOnly"

107 views
Skip to first unread message

Antoine Blais

unread,
Feb 10, 2014, 10:53:51 AM2/10/14
to play-fr...@googlegroups.com
Hi,

My Play apps works fine in Prod with my PostGreSql DB, but in local with "db=fs" mode I got this error on startup :

Oops: NoSuchMethodError
An unexpected error occured caused by exception NoSuchMethodError: javax.persistence.EntityManager.setProperty(Ljava/lang/String;Ljava/lang/Object;)V

play.exceptions.UnexpectedException: Unexpected Error
at play.Invoker$Invocation.onException(Invoker.java:244)
at play.Invoker$Invocation.run(Invoker.java:286)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.NoSuchMethodError: javax.persistence.EntityManager.setProperty(Ljava/lang/String;Ljava/lang/Object;)V
at play.db.jpa.JPAPlugin.startTx(JPAPlugin.java:375)
at play.db.jpa.JPAPlugin.beforeInvocation(JPAPlugin.java:345)
at play.plugins.PluginCollection.beforeInvocation(PluginCollection.java:473)
at play.Invoker$Invocation.before(Invoker.java:217)
at play.Invoker$Invocation.run(Invoker.java:277)
... 1 more

cause by the following line in JPAPlugin line 375 : 

 manager.setProperty("org.hibernate.readOnly", readonly);


Any idea ?

thanks

Antoine Blais

unread,
Mar 14, 2014, 6:21:02 AM3/14/14
to play-fr...@googlegroups.com
Up

Grzegorz Slowikowski

unread,
Mar 14, 2014, 6:41:23 AM3/14/14
to play-framework
Hi

"hibernate-jpa-2.0-api-1.0.1.Final.jar" contains "javax.persistence.EntityManager" interface with "public void setProperty(String propertyName, Object value)" method.

Did you change any of the libraries in Play's framework/lib directory or added to your project some library that conflicts with the above one (for example ejb3-persistence-1.${something}.jar)?

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.

Reply all
Reply to author
Forward
0 new messages