Ticket #6 (closed defect: fixed)

Opened 10 months ago

Last modified 8 weeks ago

Marlett - switching from source view - causes Invalid byte 2 of 3-byte UTF-8 sequence.

Reported by: jharrop Owned by: somebody
Priority: minor Milestone:
Component: component1 Version:
Keywords: Cc:

Description

When I add text in Source view, on Windows I get the stack trace copied below when I switch back to Edit view.

This doesn't happen on Ubuntu.

It happens with Xerces-J 2.8.1 from file:/C:/Users/jharrop/.m2/repository/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar

If I take Xerces out of docx4j's pom, a similar thing happens with com.sun.org.apache.xerces (Xerces-J 2.6.2 from (system classloader)

When I cut/paste to a UTF 8 editor (SC UniPad?), it complains about characters in tte Marlett font part.

The error doesn't occur when the content is first loaded into the Source view using XmlUtil?.serialize

This leads me to wonder whether there is something wrong with how the source EditorKit? handles character in different fonts

Note that Marlett is currently mapped to something else (at least for PDF output), because fop.fonts.autodetect.FontInfoFinder?? can't load it since its Unicode cmap table not present.


[AWT-EventQueue-0] WARN jaxb.JaxbValidationEventHandler? - [(non)FATAL_ERROR] : Invalid byte 2 of 3-byte UTF-8 sequence. [AWT-EventQueue-0] INFO jaxb.JaxbValidationEventHandler? - continuing (with possible element/attribute loss) javax.xml.bind.UnmarshalException?

  • with linked exception:

[org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence.]

at javax.xml.bind.helpers.AbstractUnmarshallerImpl?.createUnmarshalException(Unknown

Source)

at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl?.createUnmarshalException(Unknown

Source)

at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl?.unmarshal0(Unknown

Source)

at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl?.unmarshal(Unknown

Source)

at javax.xml.bind.helpers.AbstractUnmarshallerImpl?.unmarshal(Unknown Source) at javax.xml.bind.helpers.AbstractUnmarshallerImpl?.unmarshal(Unknown Source) at org.docx4all.util.XmlUtil?.deserialize(XmlUtil?.java:135) at org.docx4all.util.DocUtil?.write(DocUtil?.java:92) at org.docx4all.ui.main.WordMLEditor$ViewChangeListener?.stateChanged(WordMLEditor.java:621) at javax.swing.JTabbedPane.fireStateChanged(Unknown Source) at javax.swing.JTabbedPane$ModelListener?.stateChanged(Unknown Source) at javax.swing.DefaultSingleSelectionModel?.fireStateChanged(Unknown Source) at javax.swing.DefaultSingleSelectionModel?.setSelectedIndex(Unknown Source) at javax.swing.JTabbedPane.setSelectedIndexImpl(Unknown Source) at javax.swing.JTabbedPane.setSelectedIndex(Unknown Source) at javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mousePressed(Unknown

Source)

at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher?.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher?.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher?.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue?.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread?.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread?.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread?.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread?.pumpEvents(Unknown Source) at java.awt.EventDispatchThread?.pumpEvents(Unknown Source) at java.awt.EventDispatchThread?.run(Unknown Source)

Caused by: org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence.

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) ... 34 more

Exception in thread "AWT-EventQueue?-0" java.lang.RuntimeException?: javax.xml.bind.UnmarshalException?

  • with linked exception:

[org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence.]

at org.docx4all.util.XmlUtil?.deserialize(XmlUtil?.java:161) at org.docx4all.util.DocUtil?.write(DocUtil?.java:92) at org.docx4all.ui.main.WordMLEditor$ViewChangeListener?.stateChanged(WordMLEditor.java:621) at javax.swing.JTabbedPane.fireStateChanged(Unknown Source) at javax.swing.JTabbedPane$ModelListener?.stateChanged(Unknown Source) at javax.swing.DefaultSingleSelectionModel?.fireStateChanged(Unknown Source) at javax.swing.DefaultSingleSelectionModel?.setSelectedIndex(Unknown Source) at javax.swing.JTabbedPane.setSelectedIndexImpl(Unknown Source) at javax.swing.JTabbedPane.setSelectedIndex(Unknown Source) at javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mousePressed(Unknown

Source)

at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher?.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher?.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher?.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue?.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread?.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread?.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread?.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread?.pumpEvents(Unknown Source) at java.awt.EventDispatchThread?.pumpEvents(Unknown Source) at java.awt.EventDispatchThread?.run(Unknown Source)

Caused by: javax.xml.bind.UnmarshalException?

  • with linked exception:

[org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence.]

at javax.xml.bind.helpers.AbstractUnmarshallerImpl?.createUnmarshalException(Unknown

Source)

at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl?.createUnmarshalException(Unknown

Source)

at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl?.unmarshal0(Unknown

Source)

at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl?.unmarshal(Unknown

Source)

at javax.xml.bind.helpers.AbstractUnmarshallerImpl?.unmarshal(Unknown Source) at javax.xml.bind.helpers.AbstractUnmarshallerImpl?.unmarshal(Unknown Source) at org.docx4all.util.XmlUtil?.deserialize(XmlUtil?.java:135) ... 29 more

Caused by: org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence.

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) ... 34 more

Attachments

Change History

Changed 8 weeks ago by jharrop

  • status changed from new to closed
  • resolution set to fixed

Add/Change #6 (Marlett - switching from source view - causes Invalid byte 2 of 3-byte UTF-8 sequence.)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.