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 <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED] 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 <[EMAIL PROTECTED]> wrote: > > Try moving your xml files into WEB-INF/classes. > > > > -----Original Message----- > From: Chris Chiappone [mailto:[EMAIL PROTECTED] > 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 > [EMAIL PROTECTED]/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 > [EMAIL PROTECTED]/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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- ~chris --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- ~chris