AurobindoSaha
Programmer
I am getting a NullPointerException while trying to open the crystal report using JRC. Attached is the crystal reports version, java version, the program snippet which is used, the output and Exception thrown. I have also attached the config file.
It would be great if you could help me debug this problem and get it fixed.
Crystal reports XI Release 2
version : 11.5.0.313
Java Version : 1.4.2_08
Program :
ReportClientDocument reportClientDoc = new ReportClientDocument();
reportClientDoc.open(REPORT_FILE_NAME, 0); - Exception is thrown. REPORT_FILE_NAME is the absolute location of the report.
PrintOutputController print = reportClientDoc.getPrintOutputController();
ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream) print.export(ReportExportFormat.MSExcel);
OUTPUT :
- All configurations cleared.
- New configuration being added to the stack.
- received request: verifyLogon
java.lang.NullPointerException
at com.crystaldecisions.sdk.occa.report.application.ReportAppSession.do(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportAppSession.initialize(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ClientDocument.for(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.for(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ClientDocument.open(Unknown Source)
at com.crystaldecisions.reports.sdk.ReportClientDocument.open(Unknown Source)
at com.wellsfargo.irx.operStats.operStatsReport.main(operStatsReport.java:24)
CONFIG FILE :
<?xml version="1.0" encoding="utf-8"?><CrystalReportEngine-configuration>
<reportlocation>../..</reportlocation>
<timeout>10</timeout>
<ExternalFunctionLibraryClassNames>
<classname> </classname>
<classname> </classname>
</ExternalFunctionLibraryClassNames>
<keycode>…keycode…..keycode>
<Javaserver-configuration>
<DataDriverCommon>
<JavaDir>C:\Program Files\Business Objects\j2sdk1.4.2_08\bin</JavaDir>
<Classpath>C:\Program Files\Business Objects\Common\3.5\java\lib\crlovmanifest.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\CRLOVExternal.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\CRDBJavaServerCommon.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\CRDBJavaServer.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\CRDBJDBCServer.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\CRDBXMLServer.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\CRDBJavaBeansServer.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\external\CRDBXMLExternal.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\external\log4j.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\cecore.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\celib.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\ebus405.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\corbaidl.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\external\freessl201.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\external\asn1.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\external\certj.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\external\jsafe.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\external\sslj.jar;${CLASSPATH}</Classpath>
<IORFileLocation>${TEMP}</IORFileLocation>
<JavaServerTimeout>1800</JavaServerTimeout>
<JVMMaxHeap>64000000</JVMMaxHeap>
<JVMMinHeap>32000000</JVMMinHeap>
<NumberOfThreads>100</NumberOfThreads>
</DataDriverCommon>
<JDBC>
<CacheRowSetSize>100</CacheRowSetSize>
<JDBCURL>dburl</JDBCURL>
<JDBCClassName>dbclassnameJDBCClassName>
<JDBCUserName></JDBCUserName>
<JNDIURL></JNDIURL>
<JNDIConnectionFactory></JNDIConnectionFactory>
<JNDIInitContext>/</JNDIInitContext>
<JNDIUserName>weblogic</JNDIUserName>
<GenericJDBCDriver>
<Default>
<ServerType>UNKNOWN</ServerType>
<QuoteIdentifierOnOff>ON</QuoteIdentifierOnOff>
<StoredProcType>Standard</StoredProcType>
<LogonStyle>Standard</LogonStyle>
</Default>
<Sybase>
<ServerType>SYBASE</ServerType>
<QuoteIdentifierOnOff>OFF</QuoteIdentifierOnOff>
<DriverClassName>com.sybase.jdbc2.jdbc.SybDriver</DriverClassName>
<StoredProcType>Standard</StoredProcType>
<LogonStyle>MySQL</LogonStyle>
</Sybase>
</GenericJDBCDriver>
</JDBC>
<XML>
<CacheRowSetSize>100</CacheRowSetSize>
<PreReadNBytes>4096</PreReadNBytes>
<XMLLocalURL></XMLLocalURL>
<SchemaLocalURL></SchemaLocalURL>
<XMLHttpURL></XMLHttpURL>
<SchemaHttpURL></SchemaHttpURL>
</XML>
<JavaBeans>
<CacheRowSetSize>100</CacheRowSetSize>
<JavaBeansClassPath></JavaBeansClassPath>
</JavaBeans>
</Javaserver-configuration>
</CrystalReportEngine-configuration>
It would be great if you could help me debug this problem and get it fixed.
Crystal reports XI Release 2
version : 11.5.0.313
Java Version : 1.4.2_08
Program :
ReportClientDocument reportClientDoc = new ReportClientDocument();
reportClientDoc.open(REPORT_FILE_NAME, 0); - Exception is thrown. REPORT_FILE_NAME is the absolute location of the report.
PrintOutputController print = reportClientDoc.getPrintOutputController();
ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream) print.export(ReportExportFormat.MSExcel);
OUTPUT :
- All configurations cleared.
- New configuration being added to the stack.
- received request: verifyLogon
java.lang.NullPointerException
at com.crystaldecisions.sdk.occa.report.application.ReportAppSession.do(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportAppSession.initialize(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ClientDocument.for(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.for(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ClientDocument.open(Unknown Source)
at com.crystaldecisions.reports.sdk.ReportClientDocument.open(Unknown Source)
at com.wellsfargo.irx.operStats.operStatsReport.main(operStatsReport.java:24)
CONFIG FILE :
<?xml version="1.0" encoding="utf-8"?><CrystalReportEngine-configuration>
<reportlocation>../..</reportlocation>
<timeout>10</timeout>
<ExternalFunctionLibraryClassNames>
<classname> </classname>
<classname> </classname>
</ExternalFunctionLibraryClassNames>
<keycode>…keycode…..keycode>
<Javaserver-configuration>
<DataDriverCommon>
<JavaDir>C:\Program Files\Business Objects\j2sdk1.4.2_08\bin</JavaDir>
<Classpath>C:\Program Files\Business Objects\Common\3.5\java\lib\crlovmanifest.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\CRLOVExternal.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\CRDBJavaServerCommon.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\CRDBJavaServer.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\CRDBJDBCServer.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\CRDBXMLServer.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\CRDBJavaBeansServer.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\external\CRDBXMLExternal.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\external\log4j.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\cecore.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\celib.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\ebus405.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\corbaidl.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\external\freessl201.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\external\asn1.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\external\certj.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\external\jsafe.jar;C:\Program Files\Business Objects\Common\3.5\java\lib\external\sslj.jar;${CLASSPATH}</Classpath>
<IORFileLocation>${TEMP}</IORFileLocation>
<JavaServerTimeout>1800</JavaServerTimeout>
<JVMMaxHeap>64000000</JVMMaxHeap>
<JVMMinHeap>32000000</JVMMinHeap>
<NumberOfThreads>100</NumberOfThreads>
</DataDriverCommon>
<JDBC>
<CacheRowSetSize>100</CacheRowSetSize>
<JDBCURL>dburl</JDBCURL>
<JDBCClassName>dbclassnameJDBCClassName>
<JDBCUserName></JDBCUserName>
<JNDIURL></JNDIURL>
<JNDIConnectionFactory></JNDIConnectionFactory>
<JNDIInitContext>/</JNDIInitContext>
<JNDIUserName>weblogic</JNDIUserName>
<GenericJDBCDriver>
<Default>
<ServerType>UNKNOWN</ServerType>
<QuoteIdentifierOnOff>ON</QuoteIdentifierOnOff>
<StoredProcType>Standard</StoredProcType>
<LogonStyle>Standard</LogonStyle>
</Default>
<Sybase>
<ServerType>SYBASE</ServerType>
<QuoteIdentifierOnOff>OFF</QuoteIdentifierOnOff>
<DriverClassName>com.sybase.jdbc2.jdbc.SybDriver</DriverClassName>
<StoredProcType>Standard</StoredProcType>
<LogonStyle>MySQL</LogonStyle>
</Sybase>
</GenericJDBCDriver>
</JDBC>
<XML>
<CacheRowSetSize>100</CacheRowSetSize>
<PreReadNBytes>4096</PreReadNBytes>
<XMLLocalURL></XMLLocalURL>
<SchemaLocalURL></SchemaLocalURL>
<XMLHttpURL></XMLHttpURL>
<SchemaHttpURL></SchemaHttpURL>
</XML>
<JavaBeans>
<CacheRowSetSize>100</CacheRowSetSize>
<JavaBeansClassPath></JavaBeansClassPath>
</JavaBeans>
</Javaserver-configuration>
</CrystalReportEngine-configuration>