1 Reply Latest reply on Sep 12, 2007 3:31 PM by Matt Cristantello

    Anyone had luck getting the Crystal Reports XI Viewer workin

    Matt Cristantello Newbie

      I am trying to use the getHtmlContent() method of the CrystalReportViewer object provided with the Crystal Reports XI product to render the viewer control inside a JSR 168 Portlet running on JBoss Portal 2.6.1 GA using the JBoss 4.0.5.GA AS, and I get a long NullPointerException buried inside the Crystal libraries when I try to render the crystal viewer.

      Some specifics about our environment:
      JDK: 1.5.0_10
      OS: Solaris 8
      Arch: Sparc

      Here is the relevant code from the JSP called via a PortletRequestDispatcher (you can assume that the reportSource is retrieved correctly, that part works fine):
      CrystalReportViewer viewer = new CrystalReportViewer();

      viewer.setName("CrystalReportViewer");
      viewer.setOwnPage(false);
      //Enable Active-X print mode.
      viewer.setPrintMode(CrPrintMode.ACTIVEX);
      //Obtain report source of the report that the viewer will display.
      viewer.setReportSource(reportSource);
      %>
      <%=viewer.getHtmlContent(request, response, getServletConfig().getServletContext())%>

      Here is the error:
      10:32:46,465 INFO [STDOUT] 2007-09-11 10:32:46
      java.lang.NullPointerException
      at com.crystaldecisions.report.web.viewer.JSPViewerRequest.getRequestURL(Unknown Source)
      at com.crystaldecisions.report.web.CrystalCommandBuilder.(Unknown Source)
      at com.crystaldecisions.report.web.component.o.a(Unknown Source)
      at com.crystaldecisions.report.web.WorkflowController.case(Unknown Source)
      at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source)
      at com.crystaldecisions.report.web.ServerControl.a(Unknown Source)
      at com.crystaldecisions.report.web.ServerControl.getHtmlContent(Unknown Source)
      at org.fstrf.common.reporting.crystal.CrystalWebHandler.getHtmlContent(CrystalWebHandler.java:272)
      at org.apache.jsp.WEB_002dINF.view.report_jsp._jspService(report_jsp.java:91)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
      at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
      at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
      at org.jboss.portal.portlet.impl.jsr168.api.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:86)
      at org.fstrf.actg.labdiv.rnaresults.portlet.RnaResultsPortletSimple.doView(RnaResultsPortletSimple.java:77)
      at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:133)
      at javax.portlet.GenericPortlet.render(GenericPortlet.java:306)
      at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.invokeRender(PortletContainerImpl.java:483)
      at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:405)
      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$TransactionInterceptor$invokeNotSupported$aop(TransactionInterceptor.java:86)
      at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSupported_N4547270787964792031.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_N4547270787964792031.invokeNext(TransactionInterceptor$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(TransactionInterceptor$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:58)
      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.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(PortletSessionSynchronizationInterceptor.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.java:89)
      at org.jboss.portal.web.jboss.JBossWebContext$InvokeNextCommand.execute(JBossWebContext.java:134)
      at sun.reflect.GeneratedMethodAccessor447.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.portal.server.servlet.CommandServlet.doGet(CommandServlet.java:99)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
      at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
      at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
      at org.jboss.portal.server.servlet.CommandServlet.include(CommandServlet.java:79)
      at org.jboss.portal.web.jboss.JBossWebContext.include(JBossWebContext.java:62)
      at org.jboss.portal.portlet.impl.spi.AbstractRequestContext.dispatch(AbstractRequestContext.java:81)
      at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:70)
      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.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:68)
      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.ValveInterceptor.invoke(ValveInterceptor.java:60)
      at org.jboss.portal.portlet.

      Thanks in advance,
      ~Matt