I have check this, I have only one file hibernate.cfg.xml.
I still do not know where is the problem.
Below is part from my log :
[lut 10 08:16:48] INFO - Reading mappings from resource: Store.hbm.xml
[lut 10 08:16:48] DEBUG - trying to locate
http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath under org/hibernate/
[lut 10 08:16:48] DEBUG - found
http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath
[lut 10 08:16:48] INFO - Mapping class: Store -> store
[lut 10 08:16:48] DEBUG - Mapped property: id -> id
[lut 10 08:16:48] DEBUG - Mapped property: name -> name
[lut 10 08:16:48] DEBUG - Mapped property: memo -> memo
[lut 10 08:16:48] DEBUG - Preparing to build session factory with filters : {}
[lut 10 08:16:48] DEBUG - processing extends queue
[lut 10 08:16:48] DEBUG - processing collection mappings
[lut 10 08:16:48] DEBUG - processing native query and ResultSetMapping mappings
[lut 10 08:16:48] DEBUG - processing association property references
[lut 10 08:16:48] DEBUG - processing foreign key constraints
[lut 10 08:16:48] WARN - No connection properties specified - the user must supply JDBC connections
[lut 10 08:16:48] ERROR - Error calling action method of component with id submit
.....
.....
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.el.EvaluationException: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
... 27 more
Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:378)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:110)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
----
And I forget to show the all lines from java file :
Configuration cfg = new Configuration();
cfg.addResource("Store.hbm.xml");
cfg.setProperties(System.getProperties());
SessionFactory sessions = cfg.buildSessionFactory();
Session session = sessions.openSession();
Transaction tx = session.beginTransaction();
Store st = (Store) session.load(Store.class, new Long(1));
st.setMemo("Memoooo");
st.setName("namienamie");
tx.commit();
session.close();
thanks