I'm having a horid experience using the UWC to attempt to import our company's FogBugz wiki into Confluence. I'd really appreciate some pointers / tips on how to import pages that are already in Confluence markup format.
<rant>
Every cryptic failure I've hit makes the UWC look more and more like an incomplete, unprofessional, unsupported product. It feels like Atlassian couldn't care less about winning new business and solving actual customer problems.
There really needs to be basic quick start guide with examples to get newbies going. The current documentation of the UWC is a mess. It is half-baked. It hints that it will describe things in detail, but the links to the hints you need go nowhere, or are not written from a new users point of view (which, BTW, are the *only* type of users for UWC: ie. People who just want to use the tool once to get their data into Confluence! Grrr!)
</rant>
Since FogBugz is not a supported wiki, I wrote a Ruby script to create the "exported" wiki according to this UWC page
My exported wiki has about 400 pages (stored as UTF-8 text files in Confluence Wiki Markup), and some pages have attachments. We don't care about importing the history of each page. Just the current status of each page is fine by us.
somePath/mywiki/page1.txt
somePath/mywiki/page1/attachment1.ext
somePath/mywiki/page1/attachment2.ext
somePath/mywiki/page2.txt
somePath/mywiki/page3.txt
somePath/mywiki/page3/attachment1.ext
somePath/mywiki/page4.txt
...
I've configured my confluenceSettings.properties file to point to my empty Confluence space, and have tested the connection successfully, from both the UWC GUI and from the command line.
Properties of interest from my confluenceSettings.properties file:
wikitype=NoSyntaxConversions # Because *.txt are already in Confluence markup format
pages=somePath/mywiki
attachments= # Because UWC assumes attachments are stored in a page-relative folder
sendToConfluence=true
uploadOrphanAttachments=false
When I attempt a UWC conversion operation, UWC appears to process each of the 400 .txt files in the pages folder as its own page, since uwc.log shows a "Converting page file: foo.txt" message for each file. So far so good.
But then UWC attempts to start uploading the converted pages to my Confluence space, and UWC fails quickly, after about 4-6 successful page uploads. Here is the relevant content from the final 5 lines of my uwc.log:
2013-04-02 14:04:00,760 INFO [Thread-5] - ::: total time to convert files: 8 seconds.
2013-04-02 14:04:00,762 INFO [Thread-5] - Uploading Pages to Confluence...
2013-04-02 14:04:08,735 ERROR [Thread-5] - Unexpected problem while converting: null
2013-04-02 14:04:08,752 ERROR [Thread-5] -
Conversion Status... NONE
That's it, just a cryptic null exception message. So helpful! But on the console that launched UWC, I see the exception stack trace. Why isn't the exception stack trace part of the uwc.log? Cuz that's what the developer will want to know if/when my questions gets investigated. Here is that stack trace, BTW:
2013-04-02 14:04:00,760 INFO [Thread-5] - ::: total time to convert files: 8 seconds.
2013-04-02 14:04:00,762 INFO [Thread-5] - Uploading Pages to Confluence...
2013-04-02 14:04:08,735 ERROR [Thread-5] - Unexpected problem while converting: null
java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at com.atlassian.uwc.ui.ConverterEngine.createPageTable(ConverterEngine.java:2112)
at com.atlassian.uwc.ui.ConverterEngine.sendPage(ConverterEngine.java:2014)
at com.atlassian.uwc.ui.ConverterEngine.sendPage(ConverterEngine.java:1719)
at com.atlassian.uwc.ui.ConverterEngine.writePages(ConverterEngine.java:1356)
at com.atlassian.uwc.ui.ConverterEngine.convert(ConverterEngine.java:421)
at com.atlassian.uwc.ui.ConverterEngine.convert(ConverterEngine.java:215)
at com.atlassian.uwc.ui.UWCGuiModel.convert(UWCGuiModel.java:180)
at com.atlassian.uwc.ui.listeners.ConvertListener$Worker.construct(ConvertListener.java:277)
at com.atlassian.uwc.ui.SwingWorker$2.run(SwingWorker.java:110)
at java.lang.Thread.run(Unknown Source)
2013-04-02 14:04:08,752 ERROR [Thread-5] -
Conversion Status... NONE
But there is so much more missing from the UWC log:
- Should log the stack trace for any exceptions that occur
- Should log the page name for each upload attempt (just like it already does for each page during the converter page), so we can figure out which pages work and which one it is crashing on.
- Should log the name of the top-level wiki type, and probably the path of that wiki's .properties file, just to confirm what type of conversions were going to be performed.
So I'm totally in the dark about why the UWC is failing. I'm guessing I'm doing something wrong, but I have no way of diagnosing what that is. Is my filesystem layout wrong? Is my configuration wrong? Is the specific data in one of the *.txt files wrong?
Any guidance would be appreciated.