This is siva, I am newly learning playframe work , I am trying to connect
play 2.0 project with mySQL database by using hibernate(JPA). Still I
didn't get solution. Could you tell exact steps for that configuration or
could you share that project to me.
On Monday, 14 May 2012 15:46:30 UTC+5:30, sivaprasad gudluri wrote:
> Hi,
> This is siva, I am newly learning playframe work , I am trying to connect > play 2.0 project with mySQL database by using hibernate(JPA). Still I > didn't get solution. Could you tell exact steps for that configuration or > could you share that project to me.
I am trying to run my application I got Unexpected exception:
PersistenceException: [PersistenceUnit:
defaultPersistenceUnit] Unable to build EntityManagerFactory
No source available, here is the exception stack trace:
->javax.persistence.PersistenceException: [PersistenceUnit:
defaultPersistenceUnit] Unable to build EntityManagerFactory
> On Monday, 14 May 2012 15:46:30 UTC+5:30, sivaprasad gudluri wrote:
>> Hi,
>> This is siva, I am newly learning playframe work , I am trying to connect
>> play 2.0 project with mySQL database by using hibernate(JPA). Still I
>> didn't get solution. Could you tell exact steps for that configuration or
>> could you share that project to me.
>> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/-Wh51OwR62YJ.
> To post to this group, send email to play-framework@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framework+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.
> I am trying to run my application I got Unexpected exception:
> PersistenceException: [PersistenceUnit:
> defaultPersistenceUnit] Unable to build EntityManagerFactory
> No source available, here is the exception stack trace:
> ->javax.persistence.PersistenceException: [PersistenceUnit:
> defaultPersistenceUnit] Unable to build EntityManagerFactory
> > On Monday, 14 May 2012 15:46:30 UTC+5:30, sivaprasad gudluri wrote:
> >> Hi,
> >> This is siva, I am newly learning playframe work , I am trying to connect
> >> play 2.0 project with mySQL database by using hibernate(JPA). Still I
> >> didn't get solution. Could you tell exact steps for that configuration or
> >> could you share that project to me.
> >> --
> > You received this message because you are subscribed to the Google Groups
> > "play-framework" group.
> > To view this discussion on the web visit
> >https://groups.google.com/d/msg/play-framework/-/-Wh51OwR62YJ.
> > To post to this group, send email to play-framework@googlegroups.com.
> > To unsubscribe from this group, send email to
> > play-framework+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/play-framework?hl=en.
> > I am trying to run my application I got Unexpected exception:
> > PersistenceException: [PersistenceUnit:
> > defaultPersistenceUnit] Unable to build EntityManagerFactory
> > No source available, here is the exception stack trace:
> > > On Monday, 14 May 2012 15:46:30 UTC+5:30, sivaprasad gudluri wrote:
> > >> Hi,
> > >> This is siva, I am newly learning playframe work , I am trying to
> connect
> > >> play 2.0 project with mySQL database by using hibernate(JPA). Still I
> > >> didn't get solution. Could you tell exact steps for that
> configuration or
> > >> could you share that project to me.
> > >> --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "play-framework" group.
> > > To view this discussion on the web visit
> > >https://groups.google.com/d/msg/play-framework/-/-Wh51OwR62YJ.
> > > To post to this group, send email to play-framework@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > play-framework+unsubscribe@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/play-framework?hl=en.
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To post to this group, send email to play-framework@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framework+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.
> To post to this group, send email to play-framework@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framework+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.
On Wednesday, May 16, 2012 4:27:33 AM UTC-4, Leonard Punt wrote:
> This is how to configure Play 2 + Hibernate + MySQL. If you are using a > different JPA implementation, some steps will probably be slightly > different.
Still a similar problem even after doing all below. I found some older JBoss posts mentioning old JDK version. Mine is on Mac.
$ java -version java version "1.6.0_37" Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909) Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)
Any suggestions?
[info] play - database [default] connected at jdbc:mysql://localhost/computer [error] o.h.c.DatasourceConnectionProvider - Could not find datasource: DefaultDS javax.naming.NameNotFoundException: DefaultDS not found at tyrex.naming.MemoryContext.internalLookup(Unknown Source) ~[tyrex.jar:1.0.1 November 11 2003 1703] at tyrex.naming.MemoryContext.lookup(Unknown Source) ~[tyrex.jar:1.0.1 November 11 2003 1703] at javax.naming.InitialContext.lookup(InitialContext.java:392) ~[na:1.6.0_37] at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceC onnectionProvider.java:75) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(Co nnectionProviderFactory.java:143) [hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(Injecti onSettingsFactory.java:51) [hibernate-entitymanager-3.6.9.Final.jar:3.6.9.Final] [error] application -
! @6d46lj4jl - Internal server error, for (GET) [/] ->
play.api.UnexpectedException: Unexpected exception[PersistenceException: [PersistenceUnit: defaultPersistenceUnit] Unable to build EntityManagerFactory] at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$1.apply(Application Provider.scala:142) ~[play_2.10.jar:2.1-RC2] at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$1.apply(Application Provider.scala:106) ~[play_2.10.jar:2.1-RC2] at scala.Option.map(Option.scala:145) ~[scala-library.jar:na] at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.sc ala:106) ~[play_2.10.jar:2.1-RC2] at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.sc ala:104) ~[play_2.10.jar:2.1-RC2] at scala.util.Either$RightProjection.flatMap(Either.scala:523) [scala-library.jar:na] Caused by: javax.persistence.PersistenceException: [PersistenceUnit: defaultPersistenceUnit] Unable to build EntityManagerFactory at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configura tion.java:915) ~[hibernate-entitymanager-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(Hibernate Persistence.java:57) ~[hibernate-entitymanager-3.6.9.Final.jar:3.6.9.Final] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:6 3) ~[hibernate-jpa-2.0-api.jar:1.0.1.Final] at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:4 7) ~[hibernate-jpa-2.0-api.jar:1.0.1.Final] at play.db.jpa.JPAPlugin.onStart(JPAPlugin.java:35) ~[play-java-jpa_2.10.jar:2.1-RC2] at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:63) ~[play_2.10.jar:2.1-RC2] Caused by: org.hibernate.HibernateException: Could not find datasource at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceC onnectionProvider.java:79) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(Co nnectionProviderFactory.java:143) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(Injecti onSettingsFactory.java:51) ~[hibernate-entitymanager-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:90) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:28 63) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2859) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] Caused by: javax.naming.NameNotFoundException: DefaultDS not found at tyrex.naming.MemoryContext.internalLookup(Unknown Source) ~[tyrex.jar:1.0.1 November 11 2003 1703] at tyrex.naming.MemoryContext.lookup(Unknown Source) ~[tyrex.jar:1.0.1 November 11 2003 1703] at javax.naming.InitialContext.lookup(InitialContext.java:392) ~[na:1.6.0_37] at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceC onnectionProvider.java:75) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(Co nnectionProviderFactory.java:143) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(Injecti onSettingsFactory.java:51) ~[hibernate-entitymanager-3.6.9.Final.jar:3.6.9.Final]
On Wednesday, May 16, 2012 1:27:33 AM UTC-7, Leonard Punt wrote:
> This is how to configure Play 2 + Hibernate + MySQL. If you are using a > different JPA implementation, some steps will probably be slightly > different.
PersistenceException: [PersistenceUnit: defaultPersistenceUnit] Unable to build EntityManagerFactory No source available, here is the exception stack trace:
->javax.persistence.PersistenceException: [PersistenceUnit: defaultPersistenceUnit] Unable to build EntityManagerFactory
I think that is better look at the stack trace in your console. Maybe there
is more information there. Also, could you give us more details about how
are you configuring your app to use jpa?
On Wed, Feb 13, 2013 at 11:07 AM, Mohit Garg <mgy...@gmail.com> wrote:
> Unexpected exception
> PersistenceException: [PersistenceUnit: defaultPersistenceUnit] Unable to
> build EntityManagerFactory
> No source available, here is the exception stack trace:
> ->javax.persistence.PersistenceException: [PersistenceUnit: defaultPersistenceUnit] Unable to build EntityManagerFactory
> I am also running into this problem with Play 2.1 java
> Please give some suggestion.
> Thanks in advance. :)
> --
> 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-framework+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> I think that is better look at the stack trace in your console. Maybe > there is more information there. Also, could you give us more details about > how are you configuring your app to use jpa?
> On Wed, Feb 13, 2013 at 11:07 AM, Mohit Garg <mgy...@gmail.com<javascript:> > > wrote:
>> Unexpected exception
>> PersistenceException: [PersistenceUnit: defaultPersistenceUnit] Unable to >> build EntityManagerFactory >> No source available, here is the exception stack trace:
>> ->javax.persistence.PersistenceException: [PersistenceUnit: defaultPersistenceUnit] Unable to build EntityManagerFactory
>> I am also running into this problem with Play 2.1 java
>> Please give some suggestion.
>> Thanks in advance. :)
>> -- >> 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 <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out.
We have selected play2.1, scala 2.1.0 and hibernate for a large enterprise product's backend REST services development. Can you please suggest if we have choosen the right technologies? about using Scala and Hibernate, and also can you please show a good sample configuration for Play2.1, Scala 2.1.0 and Hibernate, MySQL project.
>> Internal server error, for (GET) [/] -> >> play.api.Application$$anon$1: Execution exception[[PersistenceException: >> [PersistenceUnit: samplePersistenceUnit] class or package not found]] >> at play.api.Application$class.handleError(Application.scala:289) >> ~[play_2.10.jar:2.1.0] >> at play.api.DefaultApplication.handleError(Application.scala:383) >> [play_2.10.jar:2.1.0] >> at >> play.core.server.netty.PlayDefaultUpstreamHandler$$anon$2$$anonfun$handle$1 .apply(PlayDefaultUpstreamHandler.scala:132) >> [play_2.10.jar:2.1.0] >> at >> play.core.server.netty.PlayDefaultUpstreamHandler$$anon$2$$anonfun$handle$1 .apply(PlayDefaultUpstreamHandler.scala:128) >> [play_2.10.jar:2.1.0] >> at >> play.api.libs.concurrent.PlayPromise$$anonfun$extend1$1.apply(Promise.scala :113) >> [play_2.10.jar:2.1.0] >> at >> play.api.libs.concurrent.PlayPromise$$anonfun$extend1$1.apply(Promise.scala :113) >> [play_2.10.jar:2.1.0] >> javax.persistence.PersistenceException: [PersistenceUnit: >> samplePersistenceUnit] class or package not found >> at >> org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configurat ion.java:1386) >> ~[hibernate-entitymanager-3.6.9.Final.jar:3.6.9.Final] >> at >> org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configur ation.java:1159) >> ~[hibernate-entitymanager-3.6.9.Final.jar:3.6.9.Final] >> at >> org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1004) >> ~[hibernate-entitymanager-3.6.9.Final.jar:3.6.9.Final] >> at >> org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:282) >> ~[hibernate-entitymanager-3.6.9.Final.jar:3.6.9.Final] >> at >> org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:366) >> ~[hibernate-entitymanager-3.6.9.Final.jar:3.6.9.Final] >> at >> org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(Hibernate Persistence.java:56) >> ~[hibernate-entitymanager-3.6.9.Final.jar:3.6.9.Final] >> Caused by: java.lang.ClassNotFoundException: models.Employee >> at java.net.URLClassLoader$1.run(URLClassLoader.java:366) >> ~[na:1.7.0] >> at java.net.URLClassLoader$1.run(URLClassLoader.java:355) >> ~[na:1.7.0] >> at java.security.AccessController.doPrivileged(Native Method) >> ~[na:1.7.0] >> at java.net.URLClassLoader.findClass(URLClassLoader.java:354) >> ~[na:1.7.0] >> at java.lang.ClassLoader.loadClass(ClassLoader.java:423) >> ~[na:1.7.0] >> at java.lang.ClassLoader.loadClass(ClassLoader.java:356) >> ~[na:1.7.0]
> On Wednesday, 13 February 2013 20:52:02 UTC+5:30, Marcos Silva Pereira > wrote:
>> I think that is better look at the stack trace in your console. Maybe >> there is more information there. Also, could you give us more details about >> how are you configuring your app to use jpa?
>> On Wed, Feb 13, 2013 at 11:07 AM, Mohit Garg <mgy...@gmail.com> wrote:
>>> Unexpected exception
>>> PersistenceException: [PersistenceUnit: defaultPersistenceUnit] Unable >>> to build EntityManagerFactory >>> No source available, here is the exception stack trace:
>>> ->javax.persistence.PersistenceException: [PersistenceUnit: defaultPersistenceUnit] Unable to build EntityManagerFactory
Hi, I have created a basic sample for the configuration of Play 2.1.1 Framework, Scala 2.10 Language, Spring3 for dependency injection and Hibernate4 as ORM.
Although the dependency "*javaJpa*" was in the "*Build.scala*" file, i wasn't able to use the *play.db.jpa.JPA* helper, so i tried to follow the j2ee 6 official tutorial (
http://docs.oracle.com/javaee/6/tutorial/doc/bnbpy.html).
Following the tutorial those problems occurred.
All the examples are using the JPA helper, so i needed to use too. So i cleaned the project, forced the application to update the dependencies (using *play update*) and then i was able to use the JPA helper.
Using the helper those errors disappeared.
Clean the project, force the update of the dependencies and use the JPA helper!
In the worst case clean the sbt dependencies or create a new play installation folder.
Now i've got others, but it's my fault!
I hope it helps!
*Luís Loureiro*
Quinta-feira, 11 de Abril de 2013 22:05:54 UTC+1, Nathan Murthy escreveu: