7 Replies Latest reply on Mar 13, 2012 3:03 PM by Ken Finnigan

    Problem with Seam Portlet gatein 3.2

    - Pablo - Newbie

      I have follow same guides from the forum, but i can't make a seam portlet work properly as if it isn't a portlet.

      in the portlet, the popup menu for search and edit the generated entity doesn't appear. Also throw same error when click on logout link.

      And the pages look different in the design view in JBOSS development studio.

       

      here are the steps i follow to create and deploy the portlet.

       

      *************creation of the seam proyect******************

      SNAG-0047.png

      SNAG-0048.png

      SNAG-0049.png

       

      SNAG-0050.png

       

       

       

      SNAG-0052.png

       

      SNAG-0054.png

       

      SNAG-0055.png

       

      SNAG-0056.png

       

      SNAG-0057.png

       

      SNAG-0058.png

      SNAG-0059.png

       

      to be continue....

        • 1. Re: Problem with Seam Portlet gatein 3.2
          - Pablo - Newbie

          SNAG-0060.png

           

          SNAG-0061.png

           

           

          SNAG-0062.png

           

          SNAG-0063.png

           

           

          SNAG-0064.png

           

          SNAG-0065.png

           

          SNAG-0066.png

           

          SNAG-0067.png

           

           

          SNAG-0068.png

           

          SNAG-0069.png

           

          SNAG-0070.png

          SNAG-0071.png

           

          SNAG-0072.png

           

          SNAG-0073.png

           

          SNAG-0074.png

           

          SNAG-0075.png

           

          SNAG-0076.png

           

          SNAG-0077.png

           

          that's for the creation of the proyect, 

          the screenshots for the creation of the seam portlet and the seam generate entity will be attached in a zip, because i get tired of attaching  images one by one

          • 2. Re: Problem with Seam Portlet gatein 3.2
            Ken Finnigan Master

            Are there any errors when the server starts for the Seam Portlet?

             

            Can you try creating a Seam Portlet using the JBoss Portlet Bridge archetype here: http://anonsvn.jboss.org/repos/portletbridge/tags/2.3.0.Final/archetypes/seam-basic/

             

            Regards

            Ken

            • 3. Re: Problem with Seam Portlet gatein 3.2
              - Pablo - Newbie

              here is the server log

               

              and the ear file

              • 4. Re: Problem with Seam Portlet gatein 3.2
                - Pablo - Newbie

                changingin web.xml

                 

                <context-param>

                    <param-name>org.richfaces.LoadStyleStrategy</param-name>

                    <param-value>NONE</param-value>

                  </context-param>

                  <context-param>

                    <param-name>org.richfaces.LoadScriptStrategy</param-name>

                    <param-value>NONE</param-value>

                  </context-param>

                 

                to

                 

                <context-param>

                    <param-name>org.richfaces.LoadStyleStrategy</param-name>

                    <param-value>ALL</param-value>

                  </context-param>

                  <context-param>

                    <param-name>org.richfaces.LoadScriptStrategy</param-name>

                    <param-value>ALL</param-value>

                  </context-param>

                 

                fix the richfaces problem.

                 

                but i still get an error when clicking to see the the personlist.

                 

                SNAG-0099.png

                 

                 

                SNAG-0100.png

                 

                 

                SNAG-0101.png

                 

                 

                12:39:59,855 SEVERE [viewhandler] Error Rendering View[/PersonList.xhtml]

                javax.el.ELException: /PersonList.xhtml: Error reading 'resultList' on type org.domain.seamexample.session.PersonList_$$_javassist_seam_2

                        at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:48)

                        at com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)

                        at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:275)

                        at org.richfaces.renderkit.html.PanelRenderer.doEncodeBegin(PanelRenderer.java:169)

                        at org.richfaces.renderkit.html.PanelRenderer.doEncodeBegin(PanelRenderer.java:128)

                    ........

                        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

                        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

                        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

                        at java.lang.Thread.run(Thread.java:662)

                Caused by: java.lang.IllegalStateException: EntityManager is closed

                        at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:66)

                     

                 

                 

                this is the auto generated PersonList class

                -----

                package org.domain.seamexample.session;

                 

                 

                import org.domain.seamexample.entity.*;

                import org.jboss.seam.annotations.Name;

                import org.jboss.seam.framework.EntityQuery;

                import java.util.Arrays;

                 

                 

                @Name("personList")

                public class PersonList extends EntityQuery<Person> {

                 

                 

                          private static final String EJBQL = "select person from Person person";

                 

                 

                          private static final String[] RESTRICTIONS = {};

                 

                 

                          private Person person;

                 

                 

                          public PersonList() {

                       person = new Person();

                       person.setId(new PersonId());

                                         setEjbql(EJBQL);

                                         setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));

                                         setMaxResults(25);

                          }

                 

                 

                          public Person getPerson() {

                                         return person;

                          }

                }

                 

                -----

                this es the code of the button that fails

                 

                <s:link view="/PersonList.xhtml"

                                     value="Person List"

                                     id="PersonId"

                                              includePageParams="false"

                                         propagation="none"/>

                • 5. Re: Problem with Seam Portlet gatein 3.2
                  - Pablo - Newbie

                  i get an error when use mvn

                   

                  mvn archetype:generate -DarchetypeCatalog=http://bit.ly/fLm527

                   

                  [INFO] Scanning for projects...

                  [INFO]

                  [INFO] ------------------------------------------------------------------------

                  [INFO] Building Maven Stub Project (No POM) 1

                  [INFO] ------------------------------------------------------------------------

                  [INFO]

                  [INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>

                  [INFO]

                  [INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<

                  [INFO]

                  [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---

                  [INFO] Generating project in Interactive mode

                  [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)

                  Choose archetype:

                  1: http://bit.ly/fLm527 -> org.jboss.portletbridge.archetypes:seam-basic ([2.2.1.CR1-SNAPSHOT] Seam 2.2.2.Final Portlet)

                  2: http://bit.ly/fLm527 -> org.jboss.portletbridge.archetypes:richfaces-basic ([2.2.1.CR1-SNAPSHOT] Richfaces 3.3.3.Final Portlet)

                  3: http://bit.ly/fLm527 -> org.jboss.portletbridge.archetypes:1.2-basic ([2.2.1.CR1-SNAPSHOT] JSF 1.2 Portlet)

                  4: http://bit.ly/fLm527 -> org.jboss.portletbridge.archetypes:2.0-basic ([3.0.0.Beta1] JSF 2.0 Portlet)

                  Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 1

                  Downloading: http://repository.jboss.org/nexus/content/groups/public/org/jboss/portletbridge/archetypes/seam-basic/2.2.1.CR1-SNAPSHOT/maven-metadata.xml

                  Downloading: http://repository.jboss.org/nexus/content/groups/public/org/jboss/portletbridge/archetypes/seam-basic/2.2.1.CR1-SNAPSHOT/seam-basic-2.2.1.CR1-SNAPSHOT.jar

                  [INFO] ------------------------------------------------------------------------

                  [INFO] BUILD FAILURE

                  [INFO] ------------------------------------------------------------------------

                  [INFO] Total time: 1:39.821s

                  [INFO] Finished at: Tue Mar 13 14:03:24 ART 2012

                  [INFO] Final Memory: 8M/19M

                  [INFO] ------------------------------------------------------------------------

                  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.jboss.portletbridge.arche

                  types:seam-basic:2.2.1.CR1-SNAPSHOT) -> [Help 1]

                  [ERROR]

                  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

                  [ERROR] Re-run Maven using the -X switch to enable full debug logging.

                  [ERROR]

                  [ERROR] For more information about the errors and possible solutions, please read the following articles:

                  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

                   

                  mvn -version

                   

                  Apache Maven 3.0.4 (r1232337; 2012-01-17 05:44:56-0300)

                  Maven home: D:\apache-maven-3.0.4\bin\..

                  Java version: 1.6.0_31, vendor: Sun Microsystems Inc.

                  Java home: C:\Program Files\Java\jdk1.6.0_31\jre

                  Default locale: es_UY, platform encoding: Cp1252

                  OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"

                  • 7. Re: Problem with Seam Portlet gatein 3.2
                    Ken Finnigan Master

                    The error in your server.log indicates a NPE due to a site name being null and it causes a groovy template to fail.

                     

                    Does the portal work ok without the Seam Portlet deployed?