Bonjour,

Je souhaite faire fonctionner Tapestry 5.3.7 + Spring 3.1.0 + Hibernate 3.6.0

Malgré mes recherches sur différents forums, j'ai toujours une erreur au lancement de ma page.

Service id 'jointureManager' is not defined by any module.

Mon ApplicationContext contient les données suivantes :
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
 
	<context:annotation-config />
	<context:component-scan base-package="org.test" />
	<bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor"/>
 
	<bean id="sessionFactory"
		class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
		<property name="configLocation">
			<value>classpath:hibernate.cfg.xml</value>
		</property>
		<property name="configurationClass">
			<value>org.hibernate.cfg.AnnotationConfiguration</value>
		</property>
	</bean>
 
	<bean id="transactionManager"
		class="org.springframework.orm.hibernate3.HibernateTransactionManager">
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>
 
 
	<bean id="transactionProxy" abstract="true"
		class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
		<property name="transactionManager">
			<ref bean="transactionManager" />
		</property>
		<property name="transactionAttributes">
			<props>
				<prop key="insert*">PROPAGATION_REQUIRED</prop>
				<prop key="update*">PROPAGATION_REQUIRED</prop>
				<prop key="save*">PROPAGATION_REQUIRED</prop>
				<prop key="*">PROPAGATION_REQUIRED, readOnly</prop>
			</props>
		</property>
	</bean>
J'utilise l'annotation AutoWired sur ma classe Service JointureManagerImpl.

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
public class JointureManagerImpl implements JointureManager {
 
	@Autowired
	private JointureDao jointureDao;
 
	/**
         * setter to allows spring to inject userDao implementation
         * 
         * @param jointureDao
         *            : object (implementation of JointureDao interface) to inject.
         */
	public void setJointureDao(JointureDao jointureDao) {
		this.jointureDao = jointureDao;
	}
 
	/**
         * {@inheritDoc}
         */
	public List<Jointure> getAllJointures() {
		return this.jointureDao.getAllJointures();
	}
}
Concernant mon interface JointureManager, j'utilise l'annotation @Transactional (readOnly=true, propagation=Propagation.REQUIRED)

Sans rentrer plus dans le détail, ma classe JointureDaoImpl implémente l'interface JointureDao et hérite de la classe HibernateDaoSupport.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
public class JointureDaoImpl extends HibernateDaoSupport implements JointureDao {
Ma classe associée au fichier .tml contient une variable :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
	@InjectService("jointureManager")
	private JointureManager jointureManager;
Lorsque je lance ma page, j'obtiens l'erreur Service id 'jointureManager' is not defined by any module.
Du coup, je ne vois pas ce qui ne va pas. J'ai l'impression qu'il manque un mapping dans un fichier.

J'ai aussi essayé de modifier le fichier AppModule.java pour effectuer des binding manuels (via la méthode bind) mais je me retrouve avec des NullPointerException ensuite...