Hi ravindra,

configuring your Hibernate (DB) with Spring is fine. 

tapestry-hibernate is an alternative way to use hibernate 
in your tapestry 5 application directly without needing spring. 
it adds some convenience functions that otherwise have to 
be coded manually (nice integration with the Web framework). 

IMHO if you use spring a lot configure your db with spring
if you don't use spring expect for the db (Hibernate) you could 
use tapestry-hibernate instead.



g,
kris




raveendra <[EMAIL PROTECTED]> 
18.06.2008 07:37
Bitte antworten an
"Tapestry users" <users@tapestry.apache.org>


An
users@tapestry.apache.org
Kopie

Thema
Re: Issue with Grid component






Thanks Kristian,

             That solved my problem.I have removed tapestry-hibernate.jar
from my class
path and it isn't asking for hibernate.hbm.xml.

But i have a question.We have connected to DB by configuring the
tapestry-spring module.
Now we don't have tapestry-hibernate.jar in our class path and we are able
to interact with
DB.

Sorry if it is very simple question.

Is it not necessary to put tapestry-hibernate.jar in our classpath ?


Thankyou,
ravindra.

On Wed, Jun 18, 2008 at 10:50 AM, ravindra <[EMAIL PROTECTED]> wrote:

>
> From: Kristian Marinkovic [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 17, 2008 2:10 PM
> To: Tapestry users
> Subject: Re: Issue with Grid component
>
> no. but if you use tapestry-hibernate you have to have a
> hibernate.cfg.xml (hibernate.jar) file somewhere
>
> more details:
> if you use tapestry-hibernate it will contribute ValueEncoder for
> your entities. this allows you to use entities in SelectModels and
> in templates (forms) more easily and more elegant.
> however, the Grid and BeanEditor use the ValueEncoderSource
> service that  has the ValueEncoders contributed. When it is first
> used it will call all "contribute" methods. but the
> "contributeValueEncoderSource"
> within HibernateModule needs the Hibernate SessionFactory to
> determine all available entities. and because for the first call, the
> Hibernate SessionFactory does not exist (everything is lazy by default)
> it will try to create it by calling hibernate.Configurer.configure() 
which
> in turn assumes there is a hibernate.cfg.xml somewhere on the classpath
> (look at the HibernateModule.java file)
>
>
> the easiest way would be to remove the tapestry-hibernate
> dependencies
>
> g,
> kris
>
>
>
>
>
> raveendra <[EMAIL PROTECTED]>
> 17.06.2008 10:21
> Bitte antworten an
> "Tapestry users" <users@tapestry.apache.org>
>
>
> An
> users@tapestry.apache.org
> Kopie
>
> Thema
> Issue with Grid component
>
>
>
>
>
>
> Hi T5 guys,
>
>    We have chosen T5 for our new project.I am trying to develop a screen
> using Grid component.I am not connecting to database
> just displaying the list of  callSummaryBean' s (just creating the beans
> with some data in my page class) using below tag.
>
> My question is why is it asking for Hibernate Session or 
hibernate.cfg.xml
> when i am not connecting to DB.
>
> Is it necessary to configure Logger and hibernate.cfg.xml before using 
the
> Grid or BeanEditComponent.
>
>              <t:grid source="callSummaryList" row="callSummaryBean"/>
>
>
>
> Render queue error in BeginRender[CallSummary:grid.columns.sort]:
> Exception
> constructing service 'ValueEncoderSource': Error invoking service 
builder
> method org.apache.tapestry.services.TapestryModule.build(Map) (at
> TapestryModule.java:1567) (for service 'ValueEncoderSource'): Error
> invoking
> service contribution method
>
> 
org.apache.tapestry.hibernate.HibernateModule.contributeValueEncoderSource(M
> appedConfiguration,
> HibernateSessionSource, Session, TypeCoercer): Exception constructing
> service 'HibernateSessionSource': Error invoking service builder method
> org.apache.tapestry.hibernate.HibernateModule.build(Logger, List,
> RegistryShutdownHub) (at HibernateModule.java:124) (for service
> 'HibernateSessionSource'): /hibernate.cfg.xml not found
>
> Thankyou,
> ravindra.
>
>
>
>

Reply via email to