1 2 Previous Next 19 Replies Latest reply on Aug 27, 2009 5:24 PM by asookazian

    Reverse engineering  with seam-gen.reveng.xml don’t work

    aabm.aabm.4intro.jazztel.es
      Hello I’m working with Seam 2.1.1 GA and Jboss 4.2.3. I’m just reproducing the Seam in action book example  and  I can  reverse the Database from MySQL (seam generate) without problems, I get the entities and the ui and it works fine, but when I edit the file seam-gen.reveng.xml to add some customizations for example:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE hibernate-reverse-engineering SYSTEM "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
      <hibernate-reverse-engineering>
         <table name="HOLE">
          <column name="M_PAR" property="mensPar" />
          <column name="L_PAR" property="ladiesPar" />
          <column name="M_HANDICAP" property="mensHandicap" />
          <column name="L_HANDICAP" property="ladiesHandicap" />
        </table>

      </hibernate-reverse-engineering>

      It does the same like if the file seam-gen.reveng.xml   wasn’t edited. It doesn’t change nothing in both entities and ui.

      Some idea?

      Thanks.
        • 1. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
          ufasoli.ulisesdante.hotmail.com

          I had the same problem, you just need to tell seam-gen the database in which the table is stored using the catalog property like this :



          <table name="HOLE" catalog="yourDatabaseName">




          hope this works


          Ulises

          • 2. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
            aabm.aabm.4intro.jazztel.es
            Hello

            Thanks for the response

            I have trying to do so and not lucky.  Now the code is:

            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE hibernate-reverse-engineering SYSTEM "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
            <hibernate-reverse-engineering>
                   <table name="HOLE" catalog="open18">
                     <column name="M_PAR" property="mensPar" />
                     <column name="L_PAR" property="ladiesPar" />
                     <column name="M_HANDICAP" property="mensHandicap" />
                     <column name="L_HANDICAP" property="ladiesHandicap" />
                   </table>
            </hibernate-reverse-engineering>

            After save the changes in the file, I execute the command “seam generate restart” and It's as if the file seam-gen.reveng.xml hasn't been read.

            I have trying too, to put the catalog in the seam setup command formulary and I have created a new project. The file build.properties looks like this:

            #Generated by seam setup
            #Thu Apr 16 09:10:18 CEST 2009
            hibernate.connection.password=aaaabbmm
            workspace.home=D\:/4INTRO/_WORKSPACE_4INTRO/ECLIPSE_IDE/ECLIPSE34/SAMPLES/SEAM
            model.package=org.domain.open18_Rich_MySQL_211.entity
            hibernate.default_catalog=open18
            driver.jar=C\:\\_PROGRAMACION\\MySQL\\mysql-connector-java-5.1.7\\mysql-connector-java-5.1.7-bin.jar
            action.package=org.domain.open18_Rich_MySQL_211.session
            test.package=org.domain.open18_Rich_MySQL_211.test
            database.type=mysql
            richfaces.skin=wine
            hibernate.default_schema.null=
            database.drop=n
            project.name=open18_Rich_MySQL_211_DOS
            hibernate.connection.username=root
            hibernate.connection.driver_class=com.mysql.jdbc.Driver
            hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
            project.type=war
            icefaces.home=
            database.exists=y
            jboss.home=C\:/_PROGRAMACION/jboss-4.2.3.GA
            hibernate.dialect=org.hibernate.dialect.MySQLDialect
            hibernate.connection.url=jdbc\:mysql\://localhost\:3306/open18
            icefaces=n

            It doesn’t work either.

            I don’t know what I can do. Any ideas?
            • 3. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
              ufasoli.ulisesdante.hotmail.com

              humm, that's weird. just a quick question, when you execute the seam generate command do you execute it inside your project's directory like for example /home/projects/open18 or inside seam's root directory? also did you edit the seam-gen.reveng.xml that is generated inside your project /home/projects/open18/ressources/seam-gen.reveng.xml or the one inside seam's root directory??


              • 4. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
                aabm.aabm.4intro.jazztel.es
                Hello

                I execute the "seam generate command" just inside seam's root directory.Just
                C:\jboss-seam-2.1.1.GA>

                And I edited the "seam-gen.reveng.xml" that is generated inside my project.
                D:\4INTRO\_WORKSPACE_4INTRO\ECLIPSE_IDE\ECLIPSE34\SAMPLES\SEAM\open18_Rich_MySQL_211_DOS\resources\seam-gen.reveng.xml

                I think all is OK, butit doesn't work ¿?

                Thanks
                • 5. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
                  ufasoli.ulisesdante.hotmail.com

                  You should try to execute the seam command inside your project root directory. You should add the seam executable to your path in order to make it simpler.


                  • 6. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
                    aabm.aabm.4intro.jazztel.es

                    Thanks Ulises


                    I tried it, but it doesn´t work either.
                    I have created a environtment variable SEAMHOME with the path of SEAM 2.1.1 GA.and in the path I set %SEAMHOME% after inside my project root directory i executed the command seam generate restart and nothing happened. ¿?


                    thanks again, I will continue trying it

                    • 7. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
                      ufasoli.ulisesdante.hotmail.com

                      Ok so let me see if we are on the same page here. You added the seam executable directory to your %PATH% enviroment variable. Then you went under your project directory and you executed the seam generate command and still doesn't work.
                      Could you post here the whole output that you get when you execute the command as well as your seam-gen.reveng.xml file and your %PATH% var so I can take a look at them???



                      Ulises

                      • 8. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
                        aabm.aabm.4intro.jazztel.es
                        Hello Ulises

                        Thanks for your interest !!

                        ==============================================================================
                        ENVIRONMENT VARIABLES
                        ==============================================================================

                        SEAM_HOME = C:\_PROGRAMACION\eclipse_341\configManual\jboss-seam-2.1.1.GA
                        PATH = ......;%SEAM_HOME%

                        ==============================================================================
                        SEAM-GEN.REVENG.XML
                        ==============================================================================
                        <?xml version="1.0" encoding="UTF-8"?>
                        <!DOCTYPE hibernate-reverse-engineering SYSTEM "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
                        <hibernate-reverse-engineering>

                          <table name="HOLE">
                            <column name="M_PAR" property="mensPar" />
                            <column name="L_PAR" property="ladiesPar" />
                            <column name="M_HANDICAP" property="mensHandicap" />
                            <column name="L_HANDICAP" property="ladiesHandicap" />
                          </table>
                         
                        </hibernate-reverse-engineering>

                        ==============================================================================
                        OUTPUT OF SEAM GENERATE RESTART
                        ==============================================================================
                        Microsoft Windows XP [Versión 5.1.2600]
                        (C) Copyright 1985-2001 Microsoft Corp.

                        C:\Documents and Settings\Toni>d:

                        D:\>cd D:\4INTRO\_WORKSPACE_4INTRO\ECLIPSE_IDE\ECLIPSE34\SAMPLES\SEAM\open18_Ric
                        h_MySQL_211_DOS

                        D:\4INTRO\_WORKSPACE_4INTRO\ECLIPSE_IDE\ECLIPSE34\SAMPLES\SEAM\open18_Rich_MySQL
                        _211_DOS>seam generate restart
                        SEAM_HOME: C:\_PROGRAMACION\eclipse_341\configManual\jboss-seam-2.1.1.GA
                        Using seam-gen sources from: C:\_PROGRAMACION\eclipse_341\configManual\jboss-sea
                        m-2.1.1.GA\seam-gen
                        Buildfile: C:\_PROGRAMACION\eclipse_341\configManual\jboss-seam-2.1.1.GA\seam-ge
                        n\build.xml

                        init:

                        init-properties:
                             [echo] C:/_PROGRAMACION/jboss-4.2.3.GA

                        validate-workspace:

                        validate-project:

                        init-generate:

                        generate-model:
                             [echo] Reverse engineering database using JDBC driver C:\_PROGRAMACION\MySQ
                        L\mysql-connector-java-5.1.7\mysql-connector-java-5.1.7-bin.jar
                             [echo] project=D:/4INTRO/_WORKSPACE_4INTRO/ECLIPSE_IDE/ECLIPSE34/SAMPLES/SE
                        AM/open18_Rich_MySQL_211_DOS
                             [echo] model=org.domain.open18_Rich_MySQL_211.entity
                        [hibernate] Executing Hibernate Tool with a JDBC Configuration (for reverse engi
                        neering)
                        [hibernate] 1. task: hbm2java (Generates a set of .java files)
                        [hibernate] 18-abr-2009 21:16:01 org.hibernate.cfg.Environment <clinit>
                        [hibernate] INFO: Hibernate 3.2.4.sp1
                        [hibernate] 18-abr-2009 21:16:01 org.hibernate.cfg.Environment <clinit>
                        [hibernate] INFO: hibernate.properties not found
                        [hibernate] 18-abr-2009 21:16:01 org.hibernate.cfg.Environment buildBytecodeProv
                        ider
                        [hibernate] INFO: Bytecode provider name : cglib
                        [hibernate] 18-abr-2009 21:16:01 org.hibernate.cfg.Environment <clinit>
                        [hibernate] INFO: using JDK 1.4 java.sql.Timestamp handling
                        [hibernate] 18-abr-2009 21:16:01 org.hibernate.cfg.reveng.OverrideRepository add
                        File
                        [hibernate] INFO: Override file: D:\4INTRO\_WORKSPACE_4INTRO\ECLIPSE_IDE\ECLIPSE
                        34\SAMPLES\SEAM\open18_Rich_MySQL_211_DOS\resources\seam-gen.reveng.xml
                        [hibernate] 18-abr-2009 21:16:02 org.hibernate.connection.DriverManagerConnectio
                        nProvider configure
                        [hibernate] INFO: Using Hibernate built-in connection pool (not for production u
                        se!)
                        [hibernate] 18-abr-2009 21:16:02 org.hibernate.connection.DriverManagerConnectio
                        nProvider configure
                        [hibernate] INFO: Hibernate connection pool size: 20
                        [hibernate] 18-abr-2009 21:16:02 org.hibernate.connection.DriverManagerConnectio
                        nProvider configure
                        [hibernate] INFO: autocommit mode: false
                        [hibernate] 18-abr-2009 21:16:02 org.hibernate.connection.DriverManagerConnectio
                        nProvider configure
                        [hibernate] INFO: using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://local
                        host:3306/open18
                        [hibernate] 18-abr-2009 21:16:02 org.hibernate.connection.DriverManagerConnectio
                        nProvider configure
                        [hibernate] INFO: connection properties: {user=root, password=****}
                        [hibernate] 18-abr-2009 21:10:45 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: RDBMS: MySQL, version: 5.1.29-rc-community
                        [hibernate] 18-abr-2009 21:10:45 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-ja
                        va-5.1.7 ( Revision: ${svn.Revision} )
                        [hibernate] 18-abr-2009 21:10:45 org.hibernate.dialect.Dialect <init>
                        [hibernate] INFO: Using dialect: org.hibernate.dialect.MySQLDialect
                        [hibernate] 18-abr-2009 21:10:45 org.hibernate.transaction.TransactionFactoryFac
                        tory buildTransactionFactory
                        [hibernate] INFO: Using default transaction strategy (direct JDBC transactions)
                        [hibernate] 18-abr-2009 21:10:45 org.hibernate.transaction.TransactionManagerLoo
                        kupFactory getTransactionManagerLookup
                        [hibernate] INFO: No TransactionManagerLookup configured (in JTA environment, us
                        e of read-write or transactional second-level cache is not recommended)
                        [hibernate] 18-abr-2009 21:10:45 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Automatic flush during beforeCompletion(): disabled
                        [hibernate] 18-abr-2009 21:10:45 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Automatic session close at end of transaction: disabled
                        [hibernate] 18-abr-2009 21:10:45 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: JDBC batch size: 15
                        [hibernate] 18-abr-2009 21:10:45 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: JDBC batch updates for versioned data: disabled
                        [hibernate] 18-abr-2009 21:10:45 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Scrollable result sets: enabled
                        [hibernate] 18-abr-2009 21:10:45 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: JDBC3 getGeneratedKeys(): enabled
                        [hibernate] 18-abr-2009 21:10:45 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Connection release mode: auto
                        [hibernate] 18-abr-2009 21:10:45 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Default catalog: open18
                        [hibernate] 18-abr-2009 21:10:46 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Maximum outer join fetch depth: 2
                        [hibernate] 18-abr-2009 21:10:46 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Default batch fetch size: 1
                        [hibernate] 18-abr-2009 21:10:46 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Generate SQL with comments: disabled
                        [hibernate] 18-abr-2009 21:10:46 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Order SQL updates by primary key: disabled
                        [hibernate] 18-abr-2009 21:10:46 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Order SQL inserts for batching: disabled
                        [hibernate] 18-abr-2009 21:10:46 org.hibernate.cfg.SettingsFactory createQueryTr
                        anslatorFactory
                        [hibernate] INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFact
                        ory
                        [hibernate] 18-abr-2009 21:10:46 org.hibernate.hql.ast.ASTQueryTranslatorFactory
                        <init>
                        [hibernate] INFO: Using ASTQueryTranslatorFactory
                        [hibernate] 18-abr-2009 21:10:46 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Query language substitutions: {}
                        [hibernate] 18-abr-2009 21:10:46 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: JPA-QL strict compliance: disabled
                        [hibernate] 18-abr-2009 21:10:46 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Second-level cache: enabled
                        [hibernate] 18-abr-2009 21:10:46 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Query cache: disabled
                        [hibernate] 18-abr-2009 21:10:46 org.hibernate.cfg.SettingsFactory createCachePr
                        ovider
                        [hibernate] INFO: Cache provider: org.hibernate.cache.HashtableCacheProvider
                        [hibernate] 18-abr-2009 21:10:46 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Optimize cache for minimal puts: disabled
                        [hibernate] 18-abr-2009 21:10:46 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Structured second-level cache entries: disabled
                        [hibernate] 18-abr-2009 21:10:47 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Statistics: disabled
                        [hibernate] 18-abr-2009 21:10:47 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Deleted entity synthetic identifier rollback: disabled
                        [hibernate] 18-abr-2009 21:10:47 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Default entity-mode: pojo
                        [hibernate] 18-abr-2009 21:10:47 org.hibernate.cfg.SettingsFactory buildSettings

                        [hibernate] INFO: Named query checking : enabled
                        [hibernate] 18-abr-2009 21:10:48 org.hibernate.connection.DriverManagerConnectio
                        nProvider close
                        [hibernate] INFO: cleaning up connection pool: jdbc:mysql://localhost:3306/open1
                        8
                        [hibernate] 18-abr-2009 21:10:48 org.hibernate.tool.Version <clinit>
                        [hibernate] INFO: Hibernate Tools 3.2.2.GA
                        [javaformatter] Java formatting of 6 files completed. Skipped 0 file(s).

                        generate-ui:
                             [echo] Building project 'open18_Rich_MySQL_211_DOS' to generate views and c
                        ontrollers

                        init:

                        groovy.compilemodel:

                        compilemodel:
                            [javac] Compiling 6 source files to D:\4INTRO\_WORKSPACE_4INTRO\ECLIPSE_IDE\
                        ECLIPSE34\SAMPLES\SEAM\open18_Rich_MySQL_211_DOS\exploded-archives\open18_Rich_M
                        ySQL_211_DOS.war\WEB-INF\classes

                        groovy.compileactions:

                        groovy.copyactions:

                        compileactions:

                        copyclasses:

                        compile:

                        war:
                             [copy] Copying 1 file to D:\4INTRO\_WORKSPACE_4INTRO\ECLIPSE_IDE\ECLIPSE34\
                        SAMPLES\SEAM\open18_Rich_MySQL_211_DOS\exploded-archives\open18_Rich_MySQL_211_D
                        OS.war\WEB-INF\classes
                             [copy] Copying 1 file to D:\4INTRO\_WORKSPACE_4INTRO\ECLIPSE_IDE\ECLIPSE34\
                        SAMPLES\SEAM\open18_Rich_MySQL_211_DOS\exploded-archives\open18_Rich_MySQL_211_D
                        OS.war\WEB-INF\classes\META-INF
                             [copy] Copying 1 file to D:\4INTRO\_WORKSPACE_4INTRO\ECLIPSE_IDE\ECLIPSE34\
                        SAMPLES\SEAM\open18_Rich_MySQL_211_DOS\exploded-archives\open18_Rich_MySQL_211_D
                        OS.war\WEB-INF\classes
                        [hibernate] Executing Hibernate Tool with a JPA Configuration
                        [hibernate] 1. task: generic exportertemplate: view/list.xhtml.ftl
                        [hibernate] 18-abr-2009 21:11:08 org.hibernate.cfg.annotations.Version <clinit>
                        [hibernate] INFO: Hibernate Annotations 3.3.0.GA
                        [hibernate] 18-abr-2009 21:11:08 org.hibernate.ejb.Version <clinit>
                        [hibernate] INFO: Hibernate EntityManager 3.3.1.GA
                        [hibernate] 18-abr-2009 21:11:09 org.hibernate.cfg.AnnotationBinder bindClass
                        [hibernate] INFO: Binding entity from annotated class: org.domain.open18_Rich_My
                        SQL_211.entity.Hole
                        [hibernate] 18-abr-2009 21:11:09 org.hibernate.cfg.annotations.EntityBinder bind
                        Table
                        [hibernate] INFO: Bind entity org.domain.open18_Rich_MySQL_211.entity.Hole on ta
                        ble hole
                        [hibernate] 18-abr-2009 21:11:09 org.hibernate.cfg.AnnotationBinder bindClass
                        [hibernate] INFO: Binding entity from annotated class: org.domain.open18_Rich_My
                        SQL_211.entity.Tee
                        [hibernate] 18-abr-2009 21:11:09 org.hibernate.cfg.annotations.EntityBinder bind
                        Table
                        [hibernate] INFO: Bind entity org.domain.open18_Rich_MySQL_211.entity.Tee on tab
                        le tee
                        [hibernate] 18-abr-2009 21:11:09 org.hibernate.cfg.AnnotationBinder bindClass
                        [hibernate] INFO: Binding entity from annotated class: org.domain.open18_Rich_My
                        SQL_211.entity.TeeSet
                        [hibernate] 18-abr-2009 21:11:09 org.hibernate.cfg.annotations.EntityBinder bind
                        Table
                        [hibernate] INFO: Bind entity org.domain.open18_Rich_MySQL_211.entity.TeeSet on
                        table tee_set
                        [hibernate] 18-abr-2009 21:11:10 org.hibernate.cfg.AnnotationBinder bindClass
                        [hibernate] INFO: Binding entity from annotated class: org.domain.open18_Rich_My
                        SQL_211.entity.Facility
                        [hibernate] 18-abr-2009 21:11:10 org.hibernate.cfg.annotations.EntityBinder bind
                        Table
                        [hibernate] INFO: Bind entity org.domain.open18_Rich_MySQL_211.entity.Facility o
                        n table facility
                        [hibernate] 18-abr-2009 21:11:10 org.hibernate.cfg.AnnotationBinder bindClass
                        [hibernate] INFO: Binding entity from annotated class: org.domain.open18_Rich_My
                        SQL_211.entity.Course
                        [hibernate] 18-abr-2009 21:11:10 org.hibernate.cfg.annotations.EntityBinder bind
                        Table
                        [hibernate] INFO: Bind entity org.domain.open18_Rich_MySQL_211.entity.Course on
                        table course
                        [hibernate] 18-abr-2009 21:11:10 org.hibernate.cfg.annotations.CollectionBinder
                        bindOneToManySecondPass
                        [hibernate] INFO: Mapping collection: org.domain.open18_Rich_MySQL_211.entity.Ho
                        le.tees -> tee
                        [hibernate] 18-abr-2009 21:11:10 org.hibernate.cfg.annotations.CollectionBinder
                        bindOneToManySecondPass
                        [hibernate] INFO: Mapping collection: org.domain.open18_Rich_MySQL_211.entity.Ho
                        le.tees_1 -> tee
                        [hibernate] 18-abr-2009 21:11:10 org.hibernate.cfg.annotations.CollectionBinder
                        bindOneToManySecondPass
                        [hibernate] INFO: Mapping collection: org.domain.open18_Rich_MySQL_211.entity.Te
                        eSet.tees -> tee
                        [hibernate] 18-abr-2009 21:11:10 org.hibernate.cfg.annotations.CollectionBinder
                        bindOneToManySecondPass
                        [hibernate] INFO: Mapping collection: org.domain.open18_Rich_MySQL_211.entity.Te
                        eSet.tees_1 -> tee
                        [hibernate] 18-abr-2009 21:11:10 org.hibernate.cfg.annotations.CollectionBinder
                        bindOneToManySecondPass
                        [hibernate] INFO: Mapping collection: org.domain.open18_Rich_MySQL_211.entity.Fa
                        cility.courses -> course
                        [hibernate] 18-abr-2009 21:11:10 org.hibernate.cfg.annotations.CollectionBinder
                        bindOneToManySecondPass
                        [hibernate] INFO: Mapping collection: org.domain.open18_Rich_MySQL_211.entity.Fa
                        cility.courses_1 -> course
                        [hibernate] 18-abr-2009 21:11:10 org.hibernate.cfg.annotations.CollectionBinder
                        bindOneToManySecondPass
                        [hibernate] INFO: Mapping collection: org.domain.open18_Rich_MySQL_211.entity.Co
                        urse.holes -> hole
                        [hibernate] 18-abr-2009 21:11:11 org.hibernate.cfg.annotations.CollectionBinder
                        bindOneToManySecondPass
                        [hibernate] INFO: Mapping collection: org.domain.open18_Rich_MySQL_211.entity.Co
                        urse.holes_1 -> hole
                        [hibernate] 18-abr-2009 21:11:11 org.hibernate.cfg.annotations.CollectionBinder
                        bindOneToManySecondPass
                        [hibernate] INFO: Mapping collection: org.domain.open18_Rich_MySQL_211.entity.Co
                        urse.teeSets -> tee_set
                        [hibernate] 18-abr-2009 21:11:11 org.hibernate.cfg.annotations.CollectionBinder
                        bindOneToManySecondPass
                        [hibernate] INFO: Mapping collection: org.domain.open18_Rich_MySQL_211.entity.Co
                        urse.teeSets_1 -> tee_set
                        [hibernate] 18-abr-2009 21:11:11 org.hibernate.validator.Version <clinit>
                        [hibernate] INFO: Hibernate Validator 3.0.0.GA
                        [hibernate] 2. task: generic exportertemplate: view/view.xhtml.ftl
                        [hibernate] 3. task: generic exportertemplate: view/view.page.xml.ftl
                        [hibernate] 4. task: generic exportertemplate: view/edit.xhtml.ftl
                        [hibernate] 5. task: generic exportertemplate: view/edit.page.xml.ftl
                        [hibernate] 6. task: generic exportertemplate: src/EntityList.java.ftl
                        [hibernate] 7. task: generic exportertemplate: view/list.page.xml.ftl
                        [hibernate] 8. task: generic exportertemplate: src/EntityHome.java.ftl
                        [hibernate] 9. task: generic exportertemplate: view/layout/menu.xhtml.ftl
                        [javaformatter] Java formatting of 11 files completed. Skipped 0 file(s).
                             [echo] Type 'ant restart' and go to http://localhost:8080/open18_Rich_MySQL
                        _211_DOS

                        generate:

                        init:

                        init-properties:
                             [echo] C:/_PROGRAMACION/jboss-4.2.3.GA

                        validate-workspace:

                        validate-project:

                        restart:
                             [echo] Restarting project 'open18_Rich_MySQL_211_DOS'

                        check-deployed:

                        restart-exploded:

                        init:

                        groovy.compilemodel:

                        compilemodel:

                        groovy.compileactions:

                        groovy.copyactions:

                        compileactions:
                            [javac] Compiling 11 source files to D:\4INTRO\_WORKSPACE_4INTRO\ECLIPSE_IDE
                        \ECLIPSE34\SAMPLES\SEAM\open18_Rich_MySQL_211_DOS\exploded-archives\open18_Rich_
                        MySQL_211_DOS.war\WEB-INF\dev

                        copyclasses:

                        compile:

                        war:
                             [copy] Copying 1 file to D:\4INTRO\_WORKSPACE_4INTRO\ECLIPSE_IDE\ECLIPSE34\
                        SAMPLES\SEAM\open18_Rich_MySQL_211_DOS\exploded-archives\open18_Rich_MySQL_211_D
                        OS.war\WEB-INF\classes
                             [copy] Copying 1 file to D:\4INTRO\_WORKSPACE_4INTRO\ECLIPSE_IDE\ECLIPSE34\
                        SAMPLES\SEAM\open18_Rich_MySQL_211_DOS\exploded-archives\open18_Rich_MySQL_211_D
                        OS.war\WEB-INF\classes\META-INF
                             [copy] Copying 1 file to D:\4INTRO\_WORKSPACE_4INTRO\ECLIPSE_IDE\ECLIPSE34\
                        SAMPLES\SEAM\open18_Rich_MySQL_211_DOS\exploded-archives\open18_Rich_MySQL_211_D
                        OS.war\WEB-INF\classes
                             [copy] Copying 31 files to D:\4INTRO\_WORKSPACE_4INTRO\ECLIPSE_IDE\ECLIPSE3
                        4\SAMPLES\SEAM\open18_Rich_MySQL_211_DOS\exploded-archives\open18_Rich_MySQL_211
                        _DOS.war

                        stage:

                        datasource:

                        explode:
                             [copy] Copying 51 files to C:\_PROGRAMACION\jboss-4.2.3.GA\server\default\d
                        eploy\open18_Rich_MySQL_211_DOS.war

                        restart-deployed:

                        restart:

                        BUILD SUCCESSFUL
                        Total time: 37 seconds

                        D:\4INTRO\_WORKSPACE_4INTRO\ECLIPSE_IDE\ECLIPSE34\SAMPLES\SEAM\open18_Rich_MySQL
                        _211_DOS>

                        Toni
                        • 9. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
                          ufasoli.ulisesdante.hotmail.com

                          ok in your seam-gen.reveng.xml


                          change the line


                          <table name="HOLE">



                          with



                          <table name="HOLE" catalog="open18">



                          let me know if this works


                          Ulises


                          • 10. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
                            aabm.aabm.4intro.jazztel.es

                            Hello


                            It doesn't work. I'm very surprise, I have trying all about it.
                            I'm thinking that the problem can be about the version of SEAM 2.1.1 GA. I'll try with another version of SEAM.


                            Thanks.



                            • 11. Re: Reverse engineering  with seam-gen.reveng.xml don’t work

                              Hello, I am having the same issue. 




                              • jboss-seam-2.1.1.GA

                              • jboss-4.2.3.GA

                              • JDK 1.6.0_13

                              • Windows XP SP3

                              • MySQL 5.x



                              The basic reverse engineering works for both H2 and MySQL, but any customizations that I apply to PROJECT_ROOT/resources/seam-gen.reveng.xml are ignored when I try to use MySQL.  I try running seam generate restart from PROJECT_ROOT.


                              I have tried fiddling with the catalog and schema settings in SEAM_HOME/seam-gen/build.properties and PROJECT_HOME/seam-gen.properties to no avail.  I have tried fiddling with the schema/catalog settings as well in PROJECT_ROOT/resources/seam-gen.reveng.xml as well, no avail.


                              Here is my current build.properties file:


                              hibernate.connection.password=tiger
                              workspace.home=C\:/Documents and Settings/cdunphy/My Documents/Code/Seam
                              model.package=org.open18.model
                              driver.jar=C\:/Libraries/Java/JDBC/mysql-connector-java-5.1.5/mysql-connector-java-5.1.5-bin.jar
                              action.package=org.open18.action
                              test.package=org.open18.test
                              database.type=mysql
                              richfaces.skin=emeraldTown
                              hibernate.default_catalog=open18
                              hibernate.default_schema.null=open18
                              database.drop=n
                              project.name=open18
                              hibernate.connection.username=
                              hibernate.connection.driver_class=com.mysql.jdbc.Driver
                              hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
                              project.type=war
                              icefaces.home=
                              database.exists=y
                              jboss.home=C\:/JBoss/jboss-4.2.3.GA
                              hibernate.dialect=org.hibernate.dialect.MySQLDialect
                              hibernate.connection.url=jdbc:mysql://localhost/open18
                              icefaces=n
                              hibernate.hbm2ddl.auto=none




                              Here is my current seam-gen.reveng.xml file:



                              <?xml version="1.0" encoding="UTF-8"?>
                              <!DOCTYPE hibernate-reverse-engineering SYSTEM "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
                              <hibernate-reverse-engineering>
                              
                                  <table name="HOLE" catalog="open18">
                                        <column name="M_PAR" property="mensPar" />
                                        <column name="L_PAR" property="ladiesPar" />
                                        <column name="M_HANDICAP" property="mensHandicap" />
                                        <column name="L_HANDICAP" property="ladiesHandicap" />
                                   </table>
                              
                                   <table name="TEE_SET" catalog="open18">
                                        <meta attribute="class-code">
                                             @javax.persistence.Transient
                                             public int getDistanceOut() {
                                                  int distance = 0;
                                                  for (Tee tee : tees) {
                                                       if (tee.getHole().getNumber() &lt;= 9) {
                                                        distance += tee.getDistance();
                                                    }
                                                }
                                                    return distance;
                                            }
                                        
                                            @javax.persistence.Transient
                                            public int getDistanceIn() {
                                                int distance = 0;
                                                for ( Tee tee : tees ) {
                                                    if ( tee.getHole().getNumber() > 9 ) {
                                                        distance += tee.getDistance();
                                                    }
                                                }
                                                return distance;
                                            }
                                  </meta>
                                  <column name="POS" property="position" />
                                  <column name="M_SLOPE_RATING" property="mensSlopeRating" />
                                  <column name="M_COURSE_RATING" property="mensCourseRating" />
                                  <column name="L_SLOPE_RATING" property="ladiesSlopeRating" />
                                  <column name="L_COURSE_RATING" property="ladiesCourseRating" />
                                </table>
                              
                              
                              </hibernate-reverse-engineering>




                              I am not an expert in Hibernate, but we use MySQL here in our shop, so I am really keen to get this working.  Tons of googling and posting in the Seam in Action book forum hasn't resulted in a solution yet.


                              Is this a known issue with Hibernate/MySQL?

                              • 12. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
                                toutatis

                                Hi,


                                I ran into the same problem: Command line tool works fine and the Hibernate tool in Eclipse ignores seam-gen.reveng.xml.


                                After some experiments I found out that is works when I use lowercase table names in reveng.xml, like:




                                :
                                   <table name="*hole*" catalog="open18">
                                     <column name="M_PAR" property="mensPar" />
                                     <column name="L_PAR" property="ladiesPar" />
                                     <column name="M_HANDICAP" property="mensHandicap" />
                                     <column name="L_HANDICAP" property="ladiesHandicap" />
                                   </table>
                                :
                                



                                Hope this helps you too.


                                Roel

                                • 13. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
                                  toutatis

                                  Ehh. Ignore the stars... I wanted to emphasize this text. So:



                                  :
                                     <table name="hole" catalog="open18">
                                       <column name="M_PAR" property="mensPar" />
                                       <column name="L_PAR" property="ladiesPar" />
                                       <column name="M_HANDICAP" property="mensHandicap" />
                                       <column name="L_HANDICAP" property="ladiesHandicap" />
                                     </table>
                                  :
                                  



                                  • 14. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
                                    aabm.aabm.4intro.jazztel.es
                                    Hi Roel

                                    Now It work fine !!!!!

                                    It's incredible that sometimes little details, that someone never would think about are the solution.

                                    Thank you very much !!!

                                    PD: It's working too without the catalog :

                                       <table name="hole">
                                         <column name="M_PAR" property="mensPar" />
                                         <column name="L_PAR" property="ladiesPar" />
                                         <column name="M_HANDICAP" property="mensHandicap" />
                                         <column name="L_HANDICAP" property="ladiesHandicap" />
                                       </table>
                                    1 2 Previous Next