10 Replies Latest reply on Jan 25, 2009 11:48 AM by andhdo

    Error Creating Seam Portlet

      I am trying to setup a Seam JSF/Portlet for bundeled version of JBoss Portal 2.7.0 with the last JBoss Developer Studio 2.0.0 CR1 or the latest JBoss Tools and my own eclipse.

      When I follow http://download.jboss.org/jbosstools/nightly-docs/en/jboss_portal_tools_ref_guide/html_single/index.html#seam_portlet, I get

      java.lang.IllegalArgumentException: Path for project must have only one segment.
       at org.eclipse.core.runtime.Assert.isLegal(Assert.java:64)
       at org.eclipse.core.internal.resources.WorkspaceRoot.getProject(WorkspaceRoot.java:165)
       at org.eclipse.jem.util.emf.workbench.ProjectUtilities.getProject(ProjectUtilities.java:749)
       at org.jboss.tools.portlet.ui.internal.wizard.NewJSFPortletClassWizardPage.updateProject(NewJSFPortletClassWizardPage.java:194)
       at org.jboss.tools.portlet.ui.internal.wizard.NewJSFPortletClassWizardPage.addProjectNameGroup(NewJSFPortletClassWizardPage.java:188)
       at org.jboss.tools.portlet.ui.internal.wizard.NewJSFPortletClassWizardPage.createTopLevelComposite(NewJSFPortletClassWizardPage.java:93)
       at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage.createControl(DataModelWizardPage.java:103)
       at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1147)
       at org.eclipse.jface.wizard.WizardDialog.access$2(WizardDialog.java:1139)
       at org.eclipse.jface.wizard.WizardDialog$4.run(WizardDialog.java:1128)
       at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
       at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1126)
       at org.eclipse.ui.internal.dialogs.NewWizardSelectionPage.advanceToNextPageOrFinish(NewWizardSelectionPage.java:71)
       at org.eclipse.ui.internal.dialogs.NewWizardNewPage$1.doubleClick(NewWizardNewPage.java:355)
       at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:799)
       at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
       at org.eclipse.core.runtime.Platform.run(Platform.java:880)
      


      This error occurs when i am trying to add the seam portlet like in figure 5.5 in the doc.

      I tried it with jboss-seam-2.0.3.CR1 and jboss-seam-2.1.1.GA.

      What is wrong here ?

        • 1. Re: Error Creating Seam Portlet

          Found my problem - all Portal Stuff is deactivated after Eclipse creates the project.

          • 2. Re: Error Creating Seam Portlet
            maxandersen

            what does that mean ? how is the problem solved if everything is deactivated ?

            • 3. Re: Error Creating Seam Portlet

              I actiavted JBoss Portaloptions in the project preferences and now I can create a JBoss Seam Portlet. I recreated my project several times - and i still have this issue with the latest Jboss Developer Suite.

              So for me this problem is fixed, actual I am evaluating JBoss Portal for a Supervisory Controls & MES System. On paper it looks very nice, but i have many problems with the guides. I feel a little bit lost, cause i need so many libs and tools which are not described in one guide.

              • 4. Re: Error Creating Seam Portlet

                Now i didnt got any errors, but i wont see any portal page like in the guide figure 5.7...

                • 5. Re: Error Creating Seam Portlet
                  snjeza

                  I have created for you a screencast showing creating a Seam portlet using JBoss Tools/JBDS nightly build.
                  See http://screencast.com/t/Hlud94xoQBi

                  • 6. Re: Error Creating Seam Portlet

                    Same here with Portal 2.7.1, nightly Tools and (this maybe the problem) with Seam 2.0.2 and not 2.0.3 it will run!

                    But maybe your are so friendly and can help me with a little problem. When deploying a new project, deleting the project and creating a new project with the same name - I still have the old Portal Page without content.
                    In other words: If I undeploy a portal project, the page still exits and I cant overwrite these pages (same with the JSF Portal Projects).

                    So how can i delete these old pages ? I didnt found anything in the portal files and i deleted the project foldes in server\deploy.

                    • 7. Re: Error Creating Seam Portlet

                      Found it by my self :) Thanks for the help!

                      • 8. Re: Error Creating Seam Portlet

                        And again its not working, i dont know why.

                        Todays morning i started my machine - created a new JBoss Seam Portlet Project 2.0, used portletbridge-1.0.0.B5 and jboss-seam-2.0.2.SP1/jboss-seam-2.0.3.CR1. Created my Seam Portlet, deployed to JBoss Portal 2.7.1/JBoss Portal 2.7.0

                        13:55:42,390 ERROR [InternalPortletContentProvider] Portlet invoker exception during portlet window rendering
                        org.jboss.portal.portlet.PortletInvokerException: javax.servlet.ServletException
                         at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:101)
                         at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
                         at org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:69)
                         at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
                         at org.jboss.portal.portlet.aspects.portlet.ValveInterceptor.invoke(ValveInterceptor.java:75)
                         at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
                         at org.jboss.portal.portlet.container.ContainerPortletInvoker.invoke(ContainerPortletInvoker.java:116)
                         at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
                         at org.jboss.portal.portlet.state.producer.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java:221)
                         at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker.org$jboss$portal$core$impl$portlet$state$ProducerPortletInvoker$invoke$aop(ProducerPortletInvoker.java:53)
                         at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker$invoke_N8654503705355129869.invokeNext(ProducerPortletInvoker$invoke_N8654503705355129869.java)
                         at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
                        
                        ....
                        
                        Caused by: javax.servlet.ServletException
                         at org.jboss.portal.web.command.CommandServlet.include(CommandServlet.java:97)
                         at org.jboss.portal.web.command.CommandDispatcher.include(CommandDispatcher.java:50)
                         at org.jboss.portal.web.jboss.JBossWebContext.include(JBossWebContext.java:66)
                         at org.jboss.portal.web.impl.DefaultServletContainer.include(DefaultServletContainer.java:190)
                         at org.jboss.portal.portlet.impl.spi.AbstractServerContext.dispatch(AbstractServerContext.java:69)
                         at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:77)
                         ... 171 more
                        Caused by: java.lang.NoSuchMethodError: org.jboss.portletbridge.component.UIPortletViewRoot.processPhaseListeners(Ljavax/faces/context/FacesContext;Ljavax/faces/event/PhaseId;Z)V
                         at org.jboss.portletbridge.component.UIPortletViewRoot.encodeBegin(UIPortletViewRoot.java:51)
                         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:934)
                         at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
                         at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
                         at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
                         at org.jboss.portletbridge.lifecycle.RenderResponsePhase.executePhase(RenderResponsePhase.java:58)
                        ....
                        


                        When i replace the provided Seam libs with:

                        • jsf-facelets-1.1.14.jar
                        • richfaces-api-3.3.0.GA.jar
                        • richfaces-impl-3.3.0.GA.jar
                        • richfaces-ui-3.3.0.GA.jar
                        • commons-digester-1.8.1.jar
                        • commons-beanutils-1.8.0.jar

                          it's working.

                          It would be a very good documentation hint if you add all needed libs and its versions for JBoss Tools and JBoss Portal. I would help you here but iam a real newbie to JBoss and its tools.

                          Then i found a little bug, sometimes when undeploying a project it is not deleted in the jboss workspace directory .metadata\.plugins\org.jboss.ide.eclipse.as.core\JBoss_Application_Server_4.2_-_jboss-portal-2.7.1\deploy


                        • 9. Re: Error Creating Seam Portlet
                          maxandersen

                          Looks like a portal question and not tool related.
                          Have you asked in the portal forum ?

                          If files are not deleted then my guess is portal is locking a file preventing us from deleting it. What happens if you stop AS before removing it, does the files still stay there ?

                          • 10. Re: Error Creating Seam Portlet
                            andhdo

                            If you use: Ganymede + Seam 2.1.1 GA + jbos-portal bundle (2.7.1), you can solve this doing the following:


                            * BUG-01 Remove jboss-seam.jar declaration of META-INF/manifest.mf file, and add again “jboss-seam.jarâ€� as library of the ejb project.
                            * Bug-02: file pages.xml, comment log-level=“traceâ€� sentence


                            The project creates duplicate entries of libraries in the project, specifically it loads richfaces-*.jar and richfaces-*-3.3.0-beta4.jar libraries, and this could alter the classloading; to solve this, you need to remove the old library stuff, and let the new (3.3.0 beta 4 libraries).
                            You need to do this for the web project, and you need to replace the rich-faces-api.jar lib in the ear project for the new one rich-faces-api-3.3.0-beta4.jar lib, and reference it in your ejb3 project