Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Need to configuration steps for play2+hibernate(JPA)+mySQL
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  17 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
gsp  
View profile  
 More options May 14 2012, 6:16 am
From: gsp <gsp....@gmail.com>
Date: Mon, 14 May 2012 15:46:30 +0530
Local: Mon, May 14 2012 6:16 am
Subject: Need to configuration steps for play2+hibernate(JPA)+mySQL

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.

--
Thanks&Regards,
Sivaprasad.gudluri,
+91-7418674647.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gopala  
View profile  
 More options May 14 2012, 6:58 am
From: gopala <gopal....@gmail.com>
Date: Mon, 14 May 2012 03:58:16 -0700 (PDT)
Local: Mon, May 14 2012 6:58 am
Subject: Re: Need to configuration steps for play2+hibernate(JPA)+mySQL

Hi Siva,

 You need to add mysql configuration stuff in floder conf/application.conf
file.I have given the stuff u just copy and paste.

db.default.driver=com.mysql.jdbc.Driver
db.default.user=root
db.default.pass=root
db.default.url="jdbc:mysql://localhost/databasename".


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gsp  
View profile  
 More options May 14 2012, 7:28 am
From: gsp <gsp....@gmail.com>
Date: Mon, 14 May 2012 16:58:41 +0530
Local: Mon, May 14 2012 7:28 am
Subject: Re: [play-framework] Re: Need to configuration steps for play2+hibernate(JPA)+mySQL

Hi Gopala,

Thank you for response.
I want to steps for play2+jpa+mysql

I configured MySQL db details,

 *conf/application.conf*
*----------------------------------*
*
*
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://182.897:3456/mydb"
db.default.user=****
db.default.password=****
db.default.jndiName=DefaultDS
jpa.default=defaultPersistenceUnit

*Build.scala*
*---------------*
*
*
"org.hibernate" % "hibernate-entitymanager" % "3.6.9.Final",
      "mysql" % "mysql-connector-java" % "5.1.18"

*persistence.xml*
*-----------------------*
*
*
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
             version="2.0">

    <persistence-unit name="defaultPersistenceUnit"
transaction-type="RESOURCE_LOCAL">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <non-jta-data-source>DefaultDS</non-jta-data-source>
        <properties>
            <property name="hibernate.dialect"
value="org.hibernate.dialect.MySQLInnoDBDialect"/>
        </properties>
    </persistence-unit>

</persistence>

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

     org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configura tion.java:915)

     org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(Hibernate Persistence.java:57)

     javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:6 3)

please let me know solution for this exception.

--
Thanks&Regards,
Sivaprasad.gudluri,
+91-7418674647.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nilanjan  
View profile  
 More options May 14 2012, 10:37 am
From: Nilanjan <nraychaudh...@gmail.com>
Date: Mon, 14 May 2012 07:37:29 -0700 (PDT)
Local: Mon, May 14 2012 10:37 am
Subject: Re: Need to configuration steps for play2+hibernate(JPA)+mySQL
Could you be having similar problem:

http://stackoverflow.com/questions/4757662/unable-to-build-entitymana...

Nilanjan

On May 14, 5:28 am, gsp <gsp....@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gsp  
View profile  
 More options May 15 2012, 7:45 am
From: gsp <gsp....@gmail.com>
Date: Tue, 15 May 2012 17:15:46 +0530
Local: Tues, May 15 2012 7:45 am
Subject: Re: [play-framework] Re: Need to configuration steps for play2+hibernate(JPA)+mySQL

Hi Nilanjan,

Thank you for response.

I am trying jpa with play frame work.
Could u give any sample app for play+jpa+mysql.

--
Thanks&Regards,
Sivaprasad.gudluri,
+91-7418674647.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leonard Punt  
View profile  
 More options May 15 2012, 10:57 am
From: Leonard Punt <leonardp...@gmail.com>
Date: Tue, 15 May 2012 07:57:52 -0700 (PDT)
Local: Tues, May 15 2012 10:57 am
Subject: Re: [play-framework] Re: Need to configuration steps for play2+hibernate(JPA)+mySQL

Play has a sample of
JPA+H2: https://github.com/playframework/Play20/tree/master/samples/java/comp...

Is the stacktrace you posted the whole stacktrace? If not, can you provide
the whole stacktrace?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gsp  
View profile  
 More options May 15 2012, 11:50 pm
From: gsp <gsp....@gmail.com>
Date: Wed, 16 May 2012 09:20:31 +0530
Local: Tues, May 15 2012 11:50 pm
Subject: Re: [play-framework] Re: Need to configuration steps for play2+hibernate(JPA)+mySQL

Hi  Leonard Punt,

