I really can't figure out what is wrong here.. :(
I did some debugging and found out that the hibernateSession is
actually created, and the method setSession(...) in "BlaskanManager"
is invoked. So somewhere is there a session created but still I get
"Unable to construct service
se.liu.studorg.blaskan.web.hibernateSession"
On 9/20/05, Ted Steen <[EMAIL PROTECTED]> wrote:
> ok, some more trouble with hivemind..
> this is in my hivemind.xml
>
> <service-point
> id="hibernateSession"
> interface="org.hibernate.Session"/>
>
> <service-point
> id="hibernateSessionFactory"
>
> interface="org.apache.hivemind.ServiceImplementationFactory"/>
>
> <service-point
> id="blaskanManager"
> interface="se.liu.studorg.blaskan.web.BlaskanManager"
> />
>
>
>
> <implementation service-id="hibernateSession">
> <invoke-factory
> service-id="hibernateSessionFactory"
> model="threaded"/>
> </implementation>
>
> <implementation service-id="hibernateSessionFactory">
> <invoke-factory>
> <construct
>
> class="se.liu.studorg.blaskan.web.HibernateSessionFactory"
> initialize-method="init"/>
> </invoke-factory>
> </implementation>
>
> <implementation service-id="blaskanManager">
> <invoke-factory>
> <construct
> class="se.liu.studorg.blaskan.web.BlaskanManager" />
> </invoke-factory>
> </implementation>
>
> now when I try to use this injected object:
> @InjectObject("service:se.liu.studorg.blaskan.web.blaskanManager")
>
> I get
> Unable to construct service
> se.liu.studorg.blaskan.web.hibernateSession: Error at
> context:/WEB-INF/hivemodule.xml, line 24, column 26: Parameters to
> service implementation factory hibernateSessionFactory contains no
> contributions but expects exactly one contribution.
>
> 21 <implementation service-id="hibernateSession">
> 22 <invoke-factory
> 23 service-id="hibernateSessionFactory"
> 24 model="threaded"/>
> 25 </implementation>
>
>
> thanks!
>
> On 9/20/05, Kent Tong <[EMAIL PROTECTED]> wrote:
> > Ted Steen <ted.steen <at> gmail.com> writes:
> >
> > >
> > > i got this hivemodule
> > > <service-point
> > > id="hibernateSession"
> > > interface="org.hibernate.Session"/>
> > >
> > > <service-point
> > > id="hibernateSessionFactory"
> > >
> > > interface="org.apache.hivemind.ServiceImplementationFactory"/>
> > >
> > > <implementation service-id="hibernateSessionFactory">
> > > <invoke-factory>
> > > <construct
> > >
> > > class="se.liu.studorg.blaskan.web.HibernateSessionFactory"
> > > initialize-method="init"/>
> > > </invoke-factory>
> > > </implementation>
> > >
> > > and yet I get this error:
> > > Error: No module has contributed a service constructor for service
> > > point se.liu.studorg.blaskan.web.hibernateSession.
> >
> > It's saying there is no implementation for hibernateSession. Maybe
> > you'd like something like:
> >
> > <service-point
> > id="hibernateSession"
> > interface="org.hibernate.Session">
> > <invoke-factory service-id="hibernateSessionFactory"/>
> > </service-point>
> >
> > --
> > Author of an e-Book for learning Tapestry (http://www.agileskills2.org/EWDT)
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> /ted
>
--
/ted
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]