Hibernate产生映射时出错
来源:百度知道 编辑:UC知道 时间:2024/05/14 08:02:18
An internal error occurred during:"Generating Artifacts" 报这个错误
hibernate.cfg.xml的内容
<hibernate-configuration>
<session-factory>
<property name="connection.username">scott</property>
<property name="connection.url">
jdbc:oracle:thin:@localhost:1521:aptech
</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="myeclipse.connection.profile">shadow</property>
<property name="connection.password">tiger</property>
<property name="connection.driver_class">
oracle.jdbc.driver.OracleDriver
</property>
<property name="show_sql">true</property>
</session-factory>
</hibernate-configuration>
hibernate.reveng.xml的内容:
<hibernate-reverse-engin
hibernate.cfg.xml的内容
<hibernate-configuration>
<session-factory>
<property name="connection.username">scott</property>
<property name="connection.url">
jdbc:oracle:thin:@localhost:1521:aptech
</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="myeclipse.connection.profile">shadow</property>
<property name="connection.password">tiger</property>
<property name="connection.driver_class">
oracle.jdbc.driver.OracleDriver
</property>
<property name="show_sql">true</property>
</session-factory>
</hibernate-configuration>
hibernate.reveng.xml的内容:
<hibernate-reverse-engin
???????
你在hibernate.cfg.xml中配置的你hibernate.reveng.xml这个文件的地址呢 去哪里了~!!
在</session-factory>的前面加上
<mapping resource="包名/hibernate.reveng.xml"/> 这个~~!
少量这句吧??
<mapping resource="hibernate.reveng.xml"/>
恩有道理
使用工具得了,省时省力