You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Sven Homburg <ho...@googlemail.com> on 2008/08/19 22:01:17 UTC

Hibernate's FullTextSession against Session - howto?

Hi there,

i used Tapestry's hibernate module and wrote an application that use the
FullTextSession from the hibernate search module.
since howards svn commit (release 686850 / TAPESTRY-2571: Add configuration
to turn off the automatic creation of ValueEncoders for Hibernate entities)
my application throw an exception at startup like this

Caused by: java.lang.RuntimeException: Service interface
org.hibernate.Session is matched by 2 services: FullTextSession, Session.
Automatic dependency resolution requires that exactly one service implement
the interface.
        at
org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:533)
        at
org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl.provide(MasterObjectProviderImpl.java:46)
        at
$MasterObjectProvider_11bdc885575.provide($MasterObjectProvider_11bdc885575.java)
        at
org.apache.tapestry5.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:626)
        at
org.apache.tapestry5.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:733)
        at
org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getObject(ObjectLocatorImpl.java:49)
        at
org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParameterValue(InternalUtils.java:209)
        at
org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParameters(InternalUtils.java:239)
        at
org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParametersForConstructor(InternalUtils.java:227)
        at
org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:47)

how can i prevent this exception?

-- 
with regards
Sven Homburg
http://www.chenillekit.org
http://tapestry5-components.googlecode.com

Re: Hibernate's FullTextSession against Session - howto?

Posted by Sven Homburg <ho...@googlemail.com>.
i have add a Marker "HibernateCore" to all Session parameters in the build
calls in HibernateModule
now my application works again, but is this the right/only way ?


2008/8/19 Sven Homburg <ho...@googlemail.com>

> Hi there,
>
> i used Tapestry's hibernate module and wrote an application that use the
> FullTextSession from the hibernate search module.
> since howards svn commit (release 686850 / TAPESTRY-2571: Add configuration
> to turn off the automatic creation of ValueEncoders for Hibernate entities)
> my application throw an exception at startup like this
>
> Caused by: java.lang.RuntimeException: Service interface
> org.hibernate.Session is matched by 2 services: FullTextSession, Session.
> Automatic dependency resolution requires that exactly one service implement
> the interface.
>         at
> org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:533)
>         at
> org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl.provide(MasterObjectProviderImpl.java:46)
>         at
> $MasterObjectProvider_11bdc885575.provide($MasterObjectProvider_11bdc885575.java)
>         at
> org.apache.tapestry5.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:626)
>         at
> org.apache.tapestry5.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:733)
>         at
> org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getObject(ObjectLocatorImpl.java:49)
>         at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParameterValue(InternalUtils.java:209)
>         at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParameters(InternalUtils.java:239)
>         at
> org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParametersForConstructor(InternalUtils.java:227)
>         at
> org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:47)
>
> how can i prevent this exception?
>
> --
> with regards
> Sven Homburg
> http://www.chenillekit.org
> http://tapestry5-components.googlecode.com
>
>


-- 
with regards
Sven Homburg
http://www.chenillekit.org
http://tapestry5-components.googlecode.com