E ai pessoal estamos ai mais uma vez, hoje dinivo....
Pessoal. Eu fiz a instalação do Hibernate, coloquei as JAR no CLASSPATH.. e mesmo assim da O erro abaixo
Ooo i agora quem podera me ajudar, a acabar com essa do hibernate agora..
GeraTabelaspackage br.com.paiter.hibernate;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.classic.Session;
public class GeraTabelas
{
public static void main(String[] args)
{
// Cria uma configuração para a classe Produto
AnnotationConfiguration cfg = new AnnotationConfiguration();
cfg.addAnnotatedClass(Produto.class);
SchemaExport se = new SchemaExport(cfg);
se.create(true, true);
}
}
2 [main] INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.4.0.GA
23 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.0.SP1
28 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
33 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
39 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
127 [main] INFO org.hibernate.annotations.common.Version - Hibernate Commons Annotations 3.1.0.GA
Exception in thread "main" org.hibernate.HibernateException: The dialect was not set. Set the property hibernate.dialect.
at org.hibernate.dialect.Dialect.instantiateDialect(Dialect.java:256)
at org.hibernate.dialect.Dialect.getDialect(Dialect.java:234)
at org.hibernate.dialect.Dialect.getDialect(Dialect.java:249)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:121)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:91)
at br.com.paiter.hibernate.GeraTabelas.main(GeraTabelas.java:15)
Valeu pessoALL
Obrigado
att
Romildo Paiter