spring hibernate postgres schema doesn't found
Bonjour a tous,
je suis entrain de migrer une db mysql vers postgres
et je rencontre un problème lors de la connection a ma db
j'utilise eclipse 3.6 - spring 2.5.6 - hibernate 3.3.1
j'ai cette erreur lors de la première requete
Code:
1 2
|
ERROR root - org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [select cptvisite0_.cptvisiteid as cptvisit1_10_, cptvisite0_.ip as ip10_, cptvisite0_.datelastmodif as datelast3_10_ from madb.cptvisite cptvisite0_ where cptvisite0_.ip=?]; SQL state [3F000]; error code [0]; ERREUR: le schéma « madb » n'existe pas; nested exception is java.sql.SQLException: ERREUR: le schéma « madb » n'existe pas |
j'ai réusi a connecté hibernate tools a madb
config spring - hibernate
Code:
1 2 3 4 5 6 7 8 9 10
|
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="cache.use_query_cache">true</prop>
<prop key="hibernate.cache.use_second_level_cache">false</prop>
<prop key="hibernate.cglib.use_reflection_optimizer">false</prop>
</props>
</property> |
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>org.postgresql.Driver</value>
</property>
<property name="url">
<value>jdbc:postgresql:madb</value>
</property>
<property name="username">
<value>postgres</value>
</property>
<property name="password">
<value>postgres</value>
</property>
</bean> |
cette config fonctionnais corectement lorsque la db était sous mysql
d'avance merci pour vos réponse
Fennec.