You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Chris Chiappone <ch...@gmail.com> on 2006/05/16 16:47:59 UTC

Tapernate configuration questions

I am attempting to migrate my application to make use of Tapernate.  I
pulled down the SVN and understand most of the configuration.  The problem I
believe I am having is my application is not mapping my hibernate resources.

Here is my Tapernate contribution in hivemind.xml

 <contribution configuration-id="spring.hibernate3.Configuration">
        <configuration-file>hibernate.cfg.xml</configuration-file>
        <property name="hibernate.dialect" value="
org.hibernate.dialect.PostgreSQLDialect"/>
        <property name="hibernate.connection.driver_class" value="
org.postgresql.Driver"/>
        <property name="hibernate.connection.url"
value="jdbc:postgresql://localhost/TrustedAPP"/>
        <property name="hibernate.connection.username" value="scan"/>
        <property name="hibernate.connection.password" value="s"/>
        <property name="hibernate.current_session_context_class"
value="thread"/>
        <property name="hibernate.cache.provider_class" value="
org.hibernate.cache.NoCacheProvider"/>
        <property name="hibernate.show_sql" value="true"/>
        <property name="hibernate.hbm2ddl.auto" value="false"/>
</contribution>

And here is my hibernate.cfg.xml file:

<hibernate-configuration>
    <session-factory>
        <mapping resource="Comp_Users.hbm.xml"/>
        <mapping resource="Users.hbm.xml"/>
        <mapping resource="Role.hbm.xml"/>
        <mapping resource="Company.hbm.xml"/>
        <mapping resource="AppInfo.hbm.xml"/>
        <mapping resource="AppType.hbm.xml"/>
        <mapping resource="AppVer.hbm.xml"/>
        <mapping resource="AssessInfo.hbm.xml"/>
        <mapping resource="AssessPhase.hbm.xml"/>
        <mapping resource="DocumentLocker.hbm.xml"/>
        <mapping resource="Partners.hbm.xml"/>
    </session-factory>
</hibernate-configuration>


Currenlty I have hibernate.cfg.xml and all the .hbm.xml files located in
/WEB-INF/ of my application.  When deploying the app hibernate appears to be
configured:

14:33:24,840 INFO  [Environment] Hibernate 3.1.2
14:33:24,859 INFO  [Environment] hibernate.properties not found
14:33:24,889 INFO  [Environment] using bytecode reflection optimizer
14:33:24,890 INFO  [Environment] Bytecode provider name : cglib
14:33:24,894 INFO  [Environment] using JDK 1.4 java.sql.Timestamp handling
14:33:25,156 INFO  [Configuration] configuring from resource:
hibernate.cfg.xml
14:33:25,189 INFO  [Configuration] Configuration resource: hibernate.cfg.xml
14:33:25,549 INFO  [Configuration] Configured SessionFactory: null
14:33:25,852 INFO  [C3P0ConnectionProvider] C3P0 using driver:
org.postgresql.Driver at URL: jdbc:postgresql://localhost/tpp
14:33:25,861 INFO  [C3P0ConnectionProvider] Connection properties:
{user=tpp, password=****}
14:33:25,862 INFO  [C3P0ConnectionProvider] autocommit mode: false


When I attempt to log into my application I get the following which I assume
is because hibernate hasn't read any of my mapping files:

Unable to process client request: Failure invoking listener method 'public
void com.tapp.view.components.NavLogin.formSubmit(
org.apache.tapestry.IRequestCycle)' on
$NavLogin_2@be0b48[Home/border.navLogin]: Users is not mapped [select u from
Users as u where u.email = :email and u.password = :pass]
org.apache.hivemind.ApplicationRuntimeException: Failure invoking listener
method 'public void com.tapp.view.components.NavLogin.formSubmit(
org.apache.tapestry.IRequestCycle)' on
$NavLogin_2@be0b48[Home/border.navLogin]: Users is not mapped [select u from
Users as u where u.email = :email and u.password = :pass]
[context:/WEB-INF/Border.jwc, line 32, column 46]


Could anyone lead me in the right direction with this configuration?
Thanks.
-- 
~chris

Re: Tapernate configuration questions

Posted by Chris Chiappone <ch...@gmail.com>.
The solution to my problem was relatively easy after talking with James.  I
ended up needing to change an session persistent getter to an "entity"
persistent one.  That solved the lazy loading problem that I was having.


On 5/19/06, Andreas Bulling <sp...@phoenix.hadiko.de> wrote:
>
> On 18. Mai 2006 - 14:34:36, Chris Chiappone wrote:
> | Just wanted to let the tapestry list know of what a great resource James
> has
> | been on this topic.  Tapernate has improved my applications performace
> | tremendously and James was very helpful with any questions I had.
>
> Could you please summarize shortly what the problem was and how you
> solved it? I once had similar problems with Tapernate and I'm just
> interested in how you solved yours. ;)
>
> Thanks and kind regards,
>   Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
~chris

Re: Tapernate configuration questions

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
On 18. Mai 2006 - 14:34:36, Chris Chiappone wrote:
| Just wanted to let the tapestry list know of what a great resource James has
| been on this topic.  Tapernate has improved my applications performace
| tremendously and James was very helpful with any questions I had.

Could you please summarize shortly what the problem was and how you
solved it? I once had similar problems with Tapernate and I'm just
interested in how you solved yours. ;)

Thanks and kind regards,
  Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapernate configuration questions

Posted by Jesse Kuhnert <jk...@gmail.com>.
Completely agree.

