Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Formatter.format for date format is not thread safe?
Formatter.format for date format is not thread safe? [message #1386766] Fri, 20 June 2014 09:42 Go to next message
X YB is currently offline X YBFriend
Messages: 4
Registered: June 2014
Junior Member
I am using the birt engine 4.3.1 and my application will run muntiple reports at the same time(thread pool size =5).
I find that when the report using the expression like Formatter.format(dataset["create_date"],"dd/MM/yyyy"), it shows a lot of strange value like '01/05/0100'. Actually we don't have such date in DB. After regernate the report in single thread, the result is ok.
Is there a solution for this?
Re: Formatter.format for date format is not thread safe? [message #1388938 is a reply to message #1386766] Fri, 27 June 2014 05:44 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Have you tried doing something like:

df = new java.text.SimpleDateFormat("dd/MM/yyyy");
df.format(row["create_date"]);

instead of the Formatter.format?


Michael

Developer Evangelist, Silanis
Re: Formatter.format for date format is not thread safe? [message #1390901 is a reply to message #1388938] Mon, 30 June 2014 06:42 Go to previous messageGo to next message
X YB is currently offline X YBFriend
Messages: 4
Registered: June 2014
Junior Member
Yes, this can resolve the problem. But I wonder that why the build-in expression will cause this. I think almost report development is using the build-in expression rather than java expression. So I want to know is there any special setting on birt engine or is it a birt engine bug.
Re: Formatter.format for date format is not thread safe? [message #1390921 is a reply to message #1390901] Mon, 30 June 2014 07:21 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

It sounds pretty buggy to me. Log a bug for it in the bugzilla and post the bug info in here for tracking purposes.

Michael

Developer Evangelist, Silanis
Re: Formatter.format for date format is not thread safe? [message #1391705 is a reply to message #1390921] Tue, 01 July 2014 09:28 Go to previous messageGo to next message
X YB is currently offline X YBFriend
Messages: 4
Registered: June 2014
Junior Member
Hi Michael

Below is the link:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=438611
Re: Formatter.format for date format is not thread safe? [message #1391904 is a reply to message #1391705] Tue, 01 July 2014 15:23 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Great! Thanks for the update!

Michael

Developer Evangelist, Silanis
Previous Topic:Vulnerabilities in Eclipse BIRT jars
Next Topic:PDF and barcode generation through iText
Goto Forum:
  


Current Time: Thu Apr 25 21:01:03 GMT 2024

Powered by FUDForum. Page generated in 0.04050 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top