cancel
Showing results for 
Search instead for 
Did you mean: 

Report file didn't open -2147467259 Error code

former_member686570
Discoverer
1,534

Hi

I`m download crystal sdk for java

I try export report to format PDF

In my computer didn't installed software SAP or RAS

My code

`

import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;
import com.crystaldecisions.sdk.occa.report.lib.ReportSDKException;import java.io.File;
public class ReportTest {
public static void main(String[] args) throws ReportSDKException {
final String IMPORT_FILE = "rcapireport.rpt";        
final String EXPORT_FILE = "myExportedReport.pdf";
ClassLoader classLoader = new ReportTest().getClass().getClassLoader();
File file = new File(classLoader.getResource(IMPORT_FILE).getFile());
ReportClientDocument clientDoc = new ReportClientDocument();clientDoc.open(file, 0);}
}

`

and I have ERROR

Exception in thread "main" com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: org/apache/log4j/Logger---- Error code:-2147467259 Error code name:failed at com.businessobjects.sdk.erom.jrc.ReportAgentFactory.createAgent(SourceFile:54) at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.<init>(SourceFile:703) at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:662) at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:632) at com.crystaldecisions.sdk.occa.report.application.ClientDocument.if(SourceFile:504) at com.crystaldecisions.sdk.occa.report.application.ClientDocument.open(SourceFile:669) at ReportTest.main(ReportTest.java:41) Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger at com.businessobjects.reports.sdk.JRCCommunicationAdapter.<clinit>(SourceFile:190) at com.businessobjects.sdk.erom.jrc.a.<init>(SourceFile:43) at com.businessobjects.sdk.erom.jrc.ReportAgentFactory.createAgent(SourceFile:46) ... 6 more Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ... 9 more Process finished with exit code 1

Please, help

Tell me, what I need change or add to maven something?

View Entire Topic
dfarina
Explorer
0 Kudos

I ran into this problem as well, and as far as I can tell, the Crystal Reports Java Runtime uses a very outdated version of log4j. I couldn't even find a version of log4j that had the particular classpath it was looking for, but Apache has a log4j 1.x compatibility library, and on first blush the below artifact works for me:

https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-1.2-api

Note that I only had this problem upgrading from 12.2.225 to 12.2.228, and before I was just using plain log4j 1.2. Not sure what changed between the versions but something broke and a dependency is not being met in their standard library distribution.

dfarina
Explorer
0 Kudos

So the runtime doesn't throw any errors, but it doesn't print any logs. I suppose I would have to change the logging for my entire application to accommodate this latest version of the runtime.

Please address this SAP.