5 Replies Latest reply on Sep 10, 2009 6:14 AM by Günther Herndl

    ava.lang.ClassCastException: org.jboss.portal.portlet.impl.j

    Günther Herndl Newbie

      I have ported our SEAM Application to porteltbridge CR2. One part of the application is report PDF or XLS generation with JASPER. To dowdload the code we use the following code:

      HttpServletResponse response = (HttpServletResponse) externalContext.getResponse();
      response.setContentType("application/x-download");
      response.setContentLength((int) reportFile.length());
      response.setHeader("Content-Disposition", "attachment; filename=\"" + filename + "\";");
      try
      {
      ServletOutputStream os = response.getOutputStream();
      FileInputStream fis = new FileInputStream(reportFile);

      while ((read = fis.read(bytes)) != -1)
      {
      os.write(bytes, 0, read);
      }
      fis.close();

      os.flush();
      os.close();
      facesContext.responseComplete();
      }
      catch (Exception e)
      {
      if (log.isErrorEnabled())
      {
      log.error(DownloadComponent.class, e);
      }
      }
      Doe a clastcastexception I changed the first line to:

      HttpServletResponseWrapper response =(HttpServletResponseWrapper)FacesContext.getCurrentInstance().getExternalContext().getResponse();

      But I get again a ClassCastException, what die I wrong:
      2009-08-31 17:05:03,160 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@c93509, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@ddf0c3{ url=null ,addedOrder=0}
      2009-08-31 17:05:03,160 ERROR [de.softcon.ivory.invserver.action.report.impl.CreateListOfAssetReportAction] class de.softcon.ivory.invserver.action.report.impl.CreateListOfAssetReportAction
      java.lang.ClassCastException: org.jboss.portal.portlet.impl.jsr168.api.ActionResponseImpl cannot be cast to javax.servlet.http.HttpServletResponseWrapper
      at de.softcon.ivory.invserver.action.report.DownloadComponent.download(DownloadComponent.java:42)
      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:597)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
      at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
      at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
      at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
      at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
      at de.softcon.ivory.invserver.action.report.DownloadComponent_$$_javassist_seam_36.download(DownloadComponent_$$_javassist_seam_36.java)
      at de.softcon.ivory.invserver.action.report.impl.AbstractBaseReportAction.createReport(AbstractBaseReportAction.java:105)
      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:597)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
      at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
      at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
      at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:29)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:30)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
      at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
      at sun.reflect.GeneratedMethodAccessor291.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
      at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
      at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240)
      at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210)
      at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84)
      at $Proxy378.createReport(Unknown Source)
      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:597)
      at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
      at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
      at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
      at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:163)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
      at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
      at org.javassist.tmp.java.lang.Object_$$_javassist_seam_34.createReport(Object_$$_javassist_seam_34.java)
      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:597)
      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335)
      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:280)
      at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59)
      at org.jboss.el.parser.AstMethodSuffix.invoke(AstMethodSuffix.java:65)
      at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
      at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
      at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
      at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
      at javax.faces.component.UICommand.broadcast(UICommand.java:387)
      at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
      at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
      at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
      at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      at org.jboss.portletbridge.AjaxPortletBridge.execute(AjaxPortletBridge.java:842)
      at org.jboss.portletbridge.AjaxPortletBridge.doFacesRequest(AjaxPortletBridge.java:350)
      at javax.portlet.faces.GenericFacesPortlet.processAction(GenericFacesPortlet.java:323)
      at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:557)
      at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:109)
      at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:72)
      at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:505)
      at org.jboss.portal.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInterceptor$invokeNotSupported$aop(TransactionInterceptor.java:97)
      at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N6922078035659651697.invokeNext(TransactionInterceptor$invokeNotSupported_N6922078035659651697.java)
      at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
      at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:112)
      at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N6922078035659651697.invokeNext(TransactionInterceptor$invokeNotSupported_N6922078035659651697.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_N6922078035659651697.invokeNext(TransactionInterceptor$invokeNotSupported_N6922078035659651697.java)
      at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invokeNotSupported(TransactionInterceptor.java)
      at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.core.aspects.portlet.HeaderInterceptor.invoke(HeaderInterceptor.java:49)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.portlet.aspects.portlet.EventPayloadInterceptor.invoke(EventPayloadInterceptor.java:196)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.portlet.aspects.portlet.RequestAttributeConversationInterceptor.invoke(RequestAttributeConversationInterceptor.java:119)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.core.aspects.portlet.SignOutInterceptor.invoke(SignOutInterceptor.java:43)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.core.aspects.portlet.AjaxInterceptor.invoke(AjaxInterceptor.java:49)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.core.aspects.portlet.BackwardCompatibilityInterceptor.invoke(BackwardCompatibilityInterceptor.java:46)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.portlet.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:49)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.portlet.aspects.portlet.PortletSessionSynchronizationInterceptor.invoke(PortletSessionSynchronizationInterceptor.java:82)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.portlet.aspects.portlet.ContextTrackerInterceptor.invoke(ContextTrackerInterceptor.java:48)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor.access$001(ContextDispatcherInterceptor.java:49)
      at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor$1.doCallback(ContextDispatcherInterceptor.java:123)
      at org.jboss.portal.web.command.CommandDispatcher$CallbackCommand.execute(CommandDispatcher.java:74)
      at sun.reflect.GeneratedMethodAccessor452.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.portal.web.command.CommandServlet.doGet(CommandServlet.java:130)
      at org.jboss.portal.web.command.CommandServlet.doPost(CommandServlet.java:161)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
      at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
      at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
      at org.jboss.portal.web.command.CommandServlet.include(CommandServlet.java:79)
      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)
      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)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
      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)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
      at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker$invoke_N8654503705355129869.invokeNext(ProducerPortletInvoker$invoke_N8654503705355129869.java)
      at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java)
      at org.jboss.portal.portlet.federation.impl.FederatedPortletInvokerService.invoke(FederatedPortletInvokerService.java:145)
      at org.jboss.portal.portlet.federation.impl.FederatingPortletInvokerService.invoke(FederatingPortletInvokerService.java:149)
      at org.jboss.portal.core.model.instance.InstanceInvoker.invoke(InstanceInvoker.java:42)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.portlet.aspects.portlet.PortalSessionSynchronizationInterceptor.invoke(PortalSessionSynchronizationInterceptor.java:93)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.core.model.instance.InstanceSecurityInterceptor.invoke(InstanceSecurityInterceptor.java:93)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.portlet.aspects.portlet.ConsumerCacheInterceptor.invoke(ConsumerCacheInterceptor.java:229)
      at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl.org$jboss$portal$core$impl$model$instance$InstanceContainerImpl$invoke$aop(InstanceContainerImpl.java:408)
      at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl$invoke_N8654503705355129869.invokeNext(InstanceContainerImpl$invoke_N8654503705355129869.java)
      at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
      at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl$invoke_N8654503705355129869.invokeNext(InstanceContainerImpl$invoke_N8654503705355129869.java)
      at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
      at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl$invoke_N8654503705355129869.invokeNext(InstanceContainerImpl$invoke_N8654503705355129869.java)
      at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl.invoke(InstanceContainerImpl.java)
      at org.jboss.portal.core.impl.model.instance.AbstractInstance.invoke(AbstractInstance.java:231)
      at org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext.internalInvoke(ControllerPortletControllerContext.java:255)
      at org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext.invoke(ControllerPortletControllerContext.java:208)
      at org.jboss.portal.portlet.controller.PortletRequestHandler.invoke(PortletRequestHandler.java:332)
      at org.jboss.portal.portlet.controller.PortletRequestHandler.invoke(PortletRequestHandler.java:58)
      at org.jboss.portal.portlet.controller.RequestHandler.handle(RequestHandler.java:64)
      at org.jboss.portal.portlet.controller.PortletController.process(PortletController.java:179)
      at org.jboss.portal.core.model.portal.command.action.InvokePortletWindowActionCommand.execute(InvokePortletWindowActionCommand.java:183)
      at org.jboss.portal.core.controller.ControllerCommand$1.invoke(ControllerCommand.java:68)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
      at org.jboss.portal.core.aspects.controller.node.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:124)
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.invoke(PageCustomizerInterceptor.java:134)
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:78)
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.controller.node.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:81)
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.controller.BackwardCompatibilityInterceptor.invoke(BackwardCompatibilityInterceptor.java:48)
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.controller.ControlInterceptor.invoke(ControlInterceptor.java:56)
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.controller.NavigationalStateInterceptor.invoke(NavigationalStateInterceptor.java:42)
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.controller.ajax.AjaxInterceptor.invoke(AjaxInterceptor.java:55)
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.controller.ResourceAcquisitionInterceptor.invoke(ResourceAcquisitionInterceptor.java:50)
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
      at org.jboss.portal.core.controller.ControllerContext.execute(ControllerContext.java:134)
      at org.jboss.portal.core.controller.Controller.processCommand(Controller.java:279)
      at org.jboss.portal.core.controller.Controller.handle(Controller.java:261)
      at org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDispatcher.java:51)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
      at org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor.invoke(IdentityBindingInterceptor.java:47)
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTypeInterceptor.java:68)
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.server.PortalContextPathInterceptor.invoke(PortalContextPathInterceptor.java:45)
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor.java:96)
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.java:196)
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.server.aspects.server.SignOutInterceptor.invoke(SignOutInterceptor.java:98)
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.impl.api.user.UserEventBridgeTriggerInterceptor.invoke(UserEventBridgeTriggerInterceptor.java:65)
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.server.IdentityCacheInterceptor.invoke(IdentityCacheInterceptor.java:68)
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.server.TransactionInterceptor.org$jboss$portal$core$aspects$server$TransactionInterceptor$invoke$aop(TransactionInterceptor.java:49)
      at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
      at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253)
      at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
      at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262)
      at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
      at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java)
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.server.aspects.LockInterceptor$InternalLock.invoke(LockInterceptor.java:69)
      at org.jboss.portal.server.aspects.LockInterceptor.invoke(LockInterceptor.java:130)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
      at org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:252)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:619)


      any help is very very appreciated. What did I wrong. Hopfully I'm in the correct forum.

      Kind regads
      Günther Herndl

        • 1. Re: ava.lang.ClassCastException: org.jboss.portal.portlet.im
          Günther Herndl Newbie

          I found a workaround for our problem, but I got also new problems. I changed the code:

          ActionResponseImpl res = (ActionResponseImpl)FacesContext.getCurrentInstance().getExternalContext().getResponse();
          // HttpServletResponseWrapper response =(HttpServletResponseWrapper)FacesContext.getCurrentInstance().getExternalContext().getResponse();
          // HttpServletResponse response = (HttpServletResponse) externalContext.getResponse();


          HttpServletResponseWrapper response = res.getRealResponse();
          response.setContentType("application/x-download");
          response.setContentLength((int) reportFile.length());
          response.setHeader("Content-Disposition", "attachment; filename=\"" + filename + "\";");

          But now my problem is the the header-info is lost. I guess also the content type. The download-Box shows the seam-objext.xml name (e.g. invserverprojectPortletWindow) as filename for download.

          Any hits what I can change in my code?

          Kind regards

          Günther

          • 2. Re: ava.lang.ClassCastException: org.jboss.portal.portlet.im
            Günther Herndl Newbie

            Here is a log entry which shows that filename should be listOfAsset.xls or .pdf

            2009-09-07 15:29:54,566 INFO [de.softcon.ivory.invserver.action.report.DownloadComponent] Content-Disposition attachment; filename="listOfAsset.xls";
            2009-09-07 15:29:54,566 ERROR [de.softcon.ivory.invserver.action.report.DownloadComponent] Content-Disposition attachment; filename="listOfAsset.xls";

            • 3. Re: ava.lang.ClassCastException: org.jboss.portal.portlet.im
              Günther Herndl Newbie

              To day I tried a more seam like way:
              /**
              *
              */
              package de.softcon.ivory.invserver.action.report;



              import java.io.ByteArrayOutputStream;
              import java.io.File;
              import java.io.FileInputStream;

              import javax.faces.context.ExternalContext;
              import javax.faces.context.FacesContext;

              import org.jboss.portal.portlet.impl.jsr168.api.ActionResponseImpl;
              import org.jboss.seam.annotations.In;
              import org.jboss.seam.annotations.Import;
              import org.jboss.seam.annotations.Logger;
              import org.jboss.seam.annotations.Name;
              import org.jboss.seam.core.Manager;
              import org.jboss.seam.document.ByteArrayDocumentData;
              import org.jboss.seam.document.DocumentData;
              import org.jboss.seam.document.DocumentStore;
              import org.jboss.seam.log.Log;





              /**
              * @author mbaumgar
              *
              */
              @Name("downloadComponent")
              @Import("org.jboss.seam.pdf")
              public class DownloadComponent
              {
              @In private Manager manager;
              @In(create = true, value = "#{org.jboss.seam.document.DocumentStore}") private DocumentStore documentStore;


              @In(value = "#{facesContext.externalContext}")
              private ExternalContext externalContext;
              /*
              @In(value = "#{org.jboss.seam.faces.facesContext}")
              private FacesContext facesContext;
              */
              @Logger
              private Log log;

              public void download(String filename, File reportFile)
              {
              int read = 0;
              byte[] bytes = new byte[1000];

              // ActionResponseImpl res = (ActionResponseImpl)FacesContext.getCurrentInstance().getExternalContext().getResponse();
              // HttpServletResponseWrapper response =(HttpServletResponseWrapper)FacesContext.getCurrentInstance().getExternalContext().getResponse();
              ActionResponseImpl res = (ActionResponseImpl) externalContext.getResponse();


              // HttpServletResponseWrapper response = res.getRealResponse();
              // response.setContentType("application/xls");
              // response.setContentLength((int) reportFile.length());
              // response.setHeader("Content-Disposition", "attachment; filename=\"" + filename + "\";");
              // log.info("Content-Disposition attachment; filename=\"" + filename + "\";");
              // log.error("Content-Disposition attachment; filename=\"" + filename + "\";");
              try
              {
              // ServletOutputStream os = response.getOutputStream();
              ByteArrayOutputStream os = new ByteArrayOutputStream();

              FileInputStream fis = new FileInputStream(reportFile);

              while ((read = fis.read(bytes)) != -1)
              {
              os.write(bytes, 0, read);
              }
              fis.close();
              //
              // os.flush();
              // os.close();
              byte[] binaryData = os.toByteArray();
              DocumentData data = new ByteArrayDocumentData("report",
              new DocumentData.DocumentType("pdf", "application/pdf"),
              binaryData);
              String docId = documentStore.newId();
              documentStore.saveData(docId, data);
              String documentUrl =
              documentStore.preferredUrlForContent(
              data.getBaseName(),
              data.getDocumentType().getExtension(),
              docId);
              FacesContext.getCurrentInstance().getExternalContext().redirect(
              manager.encodeConversationId(documentUrl));

              // FacesContext.getCurrentInstance().getExternalContext().redirect(reportFile.toURI().toString());
              // FacesContext.getCurrentInstance().responseComplete();
              // facesContext.responseComplete();
              }
              catch (Exception e)
              {
              if (log.isErrorEnabled())
              {
              log.error(DownloadComponent.class, e);
              }
              }
              }
              }


              But the injections did not succed. I got:

              org.jboss.seam.RequiredException: @In attribute requires non-null value: downloadComponent.#{org.jboss.seam.document.DocumentStore}
              at org.jboss.seam.Component.getValueToInject(Component.java:2335)

              I use PorteltBridge Version CR2 with SEAM jboss-seam-2.1.2.CR2

              Any hints how to correct generate PDF an XLS Files and download them with correct filename and extension (.pdf and .xls) are welcome.

              Kind regards

              Günther Herndl

              • 4. Re: ava.lang.ClassCastException: org.jboss.portal.portlet.im
                Günther Herndl Newbie

                If I use our default SEAM Solution:
                /**
                *
                */
                package de.softcon.ivory.invserver.action.report;



                import java.io.ByteArrayOutputStream;
                import java.io.File;
                import java.io.FileInputStream;
                import java.io.IOException;
                import java.io.OutputStream;
                import java.util.Iterator;
                import java.util.Map;

                import javax.faces.context.ExternalContext;
                import javax.faces.context.FacesContext;
                import javax.portlet.PortletMode;
                import javax.portlet.PortletModeException;
                import javax.portlet.WindowState;
                import javax.portlet.WindowStateException;
                import javax.servlet.ServletOutputStream;
                import javax.servlet.http.HttpServletResponseWrapper;

                import org.jboss.portal.portlet.impl.jsr168.api.ActionResponseImpl;
                import org.jboss.seam.annotations.In;
                import org.jboss.seam.annotations.Import;
                import org.jboss.seam.annotations.Logger;
                import org.jboss.seam.annotations.Name;
                import org.jboss.seam.core.Manager;
                import org.jboss.seam.document.ByteArrayDocumentData;
                import org.jboss.seam.document.DocumentData;
                import org.jboss.seam.document.DocumentStore;
                import org.jboss.seam.log.Log;





                /**
                * @author mbaumgar
                *
                */
                @Name("downloadComponent")
                @Import("org.jboss.seam.pdf")
                public class DownloadComponent
                {


                @In(value = "#{facesContext.externalContext}")
                private ExternalContext externalContext;
                @Logger
                private Log log;

                public void download(String filename, File reportFile)
                {
                int read = 0;
                byte[] bytes = new byte[1000];

                ActionResponseImpl res = (ActionResponseImpl)FacesContext.getCurrentInstance().getExternalContext().getResponse();


                HttpServletResponseWrapper response = res.getRealResponse();
                response.setContentType("application/xls");
                response.setContentLength((int) reportFile.length());
                response.setHeader("Content-Disposition", "attachment; filename=\"" + filename + "\";");
                log.info("Content-Disposition attachment; filename=\"" + filename + "\";");
                log.error("Content-Disposition attachment; filename=\"" + filename + "\";");
                try
                {
                ServletOutputStream os = response.getOutputStream();

                FileInputStream fis = new FileInputStream(reportFile);

                while ((read = fis.read(bytes)) != -1)
                {
                os.write(bytes, 0, read);
                }
                fis.close();

                os.flush();
                os.close();

                FacesContext.getCurrentInstance().responseComplete();
                }
                catch (Exception e)
                {
                if (log.isErrorEnabled())
                {
                log.error(DownloadComponent.class, e);
                }
                }
                }
                }

                I get the follwing exception with wrong file-names and lost extension (.pdf or .xls):

                2009-09-10 11:51:08,161 DEBUG [org.jboss.seam.Component] trying to inject with EL expression: #{facesContext.externalContext}
                2009-09-10 11:51:08,161 INFO [de.softcon.ivory.invserver.action.report.DownloadComponent] Content-Disposition attachment; filename="listOfAsset.pdf";
                2009-09-10 11:51:08,161 ERROR [de.softcon.ivory.invserver.action.report.DownloadComponent] Content-Disposition attachment; filename="listOfAsset.pdf";
                2009-09-10 11:51:08,161 DEBUG [javax.enterprise.resource.webcontainer.jsf.lifecycle] Exiting InvokeApplicationsPhase
                2009-09-10 11:51:08,161 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process after phase INVOKE_APPLICATION 5
                2009-09-10 11:51:08,161 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] committing transaction after phase: INVOKE_APPLICATION 5
                2009-09-10 11:51:08,161 DEBUG [org.jboss.seam.transaction.UTTransaction] committing JTA transaction
                2009-09-10 11:51:08,161 DEBUG [org.hibernate.transaction.CacheSynchronization] transaction before completion callback
                2009-09-10 11:51:08,161 DEBUG [org.hibernate.jdbc.JDBCContext] before transaction completion
                2009-09-10 11:51:08,161 DEBUG [org.hibernate.impl.SessionImpl] before transaction completion
                2009-09-10 11:51:08,161 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] automatically flushing session
                2009-09-10 11:51:08,161 DEBUG [org.hibernate.impl.SessionImpl] automatically flushing session
                2009-09-10 11:51:08,161 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] flushing session
                2009-09-10 11:51:08,161 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] processing flush-time cascades
                2009-09-10 11:51:08,161 DEBUG [org.hibernate.engine.Cascade] processing cascade ACTION_PERSIST_ON_FLUSH for: de.softcon.ivory.invserver.model.tenant.Tenant
                2009-09-10 11:51:08,161 DEBUG [org.hibernate.engine.Cascade] done processing cascade ACTION_PERSIST_ON_FLUSH for: de.softcon.ivory.invserver.model.tenant.Tenant
                ..........
                Lines Deleted
                ..........
                2009-09-10 11:51:08,161 DEBUG [org.jboss.seam.contexts.FacesLifecycle] <<< End JSF request for /invserverproject/faces
                2009-09-10 11:51:08,161 DEBUG [javax.enterprise.resource.webcontainer.jsf.timing] [TIMING] - [516ms] : Execution time for phase (including any PhaseListeners) -> INVOKE_APPLICATION 5
                2009-09-10 11:51:08,161 DEBUG [org.jboss.portal.core.identity.cache.IdentityCacheService] Identity cache invalidated
                2009-09-10 11:51:08,161 DEBUG [org.hibernate.transaction.CacheSynchronization] transaction after completion callback, status: 4
                2009-09-10 11:51:08,161 DEBUG [org.hibernate.jdbc.JDBCContext] after transaction completion
                2009-09-10 11:51:08,161 DEBUG [org.hibernate.impl.SessionImpl] after transaction completion
                2009-09-10 11:51:08,161 DEBUG [org.hibernate.transaction.CacheSynchronization] automatically closing session
                2009-09-10 11:51:08,161 DEBUG [org.hibernate.impl.SessionImpl] automatically closing session
                2009-09-10 11:51:08,161 DEBUG [org.hibernate.impl.SessionImpl] closing session
                2009-09-10 11:51:08,161 DEBUG [org.hibernate.jdbc.ConnectionManager] connection already null in cleanup : no action
                2009-09-10 11:51:08,177 DEBUG [org.hibernate.transaction.CacheSynchronization] transaction after completion callback, status: 4
                2009-09-10 11:51:08,177 DEBUG [org.hibernate.jdbc.JDBCContext] after transaction completion
                2009-09-10 11:51:08,177 DEBUG [org.hibernate.impl.SessionImpl] after transaction completion
                2009-09-10 11:51:08,177 DEBUG [org.hibernate.transaction.CacheSynchronization] automatically closing session
                2009-09-10 11:51:08,177 DEBUG [org.hibernate.impl.SessionImpl] automatically closing session
                2009-09-10 11:51:08,177 DEBUG [org.hibernate.impl.SessionImpl] closing session
                2009-09-10 11:51:08,177 DEBUG [org.hibernate.jdbc.ConnectionManager] connection already null in cleanup : no action
                2009-09-10 11:51:08,177 ERROR [org.jboss.portal.server.servlet.PortalServlet] Unexpected exception
                java.lang.IllegalStateException
                at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435)
                at org.jboss.portal.core.controller.handler.HTTPResponse$1.sendResponse(HTTPResponse.java:56)
                at org.jboss.portal.core.controller.Controller.sendResponse(Controller.java:363)
                at org.jboss.portal.core.controller.Controller.processHandlerResponse(Controller.java:349)
                at org.jboss.portal.core.controller.Controller.processCommandResponse(Controller.java:329)
                at org.jboss.portal.core.controller.Controller.processCommand(Controller.java:303)
                at org.jboss.portal.core.controller.Controller.handle(Controller.java:261)
                at org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDispatcher.java:51)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
                at org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor.invoke(IdentityBindingInterceptor.java:47)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTypeInterceptor.java:68)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.core.aspects.server.PortalContextPathInterceptor.invoke(PortalContextPathInterceptor.java:45)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor.java:96)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.java:196)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.server.aspects.server.SignOutInterceptor.invoke(SignOutInterceptor.java:98)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.core.impl.api.user.UserEventBridgeTriggerInterceptor.invoke(UserEventBridgeTriggerInterceptor.java:65)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.core.aspects.server.IdentityCacheInterceptor.invoke(IdentityCacheInterceptor.java:68)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.core.aspects.server.TransactionInterceptor.org$jboss$portal$core$aspects$server$TransactionInterceptor$invoke$aop(TransactionInterceptor.java:49)
                at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
                at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
                at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253)
                at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
                at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
                at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262)
                at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
                at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.server.aspects.LockInterceptor$InternalLock.invoke(LockInterceptor.java:69)
                at org.jboss.portal.server.aspects.LockInterceptor.invoke(LockInterceptor.java:130)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
                at org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:252)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                at java.lang.Thread.run(Thread.java:619)
                2009-09-10 11:51:08,177 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/portal].[PortalServletWithPathMapping]] Servlet.service() for servlet PortalServletWithPathMapping threw exception
                java.lang.IllegalStateException
                at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435)
                at org.jboss.portal.core.controller.handler.HTTPResponse$1.sendResponse(HTTPResponse.java:56)
                at org.jboss.portal.core.controller.Controller.sendResponse(Controller.java:363)
                at org.jboss.portal.core.controller.Controller.processHandlerResponse(Controller.java:349)
                at org.jboss.portal.core.controller.Controller.processCommandResponse(Controller.java:329)
                at org.jboss.portal.core.controller.Controller.processCommand(Controller.java:303)
                at org.jboss.portal.core.controller.Controller.handle(Controller.java:261)
                at org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDispatcher.java:51)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
                at org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor.invoke(IdentityBindingInterceptor.java:47)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTypeInterceptor.java:68)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.core.aspects.server.PortalContextPathInterceptor.invoke(PortalContextPathInterceptor.java:45)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor.java:96)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.java:196)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.server.aspects.server.SignOutInterceptor.invoke(SignOutInterceptor.java:98)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.core.impl.api.user.UserEventBridgeTriggerInterceptor.invoke(UserEventBridgeTriggerInterceptor.java:65)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.core.aspects.server.IdentityCacheInterceptor.invoke(IdentityCacheInterceptor.java:68)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.core.aspects.server.TransactionInterceptor.org$jboss$portal$core$aspects$server$TransactionInterceptor$invoke$aop(TransactionInterceptor.java:49)
                at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
                at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
                at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253)
                at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
                at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
                at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262)
                at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
                at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java)
                at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.server.aspects.LockInterceptor$InternalLock.invoke(LockInterceptor.java:69)
                at org.jboss.portal.server.aspects.LockInterceptor.invoke(LockInterceptor.java:130)
                at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
                at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
                at org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:252)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                at java.lang.Thread.run(Thread.java:619)
                2009-09-10 11:51:09,614 DEBUG [org.jbpm.job.executor.JobExecutorThread] acquiring jobs for execution...

                • 5. Re: ava.lang.ClassCastException: org.jboss.portal.portlet.im
                  Günther Herndl Newbie

                  the download use the window-name from *-object.xml instead:
                  <?xml version="1.0" encoding="UTF-8"?>


                  <parent-ref>default</parent-ref>
                  <if-exists>overwrite</if-exists>

                  <page-name>invserverproject</page-name>

                  <window-name>invserverprojectPortletWindow</window-name>
                  <instance-ref>invserverprojectPortletInstance</instance-ref>
                  center
                  0
                  <initial-window-state>maximized</initial-window-state>