データベース関連のすべての作業 (JPA/Hibernate 4.1.7/PostgreSQL) に Java jar を使用するプレイ アプリ (プレイ 2.0.4) があります。デフォルトの接続プールを使用していることに気付くまで、すべてがうまく機能し、これが原因であると思われるエラーが時々発生していたので、c3p0 に切り替えました。私がそれをしたとき、新しいjarをプレイにコピーしたところ、次の例外が発生しました:
play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[ExceptionInInitializerError: null]]
at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:134) [play_2.9.1.jar:2.0.4]
at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:115) [play_2.9.1.jar:2.0.4]
at akka.actor.Actor$class.apply(Actor.scala:318) [akka-actor.jar:2.0.2]
at play.core.ActionInvoker.apply(Invoker.scala:113) [play_2.9.1.jar:2.0.4]
at akka.actor.ActorCell.invoke(ActorCell.scala:626) [akka-actor.jar:2.0.2]
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:197) [akka-actor.jar:2.0.2]
Caused by: java.lang.ExceptionInInitializerError: null
at models.AuthenticatedUser$.auth(AuthenticatedUser.scala:67) ~[classes/:na]
at controllers.Application$$anonfun$2.apply(Application.scala:25) ~[classes/:na]
at controllers.Application$$anonfun$2.apply(Application.scala:24) ~[classes/:na]
at play.api.data.Mapping$$anonfun$verifying$2.apply(Form.scala:452) ~[play_2.9.1.jar:2.0.4]
at play.api.data.Mapping$$anonfun$verifying$2.apply(Form.scala:451) ~[play_2.9.1.jar:2.0.4]
at play.api.data.validation.Constraint.apply(Validation.scala:21) ~[play_2.9.1.jar:2.0.4]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: persistenceUnit] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:901) ~[hibernate-entitymanager-3.5.6-Final.jar:3.5.6-Final]
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:57) ~[hibernate-entitymanager-3.5.6-Final.jar:3.5.6-Final]
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) ~[hibernate-jpa-2.0-api.jar:1.0.1.Final]
at com.xonami.rest.db.EMFactory.<clinit>(EMFactory.java:29) ~[xonami-api-0.2-SNAPSHOT.jar:na]
at models.AuthenticatedUser$.auth(AuthenticatedUser.scala:67) ~[classes/:na]
at controllers.Application$$anonfun$2.apply(Application.scala:25) ~[classes/:na]
Caused by: org.hibernate.HibernateException: Could not instantiate connection provider: org.hibernate.connection.C3P0ConnectionProvider
at org.hibernate.connection.ConnectionProviderFactory.initializeConnectionProviderFromConfig(ConnectionProviderFactory.java:178) ~[hibernate-core-3.5.6-Final.jar:3.5.6-Final]
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:102) ~[hibernate-core-3.5.6-Final.jar:3.5.6-Final]
at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:51) ~[hibernate-entitymanager-3.5.6-Final.jar:3.5.6-Final]
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:91) ~[hibernate-core-3.5.6-Final.jar:3.5.6-Final]
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2163) ~[hibernate-core-3.5.6-Final.jar:3.5.6-Final]
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2159) ~[hibernate-core-3.5.6-Final.jar:3.5.6-Final]
play libs フォルダーに hibernate および c3p0 jar を含めてみましたが、役に立ちませんでした (ただし、それらを自分の jar にビルドしていると思います)。play には、クラスパスの最初にある c3p0 の古いバージョンがあるのではないでしょうか? 取り出せますか?どのように?他に何か間違っている可能性がありますか?