4 Replies Latest reply on Feb 27, 2008 3:42 PM by pericles

    Problem with Seam Generate Entities. Changing data model.

    pericles

      Hi all,


      First of all: Sorry about my English, ;)


      I have one data model and I use it with Seam Generate Entities   (2.0.0.GA) to generate Components and xhtml files. It works correclty, but when I change the data model...


      The change: Add one column (VARCHAR2(9)) that isn't foreign or primary key, in table USERS.


      ...if I use again Seam Generate Entities to generate again the components and xhtml files Eclipse 3.3 hanged and I have to reboot it.


      It's this a problem of Seam? Or is my problem?


      Thanks a lot.

        • 1. Re: Problem with Seam Generate Entities. Changing data model.

          Did you refresh the Eclipse project (right-click on project, refresh)? Not refreshing project after manually changing files in it ('outside eclipse') tends to make Eclipse unhappy.


          After the refresh eclipse rebuilds the workspace, which uses quite a lot of CPU and memory (depending on size of the project) and might 'hang' eclipse for a while (or permanently) on slow machines with low memory.


          I have managed to crash eclipse on a linux machine by accidentally changing files in the workspace such that the eclipse process had no permission to read them. (sudo seam-gen generate)

          • 2. Re: Problem with Seam Generate Entities. Changing data model.
            pericles

            Hi Daniel,


            Yeah, I prove it. I refresh the project after apply Seam Generate Entities again and my project hanged another time, it was hanged since 5 minuts before I reboot Eclipse 3.3. When I generate entities in first time (then always work) the time of generation is 20 seconds approximately.
            And my machines is not slow, it has 1 mounth of live, ;)


            Thanks for the reply Daniel.

            • 3. Re: Problem with Seam Generate Entities. Changing data model.
              pericles
              Well, the mistake was that in file project-ejb/ejbModule/META-INF/persistence.xml has to be defined the schema of de data base with this line:


              <property name="hibernate.default_schema" value="mySchemaDBName"/>

              Bye.
              • 4. Re: Problem with Seam Generate Entities. Changing data model.
                pericles

                ¡LOL!


                The line was this:



                <property name="hibernate.default_schema" value="MYSCHEMANAME"/>




                PS: I don't undersand why it forget to put the line.