Thank you for response.

I am trying to configure play2.0+mysql+jpa.
Could you tell configurations steps for mysql+jpa

--
Thanks&Regards,
Sivaprasad.gudluri,
+91-7418674647.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leonard Punt  
View profile  
 More options May 16 2012, 4:27 am
From: Leonard Punt <leonardp...@gmail.com>
Date: Wed, 16 May 2012 01:27:33 -0700 (PDT)
Local: Wed, May 16 2012 4:27 am
Subject: Re: [play-framework] Re: Need to configuration steps for play2+hibernate(JPA)+mySQL

This is how to configure Play 2 + Hibernate + MySQL. If you are using a
different JPA implementation, some steps will probably be slightly
different.

1. conf/application.conf:

db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://localhost/database_name"
db.default.user=mysql_user
db.default.password=mysql_user_password

2. project/Build.scala:

val appDependencies = Seq(
                "org.hibernate" % "hibernate-entitymanager" % "3.6.9.Final",              "mysql" % "mysql-connector-java" % "5.1.18"

3. conf/META-INF/persistence.xml:

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
             version="2.0">

    <persistence-unit name="defaultPersistenceUnit" transaction-type="RESOURCE_LOCAL">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <non-jta-data-source>DefaultDS</non-jta-data-source>
        <properties>
            <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
            <property name="hibernate.hbm2ddl.auto" value="update"/>
        </properties>
    </persistence-unit>

</persistence>

4. Annotate your Controller methods with:

@play.db.jpa.Transactional

or

@play.db.jpa.Transactional(readOnly = true)

5. Annotate your Model classes with

@javax.persistence.Entity


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
emeet  
View profile   Translate to Translated (View Original)
 More options May 25 2012, 2:08 pm
From: emeet <supp...@emeet.me>
Date: Fri, 25 May 2012 11:08:22 -0700 (PDT)
Local: Fri, May 25 2012 2:08 pm
Subject: Re: [play-framework] Re: Need to configuration steps for play2+hibernate(JPA)+mySQL

thanks Leonard, your post did it for me. Looked for hours, this worked for
me.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Amir  
View profile  
 More options Jan 20, 9:42 am
From: Amir <amir.youss...@gmail.com>
Date: Sun, 20 Jan 2013 06:42:28 -0800 (PST)
Local: Sun, Jan 20 2013 9:42 am
Subject: Re: [play-framework] Re: Need to configuration steps for play2+hibernate(JPA)+mySQL

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]


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mohit Garg  
View profile  
 More options Feb 13, 8:07 am
From: Mohit Garg <mgy...@gmail.com>
Date: Wed, 13 Feb 2013 05:07:17 -0800 (PST)
Local: Wed, Feb 13 2013 8:07 am
Subject: Re: Need to configuration steps for play2+hibernate(JPA)+mySQL

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

     org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configura tion.java:915)

     org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(Hibernate Persistence.java:57)

     javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:6 3)

     javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:4 7)

     play.db.jpa.JPAPlugin.onStart(JPAPlugin.java:35)

     play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:63)

     play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:63)

     scala.collection.immutable.List.foreach(List.scala:309)

     play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:63)

     play.api.Play$$anonfun$start$1.apply(Play.scala:63)

     play.api.Play$$anonfun$start$1.apply(Play.scala:63)

     play.utils.Threads$.withContextClassLoader(Threads.scala:18)

     play.api.Play$.start(Play.scala:62)

     play.core.ReloadableApplication$$anonfun$get$1$$anonfun$1.apply(Application Provider.scala:133)

     play.core.ReloadableApplication$$anonfun$get$1$$anonfun$1.apply(Application Provider.scala:106)

     scala.Option.map(Option.scala:145)

     play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.sc ala:106)

     play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.sc ala:104)

     scala.util.Either$RightProjection.flatMap(Either.scala:523)

     play.core.ReloadableApplication.get(ApplicationProvider.scala:104)

     play.core.server.Server$class.sendHandler$1(Server.scala:56)

     play.core.server.Server$$anonfun$getHandlerFor$4.apply(Server.scala:88)

     play.core.server.Server$$anonfun$getHandlerFor$4.apply(Server.scala:87)

     scala.util.Either$RightProjection.flatMap(Either.scala:523)

     play.core.server.Server$class.getHandlerFor(Server.scala:87)

     play.core.server.NettyServer.getHandlerFor(NettyServer.scala:34)

     play.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(PlayDefau ltUpstreamHandler.scala:103)

     org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleC hannelUpstreamHandler.java:75)

     org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelP ipeline.java:565)

     org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext .sendUpstream(DefaultChannelPipeline.java:793)

     org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpC ontentDecoder.java:104)

     org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleC hannelUpstreamHandler.java:75)

     org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelP ipeline.java:565)

     org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext .sendUpstream(DefaultChannelPipeline.java:793)

     org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)

     org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceiv ed(FrameDecoder.java:455)

     org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingD ecoder.java:538)

     org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(Repla yingDecoder.java:437)

     org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleC hannelUpstreamHandler.java:75)

     org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelP ipeline.java:565)

     org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelP ipeline.java:560)

     org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)

     org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)

     org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:84)

     org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(Ab stractNioWorker.java:472)

     org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker. java:333)

     org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:35)

     org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java :102)

     org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker .java:42)

     java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

     java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

     java.lang.Thread.run(Unknown Source)