On 5/18/06, Chris Chiappone <ch...@gmail.com> wrote:
>
> Just wanted to let the tapestry list know of what a great resource James
> has
> been on this topic.  Tapernate has improved my applications performace
> tremendously and James was very helpful with any questions I had.
>
> Thanks again,
>
> ~chris
>
>
>
> On 5/18/06, James Carman <ja...@carmanconsulting.com> wrote:
> >
> > Can you turn up logging and see what exactly tapernate is doing?  It
> will
> > print out a message when it closes the session (as will hibernate
> itself).
> > You're accessing this "getter" during page rendering?  The session
> should be
> > open.
> >
> >
> > On 5/18/06, Chris Chiappone <ch...@gmail.com> wrote:
> > >
> > > Here is a code snippet of where the lazy initialization exception
> occurs
> > > which is in a component of mine:
> > >
> > >     public Collection getVisibleAssessments() {
> > >         Collection visibleDocs = new ArrayList();
> > >         Iterator it = getAssessments().iterator();
> > >         while (it.hasNext()) {
> > >             AssessInfo info = (AssessInfo) it.next();
> > >             if (info.documentVisibiltyCheck
> > > (getPageVisit().getCurrentUser()))
> > > {
> > >                 visibleDocs.add(info);
> > >             }
> > >         }
> > >         return visibleDocs;
> > >     }
> > >
> > > And the exception:
> > >
> > > 16:36:59,506 ERROR [LazyInitializationException] failed to lazily
> > > initialize
> > > a collection of role: com.app.domain.company.Company.assessments , no
> > > session
> > > or session was closed
> > > org.hibernate.LazyInitializationException: failed to lazily initialize
> a
> > > collection of role: com.app.domain.company.Company.assessments, no
> > > session
> > > or session was closed
> > >         at
> > >
> > >
> org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException
> > > (AbstractPersistentCollection.java:358)
> > >         at
> > >
> > >
> org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected
> > > (AbstractPersistentCollection.java:350)
> > >         at
> > > org.hibernate.collection.AbstractPersistentCollection.initialize(
> > > AbstractPersistentCollection.java:343)
> > >         at org.hibernate.collection.AbstractPersistentCollection.read(
> > > AbstractPersistentCollection.java:86)
> > >         at org.hibernate.collection.PersistentSet.iterator(
> > > PersistentSet.java:138)
> > >         at
> > > com.app.view.components.AssessmentInfoTable.getVisibleAssessments
> > > (AssessmentInfoTable.java :55)
> > >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >         at sun.reflect.NativeMethodAccessorImpl.invoke(
> > > NativeMethodAccessorImpl.java:39)
> > >         at sun.reflect.DelegatingMethodAccessorImpl.invoke (
> > > DelegatingMethodAccessorImpl.java:25)
> > >
> > >
> > > On 5/18/06, Chris Chiappone <ch...@gmail.com> wrote:
> > > >
> > > > For the most part Tapernate has improved the performance on my
> > > > application.  Although I continue to get Lazy initilialization
> > > exceptions.
> > > > I'm not quite sure whats the correct process to get arround
> this?  Any
> > > one
> > > > have any suggestions?
> > > >
> > > > Thanks
> > > >
> > > > On 5/16/06, James Carman < james@carmanconsulting.com> wrote:
> > > >
> > > > > Correct.  For your other classes, if you wish them to have DAOs
> > > injected
> > > > > into them, then you'll have to have HiveMind manage them.
> > > > >
> > > > > -----Original Message-----
> > > > > From: Andreas Bulling [mailto: andreas@phoenix.hadiko.de ] On
> Behalf
> > > Of
> > > > > Andreas Bulling
> > > > > Sent: Tuesday, May 16, 2006 2:19 PM
> > > > > To: Tapestry users
> > > > > Subject: Re: Tapernate configuration questions
> > > > >
> > > > > On 16. Mai 2006 - 13:54:01, Chris Chiappone wrote:
> > > > > | Ok, it appears most of my migration to Tapernate seems to be
> > > working
> > > > > well.
> > > > > | My question is somewhat unrealated to tapernate but maybe
> someone
> > > > > could
> > > > > | guide me in the right direction.  For pages and components that
> > > can
> > > > > inject
> > > > > | the Dao seem to work like a charm.  The problem is I have a
> > > handfull
> > > > > of
> > > > > | classes that are not pages or components that instantiate the
> Dao
> > > in
> > > > > them.
> > > > > | Since these are now configured via tapernate the session is null
> > > and
> > > > > cannot
> > > > > | be aquired by HibernateDaoSupport.   So my question is it
> possible
> > > to
> > > > > inject
> > > > > | the dao's into other objects?
> > > > >
> > > > > I think you have to make HiveMind services out of them - please
> > > > > correct me if I'm wrong ;)
> > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > ~chris
> > > >
> > >
> > >
> > >
> > > --
> > > ~chris
> > >
> > >
> >
>
>
> --
> ~chris
>
>


-- 
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Re: Tapernate configuration questions

Posted by Chris Chiappone <ch...@gmail.com>.
Just wanted to let the tapestry list know of what a great resource James has
been on this topic.  Tapernate has improved my applications performace
tremendously and James was very helpful with any questions I had.

Thanks again,

~chris



On 5/18/06, James Carman <ja...@carmanconsulting.com> wrote:
>
> Can you turn up logging and see what exactly tapernate is doing?  It will
> print out a message when it closes the session (as will hibernate itself).
> You're accessing this "getter" during page rendering?  The session should be
> open.
>
>
> On 5/18/06, Chris Chiappone <ch...@gmail.com> wrote:
> >
> > Here is a code snippet of where the lazy initialization exception occurs
> > which is in a component of mine:
> >
> >     public Collection getVisibleAssessments() {
> >         Collection visibleDocs = new ArrayList();
> >         Iterator it = getAssessments().iterator();
> >         while (it.hasNext()) {
> >             AssessInfo info = (AssessInfo) it.next();
> >             if (info.documentVisibiltyCheck
> > (getPageVisit().getCurrentUser()))
> > {
> >                 visibleDocs.add(info);
> >             }
> >         }
> >         return visibleDocs;
> >     }
> >
> > And the exception:
> >
> > 16:36:59,506 ERROR [LazyInitializationException] failed to lazily
> > initialize
> > a collection of role: com.app.domain.company.Company.assessments , no
> > session
> > or session was closed
> > org.hibernate.LazyInitializationException: failed to lazily initialize a
> > collection of role: com.app.domain.company.Company.assessments, no
> > session
> > or session was closed
> >         at
> >
> > org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException
> > (AbstractPersistentCollection.java:358)
> >         at
> >
> > org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected
> > (AbstractPersistentCollection.java:350)
> >         at
> > org.hibernate.collection.AbstractPersistentCollection.initialize(
> > AbstractPersistentCollection.java:343)
> >         at org.hibernate.collection.AbstractPersistentCollection.read (
> > AbstractPersistentCollection.java:86)
> >         at org.hibernate.collection.PersistentSet.iterator(
> > PersistentSet.java:138)
> >         at
> > com.app.view.components.AssessmentInfoTable.getVisibleAssessments
> > (AssessmentInfoTable.java :55)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:39)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke (
> > DelegatingMethodAccessorImpl.java:25)
> >
> >
> > On 5/18/06, Chris Chiappone <ch...@gmail.com> wrote:
> > >
> > > For the most part Tapernate has improved the performance on my
> > > application.  Although I continue to get Lazy initilialization
> > exceptions.
> > > I'm not quite sure whats the correct process to get arround this?  Any
> > one
> > > have any suggestions?
> > >
> > > Thanks
> > >
> > > On 5/16/06, James Carman < james@carmanconsulting.com> wrote:
> > >
> > > > Correct.  For your other classes, if you wish them to have DAOs
> > injected
> > > > into them, then you'll have to have HiveMind manage them.
> > > >
> > > > -----Original Message-----
> > > > From: Andreas Bulling [mailto: andreas@phoenix.hadiko.de ] On Behalf
> > Of
> > > > Andreas Bulling
> > > > Sent: Tuesday, May 16, 2006 2:19 PM
> > > > To: Tapestry users
> > > > Subject: Re: Tapernate configuration questions
> > > >
> > > > On 16. Mai 2006 - 13:54:01, Chris Chiappone wrote:
> > > > | Ok, it appears most of my migration to Tapernate seems to be
> > working
> > > > well.
> > > > | My question is somewhat unrealated to tapernate but maybe someone
> > > > could
> > > > | guide me in the right direction.  For pages and components that
> > can
> > > > inject
> > > > | the Dao seem to work like a charm.  The problem is I have a
> > handfull
> > > > of
> > > > | classes that are not pages or components that instantiate the Dao
> > in
> > > > them.
> > > > | Since these are now configured via tapernate the session is null
> > and
> > > > cannot
> > > > | be aquired by HibernateDaoSupport.   So my question is it possible
> > to
> > > > inject
> > > > | the dao's into other objects?
> > > >
> > > > I think you have to make HiveMind services out of them - please
> > > > correct me if I'm wrong ;)
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > ~chris
> > >
> >
> >
> >
> > --
> > ~chris
> >
> >
>


