1 Reply Latest reply on Jul 17, 2009 3:08 PM by thierry accart

    Migration to 2.1.2... not smooth at all !

    thierry accart Newbie


      I'm using seam since monthes, and since last week, I was quite happy with it.
      Our application was running 2.0.1 GA on JBoss 4.2.2

      We planned to migrate to 2.1.2 to use some new features we need...  migration from 2.0.1GA to 2.1.2 is not funny at all ! :-/

      - seam-generated EAR folder structure (reveng) has changed. A mess to compare with our existing code.

      -some methods on generated session bean have simply disappeared (List.java and/or Home.java) instead of being flagged as deprecated.

      -some code for ui generation has been done that will surely not work. Example :

      #if parentPojo.shortName!=pojo.shortName>
              <div class="actionButtons">
                  <s:button id="${'#'}{${homeName}.instance.${property.name} != null ? 'changeParent' : 'selectParent'}" value="${'#'}{${homeName}.instance.${property.name} != null ? 'Change' : 'Select'} ${property.name}"
                      <f:param name="from" value="${pageName}Edit"/>

      The s:button's id of in page is either changeParent or selectParent...
      If you've two or more parentPojo in page, you'll get a duplicate id error :(
      The solution could be simply to add in jboss-seam-2.1.2/seam-gen/view/edit.xhtml.ftl a  suffix to the s:button id, something like  changeParent${property.name} and selectParent${property.name}

      - the calculation of resultCount is apparently driven by an autogenerated query that is

      select count(foo) com.my.bar.Foo foo

      What happens when you've classes corresponding to ejbQL keywords.
      In my case, one entity is com.my.bar.Group. The result count in this case is causing a token exception : 

      select count(group) com.my.bar.Group group

      - the worst point is that in migration guide, it seemed clear and easy to migrate  :D

      Anyway, several improvement are really great, and I continue to think that Seam is a good product, even if sometime, it really drives me ... mad!  :)

        • 1. Re: Migration to 2.1.2... not smooth at all !
          thierry accart Newbie

          I wrote a mistake :
          select count(foo) com.my.bar.Foo foo works fine... except if Foo has a composite key.

          The fault apparently comes from hibernate and seems to be known as the class Query of seam framework contains the following comment :

            to be JPA-compliant, we need to make this query like select count(u) from User u
          however, Hibernate produces queries some databases cannot run when the primary key is composite

          I opened case HHH-4044 on this problem of count conversion.