Re: T5: Hibernate

2010-12-02 Thread ael
How about this? http://tapestry.1045711.n5.nabble.com/T5-Working-Tapestry-Hibernate-with-DAO-td3229905.html http://tapestry.1045711.n5.nabble.com/T5-Working-Tapestry-Hibernate-with-DAO-td3229905.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-Hibernate

RE: T5: Hibernate

2010-12-01 Thread Jens Reufsteck
rnate with 3.2.2.ga and hibernate annotations with 3.2.1.ga Jens Reufsteck > -Original Message- > From: robnangle [mailto:robnan...@gmail.com] > Sent: Tuesday, November 30, 2010 11:25 AM > To: users@tapestry.apache.org > Subject: Re: T5: Hibernate > > > Hi, &

Re: T5: Hibernate

2010-11-30 Thread Everton Agner
gt; -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/T5-Hibernate-tp2409789p3286828.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: use

Re: T5: Hibernate

2010-11-30 Thread robnangle
Hi, Yes im running it in eclipse as my ide tomcat as my server mysql as my database -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-Hibernate-tp2409789p3286828.html Sent from the Tapestry - User mailing list archive at Nabble.com

Re: T5: Hibernate

2010-11-30 Thread Werner Keil
Hard to say without further details. E.g. are you running in an IDE, with Ant, Maven or something similar?

Re: T5: Hibernate

2010-11-30 Thread robnangle
.internal.services.TransformationException: javassist.NotFoundException: org.hibernate.Session (when I take out the commitAfter) -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-Hibernate-tp2409789p3285852.html Sent from the Tapestry - User mailing list archive at Nabble.com

Re: T5+hibernate - multiple session factories

2010-09-14 Thread cleverpig
oh,I found hibernate shards? It handle multiple database naturally. anyone used it with T5? hibernate shards:http://www.hibernate.org/subprojects/shards.html On Tue, Sep 14, 2010 at 5:17 PM, antalk wrote: > > Hi, > > I have done this successfully but i had to create my own implem

Re: T5+hibernate - multiple session factories

2010-09-14 Thread antalk
-- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-hibernate-multiple-session-factories-tp2838477p2838865.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users

Re: T5+hibernate - multiple session factories

2010-09-13 Thread cleverpig
you guy,maybe you should hack hibernate module to support multiple datasource. On Tue, Sep 14, 2010 at 9:35 AM, Fanzhen wrote: > >  well I am using spring + hibernate(JPA features) ,you can set up two more > persist unit. > > > On 2010-9-14 8:31, Paul Stanton wrote: >> >>  I have an tapestry app

Re: T5+hibernate - multiple session factories

2010-09-13 Thread Fanzhen
well I am using spring + hibernate(JPA features) ,you can set up two more persist unit. On 2010-9-14 8:31, Paul Stanton wrote: I have an tapestry app that needs to connect to 2 different databases. Has anyone done this with tapestry-hibernate? thanks, p.

T5+hibernate - multiple session factories

2010-09-13 Thread Paul Stanton
I have an tapestry app that needs to connect to 2 different databases. Has anyone done this with tapestry-hibernate? thanks, p. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: u

Re: T5:hibernate @Length validator doesn't work

2009-10-05 Thread cleverpig
thanks! On Sat, Oct 3, 2009 at 2:38 AM, Valentin Yerastov wrote: > > > Try this project http://code.google.com/p/tapestry-validator/ > > > cleverpig-2 wrote: >> >> hi,all! >> >> i got a trouble in hibernate @Length validator with Tapestry 5.1. >> i think it's a easy-meet problem for newbie(it's m

Re: T5:hibernate @Length validator doesn't work

2009-10-02 Thread Valentin Yerastov
Try this project http://code.google.com/p/tapestry-validator/ cleverpig-2 wrote: > > hi,all! > > i got a trouble in hibernate @Length validator with Tapestry 5.1. > i think it's a easy-meet problem for newbie(it's me). > > @Entity > @Table(name="hello") > public class Hello implements Serial

Re: T5 & Hibernate

2009-09-29 Thread Angelo Chen
m. > > -- > Thiago H. de Paula Figueiredo > Independent Java consultant, developer, and instructor > http://www.arsmachina.com.br/thiago > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additio

Re: T5 & Hibernate

2009-09-29 Thread Benny Law
Thanks Thiago. Somehow, I missed those additional links in the left nav. Now I have a bit more info to go on. Benny On Tue, Sep 29, 2009 at 4:52 PM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > Em Tue, 29 Sep 2009 17:00:34 -0300, Benny Law > escreveu: > > Hi Thiago, >> > > Hi!

Re: T5 & Hibernate

2009-09-29 Thread Thiago H. de Paula Figueiredo
Em Tue, 29 Sep 2009 17:00:34 -0300, Benny Law escreveu: Hi Thiago, Hi! Thanks for responding, but I was hoping for something a little more detailed. I had visited this link before, but needed more details on things such as configuration and code examples. Configuration: http://tapes

Re: T5 & Hibernate

2009-09-29 Thread Thiago H. de Paula Figueiredo
Em Tue, 29 Sep 2009 16:23:02 -0300, Benny Law escreveu: Hello, Hi! Can someone point me to the most up-to-date and detailed documentation on using Hibernate with T5 (but not Spring)? http://tapestry.apache.org/tapestry5.1/tapestry-hibernate/ -- Thiago H. de Paula Figueiredo Independent

Re: T5 & Hibernate

2009-09-29 Thread Benny Law
Hi Thiago, Thanks for responding, but I was hoping for something a little more detailed. I had visited this link before, but needed more details on things such as configuration and code examples. I have an existing database, and would like to map my models to the existing tables using annotations.

T5 & Hibernate

2009-09-29 Thread Benny Law
Hello, Can someone point me to the most up-to-date and detailed documentation on using Hibernate with T5 (but not Spring)? Thank you, Benny

Re: T5:hibernate @Length validator doesn't work

2009-09-16 Thread cleverpig
o use the tapestry specific validators. >> >> g, >> kris >> >> >> >> >> >> cleverpig >> 16.09.2009 11:28 >> Bitte antworten an >> "Tapestry users" >> >> >> An >> users@tapestry.apache.org >

Re: T5:hibernate @Length validator doesn't work

2009-09-16 Thread Juan E. Maya
have to use the tapestry specific validators. > > g, > kris > > > > > > cleverpig > 16.09.2009 11:28 > Bitte antworten an > "Tapestry users" > > > An > users@tapestry.apache.org > Kopie > > Thema > T5:hibernate @Length valid

Re: T5:hibernate @Length validator doesn't work

2009-09-16 Thread Kristian Marinkovic
hi, the beandeditor cannot handle Hibernate annotations. you have to use the tapestry specific validators. g, kris cleverpig 16.09.2009 11:28 Bitte antworten an "Tapestry users" An users@tapestry.apache.org Kopie Thema T5:hibernate @Length validator doesn't work

T5:hibernate @Length validator doesn't work

2009-09-16 Thread cleverpig
hi,all! i got a trouble in hibernate @Length validator with Tapestry 5.1. i think it's a easy-meet problem for newbie(it's me). @Entity @Table(name="hello") public class Hello implements Serializable{ ... @NotNull(message="{hello.message.notnull}") @Length(min=10,max=20) @

Re: t5: hibernate connection string

2009-08-17 Thread Angelo Chen
Hi Uli, Thanks for the quick response, leaving it in XML is fine, problem is, the xml file is packaged into a jar, can not find it under the 'ROOT' directory for me to update, any idea putting that hibernate.cfg.xml somewhere else, say WEB-INF? Ulrich Stärk wrote: > > contribute a HibernateCo

Re: t5: hibernate connection string

2009-08-17 Thread Ulrich Stärk
contribute a HibernateConfigurer to the HibernateSessionSource service. Although I don't quite get why putting the connection string into a properties file is any different than putting it in the xml file... Uli On 17.08.2009 15:21 schrieb Angelo Chen: Hi, I use following in hibernate.cfg.xm

t5: hibernate connection string

2009-08-17 Thread Angelo Chen
Hi, I use following in hibernate.cfg.xml to connect to database: < property name="hibernate.connection.url">jdbc:mysql://localhost/stock?autoReconnect=true This works very well, but it is hard coded, is there a way to put the particular info in a property file, then pick it up when the t5 prog

Re: T5 Hibernate listener crash problem - problem with classloader?

2009-06-23 Thread Thiago H. de Paula Figueiredo
On Tue, Jun 23, 2009 at 9:17 AM, "Max Weißböck (info)" wrote: > service 'HibernateSessionSource'): Unable to instantiate specified event > (pre-insert) listener class: net.weissboeck.gimmo.entities.AuditListener Couldn't you post the full stack trace? -- Thiago ---