-- 
~chris

Re: Tapernate configuration questions

Posted by James Carman <ja...@carmanconsulting.com>.
Can you turn up logging and see what exactly tapernate is doing?  It will
print out a message when it closes the session (as will hibernate itself).
You're accessing this "getter" during page rendering?  The session should be
open.

On 5/18/06, Chris Chiappone <ch...@gmail.com> wrote:
>
> Here is a code snippet of where the lazy initialization exception occurs
> which is in a component of mine:
>
>     public Collection getVisibleAssessments() {
>         Collection visibleDocs = new ArrayList();
>         Iterator it = getAssessments().iterator();
>         while (it.hasNext()) {
>             AssessInfo info = (AssessInfo) it.next();
>             if (info.documentVisibiltyCheck
> (getPageVisit().getCurrentUser()))
> {
>                 visibleDocs.add(info);
>             }
>         }
>         return visibleDocs;
>     }
>
> And the exception:
>
> 16:36:59,506 ERROR [LazyInitializationException] failed to lazily
> initialize
> a collection of role: com.app.domain.company.Company.assessments, no
> session
> or session was closed
> org.hibernate.LazyInitializationException: failed to lazily initialize a
> collection of role: com.app.domain.company.Company.assessments, no session
> or session was closed
>         at
>
> org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException
> (AbstractPersistentCollection.java:358)
>         at
>
> org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected
> (AbstractPersistentCollection.java:350)
>         at
> org.hibernate.collection.AbstractPersistentCollection.initialize(
> AbstractPersistentCollection.java:343)
>         at org.hibernate.collection.AbstractPersistentCollection.read(
> AbstractPersistentCollection.java:86)
>         at org.hibernate.collection.PersistentSet.iterator(
> PersistentSet.java:138)
>         at
> com.app.view.components.AssessmentInfoTable.getVisibleAssessments
> (AssessmentInfoTable.java:55)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>
>
> On 5/18/06, Chris Chiappone <ch...@gmail.com> wrote:
> >
> > For the most part Tapernate has improved the performance on my
> > application.  Although I continue to get Lazy initilialization
> exceptions.
> > I'm not quite sure whats the correct process to get arround this?  Any
> one
> > have any suggestions?
> >
> > Thanks
> >
> > On 5/16/06, James Carman < james@carmanconsulting.com> wrote:
> >
> > > Correct.  For your other classes, if you wish them to have DAOs
> injected
> > > into them, then you'll have to have HiveMind manage them.
> > >
> > > -----Original Message-----
> > > From: Andreas Bulling [mailto: andreas@phoenix.hadiko.de] On Behalf Of
> > > Andreas Bulling
> > > Sent: Tuesday, May 16, 2006 2:19 PM
> > > To: Tapestry users
> > > Subject: Re: Tapernate configuration questions
> > >
> > > On 16. Mai 2006 - 13:54:01, Chris Chiappone wrote:
> > > | Ok, it appears most of my migration to Tapernate seems to be working
> > > well.
> > > | My question is somewhat unrealated to tapernate but maybe someone
> > > could
> > > | guide me in the right direction.  For pages and components that can
> > > inject
> > > | the Dao seem to work like a charm.  The problem is I have a handfull
> > > of
> > > | classes that are not pages or components that instantiate the Dao in
> > > them.
> > > | Since these are now configured via tapernate the session is null and
> > > cannot
> > > | be aquired by HibernateDaoSupport.   So my question is it possible
> to
> > > inject
> > > | the dao's into other objects?
> > >
> > > I think you have to make HiveMind services out of them - please
> > > correct me if I'm wrong ;)
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > ~chris
> >
>
>
>
> --
> ~chris
>
>

Re: Tapernate configuration questions

Posted by Chris Chiappone <ch...@gmail.com>.
Here is a code snippet of where the lazy initialization exception occurs
which is in a component of mine:

    public Collection getVisibleAssessments() {
        Collection visibleDocs = new ArrayList();
        Iterator it = getAssessments().iterator();
        while (it.hasNext()) {
            AssessInfo info = (AssessInfo) it.next();
            if (info.documentVisibiltyCheck(getPageVisit().getCurrentUser()))
{
                visibleDocs.add(info);
            }
        }
        return visibleDocs;
    }

And the exception:

16:36:59,506 ERROR [LazyInitializationException] failed to lazily initialize
a collection of role: com.app.domain.company.Company.assessments, no session
or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a
collection of role: com.app.domain.company.Company.assessments, no session
or session was closed
        at
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException
(AbstractPersistentCollection.java:358)
        at
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected
(AbstractPersistentCollection.java:350)
        at org.hibernate.collection.AbstractPersistentCollection.initialize(
AbstractPersistentCollection.java:343)
        at org.hibernate.collection.AbstractPersistentCollection.read(
AbstractPersistentCollection.java:86)
        at org.hibernate.collection.PersistentSet.iterator(
PersistentSet.java:138)
        at com.app.view.components.AssessmentInfoTable.getVisibleAssessments
