title: Play 2.4 Framework and MySQL
body: <p>Im having trouble using MySqL to work with Play 2.4</p>
  
  <p>For example if I create an app with activator based on the "play-java-intro" template
  (see details below) which corresponds to the <a href="https://www.youtube.com/watch?v=8z3h4Uv9YbE" rel="nofollow">video</a> shown on the start page of <a href="https://www.playframework.com/" rel="nofollow">playframework.com</a>,
  things work fine so far. This is however using an in memory h2 database.</p>
  
  <p>When I try to modify the project to use mysql instead, I get the "Execution exception":</p>
  
  <pre><code>--- (Running the application, auto-reloading is enabled) ---
  
  [info] p.a.l.c.ActorSystemProvider - Starting application default Akka system: application
  [info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
  
  (Server started, use Ctrl+D to stop and go back to the console...)
  
  Warning: node.js detection failed, sbt will use the Rhino based Trireme JavaScript engine instead to run JavaScript assets compilation, which in some cases may be orders of magnitude slower than using node.js.
  [info] - application - Creating Pool for datasource 'default'
  [info] - play.api.db.HikariCPConnectionPool - datasource [default] bound to JNDI as DefaultDS
  [info] - play.api.db.DefaultDBApi - Database [default] connected at jdbc:mysql://localhost/foo_db
  [info] - play.api.libs.concurrent.ActorSystemProvider - Starting application default Akka system: application
  [info] - play.api.Play - Application started (Dev)
  [error] - play.core.server.netty.PlayDefaultUpstreamHandler - Cannot invoke the action
  com.google.inject.ProvisionException: Unable to provision, see the following errors:
  
  1) Error injecting constructor, java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;
    at play.db.jpa.DefaultJPAApi$JPAApiProvider.&lt;init&gt;(DefaultJPAApi.java:35)
    at play.db.jpa.DefaultJPAApi$JPAApiProvider.class(DefaultJPAApi.java:30)
    while locating play.db.jpa.DefaultJPAApi$JPAApiProvider
    while locating play.db.jpa.JPAApi
  
  1 error
          at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025) ~[guice.jar:na]
          at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051) ~[guice.jar:na]
          at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:321) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.inject.DelegateInjector.instanceOf(DelegateInjector.java:22) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.db.jpa.JPA.jpaApi(JPA.java:46) ~[play-java-jpa_2.10-2.4.2.jar:2.4.2]
          at play.db.jpa.JPA.withTransaction(JPA.java:159) ~[play-java-jpa_2.10-2.4.2.jar:2.4.2]
          at play.db.jpa.TransactionalAction.call(TransactionalAction.java:16) ~[play-java-jpa_2.10-2.4.2.jar:2.4.2]
          at play.core.j.JavaAction$$anonfun$7.apply(JavaAction.scala:94) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.core.j.JavaAction$$anonfun$7.apply(JavaAction.scala:94) ~[play_2.10-2.4.2.jar:2.4.2]
          at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) ~[scala-library-2.10.5.jar:na]
          at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) ~[scala-library-2.10.5.jar:na]
          at play.core.j.HttpExecutionContext$$anon$2.run(HttpExecutionContext.scala:40) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.api.libs.iteratee.Execution$trampoline$.execute(Execution.scala:70) ~[play-iteratees_2.10-2.4.2.jar:2.4.2]
          at play.core.j.HttpExecutionContext.execute(HttpExecutionContext.scala:32) ~[play_2.10-2.4.2.jar:2.4.2]
          at scala.concurrent.impl.Future$.apply(Future.scala:31) ~[scala-library-2.10.5.jar:na]
          at scala.concurrent.Future$.apply(Future.scala:485) ~[scala-library-2.10.5.jar:na]
          at play.core.j.JavaAction.apply(JavaAction.scala:94) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:105) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:105) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.utils.Threads$.withContextClassLoader(Threads.scala:21) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:104) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:103) ~[play_2.10-2.4.2.jar:2.4.2]
          at scala.Option.map(Option.scala:145) ~[scala-library-2.10.5.jar:na]
          at play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:103) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:96) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.api.libs.iteratee.Iteratee$$anonfun$mapM$1.apply(Iteratee.scala:524) ~[play-iteratees_2.10-2.4.2.jar:2.4.2]
          at play.api.libs.iteratee.Iteratee$$anonfun$mapM$1.apply(Iteratee.scala:524) ~[play-iteratees_2.10-2.4.2.jar:2.4.2]
          at play.api.libs.iteratee.Iteratee$$anonfun$flatMapM$1.apply(Iteratee.scala:560) ~[play-iteratees_2.10-2.4.2.jar:2.4.2]
          at play.api.libs.iteratee.Iteratee$$anonfun$flatMapM$1.apply(Iteratee.scala:560) ~[play-iteratees_2.10-2.4.2.jar:2.4.2]
          at play.api.libs.iteratee.Iteratee$$anonfun$flatMap$1$$anonfun$apply$14.apply(Iteratee.scala:537) ~[play-iteratees_2.10-2.4.2.jar:2.4.2]
          at play.api.libs.iteratee.Iteratee$$anonfun$flatMap$1$$anonfun$apply$14.apply(Iteratee.scala:537) ~[play-iteratees_2.10-2.4.2.jar:2.4.2]
          at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) ~[scala-library-2.10.5.jar:na]
          at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) ~[scala-library-2.10.5.jar:na]
          at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40) [akka-actor_2.10-2.3.11.jar:na]
          at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397) [akka-actor_2.10-2.3.11.jar:na]
          at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [scala-library-2.10.5.jar:na]
          at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [scala-library-2.10.5.jar:na]
          at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [scala-library-2.10.5.jar:na]
          at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [scala-library-2.10.5.jar:na]
  Caused by: java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;
          at org.hibernate.cfg.annotations.EntityBinder.processComplementaryTableDefinitions(EntityBinder.java:973) ~[hibernate-core-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:824) ~[hibernate-core-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3845) ~[hibernate-core-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3799) ~[hibernate-core-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1412) ~[hibernate-core-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1846) ~[hibernate-core-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:852) ~[hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:845) ~[hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:398) ~[hibernate-core-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:844) ~[hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:75) ~[hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:54) ~[hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
          at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83) ~[persistence-api-1.0.jar:1.0]
          at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60) ~[persistence-api-1.0.jar:1.0]
          at play.db.jpa.DefaultJPAApi.start(DefaultJPAApi.java:56) ~[play-java-jpa_2.10-2.4.2.jar:2.4.2]
          at play.db.jpa.DefaultJPAApi$JPAApiProvider.&lt;init&gt;(DefaultJPAApi.java:42) ~[play-java-jpa_2.10-2.4.2.jar:2.4.2]
          at play.db.jpa.DefaultJPAApi$JPAApiProvider$$FastClassByGuice$$dcd4cdbd.newInstance(&lt;generated&gt;) ~[guice.jar:2.4.2]
          at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40) ~[guice.jar:na]
          at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61) ~[guice.jar:na]
          at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105) ~[guice.jar:na]
          at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85) ~[guice.jar:na]
          at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267) ~[guice.jar:na]
          at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) ~[guice.jar:na]
          at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103) ~[guice.jar:na]
          at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) ~[guice.jar:na]
          at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) ~[guice.jar:na]
          at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) ~[guice.jar:na]
          at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:61) ~[guice.jar:na]
          at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016) ~[guice.jar:na]
          at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) ~[guice.jar:na]
          at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012) ~[guice.jar:na]
          ... 38 common frames omitted
  [error] - application - 
  
  ! @6n9po3p32 - Internal server error, for (POST) [/person] -&gt;
  
  play.api.http.HttpErrorHandlerExceptions$$anon$1: Execution exception[[ProvisionException: Unable to provision, see the following errors:
  
  1) Error injecting constructor, java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;
    at play.db.jpa.DefaultJPAApi$JPAApiProvider.&lt;init&gt;(DefaultJPAApi.java:35)
    at play.db.jpa.DefaultJPAApi$JPAApiProvider.class(DefaultJPAApi.java:30)
    while locating play.db.jpa.DefaultJPAApi$JPAApiProvider
    while locating play.db.jpa.JPAApi
  
  1 error]]
          at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:265) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:191) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.api.GlobalSettings$class.onError(GlobalSettings.scala:179) [play_2.10-2.4.2.jar:2.4.2]
          at play.api.DefaultGlobal$.onError(GlobalSettings.scala:212) [play_2.10-2.4.2.jar:2.4.2]
          at play.api.http.GlobalSettingsHttpErrorHandler.onServerError(HttpErrorHandler.scala:94) [play_2.10-2.4.2.jar:2.4.2]
          at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3.applyOrElse(PlayDefaultUpstreamHandler.scala:273) [play-netty-server_2.10-2.4.2.jar:2.4.2]
          at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3.applyOrElse(PlayDefaultUpstreamHandler.scala:269) [play-netty-server_2.10-2.4.2.jar:2.4.2]
          at scala.concurrent.Future$$anonfun$recoverWith$1.apply(Future.scala:344) [scala-library-2.10.5.jar:na]
          at scala.concurrent.Future$$anonfun$recoverWith$1.apply(Future.scala:343) [scala-library-2.10.5.jar:na]
          at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) [scala-library-2.10.5.jar:na]
          at play.api.libs.iteratee.Execution$trampoline$.executeScheduled(Execution.scala:109) [play-iteratees_2.10-2.4.2.jar:2.4.2]
          at play.api.libs.iteratee.Execution$trampoline$.execute(Execution.scala:71) [play-iteratees_2.10-2.4.2.jar:2.4.2]
          at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:40) [scala-library-2.10.5.jar:na]
          at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:248) [scala-library-2.10.5.jar:na]
          at scala.concurrent.Promise$class.complete(Promise.scala:55) [scala-library-2.10.5.jar:na]
          at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:153) [scala-library-2.10.5.jar:na]
          at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:23) [scala-library-2.10.5.jar:na]
          at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40) [akka-actor_2.10-2.3.11.jar:na]
          at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397) [akka-actor_2.10-2.3.11.jar:na]
          at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [scala-library-2.10.5.jar:na]
          at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [scala-library-2.10.5.jar:na]
          at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [scala-library-2.10.5.jar:na]
          at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [scala-library-2.10.5.jar:na]
  Caused by: com.google.inject.ProvisionException: Unable to provision, see the following errors:
  
  1) Error injecting constructor, java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;
    at play.db.jpa.DefaultJPAApi$JPAApiProvider.&lt;init&gt;(DefaultJPAApi.java:35)
    at play.db.jpa.DefaultJPAApi$JPAApiProvider.class(DefaultJPAApi.java:30)
    while locating play.db.jpa.DefaultJPAApi$JPAApiProvider
    while locating play.db.jpa.JPAApi
  
  1 error
          at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025) ~[guice.jar:na]
          at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051) ~[guice.jar:na]
          at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:321) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.inject.DelegateInjector.instanceOf(DelegateInjector.java:22) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.db.jpa.JPA.jpaApi(JPA.java:46) ~[play-java-jpa_2.10-2.4.2.jar:2.4.2]
          at play.db.jpa.JPA.withTransaction(JPA.java:159) ~[play-java-jpa_2.10-2.4.2.jar:2.4.2]
          at play.db.jpa.TransactionalAction.call(TransactionalAction.java:16) ~[play-java-jpa_2.10-2.4.2.jar:2.4.2]
          at play.core.j.JavaAction$$anonfun$7.apply(JavaAction.scala:94) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.core.j.JavaAction$$anonfun$7.apply(JavaAction.scala:94) ~[play_2.10-2.4.2.jar:2.4.2]
          at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) [scala-library-2.10.5.jar:na]
          at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) [scala-library-2.10.5.jar:na]
          at play.core.j.HttpExecutionContext$$anon$2.run(HttpExecutionContext.scala:40) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.api.libs.iteratee.Execution$trampoline$.execute(Execution.scala:70) [play-iteratees_2.10-2.4.2.jar:2.4.2]
          at play.core.j.HttpExecutionContext.execute(HttpExecutionContext.scala:32) ~[play_2.10-2.4.2.jar:2.4.2]
          at scala.concurrent.impl.Future$.apply(Future.scala:31) ~[scala-library-2.10.5.jar:na]
          at scala.concurrent.Future$.apply(Future.scala:485) ~[scala-library-2.10.5.jar:na]
          at play.core.j.JavaAction.apply(JavaAction.scala:94) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:105) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:105) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.utils.Threads$.withContextClassLoader(Threads.scala:21) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:104) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:103) ~[play_2.10-2.4.2.jar:2.4.2]
          at scala.Option.map(Option.scala:145) ~[scala-library-2.10.5.jar:na]
          at play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:103) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:96) ~[play_2.10-2.4.2.jar:2.4.2]
          at play.api.libs.iteratee.Iteratee$$anonfun$mapM$1.apply(Iteratee.scala:524) ~[play-iteratees_2.10-2.4.2.jar:2.4.2]
          at play.api.libs.iteratee.Iteratee$$anonfun$mapM$1.apply(Iteratee.scala:524) ~[play-iteratees_2.10-2.4.2.jar:2.4.2]
          at play.api.libs.iteratee.Iteratee$$anonfun$flatMapM$1.apply(Iteratee.scala:560) ~[play-iteratees_2.10-2.4.2.jar:2.4.2]
          at play.api.libs.iteratee.Iteratee$$anonfun$flatMapM$1.apply(Iteratee.scala:560) ~[play-iteratees_2.10-2.4.2.jar:2.4.2]
          at play.api.libs.iteratee.Iteratee$$anonfun$flatMap$1$$anonfun$apply$14.apply(Iteratee.scala:537) ~[play-iteratees_2.10-2.4.2.jar:2.4.2]
          at play.api.libs.iteratee.Iteratee$$anonfun$flatMap$1$$anonfun$apply$14.apply(Iteratee.scala:537) ~[play-iteratees_2.10-2.4.2.jar:2.4.2]
          at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) [scala-library-2.10.5.jar:na]
          at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) [scala-library-2.10.5.jar:na]
          ... 6 common frames omitted
  Caused by: java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;
          at org.hibernate.cfg.annotations.EntityBinder.processComplementaryTableDefinitions(EntityBinder.java:973) ~[hibernate-core-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:824) ~[hibernate-core-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3845) ~[hibernate-core-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3799) ~[hibernate-core-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1412) ~[hibernate-core-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1846) ~[hibernate-core-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:852) ~[hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:845) ~[hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:398) ~[hibernate-core-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:844) ~[hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:75) ~[hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
          at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:54) ~[hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
          at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83) ~[persistence-api-1.0.jar:1.0]
          at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60) ~[persistence-api-1.0.jar:1.0]
          at play.db.jpa.DefaultJPAApi.start(DefaultJPAApi.java:56) ~[play-java-jpa_2.10-2.4.2.jar:2.4.2]
          at play.db.jpa.DefaultJPAApi$JPAApiProvider.&lt;init&gt;(DefaultJPAApi.java:42) ~[play-java-jpa_2.10-2.4.2.jar:2.4.2]
          at play.db.jpa.DefaultJPAApi$JPAApiProvider$$FastClassByGuice$$dcd4cdbd.newInstance(&lt;generated&gt;) ~[guice.jar:2.4.2]
          at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40) ~[guice.jar:na]
          at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61) ~[guice.jar:na]
          at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105) ~[guice.jar:na]
          at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85) ~[guice.jar:na]
          at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267) ~[guice.jar:na]
          at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) ~[guice.jar:na]
          at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103) ~[guice.jar:na]
          at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) ~[guice.jar:na]
          at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) ~[guice.jar:na]
          at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) ~[guice.jar:na]
          at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:61) ~[guice.jar:na]
          at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016) ~[guice.jar:na]
          at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) ~[guice.jar:na]
          at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012) ~[guice.jar:na]
          ... 38 common frames omitted
  </code></pre>
  
  <p>when I try to save to the database.</p>
  
  <p>"<strong>conf/evolutions/default/1.sql</strong>" does get created, and the mysql database does seem to get the appropriate table
  inserted, however i cant seem to save any rows to the table.</p>
  
  <p>Id be really grateful for a solution.</p>
  
  <p>Many thanks in advance.</p>
  
  <h2>Here is what I did and below my code:</h2>
  
  <p>(1) I have a system with<br>
  OpenSuse 13.2 Linux, with Mariadb,
  Intellij 14, 
  Play 2.4.2</p>
  
  <hr>
  
  <p>mysql is running and there is a database "foo_db"
  The user "root" with empty password has full access.</p>
  
  <pre><code>MariaDB [foo_db]&gt; describe person_tb;
  +-------+--------------+------+-----+---------+-------+
  | Field | Type         | Null | Key | Default | Extra |
  +-------+--------------+------+-----+---------+-------+
  | id    | varchar(255) | NO   | PRI | NULL    |       |
  | name  | varchar(255) | YES  |     | NULL    |       |
  </code></pre>
  
  <hr>
  
  <h1>create a new play app based on "play-java-intro" template</h1>
  
  <pre><code>&gt; activator new play-java-intro_mysql play-java-intro
  &gt; cd my-play-java-sql
  &gt; activator run
  </code></pre>
  
  <p>Point Browser to 
  <a href="http://localhost:9000/" rel="nofollow">http://localhost:9000/</a></p>
  
  <p>The app works fine .. can add "persons" etc as described in the tutorial.
  <a href="https://www.youtube.com/watch?t=1028&amp;v=bLrmnjPQsZc" rel="nofollow">video tutorial</a></p>
  
  <p>(2) Now I modify some files to try to use mysql instead. Below the files after </p>
  
  <hr>
  
  <h2>Person.java:</h2>
  
  <pre><code>package models;
  
  import javax.persistence.*;
  
  @Entity
  @Table(name = "person_tb")
  public class Person {
  
      @Id
      @GeneratedValue(strategy=GenerationType.AUTO)
      public String id;
  
      public String name;
  
  }
  </code></pre>
  
  <h2>appplication.conf:</h2>
  
  <pre><code>play.crypto.secret = "changeme"
  
  play.i18n.langs = [ "en" ]
  
  db.default.driver=com.mysql.jdbc.Driver
  db.default.url="jdbc:mysql://localhost/foo_db"
  db.default.username=root
  db.default.password=""
  
  ebean.default=["models.*"]
  #applyEvolutions.default=true
  db.default.jndiName=DefaultDS
  
  jpa.default=defaultPersistenceUnit
  </code></pre>
  
  <h2>build.sbt:</h2>
  
  <pre><code>name := """play-java-intro_mysql"""
  version := "1.0-SNAPSHOT"
  lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayEbean)
  
  libraryDependencies ++= Seq(
    evolutions,
   javaJpa,
  javaJdbc,
    "mysql" % "mysql-connector-java" % "5.1.18",
    "org.hibernate" % "hibernate-entitymanager" % "4.3.7.Final"
  )
  
  routesGenerator := InjectedRoutesGenerator
  </code></pre>
  
  <hr>
  
  <h2>plugins.sbt:</h2>
  
  <pre><code>addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.2")
  
  addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")
  addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.6")
  addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.3")
  addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.7")
  addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.0")
  addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.1.0")
  
  
  addSbtPlugin("com.typesafe.sbt" % "sbt-play-enhancer" % "1.1.0")
  addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "1.0.0")
  </code></pre>