【发布时间】:2015-05-25 12:04:51
【问题描述】:
我正在尝试使用 hibernate3-maven-plugin 从 Oracle 模式中获取 Pojos。
我的问题是,虽然我在 hibernate.properties 文件中指定了我想要连接并获取 pojos 的用户,但插件继续获取系统表实体而不是我拥有的虚拟表中的实体已创建。
所以一个问题可能是用户拥有 sys dba 凭据,但事实并非如此,我什至无法从该 oracle 用户创建表...
hibernate.properties
hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
hibernate.connection.url=jdbc:oracle:thin:@localhost:1521/ORACLE
hibernate.connection.username=DROOLS
hibernate.connection.password=drools
hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
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>
<schema-selection match-schema="DROOLS"/>
</hibernate-reverse-engineering>
maven插件配置:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>3.0</version>
<configuration>
<hibernatetool>
<jdbcconfiguration/>
</hibernatetool>
</configuration>
<dependencies>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>oracle.jdbc.driver</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>
</dependencies>
</plugin>
感谢任何帮助。谢谢!
【问题讨论】: