Play Framework JPA postgres

1

Hello, I'm learning to work with Play! framework and I'm having difficulty integrating my application with the Postgres database, using hibernate. The application does not use the persistence, the bank is working because if I use a standard connection no error occurs. I tried several types of config and a lot already fired errors before even accessing the creation of the connection. The most current setting 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" 
    
asked by anonymous 03.03.2016 / 20:03

0 answers