(AssessmentInfoTable.java:55)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)


On 5/18/06, Chris Chiappone <ch...@gmail.com> wrote:
>
> For the most part Tapernate has improved the performance on my
> application.  Although I continue to get Lazy initilialization exceptions.
> I'm not quite sure whats the correct process to get arround this?  Any one
> have any suggestions?
>
> Thanks
>
> On 5/16/06, James Carman < james@carmanconsulting.com> wrote:
>
> > Correct.  For your other classes, if you wish them to have DAOs injected
> > into them, then you'll have to have HiveMind manage them.
> >
> > -----Original Message-----
> > From: Andreas Bulling [mailto: andreas@phoenix.hadiko.de] On Behalf Of
> > Andreas Bulling
> > Sent: Tuesday, May 16, 2006 2:19 PM
> > To: Tapestry users
> > Subject: Re: Tapernate configuration questions
> >
> > On 16. Mai 2006 - 13:54:01, Chris Chiappone wrote:
> > | Ok, it appears most of my migration to Tapernate seems to be working
> > well.
> > | My question is somewhat unrealated to tapernate but maybe someone
> > could
> > | guide me in the right direction.  For pages and components that can
> > inject
> > | the Dao seem to work like a charm.  The problem is I have a handfull
> > of
> > | classes that are not pages or components that instantiate the Dao in
> > them.
> > | Since these are now configured via tapernate the session is null and
> > cannot
> > | be aquired by HibernateDaoSupport.   So my question is it possible to
> > inject
> > | the dao's into other objects?
> >
> > I think you have to make HiveMind services out of them - please
> > correct me if I'm wrong ;)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> ~chris
>



-- 
~chris

Re: Tapernate configuration questions

Posted by Chris Chiappone <ch...@gmail.com>.
For the most part Tapernate has improved the performance on my application.
Although I continue to get Lazy initilialization exceptions.  I'm not quite
sure whats the correct process to get arround this?  Any one have any
suggestions?

Thanks

On 5/16/06, James Carman <ja...@carmanconsulting.com> wrote:
>
> Correct.  For your other classes, if you wish them to have DAOs injected
> into them, then you'll have to have HiveMind manage them.
>
> -----Original Message-----
> From: Andreas Bulling [mailto: andreas@phoenix.hadiko.de] On Behalf Of
> Andreas Bulling
> Sent: Tuesday, May 16, 2006 2:19 PM
> To: Tapestry users
> Subject: Re: Tapernate configuration questions
>
> On 16. Mai 2006 - 13:54:01, Chris Chiappone wrote:
> | Ok, it appears most of my migration to Tapernate seems to be working
> well.
> | My question is somewhat unrealated to tapernate but maybe someone could
> | guide me in the right direction.  For pages and components that can
> inject
> | the Dao seem to work like a charm.  The problem is I have a handfull of
> | classes that are not pages or components that instantiate the Dao in
> them.
> | Since these are now configured via tapernate the session is null and
> cannot
> | be aquired by HibernateDaoSupport.   So my question is it possible to
> inject
> | the dao's into other objects?
>
> I think you have to make HiveMind services out of them - please
> correct me if I'm wrong ;)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
~chris

RE: Tapernate configuration questions

Posted by James Carman <ja...@carmanconsulting.com>.
Correct.  For your other classes, if you wish them to have DAOs injected
into them, then you'll have to have HiveMind manage them.

-----Original Message-----
From: Andreas Bulling [mailto:andreas@phoenix.hadiko.de] On Behalf Of
Andreas Bulling
Sent: Tuesday, May 16, 2006 2:19 PM
To: Tapestry users
Subject: Re: Tapernate configuration questions

On 16. Mai 2006 - 13:54:01, Chris Chiappone wrote:
| Ok, it appears most of my migration to Tapernate seems to be working well.
| My question is somewhat unrealated to tapernate but maybe someone could
| guide me in the right direction.  For pages and components that can inject
| the Dao seem to work like a charm.  The problem is I have a handfull of
| classes that are not pages or components that instantiate the Dao in them.
| Since these are now configured via tapernate the session is null and
cannot
| be aquired by HibernateDaoSupport.   So my question is it possible to
inject
| the dao's into other objects?

I think you have to make HiveMind services out of them - please
correct me if I'm wrong ;)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapernate configuration questions

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
On 16. Mai 2006 - 13:54:01, Chris Chiappone wrote:
| Ok, it appears most of my migration to Tapernate seems to be working well.
| My question is somewhat unrealated to tapernate but maybe someone could
| guide me in the right direction.  For pages and components that can inject
| the Dao seem to work like a charm.  The problem is I have a handfull of
| classes that are not pages or components that instantiate the Dao in them.
| Since these are now configured via tapernate the session is null and cannot
| be aquired by HibernateDaoSupport.   So my question is it possible to inject
| the dao's into other objects?

I think you have to make HiveMind services out of them - please
correct me if I'm wrong ;)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapernate configuration questions

Posted by Chris Chiappone <ch...@gmail.com>.
Ok, it appears most of my migration to Tapernate seems to be working well.
My question is somewhat unrealated to tapernate but maybe someone could
guide me in the right direction.  For pages and components that can inject
the Dao seem to work like a charm.  The problem is I have a handfull of
classes that are not pages or components that instantiate the Dao in them.
Since these are now configured via tapernate the session is null and cannot
be aquired by HibernateDaoSupport.   So my question is it possible to inject
the dao's into other objects?

Thanks.

