1 2 Previous Next 17 Replies Latest reply on May 10, 2007 12:47 PM by Karl Hill

    Unable to set CMS preferences

    Peter Johnson Master

      Back in 2.4.0CR3, I was able to create a new instance of the CMSPortlet and set the indexPage preference to some other html page.

      With 2.4.0GA, and what I loaded from CVS this morning, I can no longer do this. Instead, when I click the Update button after entering in the new html page name, such as /deafult/project.html, I get a huge among of stack trace, part of which is shown:

      2006-08-24 20:05:56,875 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/portal-core]] Error calling action method of component with id jbp15f0ce3b_id98:jbp15f0ce3b_id102
      javax.faces.FacesException: Error calling action method of component with id jbp15f0ce3b_id98:jbp15f0ce3b_id102
       at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
       at javax.faces.component.UICommand.broadcast(UICommand.java:106)
       at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
       at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
       at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
       at org.apache.myfaces.portlet.MyFacesGenericPortlet.processAction(MyFacesGenericPortlet.java:221)
       at org.jboss.portal.portlet.container.PortletContainer.invokeAction(PortletContainer.java:494)
       at org.jboss.portal.portlet.container.PortletContainer.dispatch(PortletContainer.java:435)
       at org.jboss.portal.portlet.container.PortletContainerInvoker$1.dispatch(PortletContainerInvoker.java:143)
       at org.jboss.portal.portlet.invocation.PortletInvocation.dispatch(PortletInvocation.java:242)
       ...
       at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.faces.el.EvaluationException: /WEB-INF/jsp/management/plugins/preferences.xhtml @75,70 action="#{action.updateCell}": java.lang.Error: Handle me gracefully please
       at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
       at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
       ... 220 more
      Caused by: java.lang.Error: Handle me gracefully please
       at org.jboss.portal.core.portlet.management.actions.PreferenceAction.updateCell(PreferenceAction.java:147)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at com.sun.el.parser.AstValue.invoke(AstValue.java:130)
       at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
       at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
       at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
       ... 221 more
      Caused by: org.jboss.portal.portlet.InvalidPortletIdException: Cannot configure producer offered portlets
       at org.jboss.portal.portlet.state.producer.StatefulPortletInvoker.setProperties(StatefulPortletInvoker.java:477)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       ...
       at $Proxy57.setProperties(Unknown Source)
       at org.jboss.portal.federation.impl.FederatedPortletInvokerService.setProperties(FederatedPortletInvokerService.java:169)
       at org.jboss.portal.federation.impl.FederatingPortletInvokerService.setProperties(FederatingPortletInvokerService.java:179)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       ...
       at $Proxy41.setProperties(Unknown Source)
       at org.jboss.portal.core.impl.model.instance.InstanceImpl.setPreferences(InstanceImpl.java:209)
       at org.jboss.portal.core.portlet.management.actions.PreferenceAction.updateCell(PreferenceAction.java:140)
       ... 229 more



        • 1. Re: Unable to set CMS preferences
          Peter Johnson Master

          Some more information. I cannot change the preferences on any of the portlets that ship with the portal. Even if I create new instances. I tried changing a preference for the weather poertlet and got the same error.

          In 2.4.0.CR3, the compoundPortletId for the CMS portlet was local._1 and for the weather portlet was local._9. In 2.4.0.GA, the componentPortletIds are local.portal.CMSPortlet and local.samples.WeatherPortlet. The StatefulPortletInvoker.setProperties method throws an exception if the simple portletId does not start with an underscore.

          • 2. Re: Unable to set CMS preferences
            Evan Toliopoulos Newbie

            I am getting the same problem.

            Did you work out what was happening? I am hoping that since you posted two months ago you may have since worked it out and can save me some time.

            • 3. Re: Unable to set CMS preferences
              Peter Johnson Master

              No, I have not. The problem is still ib 2.4.1-CR1. I have create a JIRA issues (probably should have doen this sooner!): http://jira.jboss.com/jira/browse/JBPORTAL-1082

              • 5. Re: Unable to set CMS preferences
                Thomas Heute Master

                That was just for the records ;)

                • 6. Re: Unable to set CMS preferences
                  John DeStefano Apprentice

                  Hi,

                  Check out the current head as of 10/18 and this problem is still there. If you log in as admin and try to change a portlet preference the above exception occurs. Is there a version that this is fixed in?

                  Tx

                  • 7. Re: Unable to set CMS preferences
                    Thomas Heute Master

                    For the second time i did what was mentionned on the first topic: (with Subversion HEAD version)

                    Instead, when I click the Update button after entering in the new html page name, such as /deafult/project.html


                    And it worked fine with no stacktrace.

                    From your stack trace i cannot tell what is wrong.

                    Please try cleaning up your database and get a fresh checkout from SVN.

                    • 8. Re: Unable to set CMS preferences
                      John DeStefano Apprentice

                      With a fresh SVN head from last night, I tried creating a new instance of the CMSPortlet. But the same problem existed and preferences could not be updated. There was however one portlet instance preference which COULD be updated "NewsPortletInstance2".

                      Here is the reason:

                      If you look at the PORTLET_REF column in the JBP_INSTANCE table, you will see that all of the values are local.*.*Portlet, except for NewsPortletInstance2, which is local._1. There is a reference to the underscore issue in the JIRA bug referenced below.

                      It turns out that if you look in portlet-samples.war/WEB-INF/portlet-instances.xml. NewsPortletInstance2 is the only one that has default preferences defined in the XML file.

                      So the fix for the CMSPortlet was to edit the portal-core.war/WEB-INF/portlet-instances.xml, and add a preferences section, recreate the database and restart.

                      <deployment>
                       <instance>
                       <instance-id>CMSPortletInstance</instance-id>
                       <portlet-ref>CMSPortlet</portlet-ref>
                       <preferences>
                       <preference>
                       <name>indexpage</name>
                       <value>/default/index.html</value>
                       </preference>
                       </preferences>
                       </instance>
                      </deployment>
                      


                      Now when looking at the JPB_INSTANCE table, the PORTLET_REF for CMSPortletInstance is local._2, and the preferences update worked.

                      However this is more of a workaround. The real fix would be to change the code which is looking for the underscore.

                      • 9. Re: Unable to set CMS preferences
                        Thomas Heute Master

                        I tried in HEAD of trunk, you are probably in a different branch.

                        • 10. Re: Unable to set CMS preferences
                          Peter Johnson Master

                          I was going to try this earlier but just now go aroung to it. Downloaded source from SVN at http://anonsvn.jboss.org/repos/portal/trunk/. Compiled using JDK 1.5.0_06, deployed to JBoss 4.0.4.GA, using MysSQL 5.0. (I like the new default theme, very clean.) Logged in as admin, went to Management Portlet, clicked on Instances, clicked on CMSPortletInstance, then clicked on the paper-with-pencil icon next to the indexpage preference. Changed the value to "default/project.html" and clicked on Update. Got an HTTP Status 500 page and a lot of stack trace in the console window. Here are excerpts:

                          Got several of these:

                          08:40:59,158 ERROR [STDERR] Oct 19, 2006 8:40:59 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
                          INFO: Added Library from: jar:file:/F:/jboss/portal/jboss-4.0.4.GA/server/portal
                          24/tmp/deploy/tmp7608jsf-facelets.jar!/META-INF/jstl-core.taglib.xml


                          followed by:

                          08:41:25,251 ERROR [[/portal-core]] Error calling action method of component wit
                          h id jbp98eb779b_id98:jbp98eb779b_id102
                          javax.faces.FacesException: Error calling action method of component with id jbp
                          98eb779b_id98:jbp98eb779b_id102
                           at org.apache.myfaces.application.ActionListenerImpl.processAction(Actio
                          nListenerImpl.java:74)
                           at javax.faces.component.UICommand.broadcast(UICommand.java:106)
                           at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:9
                          0)
                           at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1
                          64)
                           at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(Lifecycl
                          eImpl.java:316)
                           at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java
                          :86)
                           at org.apache.myfaces.portlet.MyFacesGenericPortlet.processAction(MyFace
                          sGenericPortlet.java:221)
                          . . .
                          Caused by: javax.faces.el.EvaluationException: /WEB-INF/jsp/management/plugins/p
                          references.xhtml @75,70 action="#{action.updateCell}": java.lang.Error: Handle m
                          e gracefully please
                           at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.ja
                          va:73)
                           at org.apache.myfaces.application.ActionListenerImpl.processAction(Actio
                          nListenerImpl.java:63)
                           ... 219 more
                          Caused by: java.lang.Error: Handle me gracefully please
                           at org.jboss.portal.core.portlet.management.actions.PreferenceAction.upd
                          ateCell(PreferenceAction.java:143)
                           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                          java:39)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                          sorImpl.java:25)
                           at java.lang.reflect.Method.invoke(Method.java:585)
                           at com.sun.el.parser.AstValue.invoke(AstValue.java:130)
                           at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
                          
                           at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.ja
                          va:68)
                           at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.ja
                          va:69)
                           ... 220 more
                          Caused by: org.jboss.portal.portlet.InvalidPortletIdException: Cannot configure
                          producer offered portlets
                           at org.jboss.portal.portlet.state.producer.ProducerPortletInvoker.setPro
                          perties(ProducerPortletInvoker.java:554)
                           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                          java:39)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                          sorImpl.java:25)
                           at java.lang.reflect.Method.invoke(Method.java:585)
                           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                          er.java:155)
                           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
                          or.java:133)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
                          BeanOperationInterceptor.java:142)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                          java:264)
                           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                           at $Proxy72.setProperties(Unknown Source)
                           at org.jboss.portal.federation.impl.FederatedPortletInvokerService.setPr
                          operties(FederatedPortletInvokerService.java:222)
                           at org.jboss.portal.federation.impl.FederatingPortletInvokerService.setP
                          roperties(FederatingPortletInvokerService.java:216)
                          . . .
                          08:41:26,079 ERROR [[/portal-core]] Root cause: /WEB-INF/jsp/management/plugins/
                          preferences.xhtml @75,70 action="#{action.updateCell}": java.lang.Error: Handle
                          me gracefully please
                          javax.faces.el.EvaluationException: /WEB-INF/jsp/management/plugins/preferences.
                          xhtml @75,70 action="#{action.updateCell}": java.lang.Error: Handle me gracefull
                          y please
                           at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.ja
                          va:73)
                           at org.apache.myfaces.application.ActionListenerImpl.processAction(Actio
                          nListenerImpl.java:63)
                           at javax.faces.component.UICommand.broadcast(UICommand.java:106)
                           at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:9
                          0)
                           at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1
                          64)
                           at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(Lifecycl
                          eImpl.java:316)
                           at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java
                          :86)
                           at org.apache.myfaces.portlet.MyFacesGenericPortlet.processAction(MyFace
                          sGenericPortlet.java:221)
                           at org.jboss.portal.portlet.container.PortletContainer.invokeAction(Port
                          letContainer.java:491)
                           at org.jboss.portal.portlet.container.PortletContainer.dispatch(PortletC
                          ontainer.java:434)
                           at org.jboss.portal.portlet.container.PortletContainerInvoker$1.invoke(P
                          ortletContainerInvoker.java:73)
                           at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.j
                          ava:134)
                           at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jbos
                          s$portal$core$aspects$portlet$TransactionInterceptor$invokeRequired$aop(Transact
                          ionInterceptor.java:105)
                           at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeRe
                          quired_9103964459766407072.invokeNext(TransactionInterceptor$invokeRequired_9103
                          964459766407072.java)
                           at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
                          . . .
                          Caused by: org.jboss.portal.portlet.InvalidPortletIdException: Cannot configure
                           producer offered portlets
                           at org.jboss.portal.portlet.state.producer.ProducerPortletInvoker.setPro
                          perties(ProducerPortletInvoker.java:554)
                           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                          java:39)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                          sorImpl.java:25)
                           at java.lang.reflect.Method.invoke(Method.java:585)
                           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                          er.java:155)
                           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
                          or.java:133)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
                          BeanOperationInterceptor.java:142)
                           at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                          . . .
                          



                          Notice once again the "Cannot configure producer offered portlets" error, which means that the portlet id still does not start with an underscore followed by a digit.

                          • 11. Re: Unable to set CMS preferences
                            Thomas Heute Master

                            Ok, now i see the difference :)
                            You were talking about user preferences when i tried porlet instance preferences.

                            I will give it another try (my) tomorrow then

                            • 12. Re: Unable to set CMS preferences
                              Peter Johnson Master

                              Now I am curious. How did you go about setting portlet instance preferences?

                              • 13. Re: Unable to set CMS preferences
                                Thomas Heute Master

                                Through the management portlet.

                                Select the instance, then click on "preferences" (i think) on the right side. You can modify the landing page of the CMS instance.

                                I'm sorry for the confusion in this post.

                                • 14. Re: Unable to set CMS preferences
                                  Peter Johnson Master

                                  Now I really am confused. What you said you did sounds exactly like what I did.

                                  1 2 Previous Next