[jboss-user] [JBoss Portal] - Problem with getRequest in different beans in portal

aj_jboss do-not-reply at jboss.com
Fri Apr 24 08:27:38 EDT 2009


Hi

In my project I have 2 modules(Job, Customer). 
For that I have created 2 beans, jobBean and custBean.

My job.jsp displays job information from jobBean.
On this page, when I click on the customer name hyperlink to display the customer information, it goes to custBean.java and there if i try to get the request using


  | 
  | (HttpServletRequest) FacesContext.getCurrentInstance()
  | 				.getExternalContext().getRequest();
  | 
  | 

it gives the error


  | 
  | 21:28:23,864 ERROR [STDERR] Apr 24, 2009 9:28:23 PM javax.faces.event.MethodExpressionActionListener processAction
  | SEVERE: java.lang.ClassCastException: org.jboss.portlet.JBossActionRequest
  |         at com.geinfra.geenergy.psrp.util.HttpJSFUtil.getRequest(HttpJSFUtil.java:23)
  |         at com.geinfra.geenergy.psrp.backingbean.CustomerBackingBean.openRegionPage(CustomerBackingBean.java:263)
  |         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 org.apache.el.parser.AstValue.invoke(AstValue.java:131)
  |         at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
  |         at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
  |         at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:88)
  |         at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
  |         at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:746)
  |         at javax.faces.component.UICommand.broadcast(UICommand.java:368)
  |         at org.ajax4jsf.component.UIDataAdaptor.broadcast(UIDataAdaptor.java:1359)
  |         at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:317)
  |         at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:292)
  |         at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:249)
  |         at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:462)
  |         at com.sun.faces.portlet.LifecycleImpl$InvokeApplicationPhase.execute(LifecycleImpl.java:672)
  |         at com.sun.faces.portlet.LifecycleImpl.phase(LifecycleImpl.java:330)
  |         at com.sun.faces.portlet.LifecycleImpl.execute(LifecycleImpl.java:246)
  |         at com.sun.faces.portlet.FacesPortlet.processAction(FacesPortlet.java:226)
  |         at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.invokeAction(PortletContainerImpl.java:458)
  |         at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:401)
  |         at org.jboss.portal.portlet.container.PortletContainerInvoker$1.invoke(PortletContainerInvoker.java:86)
  |         at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
  |         at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInt
  | erceptor$invokeNotSupported$aop(TransactionInterceptor.java:86)
  |         at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(T
  | ransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
  |         at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
  |         at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:102)
  |         at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(T
  | ransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
  |         at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invokeNotSupported(TransactionInterceptor.java)
  |         at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
  |         at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
  |         at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
  |         at org.jboss.portal.core.aspects.portlet.HeaderInterceptor.invoke(HeaderInterceptor.java:50)
  |         at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
  |         at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
  |         at org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor.invoke(ProducerCacheInterceptor.java:53)
  |         at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
  |         at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
  |         at org.jboss.portal.core.aspects.portlet.AjaxInterceptor.invoke(AjaxInterceptor.java:51)
  |         at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
  |         at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
  |         at org.jboss.portal.portlet.aspects.portlet.ModesInterceptor.invoke(ModesInterceptor.java:62)
  |         at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
  |         at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
  |         at org.jboss.portal.portlet.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:47)
  |         at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
  |         at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
  |         at org.jboss.portal.portlet.aspects.portlet.WindowStatesInterceptor.invoke(WindowStatesInterceptor.java:55)
  |         at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
  |         at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
  |         at org.jboss.portal.portlet.aspects.portlet.PortletSessionSynchronizationInterceptor.invoke(PortletSessionSynchroniz
  | ationInterceptor.java:80)
  |         at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
  |         at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
  |         at org.jboss.portal.portlet.aspects.portlet.ContextTrackerInterceptor.invoke(ContextTrackerInterceptor.java:46)
  |         at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
  |         at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
  |         at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor$1.doCallback(ContextDispatcherInterceptor.j
  | ava:104)
  | 
  | 


Please help me to solve this issue.


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226622#4226622

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226622



More information about the jboss-user mailing list