Red Hat Bugzilla – Bug 1011751
Assembly fails with "Failed to convert the Topic Error template into a DOM document"
Last modified: 2013-10-17 19:49:24 EDT
Description of problem:
When I run "csprocessor assemble" on topic map 22451, I get the following error:
CSProcessor client version: 1.0.3
Loading configuration from /home/rlandmann/.config/csprocessor.ini
Connecting to PressGang server: http://skynet.usersys.redhat.com:8080/TopicIndex/
Attempting to download all the latest topics...
Starting first validation pass...
Starting second validation pass...
Starting bug link validation pass...
INFO: The Content Specification is valid.
Starting to build...
Doing en-US Populate Database Pass
Doing Fixed URL Pass
org.jboss.resteasy.client.ClientResponseFailure: Error status 502 null returned
at com.sun.proxy.$Proxy27.updateJSONTopics(Unknown Source)
Doing Revisions Fixed URL Pass
Doing en-US First topic pass
Processing 210 Topics
First topic Pass 5% Done
First topic Pass 10% Done
First topic Pass 15% Done
First topic Pass 20% Done
First topic Pass 25% Done
First topic Pass 30% Done
First topic Pass 35% Done
First topic Pass 40% Done
ERROR: Failed to convert the Topic Error template into a DOM document
Version-Release number of selected component (if applicable):
CSProcessor client version: 1.0.3
Steps to Reproduce:
1. run "csprocessor assemble 22451"
Does not error out
*** Bug 1011745 has been marked as a duplicate of this bug. ***
We figured out why this happened in this instance. I think the essense of this bug report is that we want it to be more obvious why a book has failed to assemble or build. I propose that the right solution is that a failing topic should not fail building the book, but that a report should be generated of topics that had to be suppressed because of unrecoverably bad XML.
In this case, there was another issue which is an import issue (entities like < and > were decoded to < and >, rendering XML invalid where it shouldn't have been. I don't know if we have root cause (was it chopbook or the csprocessor API that did it?)
So when this bug is up for consideration, it should really be divided into two.
Misty, just so this is easier to resolve would you mind specifying where the problem was? As that error shouldn't ever occur unless someone configured the template incorrectly on the server (which is why it's one of the few cases of an instant failure). ie was it invalid XML in the topic title?
I should also mention that exception shouldn't be printed to the output.
It was content spec 22451 and Matt resolved it by taking some invalid characters out of some topic titles.
Fixed in 1.2-SNAPSHOT build 201310081448.
This was caused by the title being set before the base template was converted. I've updated the builder to leave the title as is and then replace it after the DOM Document conversion. Then when the builder gets to the docbook validation part if the title is invalid then the xml will be reverted to use "Invalid Topic" as the title.
Fixed in 1.2-SNAPSHOT build 201310161416
This was caused by the way the title was being set and the way the validation was done. Since the setTitle() method sets the title as a TextNode when the attempt to parse the title into DOM elements fails it was marking the XML as valid. This then meant that the title check was missed since the XML was valid. I've updated this so that the title valid check is always done.
Confirmed that titles with xml like markup are now correctly handled.