Reputation: 1071
I'm trying to integrate Hibernate in Play for Scala. I added a file hibernate.cfg.xml
to conf/META-INF
but apparently Play doesn't find it as I get the error:
play.api.http.HttpErrorHandlerExceptions$$anon$1: Execution exception[[ConfigurationException: Could not locate cfg.xml resource [hibernate.cfg.xml]]] at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:293) at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:220) at play.api.GlobalSettings$class.onError(GlobalSettings.scala:160) at play.api.DefaultGlobal$.onError(GlobalSettings.scala:188) at play.api.http.GlobalSettingsHttpErrorHandler.onServerError(HttpErrorHandler.scala:100) at play.core.server.netty.PlayRequestHandler$$anonfun$2$$anonfun$apply$1.applyOrElse(PlayRequestHandler.scala:100)
This is the hibernate.cfg.xml
file, where should I put it?
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.sap.db.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:sap://10.194.19.20:39013</property>
<property name="hibernate.connection.username">uuu</property>
<property name="hibernate.connection.password">xxx</property>
<property name="hibernate.dialect">org.hibernate.dialect.HANAColumnStoreDialect</property>
</session-factory>
</hibernate-configuration>
Upvotes: 1
Views: 109