You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by tej minhas <mi...@gmail.com> on 2007/03/21 00:21:32 UTC
XML Data Import error
During importing of a fairly large XML file I get the following error:
- ERROR: Error parsing entity xml file:
java.io.CharConversionException: Invalid UTF-8 Encoding
The problem is that I cannot determine where in the XML file that the error
occurred. I understand that it is using some 3rd party javolution modules.
Is there some way to log the line # or XML element that failed? Perhaps I
need to set some flag/config for javolution?
I did find the following in entitySaxReader.java but never found any such
errors in the log:
public void startPrefixMapping(CharSequence arg0, CharSequence arg1)
throws SAXException {}
// ======== ErrorHandler interface implementations ========
public void error(org.xml.sax.SAXParseException exception) throws
org.xml.sax.SAXException {
Debug.logWarning(exception, "Error reading XML on line " +
exception.getLineNumber() + ", column " + exception.getColumnNumber(),
module);
}
public void fatalError(org.xml.sax.SAXParseException exception) throws
org.xml.sax.SAXException {
Debug.logError(exception, "Fatal Error reading XML on line " +
exception.getLineNumber() + ", column " + exception.getColumnNumber(),
module);
throw new SAXException("Fatal Error reading XML on line " +
exception.getLineNumber() + ", column " + exception.getColumnNumber(),
exception);
}
public void warning(org.xml.sax.SAXParseException exception) throws
org.xml.sax.SAXException {
Debug.logWarning(exception, "Warning reading XML on line " +
exception.getLineNumber() + ", column " + exception.getColumnNumber(),
module);
}
Thanks, tej
Re: XML Data Import error
Posted by Walter Vaughan <wv...@steelerubber.com>.
Al Byers wrote:
> Tej,
>
> I found this link,
> http://lists.ofbiz.org/pipermail/users/2005-August/008669.html, by going to
> advanced google search and searching on "ofbiz" and "Invalid UTF-8
> Encoding".
Or install xmllint. It's in the freeBSD ports collection, so it should be
available anywhere.
I kept getting this from data that had typgraphic single quotes rather than your
normal US-ASCII quotes.
--
Walter
Re: XML Data Import error
Posted by Al Byers <by...@automationgroups.com>.
Tej,
I found this link,
http://lists.ofbiz.org/pipermail/users/2005-August/008669.html, by going to
advanced google search and searching on "ofbiz" and "Invalid UTF-8
Encoding".
HTH
-Al
On 3/20/07, tej minhas <mi...@gmail.com> wrote:
>
> During importing of a fairly large XML file I get the following error:
>
> - ERROR: Error parsing entity xml file:
> java.io.CharConversionException: Invalid UTF-8 Encoding
>
> The problem is that I cannot determine where in the XML file that the
> error
> occurred. I understand that it is using some 3rd party javolution
> modules.
>
> Is there some way to log the line # or XML element that failed? Perhaps I
> need to set some flag/config for javolution?
>
> I did find the following in entitySaxReader.java but never found any such
> errors in the log:
>
> public void startPrefixMapping(CharSequence arg0, CharSequence arg1)
> throws SAXException {}
>
> // ======== ErrorHandler interface implementations ========
>
> public void error(org.xml.sax.SAXParseException exception) throws
> org.xml.sax.SAXException {
> Debug.logWarning(exception, "Error reading XML on line " +
> exception.getLineNumber() + ", column " + exception.getColumnNumber(),
> module);
> }
>
> public void fatalError(org.xml.sax.SAXParseException exception) throws
> org.xml.sax.SAXException {
> Debug.logError(exception, "Fatal Error reading XML on line " +
> exception.getLineNumber() + ", column " + exception.getColumnNumber(),
> module);
> throw new SAXException("Fatal Error reading XML on line " +
> exception.getLineNumber() + ", column " + exception.getColumnNumber(),
> exception);
> }
>
> public void warning(org.xml.sax.SAXParseException exception) throws
> org.xml.sax.SAXException {
> Debug.logWarning(exception, "Warning reading XML on line " +
> exception.getLineNumber() + ", column " + exception.getColumnNumber(),
> module);
> }
>
>
> Thanks, tej
>