2 Replies Latest reply on Dec 12, 2007 2:42 PM by zahidncst

    generate-entities problem

    steve_of_ar

      Hi everybody, I'm a new user evaluating Seam, must say I like what I've seen so far...

      I'm having a problem though with the "seam generate-entities" command, it doesn't appear to do anything for me except generate the single file view/layout/menu.xhtml.

      I'm connecting to an Oracle 10.2 database, apparently it's connecting fine, it just doesn't generate any entities(?) The previous steps (seam setup, seam new-project) ran fine and I was able to deploy the hello app that was generated.

      Here's the command output when trying to generate entities (sorry it's long):

      sharris@schws:~/jboss/seam-1.1.1.GA$ ./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] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.Environment
      [hibernate] INFO: Hibernate 3.2 cr4
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.Environment
      [hibernate] INFO: hibernate.properties not found
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.Environment buildBytecodeProvider
      [hibernate] INFO: Bytecode provider name : cglib
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.Environment
      [hibernate] INFO: using JDK 1.4 java.sql.Timestamp handling
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.connection.DriverManagerConnectionProvider configure
      [hibernate] INFO: Using Hibernate built-in connection pool (not for production use!)
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.connection.DriverManagerConnectionProvider configure
      [hibernate] INFO: Hibernate connection pool size: 20
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.connection.DriverManagerConnectionProvider configure
      [hibernate] INFO: autocommit mode: false
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.connection.DriverManagerConnectionProvider configure
      [hibernate] INFO: using driver: oracle.jdbc.OracleDriver at URL: jdbc:oracle:thin:@ncsoracle03.nctr.fda.gov:1528:sciprod
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.connection.DriverManagerConnectionProvider configure
      [hibernate] INFO: connection properties: {user=sdtm, password=****}
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: RDBMS: Oracle, version: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
      [hibernate] With the Partitioning, OLAP and Oracle Data Mining options
      [hibernate] JServer Release 9.2.0.4.0 - Production
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: JDBC driver: Oracle JDBC driver, version: 10.2.0.2.0
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.dialect.Dialect
      [hibernate] INFO: Using dialect: org.hibernate.dialect.OracleDialect
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
      [hibernate] INFO: Using default transaction strategy (direct JDBC transactions)
      [hibernate] Feb 6, 2007 3:17:57 PM 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] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: Automatic flush during beforeCompletion(): disabled
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: Automatic session close at end of transaction: disabled
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: JDBC batch size: 15
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: JDBC batch updates for versioned data: disabled
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: Scrollable result sets: enabled
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: JDBC3 getGeneratedKeys(): disabled
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: Connection release mode: auto
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: Default schema: sdtm
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: Default batch fetch size: 1
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: Generate SQL with comments: disabled
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: Order SQL updates by primary key: disabled
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
      [hibernate] INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.hql.ast.ASTQueryTranslatorFactory
      [hibernate] INFO: Using ASTQueryTranslatorFactory
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: Query language substitutions: {}
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: JPA-QL strict compliance: disabled
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: Second-level cache: enabled
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: Query cache: disabled
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory createCacheProvider
      [hibernate] INFO: Cache provider: org.hibernate.cache.NoCacheProvider
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: Optimize cache for minimal puts: disabled
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: Structured second-level cache entries: disabled
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: Statistics: disabled
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: Deleted entity synthetic identifier rollback: disabled
      [hibernate] Feb 6, 2007 3:17:57 PM org.hibernate.cfg.SettingsFactory buildSettings
      [hibernate] INFO: Default entity-mode: pojo
      [hibernate] Feb 6, 2007 3:17:58 PM org.hibernate.connection.DriverManagerConnectionProvider close
      [hibernate] INFO: cleaning up connection pool: jdbc:oracle:thin:@ncsoracle03.nctr.fda.gov:1528:sciprod
      [hibernate] Feb 6, 2007 3:17:58 PM org.hibernate.tool.Version
      [hibernate] INFO: Hibernate Tools 3.2.0.snapshotb9
      [hibernate] 2. task: generic exportertemplate: view/list.xhtml.ftl
      Feb 6, 2007 3:17:58 PM org.hibernate.connection.DriverManagerConnectionProvider close
      INFO: cleaning up connection pool: jdbc:oracle:thin:@ncsoracle03.nctr.fda.gov:1528:sciprod
      [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 0 files completed. Skipped 0 file(s).
      [echo] Type 'seam restart' and go to http://localhost:8080/AT

      BUILD SUCCESSFUL
      Total time: 2 seconds

      Anyone have any ideas?

        • 1. Re: generate-entities problem
          steve_of_ar

          Solved the problem - it wanted the schema name to be uppercase. I remember seeing that before, Oracle's driver won't return metadata for a schema if the schema name isn't uppercase, strange since it's case insensitive for actual usage...

          • 2. Re: generate-entities problem
            zahidncst

            This problem is still in latest seam gen (dec 12, 2007)..
            Why cant they do "upper case" on it?

            I also had problem in isIdDefined method for "bigdecimal" and
            "date".(had to manually do toString() on it)
            eg
            if (Strings.isEmpty(getTDataId().getSalesAmt()))
            >>> changed to : if (Strings.isEmpty(getTDataId().getSalesAmt().toString()))