JasperServer 5.6.0 doesn't show report result - Locale French

0

Hi ,

I have installed the community edition of JasperSever (JS_VERSION=5.6.0) on several machines (Windows XP 32 bits, Windows 2003 64 bits, Windows 2008 64 bits) with samples and got the same behaviour.

The installation went well, no login problem but when i click on any of the sample reports the result page stays empty. The new toolbar with zoom and search is displayed but that's it.


 

I have tried with IE, Firefox and Chrome and got the same behaviour.

I scheduled an immediate execution, it ran perfectly and generated my pdf  as expected.

I suspect a theme problem but i use the defalut one. I haven't even loaded another one.

Any idea is welcome.

horseman's picture
111
Joined: Oct 17 2011 - 11:30pm
Last seen: 1 year 1 week ago

7 Answers:

0

Sorry, but the only case I got a similar problem was with the theme but you're already using the default one.

Have you checked JasperServer logs if there are any errors? Have you tired logging in with superuser?

hozawa's picture
52472
Joined: Apr 24 2010 - 4:31pm
Last seen: 5 months 1 week ago
0

Hi hozawa,

Thank you for your answer.

I had checked the log but its remains empty.I log in as jasperadmin and got the same behaviour.

Finally i built an ubuntu vm server and installed the linux build of jasperserver 5.6. It is by default localized en_US but i didn't noticed it at the first time, so i run one report form the sample base and it displayed perfectly. So i came back to my Windows installation and change from fr to en but unfortunately still the same behaviour.

I then turned my ubuntu localisation to fr and got the same behaviour as Windows ---> Bingo it's a localilisation trouble BUT ...When i came back to Windows and tried all the languages in the proposed list none of them displayed a report.