Here is my complete stack trace.

I am also running into this problem with Play 2.1 java

Please give some suggestion.

Thanks in advance. :)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marcos Pereira  
View profile  
 More options Feb 13, 10:22 am
From: Marcos Pereira <marcos.si...@gmail.com>
Date: Wed, 13 Feb 2013 13:22:02 -0200
Local: Wed, Feb 13 2013 10:22 am
Subject: Re: [play-framework] Re: Need to configuration steps for play2+hibernate(JPA)+mySQL

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?

--
http://about.me/marcospereira


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neha Choudhary  
View profile  
 More options Feb 15, 7:13 am
From: Neha Choudhary <ch.neh...@gmail.com>
Date: Fri, 15 Feb 2013 04:13:16 -0800 (PST)
Local: Fri, Feb 15 2013 7:13 am
Subject: Re: [play-framework] Re: Need to configuration steps for play2+hibernate(JPA)+mySQL

I'm running into the same problem.
I have specified the class name in persistence.xml also:

<persistence xmlns="http://java.sun.com/xml/ns/persistence"

Here is the complete stack trace

On Wednesday, 13 February 2013 20:52:02 UTC+5:30, Marcos Silva Pereira
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shishir Lamichhane  
View profile  
 More options Apr 9, 9:03 am
From: Shishir Lamichhane <ceecer.lamichh...@gmail.com>
Date: Tue, 9 Apr 2013 06:03:30 -0700 (PDT)
Local: Tues, Apr 9 2013 9:03 am
Subject: Re: Need to configuration steps for play2+hibernate(JPA)+mySQL

Hi,

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.

Any help would be greatly appreciated.

Thanks,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nathan Murthy  
View profile  
 More options Apr 11, 5:05 pm
From: Nathan Murthy <nathan.mur...@gmail.com>
Date: Thu, 11 Apr 2013 14:05:54 -0700 (PDT)
Local: Thurs, Apr 11 2013 5:05 pm
Subject: Re: [play-framework] Re: Need to configuration steps for play2+hibernate(JPA)+mySQL

I'm having nearly the identical problem as Neha:

persistence.xml

<persistence xmlns="http://java.sun.com/xml/ns/persistence"

Stack trace:

[error] application -

Also would appreciate some insight into this...
Nathan

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shishir Lamichhane  
View profile  
 More options Apr 15, 8:11 am
From: Shishir Lamichhane <ceecer.lamichh...@gmail.com>
Date: Mon, 15 Apr 2013 05:11:44 -0700 (PDT)
Local: Mon, Apr 15 2013 8:11 am
Subject: Re: [play-framework] Re: Need to configuration steps for play2+hibernate(JPA)+mySQL

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.

Log4j.jar is used for logging.

Checkout the project :
https://github.com/ceecer1/play211-scala210-spring3-Hibernate4.git

Edit the following to suit your db requirement in spring-context-data.xml.

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
        <property name="driverClassName" value="org.postgresql.Driver"/>
        <property name="url"
value="jdbc:postgresql://localhost:5432/scalaspringhibernate"/>
        <property name="username" value="test"/>
        <property name="password" value="test"/>
    </bean>

cmd -> play run

Creates tables in the database.

Insert 1 or 2 rows manually in the User table after the db is created.

Change <prop key="hibernate.hbm2ddl.auto">
create</prop> to update

got to : http://localhost:9000/ and see the JSON result

This might be really helpful for you guys.

Enjoy SCALA.

Thanks,
ceecer.lamichh...@gmail.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luís Loureiro  
View profile  
 More options Apr 22, 5:34 pm
From: Luís Loureiro <llorie...@gmail.com>
Date: Mon, 22 Apr 2013 14:34:44 -0700 (PDT)
Local: Mon, Apr 22 2013 5:34 pm
Subject: Re: [play-framework] Re: Need to configuration steps for play2+hibernate(JPA)+mySQL

Hi!
I was having the same problem as you!

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:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »