Re: Re : Unknown entity and SessionFactory null

2013-05-16 Thread Boris Horvat
I would be more interested in seeing why doesn't this work out of the box.
I also dont provide entities in config.xml instead I let tapestry grab them
from my package...


On Thu, May 16, 2013 at 8:42 PM, Ken in Nashua  wrote:

> Hi Angela,
>
> Looks liek you didnt specify any entities in your hibernate cfg mapping
> file.
>
> If you model an entity under your model/entity package, yes you need to
> tell your AppModule.JAVA about that directory...
>
> But you also need to tell hibernate about those entities.
>
> We do this by specifying them in our hibernate.cfg.xml
>
> Here is mine..
>
>
>
> 
>  Configuration DTD 3.0//EN"
> "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd
> ">
> 
> 
> 
>  name="hibernate.connection.driver_class">com.mysql.jdbc.Driver
>  name="hibernate.connection.url">jdbc:mysql://localhost:3306/thibernatetest?autoReconnect=true
>  name="hibernate.dialect">org.hibernate.dialect.MySQLDialect
> root
> admin
> update
> false
> true
> 90
> true
>
> 5
> 20
> 300
> 50
> 3000
>  name="hibernate.connection.provider_class">org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider
>  name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider
>
>
> 
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
>
>




-- 
Sincerely
*Boris Horvat*


RE: Re : Unknown entity and SessionFactory null

2013-05-16 Thread Ken in Nashua
Hi Angela,

Looks liek you didnt specify any entities in your hibernate cfg mapping file.

If you model an entity under your model/entity package, yes you need to tell 
your AppModule.JAVA about that directory...

But you also need to tell hibernate about those entities.

We do this by specifying them in our hibernate.cfg.xml

Here is mine..




http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd";>



com.mysql.jdbc.Driver
jdbc:mysql://localhost:3306/thibernatetest?autoReconnect=true
org.hibernate.dialect.MySQLDialect
root
admin
update
false
true
90
true

5
20
300
50
3000
org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider
org.hibernate.connection.C3P0ConnectionProvider