you have to add the tapestry-hibernate-core dependency to your classpath as well... it contains the annotation CommitAfter
g, kris Von: robnangle <robnan...@gmail.com> An: users@tapestry.apache.org Datum: 30.11.2010 11:27 Betreff: First Tapestry app with Hibernate Hi all, Sorry if this has been posted before. Ive been trying to get going with a few examples of hibernate with tapestry with no success. The two main errors i keep gettin are: org.apache.tapestry5.internal.services.TransformationException: java.lang.ClassNotFoundException: org.apache.tapestry5.hibernate.annotations.CommitAfter org.apache.tapestry5.internal.services.TransformationException: javassist.NotFoundException: org.hibernate.Session (when i take out the commit after) HbAction.java: package hb.pages; import java.util.List; import org.apache.tapestry5.hibernate.annotations.CommitAfter; import org.apache.tapestry5.ioc.annotations.Inject; import org.hibernate.Session; import Entities.Hello; public class HbAction { @Inject private Session _session; private Hello current; @CommitAfter public void onAction() { Hello h = new Hello(); h.setMessage("Hello World"); _session.save(h); } public List getList() { return _session.createCriteria(Hello.class).list(); } public Hello getCurrent() { return current; } public void setCurrent(Hello current) { this.current = current; } } Hello.java: package Entities; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name="hello") public class Hello { @Id @GeneratedValue private long id; private String message; public long getId() { return id;} private void setId(long id) { this.id = id; } public String getMessage() { return message;} public void setMessage(String message) { this.message = message;} } HbAction.tml: <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> <head> <title>Hibernate example app</title> </head> <body> <t:loop source="list" value="current"> ${current.message}<br/> </t:loop> <t:ActionLink>add</t:ActionLink> </body> </html> Cheere if anybody can help.. -- View this message in context: http://tapestry.1045711.n5.nabble.com/First-Tapestry-app-with-Hibernate-tp3285845p3285845.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org