1 2 Previous Next 19 Replies Latest reply on Aug 27, 2009 5:24 PM by asookazian Go to original post
      • 15. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
        dan.j.allen

        I really don't understand why you are experiencing difficulty reverse engineering with MySQL. The following settings work for me every time:


        hibernate.connection.username=open18
        hibernate.connection.password=tiger
        hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
        hibernate.connection.url=jdbc:mysql://localhost/open18
        hibernate.default_catalog=open18
        hibernate.default_schema.null=



        Note that MySQL does not have schemas, so the schema property should not be set (hence the fake property). Also, table names are case sensitive in MySQL, so the case you use in your table definitions must match the case in the reverse engineering file.

        • 16. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
          shaileshaag
          Hi all,
          I'm trying go with the above suggested approach. I've added seam-gen directory to my %PATH%. I've also added the entries in the "seam-gen.reveng.xml" file and I'm trying to execute the "seam generate" command. The command executes, but, no entity files or UI files are generated. I'm using "h2" database. Pls help. Following are the various config files:

          ${SEAM_GEN_HOME}/seam-gen/build.properties


          hibernate.connection.password\=
          workspace.home\=G\:/SeamWorkspace
          model.package\=com.satyam.kickseam.entity
          driver.jar\=C\:\\H2DB\\h2.jar
          action.package\=com.satyam.kickseam
          test.package\=com.satyam.kickseam.test
          database.type\=h2
          richfaces.skin\=blueSky
          hibernate.default_catalog.null\=
          hibernate.default_schema.null\=
          database.drop\=n
          project.name\=KickSeam
          hibernate.connection.username\=sa
          hibernate.connection.driver_class\=org.h2.Driver
          hibernate.cache.provider_class\=org.hibernate.cache.HashtableCacheProvider
          project.type\=war
          icefaces.home\=
          database.exists\=y
          jboss.home\=D\:/Servers/jboss-4.2.2.GA
          hibernate.dialect\=org.hibernate.dialect.H2Dialect
          hibernate.connection.url\=jdbc\:h2\:h2db/test
          icefaces\=n


          G:\SeamWorkSpace\KickSeam\resources\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="facility">        
                          <column name="ID" property="id" type="java.lang.Long"/>
                  <column name="NAME" property="name"/>
                  <column name="TYPE" property="type"/>
                  </table>

                  <table name="course" class="com.satyam.kickseam.entity.Course">        
                          <column name="ID" property="id" type="java.lang.Long"/>
                  <column name="NAME" property="name"/>
                  <column name="FACILITY_ID" property="facility_id" type="java.lang.Long"/>
                  </table>
                 
                  <table name="hole" class="com.satyam.kickseam.entity.Hole">
                          <column name="ID" property="id" type="java.lang.Long"/>
                  <column name="HOLE_NUMBER" property="hole_number" type="java.lang.Long"/>
                  <column name="M_PAR" property="m_par"/>
                  <column name="COURSE_ID" property="course_id" type="java.lang.Long"/>
                  </table>

                  <table name="tee_set" class="com.satyam.kickseam.entity.TeeSet">
                          <column name="ID" property="id" type="java.lang.Long"/>
                  <column name="NAME" property="name"/>
                  <column name="COLOR" property="color"/>
                  <column name="POS" property="pos" type="java.lang.Long"/>
                  <column name="COURSE_ID" property="course_id" type="java.lang.Long"/>
                  </table>

                  <table name="tee" class="com.satyam.kickseam.entity.Tee">
                          <column name="HOLE_ID" property="hole_id" type="java.lang.Long"/>
                  <column name="TEE_SET_ID" property="tee_set_id" type="java.lang.Long"/>
                  <column name="DISTANCE" property="distance" type="java.lang.Long"/>
                  </table>

          </hibernate-reverse-engineering>
          • 17. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
            shaileshaag
            Hi all,
            I'm trying to reverse engineer using the above approch. I've added my seam-gen directory to my PATH and also updated the seam-gen.reveng.xml as shown above. But, still I'm not able to generate entities. I'm using "h2". Please help me out. Following are the config files I'm using:
            ============================================
            ${SEAM_GEN_HOME}/seam-gen/build.properties
            ++++++++++++++++++++++++++++++++++++++++++++
            hibernate.connection.password=
            workspace.home=G\:/SeamWorkspace
            model.package=com.satyam.kickseam.entity
            driver.jar=C\:\\H2DB\\h2.jar
            action.package=com.satyam.kickseam
            test.package=com.satyam.kickseam.test
            database.type=h2
            richfaces.skin=blueSky
            hibernate.default_catalog.null=
            hibernate.default_schema.null=
            database.drop=n
            project.name=KickSeam
            hibernate.connection.username=sa
            hibernate.connection.driver_class=org.h2.Driver
            hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
            project.type=war
            icefaces.home=
            database.exists=y
            jboss.home=D\:/Servers/jboss-4.2.2.GA
            hibernate.dialect=org.hibernate.dialect.H2Dialect
            hibernate.connection.url=jdbc\:h2\:h2db/test
            icefaces=n
            ==================================================
            ${PROJECT_HOME}/resources/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="facility">          
                      <column name="ID" property="id" type="java.lang.Long"/>
                       <column name="NAME" property="name"/>
                       <column name="TYPE" property="type"/>
                    </table>

                 <table name="course" class="com.satyam.kickseam.entity.Course">          
                      <column name="ID" property="id" type="java.lang.Long"/>
                       <column name="NAME" property="name"/>
                       <column name="FACILITY_ID" property="facility_id" type="java.lang.Long"/>
                    </table>
                    
                 <table name="hole" class="com.satyam.kickseam.entity.Hole">
                      <column name="ID" property="id" type="java.lang.Long"/>
                       <column name="HOLE_NUMBER" property="hole_number" type="java.lang.Long"/>
                       <column name="M_PAR" property="m_par"/>
                       <column name="COURSE_ID" property="course_id" type="java.lang.Long"/>
                    </table>

                 <table name="tee_set" class="com.satyam.kickseam.entity.TeeSet">
                      <column name="ID" property="id" type="java.lang.Long"/>
                       <column name="NAME" property="name"/>
                       <column name="COLOR" property="color"/>
                       <column name="POS" property="pos" type="java.lang.Long"/>
                       <column name="COURSE_ID" property="course_id" type="java.lang.Long"/>
                    </table>

                 <table name="tee" class="com.satyam.kickseam.entity.Tee">
                      <column name="HOLE_ID" property="hole_id" type="java.lang.Long"/>
                       <column name="TEE_SET_ID" property="tee_set_id" type="java.lang.Long"/>
                       <column name="DISTANCE" property="distance" type="java.lang.Long"/>
                    </table>

            </hibernate-reverse-engineering>
            ++++++++++++++++++++++++++++++++++++++++++++++
            • 18. Re: Reverse engineering  with seam-gen.reveng.xml don’t work
              coenos

              I'm having the same problem. seam-gen.reveng.xml is nog picked up by Jboss Tools 3.


              I have this mapping file which is picked up correctly by the command line seam-gen.


              
               <type-mapping>
                        <sql-type jdbc-type="TIMESTAMP" hibernate-type="java.sql.Timestamp" />
                        <sql-type jdbc-type="DATE" hibernate-type="java.sql.Date" />
                        <sql-type jdbc-type="NUMERIC" hibernate-type="java.lang.Long" />
                        <sql-type jdbc-type="DECIMAL" hibernate-type="java.lang.Long" />
                        <sql-type jdbc-type="VARCHAR" length="1" not-null="true"
                             hibernate-type="java.lang.Character" />
                        <sql-type jdbc-type="VARCHAR" length="1" hibernate-type="char" />
                        <sql-type jdbc-type="VARCHAR" hibernate-type="string" />
                   </type-mapping>
              
              



              Sadly, it is not picked up by Jboss Tools in Eclipse. Has someone found a solution for this??


              By the way, I als renamed the file to hibernate.reveng.xml, but this file is not picked up either (????).


              Thanks,
              Coenos

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

                Have you tried running the above revengr using cmd line instead of JBoss Tools 3?  Run it using the verbose option to see the stack trace:


                seam generate-entities -verbose


                If it works using cmd line with the exact same seam-gen.reveng.xml config, then report this as a possible problem in the JBoss Tools Users forum and Max Andersen will help you out.


                I have not had any problems with hbm2java via seam-gen but I use Seam 2.0.2-FP and cmd line when I revengr.

                1 2 Previous Next