On 5/16/06, Chris Chiappone <ch...@gmail.com> wrote:
>
> Unfortunately I started this project before hibernate had support for
> annotations so I'm using the old style mapping files and don't really want
> to change this until I have some extra time on my hands.  I would be a nice
> feature though.
>
>
> On 5/16/06, James Carman <ja...@carmanconsulting.com> wrote:
> >
> > Are you using annotations to define your pojos?  If so, you should check
> > out
> > the hibernate-apt thing that I use in the example project.  It will
> > automatically generate your hibernate.cfg.xml file by searching your
> > source
> > path for all classes with the @Entity annotation.
> >
> > -----Original Message-----
> > From: Chris Chiappone [mailto:chiappone@gmail.com]
> > Sent: Tuesday, May 16, 2006 11:10 AM
> > To: Tapestry users
> > Subject: Re: Tapernate configuration questions
> >
> > Excellent thanks!! I actually had all the files but the
> > hibernate.cfg.xml in
> > WEB-INF/classes when I started with this.  Looks like I'll finally be
> > able
> > to allow lazy loading with hibernate.  I'm hoping to see a major
> > performance
> > increase with tapernate.
> >
> >
> >
> > On 5/16/06, James Carman <james@carmanconsulting.com > wrote:
> > >
> > > Try moving your xml files into WEB-INF/classes.
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Chris Chiappone [mailto:chiappone@gmail.com ]
> > > Sent: Tuesday, May 16, 2006 10:48 AM
> > > To: Tapestry List
> > > Subject: Tapernate configuration questions
> > >
> > > I am attempting to migrate my application to make use of Tapernate.  I
> > > pulled down the SVN and understand most of the configuration.  The
> > problem
> > > I
> > > believe I am having is my application is not mapping my hibernate
> > > resources.
> > >
> > > Here is my Tapernate contribution in hivemind.xml
> > >
> > > <contribution configuration-id=" spring.hibernate3.Configuration">
> > >         <configuration-file>hibernate.cfg.xml</configuration-file>
> > >         <property name="hibernate.dialect" value="
> > > org.hibernate.dialect.PostgreSQLDialect "/>
> > >         <property name="hibernate.connection.driver_class" value="
> > > org.postgresql.Driver"/>
> > >         <property name="hibernate.connection.url"
> > > value="jdbc:postgresql://localhost/TrustedAPP"/>
> > >         <property name="hibernate.connection.username" value="scan"/>
> > >         <property name="hibernate.connection.password" value="s"/>
> > >         <property name=" hibernate.current_session_context_class"
> > > value="thread"/>
> > >         <property name="hibernate.cache.provider_class" value="
> > > org.hibernate.cache.NoCacheProvider"/>
> > >         <property name="hibernate.show_sql" value="true"/>
> > >         <property name="hibernate.hbm2ddl.auto" value="false"/>
> > > </contribution>
> > >
> > > And here is my hibernate.cfg.xml file:
> > >
> > > <hibernate-configuration>
> > >     <session-factory>
> > >         <mapping resource="Comp_Users.hbm.xml"/>
> > >         <mapping resource=" Users.hbm.xml"/>
> > >         <mapping resource="Role.hbm.xml"/>
> > >         <mapping resource="Company.hbm.xml"/>
> > >         <mapping resource="AppInfo.hbm.xml"/>
> > >         <mapping resource="AppType.hbm.xml"/>
> > >         <mapping resource="AppVer.hbm.xml"/>
> > >         <mapping resource="AssessInfo.hbm.xml"/>
> > >         <mapping resource=" AssessPhase.hbm.xml"/>
> > >         <mapping resource="DocumentLocker.hbm.xml"/>
> > >         <mapping resource="Partners.hbm.xml"/>
> > >     </session-factory>
> > > </hibernate-configuration>
> > >
> > >
> > > Currenlty I have hibernate.cfg.xml and all the .hbm.xml files located
> > in
> > > /WEB-INF/ of my application.  When deploying the app hibernate appears
> > to
> > > be
> > > configured:
> > >
> > > 14:33:24,840 INFO  [Environment] Hibernate 3.1.2
> > > 14:33:24,859 INFO  [Environment] hibernate.properties not found
> > > 14:33:24,889 INFO  [Environment] using bytecode reflection optimizer
> > > 14:33:24,890 INFO  [Environment] Bytecode provider name : cglib
> > > 14:33:24,894 INFO  [Environment] using JDK 1.4 java.sql.Timestamphandling
> > > 14:33:25,156 INFO  [Configuration] configuring from resource:
> > > hibernate.cfg.xml
> > > 14:33:25,189 INFO  [Configuration] Configuration resource:
> > > hibernate.cfg.xml
> > > 14:33:25,549 INFO  [Configuration] Configured SessionFactory: null
> > > 14:33:25,852 INFO  [C3P0ConnectionProvider] C3P0 using driver:
> > > org.postgresql.Driver at URL: jdbc:postgresql://localhost/tpp
> > > 14:33:25,861 INFO  [C3P0ConnectionProvider] Connection properties:
> > > {user=tpp, password=****}
> > > 14:33:25,862 INFO  [C3P0ConnectionProvider] autocommit mode: false
> > >
> > >
> > > When I attempt to log into my application I get the following which I
> > > assume
> > > is because hibernate hasn't read any of my mapping files:
> > >
> > > Unable to process client request: Failure invoking listener method
> > 'public
> > > void com.tapp.view.components.NavLogin.formSubmit (
> > > org.apache.tapestry.IRequestCycle)' on
> > > $NavLogin_2@be0b48[Home/border.navLogin]: Users is not mapped [select
> > u
> > > from
> > > Users as u where u.email = :email and u.password = :pass]
> > > org.apache.hivemind.ApplicationRuntimeException : Failure invoking
> > listener
> > > method 'public void com.tapp.view.components.NavLogin.formSubmit(
> > > org.apache.tapestry.IRequestCycle)' on
> > > $NavLogin_2@be0b48[Home/border.navLogin]: Users is not mapped [select
> > u
> > > from
> > > Users as u where u.email = :email and u.password = :pass]
> > > [context:/WEB-INF/Border.jwc, line 32, column 46]
> > >
> > >
> > > Could anyone lead me in the right direction with this configuration?
> > > Thanks.
> > > --
> > > ~chris
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > ~chris
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> ~chris
>



-- 
~chris

Re: Tapernate configuration questions

Posted by Chris Chiappone <ch...@gmail.com>.
Unfortunately I started this project before hibernate had support for
annotations so I'm using the old style mapping files and don't really want
to change this until I have some extra time on my hands.  I would be a nice
feature though.

