cancel
Showing results for 
Search instead for 
Did you mean: 

Migrating java application from cr4e to crystal server 2013

Former Member
0 Kudos

Hi,

I have developed a prototype using Crystalruntime shipped with CR4E. I have learned that we have 5CAL Crystal server 2013 license.

The app that I developed can be deployed on tomcat of Crystal server 2013 and I have verified it works by deploying it in the crystal server 2013 tomcat..

1. Is this the correct approach?

2. If no, Should I migrate my application to use jars available with Crystal server 2013?

I have tried replacing the CR4E jars with the ones provided by Crystal Server 2013 but I had to change the packages for the code classe to fix compilation issues. Also, I get all kinds of runtime errors when I deploy the war with crystal server 2013 jars.

Below is the jar list I am using from Crystal Server 2013.

What is the approach to develop java applications using crystal server 2013?

My requirement is opening Crystal report in the browser, export it in pdf.

Best Regards,

Bharat

Jar list:

com.azalea.ufl.barcode.1.0.jar

commons-codec-1.4.jar

commons-collections-3.1.jar

commons-configuration-1.2.jar

commons-io-1.1.jar

commons-lang-2.1.jar

commons-logging.jar

CrystalReportsRuntime.jar

CrystalReportsSDK.jar

cvom.jar

DatabaseConnectors.jar

derby.jar

icu4j.jar

JDBInterface.jar

keycodeDecoder.jar

pfjgraphics_driver.jar

QueryBuilder.jar

webreporting.jar

xpp3.jar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Having the server version, you have two options in which you can view a report.

1. Managed(By publishing the report to the Crystal Report Server 2013 repository)

2. Unmanaged(Report not published to the repository)

Whatever approach you choose, if you are moving from CR4E to Crystal Report Server, you would need to use the jars provided by the Crystal Report server.

The list of jars which would be required can be found from the developers guide of BusinessIntelligence Platform Java SDK guide. You might want to look at RAS SDKs along with viewers SDK which is used to export the report to pdf or view a report in the viewer.

Samples are available at

http://www.sdn.sap.com/irj/boc/index?rid=/webcontent/uuid/f0aea666-5384-2b10-ffb0-a6facef1d5e5

The samples are for XI 3.1/Crystal Report Server 2008 version, however can be used for 2013 version as well as there is not much significant difference.

The only thing to keep in mind is to use the crystalreportviewers folder and jars from the current version.

It would be best to explore the developers guide to understand it better.

You find the guides at http://help.sap.com

Navigate to Analytics--> Business Intelligence Platform(Enterprise)--> Select the version and refer to the Development section.

Regarding the deployment of your WAR, you can choose any approach, either have it installed on the tomcat which comes bundled with the server or have your own stanalone app server and deploy it in that.

Thanks,

Prithvi


Former Member
0 Kudos

Hi Prithvi,

Thanks for your help.

The jars listed in the dev guide is probably not complete. I had to copy one additional jar sap.com~tc~sec~csi.jar. Also I copied crystalreportviewers from \SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\warfiles\webapps\MobileBIService since the path mentioned in the guide is not in the crystal server directory structure.

I was getting the below exception while dhtml template rendering.

- Unable to determine installed languages

java.lang.NullPointerException

I added langpacks.properties after going thru source with property value INSTALLEDLANGUAGES=en

It removed the error. I have managed to remove all the runtime errors and I am able to export my crystal report into pdf format correctly.

But I am not able to view the report in browser. It just returns empty page.

If I view the source, i see some code related to crystal css, images and CrystalViewerHandler registration but not the dynamic html related to the data I had set? It was working fine when I used Crystal runtime engine.

My code in Servlet  is:

ReportClientDocument boReportClientDocument = new ReportClientDocument();

boReportClientDocument.setReportAppServer("RASIP:1566");

boReportClientDocument.open(reportLayout+".rpt",0);

byte[] xmlBytes = IOUtils.toByteArray(reponse.getEntity().getContent());

ixmlDataSet.setXMLData(xmlByteArray);

ixmlDataSet.setXMLSchema(xsdByteArray);

boReportClientDocument.getDatabaseController().setDataSource(ixmlDataSet);

boReportClientDocument.getSubreportController().setDataSource("SubReport",ixmlDataSet);

request.getSession(true).setAttribute("reportSource", boReportClientDocument.getReportSource());

response.sendRedirect("jsp/crystal-viewer.jsp");

In my crystal-viewer.jsp:

CrystalReportViewer viewer = new CrystalReportViewer();

viewer.setName("Crystal_Report_Viewer");

viewer.setOwnPage(false);

viewer.setOwnForm(true);

viewer.setPrintMode(CrPrintMode.ACTIVEX);

//Get the report source object that this viewer will be displaying.

Object reportSource = request.getSession(true).getAttribute("reportSource");

viewer.setReportSource(reportSource);

//Render the report.

viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);

viewer.dispose();

It just returns empty page.

Any pointers?

Former Member
0 Kudos

