[tooling] "seam generate-entities" does not seem generating
ellenzhao Apr 23, 2007 3:14 AMHi folks,
I have a database which contains 20+ existing tables and wanted to use "seam generate-entities" to get the object models quickly. I used the seam-gen tool step by step as described in the Seam 1.2.1 GA documentation but did not get the java files as expected. Here is the shell output:
ningning@olymp:~/sd/lib/jboss-seam-CVS.20070417$ ./seam generate-entities Buildfile: build.xml validate-workspace: validate-project: generate-entities: [hibernate] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering) [hibernate] 1. task: hbm2java (Generates a set of .java files) [hibernate] 23-Apr-2007 09:07:24 org.hibernate.cfg.Environment <clinit> [hibernate] INFO: Hibernate 3.2.0.cr5 [hibernate] 23-Apr-2007 09:07:24 org.hibernate.cfg.Environment <clinit> [hibernate] INFO: hibernate.properties not found [hibernate] 23-Apr-2007 09:07:24 org.hibernate.cfg.Environment buildBytecodeProvider [hibernate] INFO: Bytecode provider name : cglib [hibernate] 23-Apr-2007 09:07:24 org.hibernate.cfg.Environment <clinit> [hibernate] INFO: using JDK 1.4 java.sql.Timestamp handling [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.reveng.OverrideRepository addFile [hibernate] INFO: Override file: /home/ningning/sd/project/seam/EatSmart-alpha/resources/seam-gen.reveng.xml [hibernate] 23-Apr-2007 09:07:25 org.hibernate.connection.DriverManagerConnectionProvider configure [hibernate] INFO: Using Hibernate built-in connection pool (not for production use!) [hibernate] 23-Apr-2007 09:07:25 org.hibernate.connection.DriverManagerConnectionProvider configure [hibernate] INFO: Hibernate connection pool size: 20 [hibernate] 23-Apr-2007 09:07:25 org.hibernate.connection.DriverManagerConnectionProvider configure [hibernate] INFO: autocommit mode: false [hibernate] 23-Apr-2007 09:07:25 org.hibernate.connection.DriverManagerConnectionProvider configure [hibernate] INFO: using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/iEat [hibernate] 23-Apr-2007 09:07:25 org.hibernate.connection.DriverManagerConnectionProvider configure [hibernate] INFO: connection properties: {user=ningning, password=****} [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: RDBMS: MySQL, version: 5.0.38-Debian_1-log [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.0.5 ( $Date: 2007-03-01 00:01:06 +0100 (Thu, 01 Mar 2007) $, $Revision: 6329 $ ) [hibernate] 23-Apr-2007 09:07:25 org.hibernate.dialect.Dialect <init> [hibernate] INFO: Using dialect: org.hibernate.dialect.MySQLDialect [hibernate] 23-Apr-2007 09:07:25 org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory [hibernate] INFO: Using default transaction strategy (direct JDBC transactions) [hibernate] 23-Apr-2007 09:07:25 org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup [hibernate] INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Automatic flush during beforeCompletion(): disabled [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Automatic session close at end of transaction: disabled [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: JDBC batch size: 15 [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: JDBC batch updates for versioned data: disabled [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Scrollable result sets: enabled [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: JDBC3 getGeneratedKeys(): enabled [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Connection release mode: auto [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Default catalog: # [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Maximum outer join fetch depth: 2 [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Default batch fetch size: 1 [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Generate SQL with comments: disabled [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Order SQL updates by primary key: disabled [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory [hibernate] INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory [hibernate] 23-Apr-2007 09:07:25 org.hibernate.hql.ast.ASTQueryTranslatorFactory <init> [hibernate] INFO: Using ASTQueryTranslatorFactory [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Query language substitutions: {} [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: JPA-QL strict compliance: disabled [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Second-level cache: enabled [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Query cache: disabled [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory createCacheProvider [hibernate] INFO: Cache provider: org.hibernate.cache.NoCacheProvider [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Optimize cache for minimal puts: disabled [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Structured second-level cache entries: disabled [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Statistics: disabled [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Deleted entity synthetic identifier rollback: disabled [hibernate] 23-Apr-2007 09:07:25 org.hibernate.cfg.SettingsFactory buildSettings [hibernate] INFO: Default entity-mode: pojo [hibernate] 23-Apr-2007 09:07:25 org.hibernate.connection.DriverManagerConnectionProvider close [hibernate] INFO: cleaning up connection pool: jdbc:mysql://localhost/iEat [hibernate] 23-Apr-2007 09:07:25 org.hibernate.tool.Version <clinit> [hibernate] INFO: Hibernate Tools 3.2.0.b9 [hibernate] 2. task: generic exportertemplate: view/list.xhtml.ftl [hibernate] 3. task: generic exportertemplate: view/view.xhtml.ftl [hibernate] 4. task: generic exportertemplate: view/view.page.xml.ftl [hibernate] 5. task: generic exportertemplate: view/edit.xhtml.ftl [hibernate] 6. task: generic exportertemplate: view/edit.page.xml.ftl [hibernate] 7. task: generic exportertemplate: src/EntityList.java.ftl [hibernate] 8. task: generic exportertemplate: view/list.page.xml.ftl [hibernate] 9. task: generic exportertemplate: src/EntityHome.java.ftl [hibernate] 10. task: generic exportertemplate: view/layout/menu.xhtml.ftl [javaformatter] Java formatting of 1 files completed. Skipped 0 file(s). [echo] Type 'seam restart' and go to http://localhost:8080/iEat BUILD SUCCESSFUL Total time: 2 seconds ningning@olymp:~/sd/lib/jboss-seam-CVS.20070417$
It reports that "hibernate.properties not found". There is already an automatically generated persistence.xml which looks pretty good to me, do I have to create a hibernate.properties or hibernate.cfg.xml manually to make the "seam generate-entities" happy? Or, if this is not the problem, where did I do wrong? Thanks for any enlightenment.