On 5/16/06, James Carman <ja...@carmanconsulting.com> wrote:
>
> Are you using annotations to define your pojos?  If so, you should check
> out
> the hibernate-apt thing that I use in the example project.  It will
> automatically generate your hibernate.cfg.xml file by searching your
> source
> path for all classes with the @Entity annotation.
>
> -----Original Message-----
> From: Chris Chiappone [mailto:chiappone@gmail.com]
> Sent: Tuesday, May 16, 2006 11:10 AM
> To: Tapestry users
> Subject: Re: Tapernate configuration questions
>
> Excellent thanks!! I actually had all the files but the hibernate.cfg.xmlin
> WEB-INF/classes when I started with this.  Looks like I'll finally be able
> to allow lazy loading with hibernate.  I'm hoping to see a major
> performance
> increase with tapernate.
>
>
>
> On 5/16/06, James Carman <ja...@carmanconsulting.com> wrote:
> >
> > Try moving your xml files into WEB-INF/classes.
> >
> >
> >
> > -----Original Message-----
> > From: Chris Chiappone [mailto:chiappone@gmail.com]
> > Sent: Tuesday, May 16, 2006 10:48 AM
> > To: Tapestry List
> > Subject: Tapernate configuration questions
> >
> > I am attempting to migrate my application to make use of Tapernate.  I
> > pulled down the SVN and understand most of the configuration.  The
> problem
> > I
> > believe I am having is my application is not mapping my hibernate
> > resources.
> >
> > Here is my Tapernate contribution in hivemind.xml
> >
> > <contribution configuration-id="spring.hibernate3.Configuration">
> >         <configuration-file>hibernate.cfg.xml</configuration-file>
> >         <property name="hibernate.dialect" value="
> > org.hibernate.dialect.PostgreSQLDialect"/>
> >         <property name="hibernate.connection.driver_class" value="
> > org.postgresql.Driver"/>
> >         <property name="hibernate.connection.url"
> > value="jdbc:postgresql://localhost/TrustedAPP"/>
> >         <property name="hibernate.connection.username" value="scan"/>
> >         <property name="hibernate.connection.password" value="s"/>
> >         <property name="hibernate.current_session_context_class"
> > value="thread"/>
> >         <property name="hibernate.cache.provider_class" value="
> > org.hibernate.cache.NoCacheProvider"/>
> >         <property name="hibernate.show_sql" value="true"/>
> >         <property name="hibernate.hbm2ddl.auto" value="false"/>
> > </contribution>
> >
> > And here is my hibernate.cfg.xml file:
> >
> > <hibernate-configuration>
> >     <session-factory>
> >         <mapping resource="Comp_Users.hbm.xml"/>
> >         <mapping resource="Users.hbm.xml"/>
> >         <mapping resource="Role.hbm.xml"/>
> >         <mapping resource="Company.hbm.xml"/>
> >         <mapping resource="AppInfo.hbm.xml"/>
> >         <mapping resource="AppType.hbm.xml"/>
> >         <mapping resource="AppVer.hbm.xml"/>
> >         <mapping resource="AssessInfo.hbm.xml"/>
> >         <mapping resource="AssessPhase.hbm.xml"/>
> >         <mapping resource="DocumentLocker.hbm.xml"/>
> >         <mapping resource="Partners.hbm.xml"/>
> >     </session-factory>
> > </hibernate-configuration>
> >
> >
> > Currenlty I have hibernate.cfg.xml and all the .hbm.xml files located in
> > /WEB-INF/ of my application.  When deploying the app hibernate appears
> to
> > be
> > configured:
> >
> > 14:33:24,840 INFO  [Environment] Hibernate 3.1.2
> > 14:33:24,859 INFO  [Environment] hibernate.properties not found
> > 14:33:24,889 INFO  [Environment] using bytecode reflection optimizer
> > 14:33:24,890 INFO  [Environment] Bytecode provider name : cglib
> > 14:33:24,894 INFO  [Environment] using JDK 1.4 java.sql.Timestamphandling
> > 14:33:25,156 INFO  [Configuration] configuring from resource:
> > hibernate.cfg.xml
> > 14:33:25,189 INFO  [Configuration] Configuration resource:
> > hibernate.cfg.xml
> > 14:33:25,549 INFO  [Configuration] Configured SessionFactory: null
> > 14:33:25,852 INFO  [C3P0ConnectionProvider] C3P0 using driver:
> > org.postgresql.Driver at URL: jdbc:postgresql://localhost/tpp
> > 14:33:25,861 INFO  [C3P0ConnectionProvider] Connection properties:
> > {user=tpp, password=****}
> > 14:33:25,862 INFO  [C3P0ConnectionProvider] autocommit mode: false
> >
> >
> > When I attempt to log into my application I get the following which I
> > assume
> > is because hibernate hasn't read any of my mapping files:
> >
> > Unable to process client request: Failure invoking listener method
> 'public
> > void com.tapp.view.components.NavLogin.formSubmit(
> > org.apache.tapestry.IRequestCycle)' on
> > $NavLogin_2@be0b48[Home/border.navLogin]: Users is not mapped [select u
> > from
> > Users as u where u.email = :email and u.password = :pass]
> > org.apache.hivemind.ApplicationRuntimeException: Failure invoking
> listener
> > method 'public void com.tapp.view.components.NavLogin.formSubmit(
> > org.apache.tapestry.IRequestCycle)' on
> > $NavLogin_2@be0b48[Home/border.navLogin]: Users is not mapped [select u
> > from
> > Users as u where u.email = :email and u.password = :pass]
> > [context:/WEB-INF/Border.jwc, line 32, column 46]
> >
> >
> > Could anyone lead me in the right direction with this configuration?
> > Thanks.
> > --
> > ~chris
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> ~chris
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
~chris

RE: Tapernate configuration questions

Posted by James Carman <ja...@carmanconsulting.com>.
Are you using annotations to define your pojos?  If so, you should check out
the hibernate-apt thing that I use in the example project.  It will
automatically generate your hibernate.cfg.xml file by searching your source
path for all classes with the @Entity annotation.

-----Original Message-----
From: Chris Chiappone [mailto:chiappone@gmail.com] 
Sent: Tuesday, May 16, 2006 11:10 AM
To: Tapestry users
Subject: Re: Tapernate configuration questions

Excellent thanks!! I actually had all the files but the hibernate.cfg.xml in
WEB-INF/classes when I started with this.  Looks like I'll finally be able
to allow lazy loading with hibernate.  I'm hoping to see a major performance
increase with tapernate.



