thanks. I hava add this to AppModule:
public static void contributeHibernateSessionSource(Configuration<String> configuration) { configuration.add("com.myspacce.domain"); } Company.java is in com/myspacce/domain: import javax.persistence.*; @Entity @Table(name="company") public class Company { @Id @GeneratedValue private int id; private String name; public Company() { } public int getId() { return id; } public void setId(int id) { this.id=id; } public String getName() { return name; } public void setName(String name) { this.name=name; } I have the tapestry-hibernate module in my classpath. error is : Error invoking service builder method org.apache.tapestry.hibernate.HibernateModule.build(HibernateSessionSource, ThreadCleanupHub) (at HibernateModule.java:62) (for service 'HibernateSessionManager'): Exception constructing service 'HibernateSessionSource': Error invoking constructor org.apache.tapestry.internal.hibernate.HibernateSessionSourceImpl(Log, Collection, ClassNameLocator) (at HibernateSessionSourceImpl.java:35) (for service 'HibernateSessionSource'): org/hibernate/cfg/annotations/ResultsetMappingSecondPass thanks lasitha wrote: > > It looks like you don't have the tapestry-hibernate module in your > classpath. > > There are a couple of starters you should checkout: > http://tapestry.apache.org/tapestry5/tapestry-hibernate/ > http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryHibernate > > And don't forget to search the mailing list archives: > http://wiki.apache.org/tapestry/Tapestry5HowToSearchTheMailingLists > > Let us know if those don't help, > Cheers, lasitha. > > On 10/11/07, MavenMan <[EMAIL PROTECTED]> wrote: >> >> hello all : >> >> I write a page class : >> >> package com.myspacce.pages; >> import java.util.*; >> import org.apache.tapestry.annotations.*; >> import org.hibernate.*; >> public class Start >> { >> public String _name; >> >> @Inject >> private Session _session; >> >> public List getList() >> { >> >> List list=_session.createQuery("select name from >> Company").list(); >> return list; >> } >> } >> >> run error is >> :org.apache.tapestry.internal.services.TransformationException: >> Error obtaining injected value for field >> com.myspacce.pages.Start._session: >> No service implements the interface org.hibernate.Session. >> >> can you help me how to implements the interface org.hibernate.Session ? >> >> best regards >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/how-to-use-ioc-of-t5---tf4604761.html#a13148406 >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/how-to-use-ioc-of-t5---tf4604761.html#a13149167 Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]