Pessoal não sei o que posso ta fazendo errado… mas meu SchemaExport não ta criando a tabela no banco… e nem da errro.
meu hb configuration
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.password">XXXX</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost/magnatas</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.format_sql">true</property>
<!-- mapeamento das model -->
<mapping class="br.com.corbellini.magnatas.model.Usuario"/>
</session-factory>
</hibernate-configuration>
minha model
@Entity
public class Usuario {
@Id
@GeneratedValue
@Column(name = "Id")
private Long id;
private String login;
private String senha;
//..getter and setters ...
e por fim meu gerador do banco…
public class GeraBanco {
public static void main(String[] args) {
AnnotationConfiguration conf = new AnnotationConfiguration();
conf.configure();
SchemaExport se = new SchemaExport(conf);
se.create(true, true);
}
}
se quiserem conferir o log ta aqui… nadinha de erro =/
- Hibernate Annotations 3.4.0.GA
- Hibernate 3.3.1.GA
- hibernate.properties not found
- Bytecode provider name : javassist
- using JDK 1.4 java.sql.Timestamp handling
- Hibernate Commons Annotations 3.1.0.GA
- configuring from resource: /hibernate.cfg.xml
- Configuration resource: /hibernate.cfg.xml
- Configured SessionFactory: null
- Using dialect: org.hibernate.dialect.MySQLDialect
- Hibernate Validator not found: ignoring
- Running hbm2ddl schema export
- exporting generated schema to database
- Using Hibernate built-in connection pool (not for production use!)
- Hibernate connection pool size: 20
- autocommit mode: false
- using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/magnatas
- connection properties: {user=root, password=****}
- schema export complete
- cleaning up connection pool: jdbc:mysql://localhost/magnatas