Je rencontre un problème dans un projet. Je fais l'integration d'hibernate dans un projet spring j'ai un problème très simple j'ai totalement enlevé le fichier de configuration de hibernate et je l'ai remplacé par un bean sessionFactory et c'est la qu'est réside mon problème,je dois spécifier les fichiers mapping. C'est pour cela que j'utilise la propriètes mappingResources mais je reçois toujours une erreur 503.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
 
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:p="http://www.springframework.org/schema/p"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
 
    <!--bean id="propertyConfigurer"
          class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
          p:location="/WEB-INF/jdbc.properties" />
 
    <bean id="dataSource"
          class="org.springframework.jdbc.datasource.DriverManagerDataSource"
          p:driverClassName="${jdbc.driverClassName}"
          p:url="${jdbc.url}"
          p:username="${jdbc.username}"
          p:password="${jdbc.password}" /-->
 
    <!-- ADD PERSISTENCE SUPPORT HERE (jpa, hibernate, etc) -->
    <bean id="implProduit" class="akatsuki.domain.service.implProduit">
        <property name="produitDao" ref="produitDaoHibernate"/>
    </bean>
 
    <bean id="produitDaoHibernate" class="akatsuki.domain.repositryimpl.ProduitDaoHibernate" >
        <property name="hibernateTemplate" ref="hibernateTemplate"/>
    </bean>
 
    <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
        <property name="sessionFactory">
            <ref bean="mySessionFactory"/>
        </property>
    </bean>
 
    <bean id="mySessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        <property name="hibernateProperties">
            <props>
                <prop key="hibernate.connection.driver_class">com.mysql.jdbc.Driver</prop>
                <prop key="hibernate.connection.url">jdbc:mysql://localhost:3306/achat</prop>
                <prop key="hibernate.connection.username">root</prop>
                <prop key="hibernate.connection.password">bankai</prop>
                <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
            </props>
        </property>
        <property name="mappingResources">
            <list>
                <value>Produit.hbm.xml</value>
            </list>
        </property>
 
    </bean>
 
 
    <bean id="TransactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
        <property name="sessionFactory"><ref local="mySessionFactory"/></property>
    </bean>
 
</beans>
quand je regarde la pile d'erreur sa me dit que le fichier Produit.hbm.xml n'existe pas alors qu'il existe dans le répertoire web-inf. j'ai esseyé des chose comme classpathroduit.hbm.xml ou /WEB-INF/Produit.hbm.xml mais toujours la même erreur.
Merci d'avance pour vos réponses.