On 5/16/06, James Carman <ja...@carmanconsulting.com> wrote:
>
> Try moving your xml files into WEB-INF/classes.
>
>
>
> -----Original Message-----
> From: Chris Chiappone [mailto:chiappone@gmail.com]
> Sent: Tuesday, May 16, 2006 10:48 AM
> To: Tapestry List
> Subject: Tapernate configuration questions
>
> I am attempting to migrate my application to make use of Tapernate.  I
> pulled down the SVN and understand most of the configuration.  The problem
> I
> believe I am having is my application is not mapping my hibernate
> resources.
>
> Here is my Tapernate contribution in hivemind.xml
>
> <contribution configuration-id="spring.hibernate3.Configuration">
>         <configuration-file>hibernate.cfg.xml</configuration-file>
>         <property name="hibernate.dialect" value="
> org.hibernate.dialect.PostgreSQLDialect"/>
>         <property name="hibernate.connection.driver_class" value="
> org.postgresql.Driver"/>
>         <property name="hibernate.connection.url"
> value="jdbc:postgresql://localhost/TrustedAPP"/>
>         <property name="hibernate.connection.username" value="scan"/>
>         <property name="hibernate.connection.password" value="s"/>
>         <property name="hibernate.current_session_context_class"
> value="thread"/>
>         <property name="hibernate.cache.provider_class" value="
> org.hibernate.cache.NoCacheProvider"/>
>         <property name="hibernate.show_sql" value="true"/>
>         <property name="hibernate.hbm2ddl.auto" value="false"/>
> </contribution>
>
> And here is my hibernate.cfg.xml file:
>
> <hibernate-configuration>
>     <session-factory>
>         <mapping resource="Comp_Users.hbm.xml"/>
>         <mapping resource="Users.hbm.xml"/>
>         <mapping resource="Role.hbm.xml"/>
>         <mapping resource="Company.hbm.xml"/>
>         <mapping resource="AppInfo.hbm.xml"/>
>         <mapping resource="AppType.hbm.xml"/>
>         <mapping resource="AppVer.hbm.xml"/>
>         <mapping resource="AssessInfo.hbm.xml"/>
>         <mapping resource="AssessPhase.hbm.xml"/>
>         <mapping resource="DocumentLocker.hbm.xml"/>
>         <mapping resource="Partners.hbm.xml"/>
>     </session-factory>
> </hibernate-configuration>
>
>
> Currenlty I have hibernate.cfg.xml and all the .hbm.xml files located in
> /WEB-INF/ of my application.  When deploying the app hibernate appears to
> be
> configured:
>
> 14:33:24,840 INFO  [Environment] Hibernate 3.1.2
> 14:33:24,859 INFO  [Environment] hibernate.properties not found
> 14:33:24,889 INFO  [Environment] using bytecode reflection optimizer
> 14:33:24,890 INFO  [Environment] Bytecode provider name : cglib
> 14:33:24,894 INFO  [Environment] using JDK 1.4 java.sql.Timestamp handling
> 14:33:25,156 INFO  [Configuration] configuring from resource:
> hibernate.cfg.xml
> 14:33:25,189 INFO  [Configuration] Configuration resource:
> hibernate.cfg.xml
> 14:33:25,549 INFO  [Configuration] Configured SessionFactory: null
> 14:33:25,852 INFO  [C3P0ConnectionProvider] C3P0 using driver:
> org.postgresql.Driver at URL: jdbc:postgresql://localhost/tpp
> 14:33:25,861 INFO  [C3P0ConnectionProvider] Connection properties:
> {user=tpp, password=****}
> 14:33:25,862 INFO  [C3P0ConnectionProvider] autocommit mode: false
>
>
> When I attempt to log into my application I get the following which I
> assume
> is because hibernate hasn't read any of my mapping files:
>
> Unable to process client request: Failure invoking listener method 'public
> void com.tapp.view.components.NavLogin.formSubmit(
> org.apache.tapestry.IRequestCycle)' on
> $NavLogin_2@be0b48[Home/border.navLogin]: Users is not mapped [select u
> from
> Users as u where u.email = :email and u.password = :pass]
> org.apache.hivemind.ApplicationRuntimeException: Failure invoking listener
> method 'public void com.tapp.view.components.NavLogin.formSubmit(
> org.apache.tapestry.IRequestCycle)' on
> $NavLogin_2@be0b48[Home/border.navLogin]: Users is not mapped [select u
> from
> Users as u where u.email = :email and u.password = :pass]
> [context:/WEB-INF/Border.jwc, line 32, column 46]
>
>
> Could anyone lead me in the right direction with this configuration?
> Thanks.
> --
> ~chris
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
~chris



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapernate configuration questions

Posted by Chris Chiappone <ch...@gmail.com>.
Excellent thanks!! I actually had all the files but the hibernate.cfg.xml in
WEB-INF/classes when I started with this.  Looks like I'll finally be able
to allow lazy loading with hibernate.  I'm hoping to see a major performance
increase with tapernate.



On 5/16/06, James Carman <ja...@carmanconsulting.com> wrote:
>
> Try moving your xml files into WEB-INF/classes.
>
>
>
> -----Original Message-----
> From: Chris Chiappone [mailto:chiappone@gmail.com]
> Sent: Tuesday, May 16, 2006 10:48 AM
> To: Tapestry List
> Subject: Tapernate configuration questions
>
> I am attempting to migrate my application to make use of Tapernate.  I
> pulled down the SVN and understand most of the configuration.  The problem
> I
> believe I am having is my application is not mapping my hibernate
> resources.
>
> Here is my Tapernate contribution in hivemind.xml
>
> <contribution configuration-id="spring.hibernate3.Configuration">
>         <configuration-file>hibernate.cfg.xml</configuration-file>
>         <property name="hibernate.dialect" value="
> org.hibernate.dialect.PostgreSQLDialect"/>
>         <property name="hibernate.connection.driver_class" value="
> org.postgresql.Driver"/>
>         <property name="hibernate.connection.url"
> value="jdbc:postgresql://localhost/TrustedAPP"/>
>         <property name="hibernate.connection.username" value="scan"/>
>         <property name="hibernate.connection.password" value="s"/>
>         <property name="hibernate.current_session_context_class"
> value="thread"/>
>         <property name="hibernate.cache.provider_class" value="
> org.hibernate.cache.NoCacheProvider"/>
>         <property name="hibernate.show_sql" value="true"/>
>         <property name="hibernate.hbm2ddl.auto" value="false"/>
> </contribution>
>
> And here is my hibernate.cfg.xml file:
>
> <hibernate-configuration>
>     <session-factory>
>         <mapping resource="Comp_Users.hbm.xml"/>
>         <mapping resource="Users.hbm.xml"/>
>         <mapping resource="Role.hbm.xml"/>
>         <mapping resource="Company.hbm.xml"/>
>         <mapping resource="AppInfo.hbm.xml"/>
>         <mapping resource="AppType.hbm.xml"/>
>         <mapping resource="AppVer.hbm.xml"/>
>         <mapping resource="AssessInfo.hbm.xml"/>
>         <mapping resource="AssessPhase.hbm.xml"/>
>         <mapping resource="DocumentLocker.hbm.xml"/>
>         <mapping resource="Partners.hbm.xml"/>
>     </session-factory>
> </hibernate-configuration>
>
>
> Currenlty I have hibernate.cfg.xml and all the .hbm.xml files located in
> /WEB-INF/ of my application.  When deploying the app hibernate appears to
> be
> configured:
>
> 14:33:24,840 INFO  [Environment] Hibernate 3.1.2
> 14:33:24,859 INFO  [Environment] hibernate.properties not found
> 14:33:24,889 INFO  [Environment] using bytecode reflection optimizer
> 14:33:24,890 INFO  [Environment] Bytecode provider name : cglib
> 14:33:24,894 INFO  [Environment] using JDK 1.4 java.sql.Timestamp handling
> 14:33:25,156 INFO  [Configuration] configuring from resource:
> hibernate.cfg.xml
> 14:33:25,189 INFO  [Configuration] Configuration resource:
> hibernate.cfg.xml
> 14:33:25,549 INFO  [Configuration] Configured SessionFactory: null
> 14:33:25,852 INFO  [C3P0ConnectionProvider] C3P0 using driver:
> org.postgresql.Driver at URL: jdbc:postgresql://localhost/tpp
> 14:33:25,861 INFO  [C3P0ConnectionProvider] Connection properties:
> {user=tpp, password=****}
> 14:33:25,862 INFO  [C3P0ConnectionProvider] autocommit mode: false
>
>
> When I attempt to log into my application I get the following which I
> assume
> is because hibernate hasn't read any of my mapping files:
>
> Unable to process client request: Failure invoking listener method 'public
> void com.tapp.view.components.NavLogin.formSubmit(
> org.apache.tapestry.IRequestCycle)' on
> $NavLogin_2@be0b48[Home/border.navLogin]: Users is not mapped [select u
> from
> Users as u where u.email = :email and u.password = :pass]
> org.apache.hivemind.ApplicationRuntimeException: Failure invoking listener
> method 'public void com.tapp.view.components.NavLogin.formSubmit(
> org.apache.tapestry.IRequestCycle)' on
> $NavLogin_2@be0b48[Home/border.navLogin]: Users is not mapped [select u
> from
> Users as u where u.email = :email and u.password = :pass]
> [context:/WEB-INF/Border.jwc, line 32, column 46]
>
>
> Could anyone lead me in the right direction with this configuration?
> Thanks.
> --
> ~chris
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
~chris

