lundi 3 août 2015

Hibernate don't generate tables in database oracle 11 g (SPRING MAVEN )

I can't connect to the database and I can't find the problem

persistence file :

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://ift.tt/UICAJV" xmlns:xsi="http://ift.tt/ra1lAU" xsi:schemaLocation="http://ift.tt/UICAJV http://ift.tt/1VX9k4K ">
  <persistence-unit name="UP_GAB" transaction-type="RESOURCE_LOCAL">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <properties>
        <property name= "hibernate.show_sql" value= "true"/>
        <property name="hibernate.hbm2ddl.auto" value="validate" />
        <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />

        </properties>
    </persistence-unit>
</persistence>

contexte file :

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://ift.tt/GArMu6"
    xmlns:xsi="http://ift.tt/ra1lAU"
    xmlns:context="http://ift.tt/GArMu7"
    xmlns:tx="http://ift.tt/OGfeU2"
    xsi:schemaLocation="http://ift.tt/GArMu6 http://ift.tt/1jdM0fG
        http://ift.tt/GArMu7 http://ift.tt/1dfrlFf
        http://ift.tt/OGfeU2 http://ift.tt/1dt4Cn6">

        <bean id="datasource" class="oracle.jdbc.pool.OracleDataSource" destroy-method="close">
        <property name="connectionCachingEnabled" value="true"/>
        <property name="URL" value="jdbc:oracle:thin:localhost:1521:GAB"/>
        <property name="user" value="issam"/>
        <property name="password" value="*****"/>



</bean>

<bean id= "persistenceUnitManager" class= "org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager">
        <property name= "persistenceXmlLocations">
        <list>
        <value>classpath*:META-INF/persistence.xml</value>
        </list>
        </property>
        <property name= "defaultDataSource" ref= "datasource"></property>
</bean>
<bean id= "entityManagerFactory" class= "org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name= "persistenceUnitManager" ref= "persistenceUnitManager"></property>
<property name= "persistenceUnitName" value= "UP_GAB"></property>
</bean>
<bean id="transactionManager" class= "org.springframework.orm.jpa.JpaTransactionManager">
<property name= "entityManagerFactory" ref= "entityManagerFactory"></property>
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>

</beans>

Database Information:

connection name : Gab user name : issam hote name : localhost port :1521 SID :Gab

and this is the dependency in the pom.xml file :

       <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc14</artifactId>
            <version>10.2.0.4.0</version>
        </dependency>

Thanks for your help !

Aucun commentaire:

Enregistrer un commentaire