mysticfall / pivot4j

Pivot4J provides a common API for OLAP servers which can be used to build an analytical service frontend with pivot style GUI.
Other
128 stars 101 forks source link

Possible encoding problem in loading reports in Pentaho BI #164

Open mysticfall opened 9 years ago

mysticfall commented 9 years ago

We still need to confirm this, but from the stacktrace below, it seems that it sometimes fails to correctly parse a report file which contains characters with a certain encoding :

Caused by: org.apache.commons.configuration.ConfigurationException: Error parsing null
at org.apache.commons.configuration.XMLConfiguration.load (XMLConfiguration.java: 1014) 
at org.apache.commons.configuration.XMLConfiguration.load (XMLConfiguration.java: 972) 
at org.pivot4j.analytics.repository.ReportContent <init>. (ReportContent.java: 117) 
at org.pivot4j.analytics.repository.AbstractFileSystemRepository.getReportContent (AbstractFileSystemRepository.java: 59) 
at org.pivot4j.analytics.ui.ReportOpener.load (ReportOpener.java: 71) 
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source) 
at java.lang.reflect.Method.invoke (Unknown Source) 
at org.apache.el.parser.AstValue.invoke (AstValue.java: 191) 
... 89 more 
Caused by: org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 50; Invalid byte 1 of 1-byte UTF-8 sequence. 
at org.apache.xerces.parsers.DOMParser.parse (Unknown Source) 
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse (Unknown Source) 
at org.apache.commons.configuration.XMLConfiguration.load (XMLConfiguration.java: 1006) 
... 98 more 
Caused by: org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence. 
at org.apache.xerces.impl.io.UTF8Reader.invalidByte (Unknown Source) 
at org.apache.xerces.impl.io.UTF8Reader.read (Unknown Source) 

Related forum post :

mysticfall commented 9 years ago

I suspect it to be the case that it only happens on a platform where the default encoding is not UTF-8. I'll replace Input/OutputStreams with Reader/Writers for safety and see if it resolves the issue for the original reporter.