Hau*_*uke 9 java mysql jboss hibernate jpa
我在JBoss上部署了一个带有一些实体类的EJB项目.
一旦我部署EJB Jboss就会给我这个例外:
create table service_db (id integer not null auto_increment, ipAddress varchar(255),
primary key (id)) type=InnoDB
Unsuccessful: create table service_db (id integer not null auto_increment,
ipAddress varchar(255), primary key (id)) type=InnoDB
2011-08-17 11:38:59,997 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=InnoDB' at line 1....
Run Code Online (Sandbox Code Playgroud)
不应该是引擎= InnoDB而不是类型?我试图在没有运气的情况下在mysql中执行此语句(同样的错误).如果我用引擎移除或更换类型,它正在工作.
我的问题是,我可以改变谁?
这是我的persistance.xml(如果它很重要)
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.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_1_0.xsd">
<persistence-unit name="default">
<jta-data-source>java:/DUMMY_DS</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create" />
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect" />
</properties>
</persistence-unit>
Run Code Online (Sandbox Code Playgroud)
如果datasource xml文件很重要:
<datasources>
<local-tx-datasource>
<jndi-name>DUMMY_DS</jndi-name>
<connection-url>jdbc:mysql://localhost/cargosoft</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>hauke</user-name>
<password>******</password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>10</idle-timeout-minutes>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
</local-tx-datasource>
</datasources>
Run Code Online (Sandbox Code Playgroud)
谢谢你的帮助.
Hauke
| 归档时间: |
|
| 查看次数: |
10499 次 |
| 最近记录: |