0 Replies Latest reply on May 5, 2005 1:15 PM by Olivier Champion

    [hibernate][postgresql]how to configure ?

    Olivier Champion Newbie

      hello,

      is anybody could explain me how to configure datasource to use postgresql. I want used the datasource from the server with hibernate.

      here is the config files


      <datasources>
       <local-tx-datasource>
       <jndi-name>gestionpersonneDS</jndi-name>
       <connection-url>jdbc:postgresql://localhost:5432/referencement</connection-url>
       <driver-class>org.postgresql.Driver</driver-class>
       <user-name>postgres</user-name>
       <password></password>
       </local-tx-datasource>
       </datasources>
      


      <hibernate-configuration>
       <session-factory>
       <!-- local connection properties -->
       <property name="hibernate.connection.url">
       jdbc:postgresql://localhost:5432/referencement
       </property>
       <property name="hibernate.connection.driver_class">
       org.postgresql.Driver
       </property>
       <property name="hibernate.connection.username">postgres</property>
       <property name="hibernate.connection.password" />
       <!-- property name="hibernate.connection.pool_size"></property -->
       <!-- dialect for PostgreSQL -->
       <property name="dialect">
       net.sf.hibernate.dialect.PostgreSQLDialect
       </property>
       <property name="hibernate.show_sql">true</property>
       <property name="hibernate.use_outer_join">true</property>
       <!--
       <property name="hibernate.transaction.factory_class">net.sf.hibernate.transaction.JTATransactionFactory</property>
       <property name="jta.UserTransaction">java:comp/UserTransaction</property>
       //-->
      

      here are the errors when I use the application


      Caused by: javax.naming.NameNotFoundException: gestionpersonneDS not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)