hi,

yes i got this configuration in my web.xml and everything except hibernate
works for me
so far.

i also added the code

public static CatalogDao buildCtalaogDao(
          @InjectService("Session")
         Session session) {
     return new CatalogDaoImpl(session);
  }

to my AppModule.java with no results. the debug output remains exactly the
same.

the only thing that makes a difference is when i place a
package-info.javafile in the
entities folder. but i dont know what this is and what its good for. at
least it changes
its output to:

[DEBUG] HibernateSessionSource Constructed configuration: [
org.czarlylab.javashop.entities]
even if package-info.java file is totally empty.
but it doesnt find the entities. its the same with T5.0.5 and T5.0.4


2007/7/11, Davor Hrg <[EMAIL PROTECTED]>:

tapestry hibernate will pick it up if you follow the structure .....
myapp.entities
myapp.pages
myapp.components ......

take a look at the error
[WARN] AnnotationBinder Package not found or wo package-info.java :
org.czarlylab.javashop.entities

are you sure you have correct value in web.xml:
<param-name>tapestry.app-package</param-name>
              <param-value>org.czarlylab.javashop</param-value>


Davor Hrg

 On 7/11/07, Sebastian Heyden <[EMAIL PROTECTED]> wrote:

> additionaly i want to give you my hibernate.cfg.xml and the following
> exception
>
>
>
> <hibernate-configuration>
>
> <session-factory>
>
> <property name="configurationClass">
> org.hibernate.cfg.AnnotationConfiguration</property>
>
> <property name="connection.driver_class">
> org.apache.derby.jdbc.EmbeddedDriver</property>
>
> <property name="hibernate.connection.url">jdbc:derby:JAVASHOP;create=true
> </property>
>
> <property name="hibernate.connection.username">APP</property>
>
> <property name="hibernate.connection.password"></property>
>
> <property name="hibernate.connection.pool_size">10</property>
>
> <property name="show_sql">true</property>
>
> <property name="dialect">org.hibernate.dialect.DerbyDialect </property>
>
> <property name="hibernate.hbm2ddl.auto">create</property>
>
> <!-- Cache Configurations -->
>
> <!-- Using net.sf.ehcache.hibernate.SingletonEhCacheProvider instead of
>
> net.sf.ehcache.hibernate.EhCacheProvider ensures the same instance
>
> of CacheManager is referred to by both Hibernate and our JMX Agent
>
> simpleJpaHibernateApp.agents.jmxAgent. (Thanks to Greg Luck!) -->
>
> <property name="hibernate.cache.use_minimal_puts">false</property>
>
> <property name="hibernate.cache.use_query_cache">true</property>
>
> <property name=" hibernate.cache.use_second_level_cache">true</property>
>
> <property name="hibernate.cache.use_structured_entries">true</property>
>
> <property name="hibernate.cache.provider_class ">
> org.hibernate.cache.EhCacheProvider</property>
>
> <property name="hibernate.generate_statistics">false</property>
>
> <property name="hibernate.cache.use_structured_entries">false</property>
>
> </session-factory>
>
> </hibernate-configuration>
>
>
> -------------------------------------------------------------------
>
>
> [INFO] HibernateSessionSource Hibernate startup: 646 ms to configure,
> 4.904ms overall.
>
> [INFO] HibernateSessionSource Configured Hibernate entities:
>
> [ERROR] BrowseCatalog Render queue error in SetupRender[BrowseCatalog:
> categorylist.loop]: Failure reading parameter source of component
> BrowseCatalog:categorylist.loop: Unknown entity:
> org.czarlylab.javashop.entities.Category
>
>
>
>
> 2007/7/11, Sebastian Heyden <[EMAIL PROTECTED] >:
>
> > that helped me a lot further!
> >
> > but now i have the problem that the entities are not found. aren't
> they
> > automaticly picked up by
> > tapestry-hibernate?
> >
> > this is my debug output:
> >
> >
> >
> > [INFO] Started Jetty Server
> >
> > [DEBUG] HibernateSessionManager Creating service
> > 'HibernateSessionManager'.
> >
> > [DEBUG] Session Invoking method
> > org.apache.tapestry.hibernate.HibernateModule.build
> (HibernateSessionManager,
> > PropertyShadowBuilder) (at HibernateModule.java:84).
> >
> > [DEBUG] HibernateSessionSource Creating service
> 'HibernateSessionSource'.
> >
> > [DEBUG] HibernateSessionManager Invoking method
> > org.apache.tapestry.hibernate.HibernateModule.build
> (HibernateSessionSource,
> > ThreadCleanupHub) (at HibernateModule.java:62).
> >
> > [DEBUG] HibernateSessionSource Invoking method
> >
> org.apache.tapestry.hibernate.HibernateModule.contributeHibernateSessionSource
> (Configuration,
> > String) (at HibernateModule.java:51).
> >
> > [DEBUG] HibernateSessionSource Constructed configuration: [
> > org.czarlylab.javashop.entities]
> >
> > [DEBUG] HibernateSessionSource Invoking constructor
> > org.apache.tapestry.internal.hibernate.HibernateSessionSourceImpl(Log,
> > Collection, ClassNameLocator) (at HibernateSessionSourceImpl.java:35).
> >
> > [WARN] AnnotationBinder Package not found or wo package-info.java:
> > org.czarlylab.javashop.entities
> >
> > [WARN] ConfigurationFactory No configuration found. Configuring
> ehcache
> > from ehcache-failsafe.xml found in the classpath:
> >
> jar:file:/C:/Users/basti/.m2/repository/net/sf/ehcache/ehcache/1.2.3/ehcache-
> > 1.2.3.jar!/ehcache-failsafe.xml
> >
> > [WARN] JDBCExceptionReporter SQL Warning: 10000, SQLState: 01J01
> >
> > [WARN] JDBCExceptionReporter Database 'JAVASHOP' not created,
> connection
> > made to existing database instead.
> >
> > [WARN] EhCacheProvider Could not find configuration [
> > org.hibernate.cache.UpdateTimestampsCache ]; using defaults.
> >
> > [WARN] EhCacheProvider Could not find configuration [
> > org.hibernate.cache.StandardQueryCache]; using defaults.
> >
> > [INFO] HibernateSessionSource Hibernate startup: 639 ms to configure,
> > 5.196 ms overall.
> >
> > [INFO] HibernateSessionSource Configured Hibernate entities:
> >
>
> > 2007/7/11, 小司 <[EMAIL PROTECTED]>:
> > >
> > > You can see this
> > >
> > > http://linuxboy.javaeye.com/blog/68311
> > > I learn from there . it works well.
> > >
> > > 2007/7/11, Sebastian Heyden < [EMAIL PROTECTED]>:
> > > > hello folks,
> > > >
> > > >
> > > > since some days i write my first application with tapestry and now
> i
> > > want
> > > > to get tapestry-hibernate working. i really tried hard to find
> help in
> > > the
> > > > mailing-list
> > > > archiv and by googling. thats what i got so far:
> > > >
> > > > - a package called entities
> > > > - Annotations on my Entity
> > > > - hibernate, jta and hibernate-annotations in my classpath
> > > > - hibernate.cfg.xml with connection details without mapping-files
> > > >
> > > > i simply tried
> > > >
> > > > @Inject Session session
> > > >
> > > > in a Hivemind Service but the session was null when i wanted to
> use
> > > it.
> > > > do i have to register hibernate somehow in AppModule?
> > > >
> > > >
> > > > thanks in advance,
> > > > sebas
> > > >
> > >
> > >
> > > --
> > > 得与失都是生活
> > >
> >
> >
>


Reply via email to