1
Hello, I’m learning to work with Play! framework and I am having difficulty integrating my application with the Postgres bank, using Hibernate. The application does not use persistence, the bank is working because if I use a standard connection no error occurs. I tried several types of config and many already trigger errors before even accessing the creation of the connection. The most current config is:
application.config:
datasource="jdbc:postgresql://user:password@localhost:5432/db"
datasource.driver=org.postgresql.Driver
datasource.jndiName=defaultPersistence
datasource.schema=dev
persistence.xml:
property name="hibernate.hbm2ddl.auto" value="create-drop"
property name="hibernate.connection.driver_class" value="org.postgresql.Driver"
property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5432/sys_dev"
property name="hibernate.default_schema" value="dev"
property name="hibernate.connection.username" value="postgres"
property name="hibernate.connection.password" value="sql"
property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL9Dialect"
property name="hibernate.show_sql" value="true"
property name="hibernate.current_session_context_class" value="thread"
property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.JDBCTransactionFactory"
For my model application only when I use the ds works. db.default.driver = org.H2.Driver db.default.url = "jdbc:H2:Mem:play" db.default.username = root db.default.password = "" no other configuration works
– Luiz Rita
I found the problem. just use the "org.postgresql" % "postgresql" % "9.4-1200-jdbc41" version of the postgresql dependency, the version that appears in many examples including on the site occurs problems.
– Luiz Rita