on 2019 Oct 31 10:08 AM
Hi,
I've a problem with Date Formats after upgrading to newer Java Version (or to 64-bit JRE) or CR for Java Versions.
The Report:
uses Date Fields with Format: use the Short System Date
The Working Environment:
Windows 10 with German Locale, but System Date Format set to "JJJJ-MM-TT" (english equivalent would be YYYY--MM-DD)
CrystalReports for Java Version 12.2.220
Oracle JRE 1.8_u74 x86/32bit
Expected Output:
2019-10-29
The *NOT* working Environment:
use Oracle JRE 1.8 u74 x86_64/64bit (or any other newer Oracle or OpenJDK)
-or-
update Crystal Reports to newer version, eg. 12.2.225
wrong Output:
29.10.2019 (so this is the default German Locale, but not the Locale defined in the System Settings under Windows)
Ideas/Pointers:
somewhere in JDK8 Development there were changes to the locale handling.(see https://docs.oracle.com/javase/8/docs/technotes/guides/intl/enhancements.8.html)
now there is a property
java.locale.providers
which controls where the JRE takes it's locale values from.
I've a small Java Testprogram:
import java.text.DateFormat;
import java.util.Calendar;
public class ATest {
public static void main(final String[] args) throws Exception {
final DateFormat format = DateFormat.getDateInstance(DateFormat.SHORT);
final Calendar cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, 31);
cal.set(Calendar.MONTH, Calendar.MARCH);
cal.set(Calendar.YEAR, 2012);
System.out.println("Date: " + format.format(cal.getTime()));
}
}
when just run on the described environment (so any newer 64bit JRE) it produces:
Date: 31.03.12
when adding -Djava.locale.providers=HOST when running this program it produces
Date: 2012-03-31
which is the expected output.
When adding this property to the Java Runtime which executes the Report i get the following exception:
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unerwarteter Datenbank-Connector-Fehler---- Error code:-2147467259 Error code name:failed
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:238)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:148)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:129)
<snipped>
Caused by: com.crystaldecisions.reports.common.QueryEngineException: Unerwarteter Datenbank-Connector-Fehler
at com.crystaldecisions.reports.queryengine.Connection.a(SourceFile:2963)
at com.crystaldecisions.reports.queryengine.Rowset.Ao(SourceFile:956)
at com.crystaldecisions.reports.queryengine.Rowset.bM(SourceFile:533)
at com.crystaldecisions.reports.queryengine.Rowset.z6(SourceFile:245)
at com.crystaldecisions.reports.queryengine.RowsetBase.zU(SourceFile:162)
at com.crystaldecisions.reports.queryengine.QueryInfo.vY(SourceFile:261)
at com.crystaldecisions.reports.datafoundation.DFQuery.for(SourceFile:628)
at com.crystaldecisions.reports.datalayer.a.do(SourceFile:1621)
at com.crystaldecisions.reports.datalayer.a.a(SourceFile:1404)
at com.crystaldecisions.reports.dataengine.m.void(SourceFile:336)
at com.crystaldecisions.reports.dataengine.j.void(SourceFile:531)
at com.crystaldecisions.reports.dataengine.m.o(SourceFile:422)
at com.crystaldecisions.reports.dataengine.m.a(SourceFile:173)
at com.crystaldecisions.reports.dataengine.ContextNode.a(SourceFile:114)
at com.crystaldecisions.reports.dataengine.ContextNode.a(SourceFile:95)
at com.crystaldecisions.reports.dataengine.j.case(SourceFile:1096)
at com.crystaldecisions.reports.dataengine.h.<init>(SourceFile:108)
at com.crystaldecisions.reports.dataengine.DataContext.a(SourceFile:258)
at com.crystaldecisions.reports.dataengine.DataProcessor2.a(SourceFile:4664)
at com.crystaldecisions.reports.dataengine.DataProcessor2.a(SourceFile:4578)
at com.crystaldecisions.reports.dataengine.DataProcessor2.new(SourceFile:2656)
at com.crystaldecisions.reports.dataengine.DataProcessor2.byte(SourceFile:2614)
at com.crystaldecisions.reports.dataengine.DataProcessor2.try(SourceFile:2286)
at com.crystaldecisions.reports.dataengine.DataProcessor2.int(SourceFile:2446)
at com.crystaldecisions.reports.dataengine.DataProcessor2.I(SourceFile:1015)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.fs(SourceFile:526)
at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.if(SourceFile:613)
at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.a(SourceFile:578)
at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.Y(SourceFile:387)
at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.moveToPageN(SourceFile:339)
at com.crystaldecisions.reports.formatter.export2.a.a(SourceFile:79)
at com.crystaldecisions.reports.formatter.export2.a.a(SourceFile:253)
at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.if(SourceFile:647)
at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.a(SourceFile:597)
at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(SourceFile:641)
at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.int(SourceFile:677)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1943)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:660)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:166)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:528)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:525)
at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:524)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:423)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:351)
at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)
at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)
at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)
at com.crystaldecisions.sdk.occa.report.application.dt.a(SourceFile:186)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:1558)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:337)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:224)
... 18 more
Caused by: com.businessobjects.reports.jdbinterface.common.DBException: Unerwarteter Datenbank-Connector-Fehler
at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCQueryDefinition.Execute(Unknown Source)
at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCQueryDefinition.Execute(Unknown Source)
at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCQueryDefinition.Execute(Unknown Source)
at com.crystaldecisions.reports.queryengine.Connection.a(SourceFile:2945)
... 71 more
Caused by: java.sql.SQLDataException: ORA-01843: Kein gültiger Monat (no valid Month)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:210)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:30)
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:762)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:925)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1111)
at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1792)
at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1745)
at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:334)
... 75 more
Conclusion
* something in the Date handling changed in Java and/or CR for Java
* the supposed way of configuring which Locale the JDK should use breaks CR Report Execution
* why just switching to the same (old) Oracle JRE but with 64bit breaks ReportExecution is not clear
* this issue stops us from upgrading Java and CR and switching to 64bit's
Any help or suggestion is really appreciated,
bye Peter
If someone else comes across this issue:
we opened a support ticket and this problem schould be fixed for newer 64-bit Java JDK's with the upcoming version 12.2.227 of Crystal Reports Java Runtime.
Bye Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
11 | |
10 | |
10 | |
10 | |
9 | |
8 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.