[英]no entity generate with reverse engineering on hibernate
我在Hibernate上進行逆向工程時遇到了問題。
我的pom和這兩個中都有這個依賴項
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.2.11.Final</version>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>2.1.2</version>
</dependency>
</dependencies>
我有這個作為hibernate.cfg.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">org.mariadb.jdbc.Driver</property>
<property name="hibernate.connection.password">toto</property>
<property name="hibernate.connection.url">jdbc:mariadb://127.0.0.1:3306/</property>
<property name="hibernate.connection.username">titi</property>
<property name="hibernate.dialect">org.hibernate.dialect.MariaDB53Dialect</property>
</session-factory>
</hibernate-configuration>
我的Hibernate reveng.xml看起來像
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
<hibernate-reverse-engineering>
<table-filter match-catalog="boutique" match-name="caracterise"/>
<table-filter match-catalog="boutique" match-name="caracteristiques"/>
<table-filter match-catalog="boutique" match-name="categories"/>
<table-filter match-catalog="boutique" match-name="clients"/>
<table-filter match-catalog="boutique" match-name="commentaires"/>
<table-filter match-catalog="boutique" match-name="commente"/>
<table-filter match-catalog="boutique" match-name="contient"/>
<table-filter match-catalog="boutique" match-name="fournis"/>
<table-filter match-catalog="boutique" match-name="fournisseurs"/>
<table-filter match-catalog="boutique" match-name="marques"/>
<table-filter match-catalog="boutique" match-name="nomcaracteristique"/>
<table-filter match-catalog="boutique" match-name="paniers"/>
<table-filter match-catalog="boutique" match-name="produits"/>
</hibernate-reverse-engineering>
當我運行“休眠代碼生成配置”時,計算機工作了一段時間,但是我沒有任何代碼生成,也沒有錯誤消息
我的所有文件都是使用jboss工具4.5.0在eclipse oxygen上最終生成的,而jdk1.8.0_144在debian 9上是32bit的
在錯誤日志框中,我現在收到此消息
org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.