Java jasper报告生成期间,有时未设置日期值

Java jasper报告生成期间,有时未设置日期值,java,tomcat,jasper-reports,weblogic,simpledateformat,Java,Tomcat,Jasper Reports,Weblogic,Simpledateformat,我将日期作为参数中的键传递,将值作为DateFormat.format(Calendar.getInstance().getTime())传递 但有时会设置为当前日期,但有时会设置为空 唯一的区别是,一个应用程序在带有weblogic服务器的Linux中运行,另一个应用程序在Windows tomcat服务器中运行 有人能告诉我原因吗 DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); Map<String,Object&

我将日期作为参数中的键传递,将值作为DateFormat.format(Calendar.getInstance().getTime())传递

但有时会设置为当前日期,但有时会设置为空

唯一的区别是,一个应用程序在带有weblogic服务器的Linux中运行,另一个应用程序在Windows tomcat服务器中运行

有人能告诉我原因吗

DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
Map<String,Object> parameters = new HashMap<String,Object>();
parameters.put(ReportConstants.JR_PARAM_DATE, dateFormat.format(Calendar.getInstance().getTime()));
DateFormat DateFormat=newsimpledateformat(“dd/MM/yyyy”);
映射参数=新的HashMap();
parameters.put(ReportConstants.JR_PARAM_DATE,dateFormat.format(Calendar.getInstance().getTime());
我正在传递给jasper模板的参数值


注意:两种环境中的模板相同

通过将Jasper报告变量ReportConstants.JR_PARAM_DATE focus更改为屏幕,解决了此问题。它从报告中溢出,不在屏幕的焦点

这在Tomcat服务器中不是问题,但在WebLogic服务器中才是问题。
我不确定原因。但这件事解决了。我认为weblogic对Jasper报告还有其他一些限制规范,但它在这方面失败了

听起来很奇怪。您可能希望看到
java.time
类的性能更好:
DateTimeFormatter dateFormat=DateTimeFormatter.of模式(“dd/MM/uuu”)parameters.put(ReportConstants.JR_PARAM_DATE,dateFormat.format(LocalDate.now())