T5 Hibernate listener crash problem - problem with classloader?

2009-06-23 Thread Max Weißböck (info)
antiate specified event (pre-insert) listener class: net.weissboeck.gimmo.entities.AuditListener Debugging seems to indicate a problem with the classloader. Has anyone got hibernate listeners working with T5 hibernate module? This is my AuditListener class (I use a common abstract base entity with alle the te

Re: T5 + Hibernate + Hibernate Tools

2009-06-22 Thread Norman Franke
Yes, that is want I want. For now, what I've done works. Just getting the page requires the use of internal classes. I can't even think about how to get the component. Once this is included, then I can eliminate my hack. Norman Franke Answering Service for Directors, Inc. www.myasd.com O

Re: T5 + Hibernate + Hibernate Tools

2009-06-20 Thread Robert Zeigler
Hm. What if you have a structure like: page component x bean edit form And you want the messages in component x (to make component x be reusable)? The way you've got it now, you'll always have to put the messages in the top level page. That said, I'm in the middle of: http

Re: T5 + Hibernate + Hibernate Tools

2009-06-19 Thread Norman Franke
On Jun 19, 2009, at 3:31 PM, Thiago H. de Paula Figueiredo wrote: Em Fri, 19 Jun 2009 15:26:44 -0300, Norman Franke escreveu: No, the pages's properties. I figure I may want different settings on each page. Nice point. :) Seems like I'd need to know the page name and/or class for that.

Re: T5 + Hibernate + Hibernate Tools

2009-06-19 Thread Thiago H. de Paula Figueiredo
Em Fri, 19 Jun 2009 15:26:44 -0300, Norman Franke escreveu: No, the pages's properties. I figure I may want different settings on each page. Nice point. :) Seems like I'd need to know the page name and/or class for that. I don't. You can inject the Request and use the ComponentEventLink

Re: T5 + Hibernate + Hibernate Tools

2009-06-19 Thread Norman Franke
On Jun 18, 2009, at 8:11 PM, Thiago H. de Paula Figueiredo wrote: Em Thu, 18 Jun 2009 19:45:54 -0300, Norman Franke escreveu: Thanks! You're welcome! The ValidationConstraintGenerator may work. Being new to T5 and all, I assume it's possible to @Inject the current page into my Validat

Re: T5 + Hibernate + Hibernate Tools

2009-06-19 Thread Norman Franke
On Jun 18, 2009, at 8:21 PM, Thiago H. de Paula Figueiredo wrote: Em Thu, 18 Jun 2009 20:45:39 -0300, Norman Franke escreveu: I think I figured it out: @InjectService("PageRenderQueue") private PageRenderQueue pageRenderQueue; By the way, very clever way to do it. :) Two comments: You c

Re: T5 + Hibernate + Hibernate Tools

2009-06-18 Thread Thiago H. de Paula Figueiredo
Em Thu, 18 Jun 2009 20:45:39 -0300, Norman Franke escreveu: I think I figured it out: @InjectService("PageRenderQueue") private PageRenderQueue pageRenderQueue; By the way, very clever way to do it. :) Two comments: You could just @Inject private PageRenderQueue pageRenderQueue; @Inject

Re: T5 + Hibernate + Hibernate Tools

2009-06-18 Thread Thiago H. de Paula Figueiredo
Em Thu, 18 Jun 2009 19:45:54 -0300, Norman Franke escreveu: Thanks! You're welcome! The ValidationConstraintGenerator may work. Being new to T5 and all, I assume it's possible to @Inject the current page into my ValidationConstraintGenerator? Actually, I'd want the classpath to the .tml s

Re: T5 + Hibernate + Hibernate Tools

2009-06-18 Thread Norman Franke
I think I figured it out: @InjectService("PageRenderQueue") private PageRenderQueue pageRenderQueue; Then in buildConstraints: Page page = pageRenderQueue.getRenderingPage(); Messages msgs = page.getRootComponent().getComponentResources().getMessages(); String myValue = msgs

Re: T5 + Hibernate + Hibernate Tools

2009-06-18 Thread Norman Franke
Thanks! The ValidationConstraintGenerator may work. Being new to T5 and all, I assume it's possible to @Inject the current page into my ValidationConstraintGenerator? Actually, I'd want the classpath to the .tml so I can get the .properties. Norman Franke Answering Service for Directors,

Re: T5 + Hibernate + Hibernate Tools

