History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: HJMS-77
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Colin Crist
Reporter: Joris
Votes: 0
Watchers: 0
Operations

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

Selecting the XML-view shows a java xml error

Created: 21/Aug/08 09:57 AM   Updated: 18/Aug/09 04:19 AM
Component/s: GUI
Affects Version/s: 1.13
Fix Version/s: 1.14

Environment: Windows XP Service Pack 2


 Description  « Hide
Below the queue there are 5 views: Payload, Header, toString, Hex and XML. I have to use XML most of the time, which works great in 1.12. However, in 1.13, it shows this error message:

org.xml.sax.SAXParseException: Content is not allowed in trailing section.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at hermes.util.XmlUtils.prettyPrintXml(XmlUtils.java:76)
at hermes.util.XmlUtils.prettyPrintXml(XmlUtils.java:49)
at hermes.renderers.XMLMessageRenderer.render(XMLMessageRenderer.java:70)
at hermes.browser.components.MessagePayloadPanel.setMessage(MessagePayloadPanel.java:90)
at hermes.browser.actions.BrowserAction.valueChanged(BrowserAction.java:896)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
at javax.swing.DefaultListSelectionModel.setSelectionInterval(Unknown Source)
at hermes.browser.actions.BrowserAction$7.run(BrowserAction.java:801)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(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)

It can't be anything with the XML file itself, because in 1.12 it still works fine.

 All   Comments   Change History      Sort Order:
Yohansson [07/Oct/08 05:33 PM]
Hi Colin,

Is there a fix to this problem. I am currently getting the same issue.

Cheers

Yohansson [07/Oct/08 06:21 PM]
Hi Colin,

I believe you need to add a trim function to code to remove any extra characters at the end of the xml before parsing.

This is what is shown in the hex view

00000000 - 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 - <?xml version="1
00000016 - 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 - .0" encoding="UT
00000032 - 46 2d 38 22 3f 3e 3c 6d 65 73 73 61 67 65 3e 3c - F-8"?><message><
00000048 - 74 68 65 62 6f 64 79 3e 62 6c 61 68 3c 2f 74 68 - thebody>blah</th
00000064 - 65 62 6f 64 79 3e 3c 2f 6d 65 73 73 61 67 65 3e - ebody></message>
00000080 - 0a 00 00 00 00 00 00 00 00 - .........


even though the payload view is

<?xml version="1.0" encoding="UTF-8"?><message><thebody>blah</thebody></message>

Cheers

Yohansson [07/Oct/08 06:21 PM]
Notice the extra dots at the end of the xml in the hex view.

Cheers

Colin Crist [10/Oct/08 06:10 AM]

I think this is fixed, dould you test the version at http://hermesjms.com/patches before I close this. Thanks. Colin.

Joris [10/Oct/08 07:35 AM]
Retested with 1.14.
The XML-view doesn't show the java-errors anymore but a pretty XML. Defect is solved.