RE: Tapernate configuration questions

Posted by James Carman <ja...@carmanconsulting.com>.
Try moving your xml files into WEB-INF/classes.



-----Original Message-----
From: Chris Chiappone [mailto:chiappone@gmail.com] 
Sent: Tuesday, May 16, 2006 10:48 AM
To: Tapestry List
Subject: Tapernate configuration questions

I am attempting to migrate my application to make use of Tapernate.  I
pulled down the SVN and understand most of the configuration.  The problem I
believe I am having is my application is not mapping my hibernate resources.

Here is my Tapernate contribution in hivemind.xml

 <contribution configuration-id="spring.hibernate3.Configuration">
        <configuration-file>hibernate.cfg.xml</configuration-file>
        <property name="hibernate.dialect" value="
org.hibernate.dialect.PostgreSQLDialect"/>
        <property name="hibernate.connection.driver_class" value="
org.postgresql.Driver"/>
        <property name="hibernate.connection.url"
value="jdbc:postgresql://localhost/TrustedAPP"/>
        <property name="hibernate.connection.username" value="scan"/>
        <property name="hibernate.connection.password" value="s"/>
        <property name="hibernate.current_session_context_class"
value="thread"/>
        <property name="hibernate.cache.provider_class" value="
org.hibernate.cache.NoCacheProvider"/>
        <property name="hibernate.show_sql" value="true"/>
        <property name="hibernate.hbm2ddl.auto" value="false"/>
</contribution>

And here is my hibernate.cfg.xml file:

<hibernate-configuration>
    <session-factory>
        <mapping resource="Comp_Users.hbm.xml"/>
        <mapping resource="Users.hbm.xml"/>
        <mapping resource="Role.hbm.xml"/>
        <mapping resource="Company.hbm.xml"/>
        <mapping resource="AppInfo.hbm.xml"/>
        <mapping resource="AppType.hbm.xml"/>
        <mapping resource="AppVer.hbm.xml"/>
        <mapping resource="AssessInfo.hbm.xml"/>
        <mapping resource="AssessPhase.hbm.xml"/>
        <mapping resource="DocumentLocker.hbm.xml"/>
        <mapping resource="Partners.hbm.xml"/>
    </session-factory>
</hibernate-configuration>


Currenlty I have hibernate.cfg.xml and all the .hbm.xml files located in
/WEB-INF/ of my application.  When deploying the app hibernate appears to be
configured:

14:33:24,840 INFO  [Environment] Hibernate 3.1.2
14:33:24,859 INFO  [Environment] hibernate.properties not found
14:33:24,889 INFO  [Environment] using bytecode reflection optimizer
14:33:24,890 INFO  [Environment] Bytecode provider name : cglib
14:33:24,894 INFO  [Environment] using JDK 1.4 java.sql.Timestamp handling
14:33:25,156 INFO  [Configuration] configuring from resource:
hibernate.cfg.xml
14:33:25,189 INFO  [Configuration] Configuration resource: hibernate.cfg.xml
14:33:25,549 INFO  [Configuration] Configured SessionFactory: null
14:33:25,852 INFO  [C3P0ConnectionProvider] C3P0 using driver:
org.postgresql.Driver at URL: jdbc:postgresql://localhost/tpp
14:33:25,861 INFO  [C3P0ConnectionProvider] Connection properties:
{user=tpp, password=****}
14:33:25,862 INFO  [C3P0ConnectionProvider] autocommit mode: false


When I attempt to log into my application I get the following which I assume
is because hibernate hasn't read any of my mapping files:

Unable to process client request: Failure invoking listener method 'public
void com.tapp.view.components.NavLogin.formSubmit(
org.apache.tapestry.IRequestCycle)' on
$NavLogin_2@be0b48[Home/border.navLogin]: Users is not mapped [select u from
Users as u where u.email = :email and u.password = :pass]
org.apache.hivemind.ApplicationRuntimeException: Failure invoking listener
method 'public void com.tapp.view.components.NavLogin.formSubmit(
org.apache.tapestry.IRequestCycle)' on
$NavLogin_2@be0b48[Home/border.navLogin]: Users is not mapped [select u from
Users as u where u.email = :email and u.password = :pass]
[context:/WEB-INF/Border.jwc, line 32, column 46]


Could anyone lead me in the right direction with this configuration?
Thanks.
-- 
~chris



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org