Categories
Uncategorized

Jasper Report Server 7.1 no login FF and Chrome (i18 issue)

I was giving Jasper Report Server 7.1.1 a try for the first time. But after installing, the login button was not working. So I had a look, and chrome shows that a “dateTimeSettings” file could not be downloaded (500).

I went to Firefox. Same thing. But Internet Explorer was working, and the file could be downloaded. I started to look for logs and finally found something in “./jasperreports-server-cp-7.1.1\apache-tomcat\webapps\jasperserver\WEB-INF\logs\jasperserver.log”

java.lang.RuntimeException: Settings has incorrect format: /* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
/* Written by Mathias Bynens <http://mathiasbynens.be/> */
jQuery(function($){
	$.datepicker.regional.nl = {
		closeText: 'Sluiten',
		prevText: '←',
		nextText: '→',
		currentText: 'Vandaag',
		monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
		'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
		monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
		'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
		dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
		dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
		dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
		weekHeader: 'Wk',
		dateFormat: 'dd-mm-yy',
		firstDay: 1,
		isRTL: false,
		showMonthAfterYear: false,
		yearSuffix: ''};
	$.datepicker.setDefaults($.datepicker.regional.nl);
});

Internet Explorer is sending nl-NL as first language which doesn’t exist and falls back to ‘en’ which is working. While FF en Chrome send ‘nl’, so that was the difference and causing issues. Now I started looking at the particular files that contain these settings. I found them in “.\jasperreports-server-cp-7.1.1\apache-tomcat\webapps\jasperserver\scripts\bower_components\jquery-ui\ui\i18n”.

I compared the dutch “jquery.ui.datepicker-nl.js” with the english version. There I saw that the initialization format was a bit different ($.datepicker.regional[‘en’] vs $.datepicker.regional.nl). So I modified accordingly. Now chrome and FF also work. Watch out, these files are actually on two different places inside the installation. Make sure to correct the right one in the folder I mentioned.

/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
/* Written by Mathias Bynens <http://mathiasbynens.be/> */
jQuery(function($){
	$.datepicker.regional['nl'] = {
		closeText: 'Sluiten',
		prevText: '←',
		nextText: '→',
		currentText: 'Vandaag',
		monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
		'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
		monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
		'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
		dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
		dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
		dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
		weekHeader: 'Wk',
		dateFormat: 'dd-mm-yy',
		firstDay: 1,
		isRTL: false,
		showMonthAfterYear: false,
		yearSuffix: ''};
	$.datepicker.setDefaults($.datepicker.regional['nl']);
});

I will try to create a bug report for Jasper Report Server, but their account creation is’nt sending me a confirmation email which i need.

Leave a Reply

Your email address will not be published. Required fields are marked *