Have you configured your web.xml with the entries to support the crystalreportviewer?

Refer to the developers guide's section 'configure web.xml'.

Thanks,

Prithvi

Former Member
0 Kudos

Yes I did that already...

I know the reason now...It seems you can't do both boReportClientDocument.close() as well as viewer.dispose()!

I commented out viewer.dispose()  and I can view the report now in browser now....

But I am getting new exception!

You have been great ...thanks for your help!

Going for another question as I can't seem to find solution for this anywhere......

When I try to view the report for more than 1 record, it gives me error when navigating to second report....

My war is deployed in crystal server's tomcat.

It says the CMS server has been disabled!

2015-02-05 19:34:00

com.businessobjects.report.web.shared.WebReportingException: The viewer could not process an event. Unable to connect to the server: {0}. --- Connection reset [CRSDK00000039] ---- 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:1434)

  at com.businessobjects.report.web.WorkflowController.doEventProcessing(WorkflowController.java:353)

  at com.businessobjects.report.web.WorkflowController.doLifecycle(WorkflowController.java:255)

  at com.businessobjects.report.web.WorkflowController.doAsyncLifecycle(WorkflowController.java:106)

  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:641)

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

  at com.sungard.reports.Interceptor.doFilter(Interceptor.java:33)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)

  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)

  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)

  at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)

  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

  at java.lang.Thread.run(Thread.java:743)

Caused by: java.net.SocketException: Connection reset

  at java.net.SocketInputStream.read(SocketInputStream.java:168)

  at java.net.SocketInputStream.read(SocketInputStream.java:182)

  at java.io.DataInputStream.readInt(DataInputStream.java:370)

  at com.crystaldecisions.proxy.remoteagent.TCPIPCommunicationAdapter.request(TCPIPCommunicationAdapter.java:574)

  ... 41 more

The servers all look ok..I can view the report for 1st rowbut not for the 2nd row?

Former Member
0 Kudos

Crystal Report Viewer works by postback

While using viewer.dispose() and clientDoc.close() together in BI 4.x,

the viewer servlet is trying to work with the ReportSource saved to HTTP Session, but you've disposed it on RAS.

In BI 4.x the postback takes place immediately, hence the Exception is thrown

Regarding the exception you are getting now, I see the port 1566 being used

boReportClientDocument.setReportAppServer("RASIP:1566");

Have you set this ip port in RAS command line arguments.

Thanks,

Prithvi

Former Member
0 Kudos

Yes....See the config below...

the actual code is boReportClientDocument.setReportAppServer("AP-PUN-APPDEV01:1566");

Former Member
0 Kudos

Is your application and Crystal server on different physical machines?

Try using the IP address of your machine instead of host name in setReportAppServer method.

If your application and BO server are on diffrent physical machines, try to do host port mapping in the hostfile and try to connect again.

In application machine do mappings for BO server and Vice-versa. Also try to telnet on port 1566 from the app server machine to crystal server.

Make sure Guest account is enabled.

Thanks,

Prithvi

Former Member
0 Kudos

My app and Crystal server 2013 are on the same machine.

My app is deployed on tomcat 7 shipped with Crystal server along with BOE,launchpad and CMC applications....

Guest account is already enabled.

I changed the hostname to ip of the machine but the same exception.

I can the port is correctly associated to RAS service.

Former Member
0 Kudos

Can you confirm that you have not closed the reportclientdocument object before passing the reportsource to the viewer?


Former Member
0 Kudos

Code action in sequence in Servlet:

1. Open report using boReportClientDocument

2. Set xml datasource at runtime

3. set reportSource in session

4. Redirect to viewer JSP

Code action in sequence in JSP:

1.Initialise CrystalReportViewer

2. Get reportSource from Session and set it in CrystalReportViewer

3. Call viewer.processHttpRequest

4. Dispose Viewer


I even tried commenting our viewer.dispose() but still the same error!

2015-02-09 14:21:36

com.businessobjects.report.web.shared.WebReportingException: The viewer could not process an event. Server has been disabled by CMS AP-PUN-APPDEV01:6400

[CRSDK00000000] ---- Error code:0 [CRWEB00000119]

at com.businessobjects.report.web.shared.WebReportingException.throwWebReportingException(WebReportingException.java:71)

at c

FYI, the report is designed as Main report and subreport. The main report and its interlinked subreport is rendered separately for each Statement number. When I view the report by setting datasource with only 1 statement number it works....But when I set more than 1 statement numbers in the datasource, it will render 2 main report and its interlinked subreport within the same browser window. But currently it gives error when navigating to the second main report.

This used to work fine with crystal runtime....

Former Member
0 Kudos

There seems to be a problem with the report template. I have reported this issue on SAP forum and they think that this is related to report design. They are running diagnostics on the report. Not sure why this used to work with Crystal runtime engine but does not work with Crystal Server sdk.

Also this exceptions seems a bit misleading. If there is indeed problem with report design it should throw an exception which can tell the user something is wrong with the report design. At the moment, it just says Server has been disabled.

Answers (0)