cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Can not create temp file: Failed to open the connection. Database Vendor Code: 17002

AM_RIT
Discoverer
0 Kudos
364

Hi all, I'm run into an issue with a custom Spring Boot application that uses the RAS SDK. Here's what I can share:

Environments:

SAP BO

SAP BO: 4.3 SP4 which recently underwent an in-place upgrade from 4.2 SP

OS: Windows Server 2016 Datacentre

Local dev environment

OS: Windows 11 Enterprise 22H2

IDE: Intellij Ultimate 2024.2.0.2

JDK: openJDK 17.0.2

Spring Boot: 3.3.2

Crystal Reports SDK: 14.3.4.5014

Linux test environment

OS: CentOS 7

JDK: openJDK 17.0.2

Situation:

I’ve developed a Spring Boot application that:

  • Makes a connection to our CMS

  • Returns a ReportClientDocument with the provided CUID

  • Passes a single ID (Long) to a single parameter (“INVOICE_ID”) via a ParameterFieldController

  • Exports the report as a PDF to an InputStream using reportClientDocument.getPrintOutputController()

This code works as expected from my Windows 11 dev machine. The PDF version of the report is exported and downloaded to my browser.

When I run this code on the Linux environment, the application throws an exception when attempting to export to PDF.

Here’s the exception:

Can not create temp file: Failed to open the connection.
7984_16364_{1D957F0F-EE8B-4DA1-AB65-14DC86C1469F}.rpt
Details:  [Database Vendor Code: 17002 ]

Here are some code snippets:

ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
IEnterpriseSession enterpriseSession = sessionMgr.logon(reportsUser, reportsPassword, reportsCmsname,reportsAuthen);

ILogonTokenMgr logonTokenMgr = enterpriseSession.getLogonTokenMgr();
String logonToken = logonTokenMgr.createLogonToken("", 30, 1);  
return enterpriseSession;

//...

return reportAppFactory = (IReportAppFactory) enterpriseSession.getService("RASReportService");

//...

reportAppFactory = (IReportAppFactory) ienterpriseSession.getService("RASReportService");
//Get the reportClientDoc by CUID
IInfoStore infoStore = (IInfoStore) ienterpriseSession.getService("", "InfoStore");
IInfoObjects infoObjects = infoStore.query("Select SI_ID, SI_NAME From CI_INFOOBJECTS WHERE SI_CUID = '" + cuid + "'");
return reportAppFactory.openDocument((IInfoObject) infoObjects.get(0), 0, Locale.ENGLISH);

//...

ParameterFieldController paramController = reportClientDoc.getDataDefController().getParameterFieldController();
paramController.setCurrentValues("", "INVOICE_ID", ids.toArray());

//...
//This is where an exception is thrown when run from my Linux VM
InputStream pdfStream = reportClientDocument.getPrintOutputController().export(ReportExportFormat.PDF);

The REPORTS.CrystalReports2020ReportApplicationServer trace log (level HIGH) doesn't seem to give me much (from what I can tell). This seems to be the most useful, but I'm not sure what to do with it

ErrorLog 2024  9  1 15:52:49.816 7984 5520 (Administrator:34) (..\reporthandler.cpp:13139): CReportHandler::buildReportViewerError: CSResultException thrown.   ErrorSrc:"CRPE" FileName:"..\reporthandler.cpp" LineNum:13135 ErrorCode:756 ErrorMsg:"Failed to open the connection.

I’ve come across a few posts related to this error, but either have no solution or a solution that doesn’t solve my problem. I don’t think it’s a read/write issue related to to the SAP data and temp folders. I’ve confirmed that the SYSTEM account on my CMS Windows server has R/W to those folders. I’ve also tried using JDBC and ODBC connections with the report I’m working with, but does not make a difference.

The issue only happens from the Linux VM, so I’m guessing it’s something between that server and my CMS.

Any thoughts?

Accepted Solutions (0)

Answers (0)