cancel
Showing results for 
Search instead for 
Did you mean: 

Needed jar files for Java SDK web development

Former Member
0 Kudos

Hello,

Could someone please provide the complete list of jar files that must be packaged with a web application that's using

the SDK for Crystal Server 2013 SP7 ?

I've gone through the SDK Developers docs and some of the jar files that are listed do not exist in the Crystal Server deployment

or the Crystal Server Client Tools.

I've included all the mentioned jar files in the SDK developers guide for BO 4.0 and a few others but am still having issues with

connecting to the CMS server.  In particular I'm receiving this Exception when I try to logon:

Exception in thread "Thread-72" java.lang.NoClassDefFoundError:  com/rsa/jsafe/JSAFE_InvalidUseException

Thank you for your help!

Scott

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Which are the jar files you are not able to find in the libraries of Crystal server installation?

Have you checked the files both in java/lib and java/lib/external.

You should also include the jars which are mentioned under BI Platform SDK in dev guide.

Which application server you are using. The exception you mentioned do not contain a any package from crystal server enterprise.

Thanks,

Prithvi

Former Member
0 Kudos

Hi Prithvi,

Here are the two jar files I've been unable to find in the CS2013 SP7 installation or Client Tools:

backport-util-concurrent-2.2.jar

stax-api-1.0.1.jar

I'm going by the SAP BI40 SDK dev docs and it lists these two under BI Platform Administration.

There are also two others listed under SAP Crystal Reports, but there is a note that JSF is deprecated:

Jsf-api.jar

Jsf-impl.jar

We're running Windows Server 2008 and the application is running on JBoss 7.1.1.

Fyi, I've resolved the exception I was receiving by moving the ....FIPS.jar files to a JBoss

module and adding a jboss deployment descriptor.

But I still receive the following Exception when the connection fails due to CMS being down etc.

I think it's being generated from the classes in the JBoss module and they don't have access to the

cecore.jar file.

NoClassDefFoundError:  IllegalName: com/crystaldecisions/sdk/exception/internal/SDKLogonExceptionResources

Thanks,

Scott

Former Member
0 Kudos

You have to refer to the jars given in the below document

http://help.sap.com/businessobject/product_guides/sbo41/en/sbo41_bip_java_dg_en.zip

Those two jars are not in the list of required jars for BI 4.1/CRS 2013.

Use the jars listed in the above document and in your application have the jars only from the current installation. If any jars from other versions of CRS you need to clean them up.

Also make sure you give classloading preferences to the applications jar over jboss for your application.

Thanks,

Prithvi

Former Member
0 Kudos

Thank you Prithvi!

I was only able to find the 40 and 42 documents.

This will help greatly.

I'll go through and clean up and then retest.  Hopefully this will help with an issue

I'm seeing trying to use the Crystal Viewer.  When I access the viewer from my web application, the browser opens with my custom jsf page but it's blank.

Thanks again,

Scott

Former Member
0 Kudos

You need to copy the crystalreportsviewers component which you will get from the installation of CRS in your web applications.

In the web.xml file you would need to map the viewer components. Information about the same can be found in the developers guide shared above. There are two mappings given a basic and a jsf component. Use the basic one.

Thanks,

Prithvi

Former Member
0 Kudos

I've made the changes to my web.xml and the jar files.  I have to have the JSF settings in my

web.xml because we use JSF in the web app.

The Crystal Viewer when it opens is still blank.

I currently have a html page that I open and in it I have a namespace of:

bocrv=http://www.businessobjects.com/jsf/crystalreportsviewers

and then in the html page I have a h:form with the following tag:

<bocrv:reportPageViewer

     reportSource= ref to the report I'm trying to display.

Do you have a link to an example of how to execute/call the reportviewer from a Java Web app?

Thanks,

Scott

Former Member
0 Kudos

You can refer to the sample available at

Seems the sample is replaced with another one as the sample has code to suppress header, so you can remove the below lines from the file 'ras2008_managed_suppressheader.jsp' and it can be used for simple preview of report in the viewer

=======================================================

// SUPPRESS PAGE HEADER

  // Get original Page Header section through the ReportDefController

  Section section = (Section) rcd.getReportDefController().getReportDefinition().getPageHeaderArea().getSections().getSection(0);

  // Make a copy of the section

  ISection iSectionCopy = (ISection) section.clone(true);

  // Get the SectionFormat object of the Section

  ISectionFormat iSectionFormat = iSectionCopy.getFormat();

  // Format Section - set suppress to true

  iSectionFormat.setEnableSuppress(true);

  // Set the Properties of the Section through the ReportSectionController by passing in the original section you wish to modify,

  // the type of propery you wish to set (ReportSectionProperyEnum.format), and the modified section property

  rcd.getReportDefController().getReportSectionController().setProperty(rcd.getReportDefController().getReportDefinition().getPageHeaderArea().getSections().getSection(0), ReportSectionPropertyEnum.format, iSectionCopy.getFormat());

