Hibernate逆向工程过程不提取数据库元数据

时间:2011-06-28 10:19:57

标签: java hibernate reverse-engineering

我的Hibernate逆向工程流程根本不提取数据库元数据。 如果我使用hibernate工具eclipse向导,该过程工作正常,但在eclipse之外,我无法使用我的ant构建文件

 <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" />
<target name="generate">
    <hibernatetool destdir="src">
        <jdbcconfiguration propertyfile="hibernate.properties" revengfile="hibernate.reveng.xml" />
        <hbm2hbmxml />
        <hbm2cfgxml ejb3="true" />
        <hbmlint destdir="src" />
        <hbm2hbmxml destdir="src" />
    </hibernatetool>
    <hibernatetool destdir="src">
        <configuration configurationfile="src/hibernate.cfg.xml" />
        <hbm2java destdir="src" />
        <hbm2dao destdir="src" />
    </hibernatetool>

如果我正在尝试获取架构的远程数据库有连接,那么这不会失败。 该数据库是IBM DB2 Express-C,并且使用的是hibernate工具3.2。

我需要将其作为一个独立的进程运行,因为我希望将来通过不同的数据库生成基于JPA的数据层。目前,我的蚂蚁(详细)日志是:

 generate:
[hibernatetool] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
[hibernatetool] 1. task: hbm2hbmxml (Generates a set of hbm.xml files)
[hibernatetool] Jun 28, 2011 4:07:56 PM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: Hibernate 3.2.5
[hibernatetool] Jun 28, 2011 4:07:56 PM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: hibernate.properties not found
[hibernatetool] Jun 28, 2011 4:07:56 PM org.hibernate.cfg.Environment buildBytecodeProvider
[hibernatetool] INFO: Bytecode provider name : cglib
[hibernatetool] Jun 28, 2011 4:07:56 PM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: using JDK 1.4 java.sql.Timestamp handling
[hibernatetool] Jun 28, 2011 4:07:56 PM org.hibernate.cfg.reveng.OverrideRepository addFile
[hibernatetool] INFO: Override file: D:\workspace\Hibern8DAOCreation\hibernate.reveng.xml
[hibernatetool] Jun 28, 2011 4:07:56 PM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernatetool] INFO: Using Hibernate built-in connection pool (not for production use!)
[hibernatetool] Jun 28, 2011 4:07:56 PM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernatetool] INFO: Hibernate connection pool size: 20
[hibernatetool] Jun 28, 2011 4:07:56 PM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernatetool] INFO: autocommit mode: true
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernatetool] INFO: using driver: com.ibm.db2.jcc.DB2Driver at URL: jdbc:db2://kishorecomputer:50000/PBLXA
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.connection.DriverManagerConnectionProvider configure
[hibernatetool] INFO: connection properties: {user=Kishore, password=****, autocommit=true}
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: RDBMS: DB2/NT, version: SQL09070
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: JDBC driver: IBM DB2 JDBC Universal Driver Architecture, version: 3.57.82
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.dialect.Dialect <init>
[hibernatetool] INFO: Using dialect: org.hibernate.dialect.DB2Dialect
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
[hibernatetool] INFO: Transaction strategy: org.hibernate.transaction.JTATransactionFactory
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.util.NamingHelper getInitialContext
[hibernatetool] INFO: JNDI InitialContext properties:{}
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
[hibernatetool] INFO: instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
[hibernatetool] INFO: instantiated TransactionManagerLookup
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
[hibernatetool] INFO: instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
[hibernatetool] INFO: instantiated TransactionManagerLookup
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Automatic flush during beforeCompletion(): enabled
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Automatic session close at end of transaction: disabled
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Scrollable result sets: enabled
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: JDBC3 getGeneratedKeys(): enabled
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Connection release mode: auto
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Default schema: MenuFileFisicoRuafrep
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Default batch fetch size: 1
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Generate SQL with comments: disabled
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Order SQL updates by primary key: disabled
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Order SQL inserts for batching: disabled
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
[hibernatetool] INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
[hibernatetool] INFO: Using ASTQueryTranslatorFactory
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Query language substitutions: {}
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: JPA-QL strict compliance: disabled
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Second-level cache: enabled
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Query cache: disabled
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory createCacheProvider
[hibernatetool] INFO: Cache provider: org.hibernate.cache.NoCacheProvider
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Optimize cache for minimal puts: disabled
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Structured second-level cache entries: disabled
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Echoing all SQL to stdout
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Statistics: disabled
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Deleted entity synthetic identifier rollback: disabled
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Default entity-mode: pojo
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.cfg.SettingsFactory buildSettings
[hibernatetool] INFO: Named query checking : enabled
[hibernatetool] Jun 28, 2011 4:07:57 PM org.hibernate.connection.DriverManagerConnectionProvider close
[hibernatetool] INFO: cleaning up connection pool: jdbc:db2://kishorecomputer:50000/PBLXA

0 个答案:

没有答案