Franckly i don't understand what's going on with my Windows installation (which, i didn't mentionned it before, is french native).

horseman's picture
111
Joined: Oct 17 2011 - 11:30pm
Last seen: 1 year 1 week ago

Hi Horseman,

Did you find any fix other than installing an ubuntu vm ?

I have the same issue and would like to avoid this vm workaround.

Cheers

lerat - 5 years 4 months ago

No unfortunately i have no other workaround or clue to find the main reason of this weird behaviour.

horseman - 5 years 4 months ago
1

It's definitively a language problem. I kept on testing with my 5.6.0 installed on ubuntu and Firefox browser on a Windows client.

Results are shown with every local from the proposed list except French. Firefox console shows the JS error "SyntaxError: JSON.parse: bad escaped character at line 8 column 71 of the JSON data" on this instruction :

define(["require","jquery","jrs.configs"],function(e){function r(e,r,o){var n=new a.Deferred;return a.ajax(e.url+(e.urlParams?"?"+e.urlParams:""),{type:"POST",dataType:r,data:e.params,beforeSend:function(e){"undefined"!=typeof ajax&&ajax.csrfRequestHeaders&&ajax.csrfRequestHeaders.each(function(r){e.setRequestHeader(r.key,r.value)})},success:function(e,r,a){t(a,o)?(Report&&Report.hideAjaxDialog&&Report.hideAjaxDialog(),n.reject(a,r)):n.resolve(e,r,a)},error:function(e,r){var s=t(e,o);if(!s&&e.status>=400){var i="<p>HTML response error code: "+e.status+", "+r+"</p>";if(e.responseText.indexOf('id="errorPageContent"')>=0)i+=a(e.responseText).find("#errorPageContent .body").html();else if(e.responseText.indexOf('{"result":{"msg":"')>=0){var p=jQuery.parseJSON(e.responseText);p.result.devmsg.indexOf("<#_#>")?(i="",a.each(p.result.devmsg.split("<#_#>"),function(){i+="<p>"+this+"</p>"})):i="<p>"+p.result.devmsg+"</p>"}else i+="<p>HTML response was: "+e.responseText+"</p>";showErrorPopup(i,{reportUri:o,type:"responseError"})}Report&&Report.hideAjaxDialog&&Report.hideAjaxDialog(),n.reject(e,r)}}),n.promise()}function t(e,r){return e.getResponseHeader("LoginRequested")?(showErrorPopup("Login requested.",{reportUri:r,type:"sessionError"}),viewer&&viewer.setLocation&&viewer.setLocation("."),!0):e.getResponseHeader("reportError")?(showErrorPopup(e.responseText,{reportUri:r,type:"reportError"}),!0):e.getResponseHeader("JasperServerError")?(e.getResponseHeader("reportPageNonExisting")&&showErrorPopup("Page does not exist",{reportUri:r,type:"reportPageNonExistingError"}),e.getResponseHeader("SuppressError")||(1==a(".dashboardViewFrame").length?(document.body.innerHTML=e.responseText,a("#"+JRS.fid,window.parent.document).removeClass("hidden").show()):(showErrorPopup(e.responseText,{reportUri:r,type:"JasperserverError"}),o(e.responseText)&&setTimeout(function(){var e=jQuery("#standardAlert"),r=jQuery(".dimmer"),t=e.find("button");r.removeClass("hidden").css("z-index",parseInt(e.css("z-index"),10)-1),t.on("click",function(){buttonManager.disable(jQuery("#redo")[0]),viewer.stateStack.states.pop(),n=!0,viewer.reportInstance.undo(),viewer.reportInstance.components&&viewer.reportInstance.components.chart&&viewer.reportInstance.components.chart[0]&&(jQuery("[data-hcname]").removeClass("selected"),jQuery("[data-hcname='"+viewer.reportInstance.components.chart[0].config.charttype+"']").addClass("selected")),r.addClass("hidden"),t.off("click")})},0))),!0):!1}function o(e){for(var r=!1,t=0;t<Report.chartTypeChangeErrorMessages.length;t++)if(e.indexOf(Report.chartTypeChangeErrorMessages[t])>-1){r=!0;break}return r}var n,a=e("jquery"),s=e("jrs.configs"),i=s.contextPath,p={reportcontexturl:null,reportoutputurl:i+"/flow.html",reportactionurl:i+"/runReportAction.html",reportcomponentsurl:i+"/getReportComponents.html",reportpagestatusurl:i+"/viewReportPageUpdateCheck.html",cancelExecutionUrl:i+"/viewReportCancel.html",cancelAsyncExecutionUrl:i+"/viewReportAsyncCancel.html"},u=function(e){this.config={reporturi:null,async:!0},a.extend(this.config,e),this.jasperPrintName=null,this.contextid=null};return u.prototype={getHtmlForPage:function(e,t,o){if(n){n=!1,Report&&Report.hideAjaxDialog&&Report.hideAjaxDialog();var s=new a.Deferred;return s.reject(),s}var i={_flowExecutionKey:Report.reportExecutionKey(this.config.reporturi),_flowId:"viewReportFlow",_eventId:t?"navigate":"refreshReport",pageIndex:e,decorate:"no",confirm:"true",decorator:"empty",ajax:"true"};return Report&&Report.requestedInputParameters&&(o=Report.requestedInputParameters),r({url:p.reportoutputurl,urlParams:a.param(i),params:o},"html",this.config.reporturi)},cancelExecution:function(e){return r({url:e?p.cancelAsyncExecutionUrl+"?jasperPrintName="+this.jasperPrintName:p.cancelExecutionUrl+"?_flowExecutionKey="+Report.reportExecutionKey(this.config.reporturi)},"json")},getStatusForPage:function(e,t){return r({url:p.reportpagestatusurl,params:{jasperPrintName:this.jasperPrintName,pageIndex:e,pageTimestamp:t}},"json")},getComponentsForPage:function(e){return r({url:p.reportcomponentsurl,params:{jasperPrintName:this.jasperPrintName||Report.jasperPrintName,pageIndex:e}},"json")},runAction:function(e){var t=this,o=null!=e.showAjaxDialog?e.showAjaxDialog:!0;o&&Report&&Report.showAjaxDialog&&Report.showAjaxDialog();try{return r({url:p.reportactionurl,params:{jr_ctxid:t.contextid,jr_action:JSON.stringify(e.action)}},"json",t.config.reporturi)}catch(n){alert(n)}},save:function(e){var t=e.folder&&e.name?"saveReportAs":"saveReport",o={_flowExecutionKey:Report.reportExecutionKey(this.config.reporturi),_eventId:t};"saveReportAs"==t&&(o.folder=e.folder,o.name=e.name,o.description=e.description||"",o.overwrite=!!e.overwrite);try{return r({url:p.reportoutputurl,params:o},"json",this.config.reporturi)}catch(n){alert(n)}},exit:function(){var e={_flowExecutionKey:Report.reportExecutionKey(),_eventId:"end"};return r({url:p.reportoutputurl,urlParams:a.param(e)},"html")},setPageUpdateStatus:function(e){this.lastPageUpdateStatus=e.result,this.config.eventManager.triggerEvent("pageUpdateAvailable")}},u.UrlManager=p,u});

horseman's picture
111
Joined: Oct 17 2011 - 11:30pm
Last seen: 1 year 1 week ago

We're having the same issue on Win2008R2 - 64b.
Locale is French, behaviour same as described.

olivier.romand - 5 years 4 months ago
1

I have tried one more time on a Windows2088R2 64bits server. I Uninstalled my previous 5.6.0 installation cleaned everything and reinstalled from scratch.

I changed my local to english before the first log in and it worked perfectly just like my ubuntu vm.

I suspect a bug in the French localisazion and expect the next release for a fix

horseman's picture
111
Joined: Oct 17 2011 - 11:30pm
Last seen: 1 year 1 week ago
3

You'll need to edit the WEB-INF/bundles/jasperserver_messages_fr.properties file

replace

button.zoomOptions.option.fitWidth=Largueur d'ajustage
button.zoomOptions.option.fitHeight=Hauteur d'ajustage
button.zoomOptions.option.fitPage=Page d'essai

with

button.zoomOptions.option.fitWidth=Largueur d\u2019ajustage
button.zoomOptions.option.fitHeight=Hauteur d\u2019ajustage
button.zoomOptions.option.fitPage=Page d\u2019essai

walesr's picture
32
Joined: Apr 10 2013 - 1:27am
Last seen: 4 years 9 months ago

Thank You Very Much

KGZ - 5 years 4 months ago
1

Hi walesr,

Thank you very much for this answer it definitively solves my problem smiley. My 5.0.6 server works fine in French on all my servers (W2008,XP,Ubuntu)yes
I scanned the entire file and found much more quotes (the one used in text field not the one used to embed variables) than the one you mentionned. I then replaced all of them with the character code \u2019.

I attach to this answer my new french properties file in case it can save time to someone else.

 

Attachments: 
AttachmentSize
Binary Data French porperties for 5.0.6 server224.53 KB
horseman's picture
111
Joined: Oct 17 2011 - 11:30pm
Last seen: 1 year 1 week ago
0

I had the same problem and your fix saved my day. Thank you very much

Marc.Guichard's picture
Joined: Dec 4 2014 - 12:37am
Last seen: 3 years 9 months ago
Feedback