2009-06-18 Thread Thiago H. de Paula Figueiredo
Em Thu, 18 Jun 2009 18:29:37 -0300, Norman Franke escreveu: Next, I want to use BeanEditForm to edit the tables. I can't really add @Id, @NonVisual, or @Validate to the classes, since they'll be overwritten every time I re-generate the classes when I add or modify a table. Take a look at

T5 + Hibernate + Hibernate Tools

2009-06-18 Thread Norman Franke
We have an existing database schema that's rather large. I've used Hibernate Tools to generate the .java entity files, complete with @Entity annotations so Hibernate picks them up automatically. That works very well. Next, I want to use BeanEditForm to edit the tables. I can't really add

Re: T5: Hibernate/Session question

2009-02-05 Thread Sven Homburg
ok ;-) 2009/2/5 Thiago H. de Paula Figueiredo > Em Thu, 05 Feb 2009 17:07:24 -0300, Sven Homburg > escreveu: > > i prefer you to use the session.refresh >> > > This will overwrite your object, and sometimes you want it unchanged. As > always, the best option depends on the context. ;) > > -- >

Re: T5: Hibernate/Session question

2009-02-05 Thread Thiago H. de Paula Figueiredo
Em Thu, 05 Feb 2009 17:07:24 -0300, Sven Homburg escreveu: i prefer you to use the session.refresh This will overwrite your object, and sometimes you want it unchanged. As always, the best option depends on the context. ;) -- Thiago H. de Paula Figueiredo Independent Java consultant, de

Re: T5: Hibernate/Session question

2009-02-05 Thread Sven Homburg
February-05-09 4:48 PM > To: Tapestry users > Subject: Re: T5: Hibernate/Session question > > Em Thu, 05 Feb 2009 15:59:53 -0300, James Sherwood > escreveu: > > > Thanks, > > > > I do not want to have to change the actual POJOs as I generate them using > > reve

Re: T5: Hibernate/Session question

2009-02-05 Thread Thiago H. de Paula Figueiredo
Em Thu, 05 Feb 2009 16:58:39 -0300, James Sherwood escreveu: Hello, Hi! I used session.update(Object) and it worked, is there any difference? session.update(Object) writes the object to the database, session.lock() not. Both associate the object to the session, so use one or the other

RE: T5: Hibernate/Session question

2009-02-05 Thread James Sherwood
Hello, I used session.update(Object) and it worked, is there any difference? --James -Original Message- From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] Sent: February-05-09 4:48 PM To: Tapestry users Subject: Re: T5: Hibernate/Session question Em Thu, 05 Feb 2009 15:59

Re: T5: Hibernate/Session question

2009-02-05 Thread Thiago H. de Paula Figueiredo
Em Thu, 05 Feb 2009 15:59:53 -0300, James Sherwood escreveu: Thanks, I do not want to have to change the actual POJOs as I generate them using reverse eng so I think I will just do the lookup.\ One solution is to call session.lock(object, LockMode.NONE) before reading any property values

RE: T5: Hibernate/Session question

2009-02-05 Thread James Sherwood
:23 PM To: Tapestry users Subject: Re: T5: Hibernate/Session question there are two possible solutions: first: you declare the collection for childobjects "read not lazy" second: you attach the parentobject to a new session and re-read the childobjects collection 2009/2/5 Jame

Re: T5: Hibernate/Session question

2009-02-05 Thread Sven Homburg
there are two possible solutions: first: you declare the collection for childobjects "read not lazy" second: you attach the parentobject to a new session and re-read the childobjects collection 2009/2/5 James Sherwood > Hello, > > > > I have an application state object(Visit) that is storing

T5: Hibernate/Session question

2009-02-05 Thread James Sherwood
Hello, I have an application state object(Visit) that is storing a hibernate entity object. In a page I ask for the visit.object.getchildobject.name and receive this error: [ERROR] hibernate.LazyInitializationException could not initialize proxy - the owning Session was closed org.hibe

Re: T5+Hibernate: Entity class id variables cannot have leading underscores

2008-11-16 Thread SergeEby
Hi, This has nothing to do with Tapestry. You have 2 options: 1) Use the @Column annotation on the _id field @Id @GeneratedValue @Column(name="id") private Long _id; 2) Annotate the accessor methods /Serge Bill Holloway wrote: > > To use the simplified page activation context for a hiber

T5+Hibernate: Entity class id variables cannot have leading underscores

