Мой процесс обратного инжиниринга Hibernate вообще не извлекает метаданные базы данных.
Если я использую мастер затмения инструментов hibernate, процесс работает нормально, но вне затмения я не могу сделать это с моим файлом сборки 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 и я использую инструменты гибернации 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