==============================================================

This code is for 2008 server, however should work for 2013 as there are no major changes in the RAS sdks.

Thanks,

Prithvi

Former Member
0 Kudos

We are actually using JSF.

Do you possibly have an example for using JSF and 2013?

I'm actually upgrading our web application from 2008 to 2013.

The viewer works as expected with 2008 but with 2013 it's displaying a blank page.

The xhtml page I'm using to display the report is below.  This works in 2008.

Not sure if I'm missing some dependencies etc but I've included all the jar files and

crystalreportviewers folder in my web app, but no luck.

I'm seeing no errors at all, just a blank screen.

<html xmlns="http://www.w3.org/1999/xhtml"

      xmlns:ui="http://java.sun.com/jsf/facelets"

      xmlns:h="http://java.sun.com/jsf/html"

      xmlns:f="http://java.sun.com/jsf/core"

      xmlns:bocrv="http://www.businessobjects.com/jsf/crystalreportsviewers">

<head>

  <title>#{viewReportActions.reportTitle}</title>

  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

  <meta http-equiv="Pragma" content="no-cache"/>

  <meta http-equiv="Expires" content="0"/>

</head>

<body>

<f:view contentType="text/html">

  <h:form id="viewerForm">

    <bocrv:reportPageViewer

            reportSource="#{viewReportActions.iReportSource}"

            displayToolbarPrintButton="true"

            zoomPercentage="100"

            displayToolbarExportButton="true"

            displayToolbarRefreshButton="false"

            displayGroupTree="false"/>

  </h:form>

</f:view>

</body>

<head>

  <meta http-equiv="Pragma" content="no-cache"/>

  <meta http-equiv="Expires" content="0"/>

</head>

</html>

Thanks,

Scott

Former Member
0 Kudos

I changed my html page to the following but still no luck.  Still just displays a

blank browser page.

<html xmlns="http://www.w3.org/1999/xhtml"

      xmlns:ui="http://java.sun.com/jsf/facelets"

      xmlns:h="http://java.sun.com/jsf/html"

      xmlns:f="http://java.sun.com/jsf/core"

      xmlns:crviewer="/crystal-tags-reportviewer.tld">

<head>

  <title>#{viewReportActions.reportTitle}</title>

  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

  <meta http-equiv="Pragma" content="no-cache"/>

  <meta http-equiv="Expires" content="0"/>

</head>

<body>

<f:view contentType="text/html">

  <h:form id="viewerForm">

    <crviewer:viewer viewerName="viewerForm" reportSourceType="iReportSource"

            reportSourceVar="#{viewReportActions.iReportSource}"

            displayToolbarPrintButton="true"

            zoomPercentage="100"

            displayToolbarExportButton="true"

            displayToolbarRefreshButton="false"

            displayGroupTree="false"/>

  </h:form>

</f:view>

</body>

</html>

Thanks,

Scott

Former Member
0 Kudos

I have never worked with jsf so would not be able to help on the coding details. If you see any errors in the application logs that might help giving more detail.

Moreover, can you verify in web.xml file that you are using the correct name with case for crystalreportsviewers folder copied from the installation directory to your applications root context. This is required to be correct to invoke the viewer. Below is the parameter to check

<context-param>
  <param-name>crystal_image_uri</param-name>
  <param-value>/web_application_name/crystalreportviewers</param-value>
  </context-param>

Thanks,

Prithvi

Former Member
0 Kudos

Hi Prithvi,

I have the crystal_image_uri param set and it appears that it finds the viewer but isnt able to read the cached report from my backing object.

I changed the attribute reportSourceType to "reportingComponent" but still no luck.

I receive the following exception when it's trying to display the report:

