Hibernate 休眠不创建表和取消部署我的应用

Hibernate 休眠不创建表和取消部署我的应用,hibernate,maven,jpa,jboss,persistence.xml,Hibernate,Maven,Jpa,Jboss,Persistence.xml,我使用Hibernate在maven JBoss项目中自动创建mysql表。 部署时,我会收到以下信息消息: 13:48:24,415 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-7) HHH000206: hibernate.properties not found 这个错误是: 13:50:44,880 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) com.mys

我使用Hibernate在maven JBoss项目中自动创建mysql表。 部署时,我会收到以下信息消息:

13:48:24,415 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-7) HHH000206: hibernate.properties not found
这个错误是:

13:50:44,880 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'mydb.my_table' doesn't exist
我在persistence.xml中包含了以下属性:

 <?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
xmlns="http://java.sun.com/xml/ns/persistence"  
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
    http://java.sun.com/xml/ns/persistence
    http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
 <persistence-unit name="primary">
  <!-- If you are running in a production environment, add a managed 
     data source, the example data source is just for development and testing! -->
        <jta-data-source>java:jboss/datasources/mydb</jta-data-source>
  <properties>
     <!-- Properties for Hibernate -->
 <property name="hibernate.hbm2ddl.auto" value="create" />   
 <property name="hibernate.show_sql" value="true" />
  </properties>
</persistence-unit>
</persistence>

java:jboss/datasources/mydb
以及pom.xml中相应的依赖项:

hibernate验证器、hibernate jpamodelgen、hibernate验证器注释处理器、hibernate entitymanager和mysql连接器java


但这些表从未被创建过。我能做什么?

提供完整的持久性。xml我已经编辑了这个问题,包括italso提供、jboss和其他库版本。jboss 7.1.0、mysql连接器java 5.1.20、hibernate-jpa-2.0-api