2008-11-16 Thread Bill Holloway
To use the simplified page activation context for a hibernate entity page (e.g., onActivate(Person p)...), it looks like the entity class' primary key id field's name must match VERBATIM the text that follows the word "get" in the getter (and "set" in the setter, probably). I.e., this won't work:

T5: Hibernate and services

2008-10-14 Thread Angelo Chen
Hi, I have some tapestry-hibernate related questions: 1) if I have two concurrent services(A and B), each has Session injected. do A and B have their own transaction? 2) I have a table config that has a field 'nextID': 2.1 IDService has a method 'NextID()' which get the value from 'nextI

Re: t5: Hibernate resultset with pagination

2008-09-02 Thread Angelo Chen
Hi Bill, This is a good idea, will give it a try, thanks. Angelo Bill Holloway wrote: > > Hi Angelo, I achieve custom paging for anything that uses a tapestry > loop (or anything that needs a list per page) starting with this > abstract class: > > public abstract class PagingResults > { >

Re: t5: Hibernate resultset with pagination

2008-09-01 Thread Bill Holloway
Hi Angelo, I achieve custom paging for anything that uses a tapestry loop (or anything that needs a list per page) starting with this abstract class: public abstract class PagingResults { protected int _page; protected int _resultsPerPage; public PagingResults (int resultsPerPage)

Re: t5: Hibernate resultset with pagination

2008-09-01 Thread Davor Hrg
not sure what you are trying achieve exactly paging, table, all can be simply generated even without grid but you'll need to print each column manualy, or dig deeper and use beanModel your self Davor Hrg On Mon, Sep 1, 2008 at 3:32 AM, Angelo Chen <[EMAIL PROTECTED]>wrote: > > Hi, > > I have a

t5: Hibernate resultset with pagination

2008-08-31 Thread Angelo Chen
Hi, I have a need to display some Hibernate resultset with pagination, but I can't use T5's grid. any hint how to do this in T5? thanks. Angelo -- View this message in context: http://www.nabble.com/t5%3A-Hibernate-resultset-with-pagination-tp19247842p19247842.html Sent from the Tapestry - Us

Re: T5: Hibernate OneToMany: Works in 5.0.11, Fails in 12, 13, 14-SNAPSHOT

2008-08-07 Thread Angelo Chen
you have to add a @CommitAfter in the method where update takes place, or do a commit, there is a change in default action from commit to abort, it's in the doc. bernatowicz wrote: > > Hello. I have 2 entities with a parent-child relationship. Client is the > parent, and Project is the child.

T5: Hibernate OneToMany: Works in 5.0.11, Fails in 12, 13, 14-SNAPSHOT

2008-08-07 Thread bernatowicz
Hello. I have 2 entities with a parent-child relationship. Client is the parent, and Project is the child. In 5.0.11 each Project entity is written to the (mysql) DB correctly with its client's ID, but in 5.0.12+ each Project's client_id is zero. I applied the following source code changes to

Re: T5 - Hibernate - Transaction confusion

2008-08-05 Thread 9902468
is one successfull @CommitAfter and one failed. > > Is the correct approach to wrap multiple service calls in to one and > annotate only this? > > -99 > -- View this message in context: http://www.nabble.com/T5---Hibernate---Transacti

Re: T5 - Hibernate - Transaction confusion

2008-08-05 Thread Angelo Chen
to wrap multiple service calls in to one and > annotate only this? > > -99 > -- View this message in context: http://www.nabble.com/T5---Hibernate---Transaction-confusion-tp18826235p18826695.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

T5 - Hibernate - Transaction confusion

2008-08-05 Thread 9902468
and one failed. Is the correct approach to wrap multiple service calls in to one and annotate only this? -99 -- View this message in context: http://www.nabble.com/T5---Hibernate---Transaction-confusion-tp18826235p18826235.html Sent from the Tapestry - User mailing list archiv

Re: [T5]: Hibernate question - thank you!

2008-07-28 Thread photos
Ok. Great gadzooks! Now I see. Thanks to you and Sven. (I knew this was going to be obvious once pointed out!) p. Quoting 9902468 <[EMAIL PROTECTED]>: Yep, Injection works only in page and component classes that live the ordinary Page or component lifecycle, and are requested from the web.

Re: [T5]: Hibernate question - session is null

2008-07-28 Thread 9902468
Yep, Injection works only in page and component classes that live the ordinary Page or component lifecycle, and are requested from the web. :) Move the session to a real page and have that util to take the session as parameter, or even better move your logic to service that a page can use. (Secur

Re: [T5]: Hibernate question - session is null

2008-07-28 Thread Sven Homburg
its look like, that your Security class is only a helper class and no page component. in such classes the @Inject annotation doesnt work 2008/7/28 <[EMAIL PROTECTED]> > Ok, I have just checked. I have mysql-connector-java-5.1.5.jar in the maven > repository. > > > Code is: >

Re: [T5]: Hibernate question - session is null

2008-07-28 Thread photos
Ok, I have just checked. I have mysql-connector-java-5.1.5.jar in the maven repository. Code is: - package uk.bl.dlportal.pages.util; import java.util.List; import org.apache.tapestry5.ioc.annotations.Inject; import org.hibernate.Criteria; import org.h

Re: [T5]: Hibernate question - session is null

2008-07-28 Thread 9902468
Check also that you have the mysql-connector-java-5.1.6.jar or similar in your libraries. I have the following list: FieldValidatorSource: DEFINED FormDAO: DEFINED FormSupport: DEFINED FreeMarkerService: DEFIN

Re: [T5]: Hibernate question - session is null

2008-07-28 Thread photos
Quoting 9902468 <[EMAIL PROTECTED]>: Is the hibernate service initialized at all? When Tapestry starts it lists all known services, is Hibernate in that list? - 99 It looks like it: ... FieldValidationSupport: DEFINED FieldValidatorDefaultSource: DEFINED

Re: [T5]: Hibernate question - session is null

2008-07-27 Thread 9902468
Is the hibernate service initialized at all? When Tapestry starts it lists all known services, is Hibernate in that list? - 99 photos-4 wrote: > > Thanks for your help, but so far no joy: > > Quoting 9902468 <[EMAIL PROTECTED]>: > >> And of course, check that you have Hibernate and hibernat

Re: [T5]: Hibernate question - session is null

2008-07-26 Thread Mark Weissenberg
Hi, I also had some trouble configuring hibernate, my session was also null. After searching for a while I found this tutorial: http://linuxboy.javaeye.com/blog/68311 Since I dont use a DAO, my code looks something like the following. my db entity: ... import org.hibernate.Session; @Entity

Re: [T5]: Hibernate question - session is null

2008-07-25 Thread photos
Thanks for your help, but so far no joy: Quoting 9902468 <[EMAIL PROTECTED]>: And of course, check that you have Hibernate and hibernate annotation in your >libraries, they are NOT included automatically by maven if maven is used. The libraries appear in my repository and appear under "sou

Re: [T5]: Hibernate question - session is null

2008-07-25 Thread photos
Quoting 9902468 <[EMAIL PROTECTED]>: Check that the @Inject private Session session; session is org.hibernate.Session. - 99 It is. I notice that when I switch on the mysql log that no attempt is ever made to access the db. Is there any kind of logging I can switch on from Tapestry

Re: [T5]: Hibernate question - session is null

2008-07-25 Thread 9902468
And of course, check that you have Hibernate and hibernate annotation in your libraries, they are NOT included automatically by maven if maven is used. - 99 photos-4 wrote: > > > I'm using Eclipse. The XML config appears in target/classes and > appears to be in the classpath. > > I'm afra

Re: [T5]: Hibernate question - session is null

2008-07-25 Thread 9902468
Tapestry should be quite verbose about hibernate if tapestry is configured to run in debug mode: http://tapestry.apache.org/tapestry5/tapestry-core/guide/conf.html add: //This is the time in seconds that Tapestry waits before checking if a file is modified //Use a big number in product

Re: [T5]: Hibernate question - session is null

2008-07-25 Thread 9902468
Check that the @Inject private Session session; session is org.hibernate.Session. - 99 photos-4 wrote: > > > I'm using Eclipse. The XML config appears in target/classes and > appears to be in the classpath. > > I'm afraid I'm rather new to Tap 5 and also to Hibernate. I'm just > fol

Re: [T5]: Hibernate question - session is null

2008-07-25 Thread photos
I'm using Eclipse. The XML config appears in target/classes and appears to be in the classpath. I'm afraid I'm rather new to Tap 5 and also to Hibernate. I'm just following what is in the Tutorial. Unfortunately the session is still coming out as null. Is there anywhere I can see that T

Re: [T5]: Hibernate question

2008-07-24 Thread Andreas Andreou
Perhaps hibernate.cfg.xml isn't in your runtime classpath? Are you sure your IDE includes it to the output? On Thu, Jul 24, 2008 at 6:09 PM, <[EMAIL PROTECTED]> wrote: > I am following the tutorial at > > http://tapestry.apache.org/tapestry5/tutorial1/forms2.html > > but I find that the session (

[T5]: Hibernate question

2008-07-24 Thread photos
I am following the tutorial at http://tapestry.apache.org/tapestry5/tutorial1/forms2.html but I find that the session (supposedly injected) is null. I'm not sure how to proceed. Could someone point me to documents/better tutorials on how to use Tapestry with Hibernate? Thanks, p. ---

Re: [T5] Hibernate integration problems/questions

2008-07-23 Thread Filip S. Adamsen
Hi, It's not a technical limitation, but if I recall correctly it mirrors the way EJB handles exceptions. I'm actually surprised this is not configurable... -Filip On 2008-07-23 13:12, 9902468 wrote: From the documentation: The transaction will be committed when the method completes norma

Re: [T5] Hibernate integration problems/questions

2008-07-23 Thread 9902468
ows a checked exception? I would like my business > handling methods to rollback the transaction if the method does not > complete normally. I really want to use a checked exception so the > caller is forced to catch it. > > > > Thanks in advance for any help! &

[T5] Hibernate integration problems/questions

2008-07-22 Thread Brendan McNichols
Hi all, I have two questions/issues with tapestry-hibernate integration: 1) In my app, I am getting a "java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0" exception (I am using MySQL, btw) after the site has been up for a while. I have tried several thi

Re: T5: Hibernate and services

2008-06-27 Thread Angelo Chen
Hi, This is version 5.0.13, and I turned off the auto commit, false Howard Lewis Ship wrote: > > Dependends on the version of Tapestry. Earlier versions included an > automatic commit. > > On Thu, Jun 26, 2008 at 7:44 PM, Angelo Chen <[EMAIL PROTECTED]> > wrote: >> >> Hi, >> >> As what I un

Re: T5: Hibernate and services

2008-06-27 Thread Howard Lewis Ship
Dependends on the version of Tapestry. Earlier versions included an automatic commit. On Thu, Jun 26, 2008 at 7:44 PM, Angelo Chen <[EMAIL PROTECTED]> wrote: > > Hi, > > As what I understand now that transaction has to be committed to persist the > objects, following is a diapatcher, there is no

T5: Hibernate and services

2008-06-26 Thread Angelo Chen
Hi, As what I understand now that transaction has to be committed to persist the objects, following is a diapatcher, there is no commit, but the new PageLog got persisted too, any idea? thanks, Angelo public class LoggingDispatcher implements Dispatcher { private final HibernateSessionMan

Re: T5: Hibernate warning

2008-06-25 Thread Daniel Jue
It's just a warning, not an error, you can safely ignore this one. =) On Wed, Jun 25, 2008 at 11:13 PM, Angelo Chen <[EMAIL PROTECTED]> wrote: > > Hi, > > This is an old problem that I was not able to fix, applications runs, but > always get this error > > [WARN] AnnotationBinder Package not fou

T5: Hibernate warning

2008-06-25 Thread Angelo Chen
Hi, This is an old problem that I was not able to fix, applications runs, but always get this error [WARN] AnnotationBinder Package not found or wo package-info.java: org.bfe.sample.t5.entities I do have a hibernate.cfg.xml as follow and it works well: com.mysql

Re: Using Hibernate interceptors with T5-Hibernate

2008-06-19 Thread 9902468
gt;> Thanks! >> >> (I did read the IOC docs but couldn't quite picture how to achieve this, >> as >> I can target multiple services, but how do I intercept all those entities >> that go as parameters to service _methods_?) >> -- >> View this message in con

Re: Using Hibernate interceptors with T5-Hibernate

2008-06-19 Thread Sven Homburg
t couldn't quite picture how to achieve this, as > I can target multiple services, but how do I intercept all those entities > that go as parameters to service _methods_?) > -- > View this message in context: > http://www.nabble.com/Using-Hibernate-interce

Using Hibernate interceptors with T5-Hibernate

2008-06-19 Thread 9902468
-Hibernate-interceptors-with-T5-Hibernate-tp18002714p18002714.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: T5: Hibernate ValueEncoders

2008-03-16 Thread Filip S. Adamsen
Hi, It means that you can pass Hibernate entities around instead of ids. Example: void onActivate(Long id) { User user = session.get(User.class, id); } Long onPassivate() { return user.getId(); } becomes void onActivate(User user) { ... } User onPassivate() { return user; } And so fo

T5: Hibernate ValueEncoders

2008-03-15 Thread Angelo Chen
Hi, In Howard's blog, he mentioend: Automatic Hibernate ValueEncoders: Use an entity as a page or event context and what goes in the URL is the entity's id. Likewise, ids are turned back into entities when passed to event handler methods. What's really this? how to use it? Thanks. A.C. -- Vi

Re: T5: Hibernate warning

2008-02-27 Thread Jesper Zedlitz
Angelo Chen wrote: > I use Tapestry-Hibernate and it works very well, just I always see this > warning in the log: > > [WARN] AnnotationBinder Package not found or wo package-info.java: : > org.ust.test.t5.entities > You can create a file called package-info.java (see [1] for details) in your pac

T5: Hibernate warning

2008-02-26 Thread Angelo Chen
Hi, I use Tapestry-Hibernate and it works very well, just I always see this warning in the log: [WARN] AnnotationBinder Package not found or wo package-info.java: : org.ust.test.t5.entities -- View this message in context: http://www.nabble.com/T5%3A-Hibernate-warning-tp15706803p15706803.htm

Re: T5: Hibernate and threaded service

2008-02-12 Thread Davor Hrg
it works without workarround if you call any service that does not use ThreadCleanupHub namely almost any service other than Session and HibernateSessionManager. On Feb 12, 2008 3:04 PM, Angelo Chen <[EMAIL PROTECTED]> wrote: > > that's good, i have been using ur work around for the 5.09 version.

Re: T5: Hibernate and threaded service

2008-02-12 Thread Angelo Chen
that's good, i have been using ur work around for the 5.09 version. the strange thing about this bug is, sometimes it works even without that work around, but just to be sure, I use the work around all the time, will try that 5.0.11 when it is released. thanks. Davor Hrg wrote: > > this is now

Re: T5: Hibernate and threaded service

2008-02-12 Thread Davor Hrg
this is now fixed for T5.0.11 I've updated wiki to reflect the change. Davor Hrg On Feb 8, 2008 2:55 PM, Davor Hrg <[EMAIL PROTECTED]> wrote: > uh, > oh, > > it seems I've found a small workarround, > not a definitive fix, but the TreadSource works with it.. > > the wiki is updated > > http://wik

Re: T5: Hibernate and threaded service

2008-02-08 Thread Davor Hrg
uh, oh, it seems I've found a small workarround, not a definitive fix, but the TreadSource works with it.. the wiki is updated http://wiki.apache.org/tapestry/Tapestry5HowToRunTaskInThread Davor Hrg On Feb 8, 2008 12:45 PM, Davor Hrg <[EMAIL PROTECTED]> wrote: > this seems to be a JVM bug > ht

Re: T5: Hibernate and threaded service

2008-02-08 Thread Davor Hrg
this seems to be a JVM bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5025230 I tried it in Java 6 and code works just fine I'll look into it, an post a jira... also still trying to make a workarround for it Davor Hrg On Feb 8, 2008 1:29 AM, Angelo Chen <[EMAIL PROTECTED]> wrote: > > Hi

Re: T5: Hibernate and threaded service

2008-02-07 Thread Angelo Chen
Hi Davor, That explains my problem, this happens in 5.0.7 and 5.0.9, never tried it with 5.0.8 Davor Hrg wrote: > > I'm debuggin an example like yours, > and although I called ThreadCleanupHub.cleanup() > the list of listeners is empty... and HibernateSessionManager is not in it > > something

Re: T5: Hibernate and threaded service

2008-02-07 Thread Davor Hrg
I'm debuggin an example like yours, and although I called ThreadCleanupHub.cleanup() the list of listeners is empty... and HibernateSessionManager is not in it something is very wrong Davor Hrg On Feb 7, 2008 9:35 PM, Davor Hrg <[EMAIL PROTECTED]> wrote: > you did'nt say if the entity is saved t

Re: T5: Hibernate and threaded service

2008-02-07 Thread Davor Hrg
you did'nt say if the entity is saved to db, if you call commit explicitely, you'll see changes in log, but the way the snippet works is you create entity, you save it to session you change entity... after your task is done, ThreadCleanupHub.cleanup() is called HibernateSessionManager is a list

  1   2   >