2016-05-16 08:50:41 com.businessobjects.report.web.shared.WebReportingException: The viewer could not process an event. The report source could not be retrieved from the state object. [CRSDK00000957] ---- Error code:0 [CRWEB00000119] at com.businessobjects.report.web.shared.WebReportingException.throwWebReportingException(WebReportingException.java:71) at com.businessobjects.report.web.component.ViewerContainer.processEvents(ViewerContainer.java:1503) at com.businessobjects.report.web.WorkflowController.doEventProcessing(WorkflowController.java:373) at com.businessobjects.report.web.WorkflowController.doLifecycle(WorkflowController.java:275) at com.businessobjects.report.web.WorkflowController.doAsyncLifecycle(WorkflowController.java:108) at com.crystaldecisions.report.web.viewer.CrystalReportViewerUpdater._processHttpRequest(CrystalReportViewerUpdater.java:61) at com.crystaldecisions.report.web.ServerControl.processHttpRequest(ServerControl.java:345) at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.doUpdate(CrystalReportViewerServlet.java:206) at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.doPost(CrystalReportViewerServlet.java:194) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397) at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) at java.lang.Thread.run(Thread.java:745) Caused by: com.businessobjects.report.web.shared.WebReportingException: The report source could not be retrieved from the state object.---- Error code:0 [CRSDK00000957] at com.businessobjects.report.web.shared.WebReportingException.throwWebReportingException(WebReportingException.java:58) at com.businessobjects.report.web.state.ViewerState.fetchGroupTree(ViewerState.java:1744) at com.businessobjects.report.web.state.ViewerState.getGroupTree(ViewerState.java:1735) at com.businessobjects.report.web.event.GroupTreeListener.getGroupTree(GroupTreeListener.java:71) at com.businessobjects.report.web.event.GroupTreeListener.updateGroupTree(GroupTreeListener.java:59)

Thanks,

Scott

Former Member
0 Kudos

can you let me know how you are generating the report source. code for viewReportActions bean?

The reports are CR 2013 reports or crystal reports for enterprise reports?

Message was edited by: Prithviraj Shekhawat

Former Member
0 Kudos

Sure, here it is:

private long runCrystalReport() throws Exception {
    ReportMaster r = reportMaster;
    ReportClientDocument rcd = crystalUtils.runReport(
        r.getObjectName(), getParameterMap(), r.getDsUserId(), r.getDsPassword());
    userSessionDataBean.setiReportSource(rcd.getReportSource());
    return crystalUtils.countRowsInReport(rcd);
}

public ReportClientDocument runReport (
        String inReportName,
        Map<String, String> parameterMap,
        String dataSourceUsername,
        String dataSourcePassword) throws Exception {

    say ("About to run report " + inReportName);
    IEnterpriseSession session = login();

    ReportClientDocument rdc = getReportObject(session, inReportName);
    setReportConnections(rdc, dataSourceUsername, dataSourcePassword);
    setParameterValues(parameterMap, rdc);
    /* TODO: Ideally we'd log off Crystal at this point but then the ReportClientDocument
    can no longer be accessed. There may still be session issues to deal with.
     */
    return rdc;
}

private ReportClientDocument getReportObject(IEnterpriseSession session, String reportName) throws Exception {

    IInfoStore is = getInfoStore(session);
    IInfoObjects oo = is.query(reportQuery(reportName));
    if (oo.size() == 0) {
        throw new Exception("Report not found on Crystal server");
    }
    IInfoObject o = (IInfoObject) oo.get(0);

    IReportAppFactory raf = (IReportAppFactory) session.getService("RASReportFactory");
    return raf.openDocument(o, OpenReportOptions._openAsReadOnly, Locale.ENGLISH);
}

I then use the iReportSource store in the userSessionBean in the ViewReportActions.

I also tried the following with no success:

private void setCrystalRptReportSource(IInfoObject report, IEnterpriseSession session) throws Exception {
    IReportSourceFactory2 reportFactory = (IReportSourceFactory2) session.getService ("", "RASReportFactory");
    Object reportSource = reportFactory.createReportSource(report, Locale.ENGLISH);

    HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest();
    HttpSession httpSession = request.getSession();
    httpSession.setAttribute("CrystalReportSource",reportSource);

}

And used CrystalReportSource in my html page as the

reportSourceVar

I get the same exception no matter what I try.

Thanks!  I greatly appreciate your help trying to narrow this down.

Scott

Former Member
0 Kudos

I was not able to follow your response as I was not following the forums for past few days.

Were you able to resolve the issue.

Your code looks good. I am not sure if I would be able to assist more as I have never worked with JSF component with crystal.

Just make sure you are not closing the reportclientdocument object before passing the report source to the viewer. The issue seems to be with the report source being passed in the session. Have a check in your code whether you are able to get the report source in the session to the viewer page.

Thanks,

Prithvi

Former Member
0 Kudos

Thanks Prithvi,

Unfortunately I still have not resolved the issue.

I've opened a case with SAP and waiting on their response.

I'll take a closer look to see if the source is available to the viewer.

It's difficult because I"m unable to debug from my desktop to the crystal server.

When I make the call to the Crystal OpenDocument method from my desktop, it just

hangs and never returns until I shutdown my local JBoss instance.

I've tried updating the Hosts files on the machines but nothing seems to work.

Thanks,

Scott