You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Serge Eby <sd...@hotmail.com> on 2011/10/15 22:07:11 UTC
[T5.3.x] Service IDs Conflict
Hi,
In trying to upgrade an app to 5.3-beta-22, I ran into conflicting service
ID names.
Here is an excerpt of the error message:
---- start snip -----
java.lang.RuntimeException: Service id 'sessionFactory' has already been
defined by
org.apache.tapestry5.internal.services.SessionFactoryImpl(boolean,
SessionPersistedObjectAnalyzer, HttpServletRequest) (at
SessionFactoryImpl.java:36) via
org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at
TapestryModule.java:303) and may not be redefined by
org.apache.tapestry5.ioc.internal.util.InternalUtils$11@447cc9c9. You should
rename one of the service builder methods.
....
---- end snip -----
The application uses tapestry-spring and I can see that there is a spring
bean that conflicts with the new SessionFactory (internal) introduced in
5.3:
---- start snip -----
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="configLocation"
value="classpath:hibernate.cfg.xml"/>
<property name="hibernateProperties">
<value>
hibernate.dialect=${hibernate.dialect}
hibernate.query.substitutions=true 'Y', false 'N'
hibernate.cache.use_second_level_cache=true
hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
</value>
</property>
</bean>
---- end snip -----
I can try renaming this bean, however some users won't have that luxury.
My attempt to use ServiceOverrride / ServiceBinder / withId() did not work
:(
My question is: Is there a clean way to override the service IDs supplied by
Tapestry?
Thanks,
/Serge
--
View this message in context: http://tapestry-users.832.n2.nabble.com/T5-3-x-Service-IDs-Conflict-tp6896451p6896451.html
Sent from the Tapestry Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org