hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Bulling <>
Subject Hivetranse/Hibernate/Tapestry troubles
Date Wed, 22 Feb 2006 11:30:48 GMT
Hi everybody,

after trying to get Hivetranse/Hibernate/Tapestry to work for days
I'm in great despair now because it just doesn't work :(

As the subject says I want to use Hivetranse with Hibernate and
Tapestry as frontend but I wasn't able to find any document describing
this setup. So I hope somebody on this list can help me - Thanks in

What I did so far:

I followed the descriptions on the Hivetranse site to setup Hibernate3

I've put several POJOs and corresponding DAO classes in hivemodule.xml.
For example:
<service-point id="PersonDao" interface="de.test.plattform.dao.PersonDao">
		<construct class="de.test.plattform.dao.PersonDaoImpl">
			<set-service property="session" service-id="hibernateSession" />
    <interceptor service-id="hivetranse.core.TransactionInterceptor"/>

I also want to have one "operations" class which makes use of all the different
DAOs, so I added:
<service-point id="Operations" interface="de.test.plattform.dao.Operations">
		<construct class="de.test.plattform.dao.OperationsImpl">
			<set-service property="personDao" service-id="PersonDao" />
    <interceptor service-id="hivetranse.core.TransactionInterceptor"/>
The first problem was, that the <service> element mentioned in the document
didn't seem to work that's why you can see all these <set-service> elements.

1) What's the difference between <service> and <set-service> and can I
add serveral <service> element below the <construct> element?

Another problem was autowiring. First I got errors that 
Exception invoking listener method attemptLogin of component Login: Unable
construct service plattform.Operations: Error building service 
plattform.Operations: Unable to find constructor applicable for autowiring. 
Use explicit constructor parameters.

2) But I didn't set the constructor method by purpose, autowiring should
be used by default, shouldn't it? What do I need to use autowiring?
My DAO classes have corresponding setter methods (setSession() and
setPersonDao() in operations)

3) Putting hivemodule.xml in META-INF yields the following error:
javax.servlet.ServletException: Unable to initialize application servlet: Error at jar:file:/home/andreas/workspace/plattform/context/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml,
line 20, column 59: Configuration point hivetranse.core.TransactionDefaults contains no contributions
but expects exactly one contribution.

So I've put it in WEB-INF but then I have to set config-file to:
<service-point id="hibernateSession" interface="org.hibernate.Session">
    <invoke-factory service-id="hivetranse.hibernate3.SessionFactory" model="singleton">
    	<config file="../META-INF/hibernate.cfg.xml">
	        <property name="hibernate.connection.driver_class" value=""
		<property name="hibernate.connection.password" value="password" />
	        <property name="hibernate.connection.url" value="jdbc:mysql://localhost/plattform"
	        <property name="hibernate.connection.username" value="plattform" />
	        <property name="dialect" value="org.hibernate.dialect.MySQLDialect" />
	        <property name="show_sql" value="false" />
	        <property name="" value="create" />

This works but then I get
Unable to construct service plattform.hibernateSession: Could not build SessionFactory

4) What's wrong here?

Thanks a lot in advance for any help!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message