Atlassian JIRA   History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: XRP-39
Type: Bug Bug
Status: Closed Closed
Resolution: Applied
Priority: Minor Minor
Assignee: Marc Portier
Reporter: Bill Bruyn
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
xReporter

HSSFSerializer locale configuration

Created: 29/Apr/05 07:12 PM   Updated: 17/Feb/07 01:24 PM
Component/s: xReporter-Cocoon
Affects Version/s: None
Fix Version/s: 1.3

File Attachments: 1. Text File excel-en-patch.txt (1 kb)



 Description   
From a mailing list thread at http://lists.cocoondev.org/pipermail/xreporter/2004-June/001438.html

> Hey everyone,
>
> Has anyone had issues with the HSSFSerializer and XReporter before? I'm
> getting the exception below and an empty spreadsheet when I
> try to export to Excel, but the value begin complained about
> (25568.79....) doesn't appear anywhere in my report. The HTML
> report generates perfectly and all the other serializers work
> fine. I did make some modifications to the gnumeric.xsl to
> remove style, however these modifications were also made on
> other servers with no ill effects.
>
>
> 17:54:25,168 ERROR [STDERR] java.lang.RuntimeException: Errors in XSLT transformation: Fatal: java.io.IOException: Invalid value for a numeric cell: 25568.791780856467
> 17:54:25,168 ERROR [STDERR] at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3407)
> 17:54:25,168 ERROR [STDERR] at java.lang.Thread.run(Thread.java:534)
>
> Any ideas/insight would be helpful.

 All   Comments   Change History      Sort Order:
Comment by Bill Bruyn [02/May/05 01:53 PM]
Edit the xReporter sitemap.xmap file, and add a parameter "locale" with
value "en" to the HSSFSerializer, like:

<map:serializer mime-type="application/ms-excel" name="xls"
     src="org.apache.cocoon.serialization.HSSFSerializer">
  <parameter name="locale" value="en"/>
</map:serializer>

Comment by Bill Bruyn [02/May/05 01:53 PM]
I don't remember having to do anything like this... Was that just a local misconfguration, or is there something we should be doing that we're not? Or has it been resolved already?

Comment by Marc Portier [31/May/06 09:33 AM]
I've recently seen this behaviour as well.
It occurs when the xreporter-cocoon instance is running in a JVM that has it's default-locale different from 'en', e.g. 'nl'.

What happens is that the decimal point (dot versus comma) is not recognised as such, and the number gets not interpreted correctly.

Since the xreporter-xml creates the data with decimal 'dot' we should consider adding this locale='en' paramater in our sitemap.

Comment by Kristof Van Cleemput [12/Jun/06 02:44 AM]
added patch that solves the problem

Comment by Marc Portier [12/Jun/06 04:44 AM]
Applied the fix in revision 673.
http://svn.cocoondev.org/viewsvn?root=xreporter&view=rev&rev=673
Thx for the patch, Kristof!