Prezados Amigos do GUJ,
Decifrem esta para este aprendiz em Hibernate!
Um programa simples para fazer a exportação de um schema.
package hello;
import java.util.<em>;
import org.hibernate.</em>;
import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
import persistence.HibernateUtil;
import org.hibernate.dialect.HSQLDialect;
public class HelloWorld {
public static void main(String[] args) {
Configuration setup = new Configuration().configure();
SchemaExport export = new SchemaExport(setup);
export.create(true, false);
}
}
e o erro:
Exception in thread "main" org.hibernate.HibernateException: Dialect class not found: org.dialect.HSQLDialect
at org.hibernate.dialect.Dialect.instantiateDialect(Dialect.java:238)
at org.hibernate.dialect.Dialect.getDialect(Dialect.java:227)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:86)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:61)
at hello.HelloWorld.main(HelloWorld.java:14)
Java Result: 1
P.S.: O .Jar com a classe foi adicionado ao projeto (NetBeans)!
Conto com vocês!!!
Feliz Ano Novo!
San