Hi,

In a large T5 environment we also used Hibernate, but the team was used to
its XML form using DAO classes. This may not be as modern as "sexy" as some
of the new options, but it worked for us.

Sad to see, you still need to use the "unsexy"
org.apache.tapestry5.ioc.annotations.Inject instead of javax.inject.Inject.
I was under the impression, T5.2 had that fixed, but it seems it is still
pending.

The pace at which some things get adopted, especially Java EE success
stories like CDI or the underlying JSR-330 compared to other frameworks like
Seam or Spring may be part of the reason why people like Matt Raible had
that impression of Tapestry. And I heard a bit of a similar general tone by
both speakers and audience of Java2Days in Sofia, the largest Eastern
European event, with nearly 750 people. None of them seem to have been
communicated the same way Matt did at DevoXX, but the fact, there was
Spring, CDI/JavaEE/JSF by Oracle and Apache Wicket, but no Tapestry in the
program probably said something, too.

I was generally happy using it, but as I mentioned earlier, I haven't come
across as many project requirements with Tapestry as with other frameworks
by agencies or head hunters either. Maybe it just wasn't mentioned as much
in my CV, though ?[?]

Werner

On Tue, Nov 30, 2010 at 3:46 PM, robnangle <robnan...@gmail.com> wrote:

>
> 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
>
>

Reply via email to