Universal Wiki Converter

Universal Wiki Converter

The Universal Wiki Converter (UWC) is a standalone application which converts pages from other wikis to Confluence. It's also an extensible framework, allowing users with wikis that aren't currently supported to add their own converters.


Why the UWC?

Because you really like Confluence, but you have this plethora of existing content lying around in another wiki.

Labels

uwc uwc Delete
wikiconverter wikiconverter Delete
wikiimporter wikiimporter Delete
standalone standalone Delete
extension extension Delete
conversion conversion Delete
confluence confluence Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. May 26

    Immo Huneke says:

    I am trying to get the UWC (Universal Wiki Converter) to convert a set of 300 pa...

    I am trying to get the UWC (Universal Wiki Converter) to convert a set of 300 pages with attachments from TWiki to Confluence. I have discovered a number of things in the process:

    • The converter relies on the target Confluence installation supporting the {html} macro
    • The converter relies on the target Confluence installation recognising CamelCaseWords as links
    • The converter recognises bullet lists, but not numbered lists - the regexp in the twiki-cleaner module is wrong. I can fix this if Atlassian gives me access to the Subversion repository that contains the source

    I am at the moment trying to see if I can get the converter to recognise CamelCase words (that don't contain <nop> or start with an exclamation mark) and automatically put square brackets around them. This should not be too difficult with a Java regexp. I wouldn't like to switch on the CamelCase option in the target Confluence server, as there are thousands of pages there already which might then contain "broken links".

    1. Nov 10, 2006

      Brendan Patterson says:

      Hi Immo, Thanks for your interest in this. Yes the current TWiki converter doe...

      Hi Immo,

      Thanks for your interest in this.

      Yes the current TWiki converter does require that the HTML macro is turned on. This is true for some of the other converters as well. This was one way to handle some of the TWiki syntax that Confluence otherwise did not support.

      It's been a while since I was working on this code so I don't remember all of the specifics, but here is what I think the deal is on CamelCase. Yes the TWiki converter does want you to turn on CamelCase for the conversion, however pre-existing camel case links are not a problem. They get explicitly escaped by this regex:
      src\com\atlassian\uwc\converters\twiki\cleaners\CamelCaseEscape.java
      So it should be OK.

      As for the numbered lists you can get access to the repository by sending an email to Jonathan Nolen - jnolen AT atlassian.com However I think it's going to be much easier for you to add the regular expression directly to the converter.twiki.properties file. This is how I develop. The cleaners were mainly there as a port from another conversion system. You should be able to download the source code without any specific access, you just won't be able to check it back in. But please do check in any fixes you make.

      Hope that helps,
      Brendan

  2. Jan 31, 2007

    Pat Richards says:

    when running the converter I am getting the following error when trying to uploa...

    when running the converter I am getting the following error when trying to uploaded converted pages.

    java.io.FileNotFoundException: http://WWW.xxx.COM/CONFLUENCE/rpc/xmlrpc

    if I paste the url into a browser tomcat returns  a 404 error page with the following

    Type Status report

    message /CONFLUENCE/rpc/xmlrpc

    description The requested resource (/CONFLUENCE/rpc/xmlrpc) is not available.

    I am running SLL and I get the same message with http2 and http. 

    and yes RPC is enabled on the admin page 

    1. Jan 31, 2007

      Brendan Patterson says:

      I'm not sure off hand what the problem is. Does http://WWW.xxx.COM/CONFLUENCE br...

      I'm not sure off hand what the problem is. Does http://WWW.xxx.COM/CONFLUENCE bring up your confluence page?

      You also mention you're running SSL. The UWC doesn not currently work over SSL....so I'm not sure if that is part of your issue.

      Is the exception happening on the UWC side? If so can you email me the stack trace?

      The other common things are that the space you're writing pages to defined in the UWC settings needs to exist and the user/password needs to have write permissions to that space.

      Which version of the UWC are you using?

      1. Jan 31, 2007

        Pat Richards says:

        Well its all working now. I think the problem was that the url didn't actually ...

        Well its all working now.

        I think the problem was that the url didn't actually change when I edited it saved and then reran the upload ( the first time I set the url it was in error). When I shut the app down and restarted it ,it all worked like magic.

        1. Jan 31, 2007

          Brendan Patterson says:

          Great. Thanks for posting. It is possible that 'new settings not taking affect u...

          Great. Thanks for posting. It is possible that 'new settings not taking affect until a restart' is an issue. I'll have a look.

        2. Jan 31, 2007

          Brendan Patterson says:

          Also when you have time please take 60 seconds to check a box or two and add a c...

          Also when you have time please take 60 seconds to check a box or two and add a comment to the UWC feedback form. Thanks!!!

  3. Jan 31, 2007

    John Pierce says:

    I have about 60 pages in dokuwiki format...   I select wikitype: dokuw...

    I have about 60 pages in dokuwiki format...   I select wikitype: dokuwiki, give it the appropriate confluence settings (btw, should 'attachments' be the 'media' folder in doku ?), leave the converters alone, choose a bunch of *.txt pages, and try to send them to confluence, and nothing happens.    on screen 5, I hit 'Convert Pages to Confluence', and get the popup 'Do you want to send these pages to Confluence', click Yes, and nothing.

     am I missing something?   I'm running the converter on a windows machine that has java 1.5.0_something JDK in the path.    The DokuWiki files are from a Linux machine, I've copied them to a folder on my local hd....  Does the converter need access to the other metadata (history etc), or just the wiki/data/pages/*.txt files ?

    1. Jan 31, 2007

      Brendan Patterson says:

      We should add some feedback about how many files were successfully sent. If you ...

      We should add some feedback about how many files were successfully sent. If you just select a few files it might all happen so fast that you don't see anything else. If you select dozens or hundreds you typically see a progress bar.

      That's all you should need to do assuming your settings are correct. Give Confluence a minute or two and then check the dashboard to see if the pages appear in the 'recently added' list.

      If it's not working for you can you run the UWC from a DOS window and copy/paste/email me the output?

      1. Jan 31, 2007

        John Pierce says:

        k, I found my pages.  for some silly reason, I expected them to show up in ...

        k, I found my pages.  for some silly reason, I expected them to show up in the new workspace I'd put them in.  guess i have to link up everything by hand.

         the dokuwiki converter didn't handle the links between 'folders' at all well, I have to go back and link up everything by hand.

        1. Jan 31, 2007

          Brendan Patterson says:

          Thanks for the info. Glad you found your pages. I do understand how that was con...

          Thanks for the info. Glad you found your pages. I do understand how that was confusing.

          Yes we've only recently added the ability to arrange wiki pages with child parent relationships to the core framework (thanks to Rolf Staflin). However this has not yet made it's way into most of the converters. I assume that's along the lines of what you're talking about.

          Originally the wikis I was looking to convert (MediaWiki and TikiWiki) didn't have the concept of parent child relationships or folders or groups or whatever else you might call those associations.

          Feel free to open open an enhancement request at the UWC Jira project

        2. Feb 01, 2007

          Rolf Staflin says:

          Hi! First, let me confirm that when converting from DokuWiki you should indeed s...

          Hi!
          First, let me confirm that when converting from DokuWiki you should indeed select the "media" folder as the attachment folder.

          There is indeed support for subpages or folders of pages now, and depending on how your wiki looks you may be able to use it "out of the box" by adding a hierarchy builder to the converter list:

          DokuWiki.0.hierarchy-builder=com.atlassian.uwc.hierarchies.BaseHierarchy

          In fact, if you check out the latest version of the UWC, you will find that the converter is already in the file (devel/conf/converter.dokuwiki.properties) although it's commented out.

          I designed the default implementation of the page hierarchy in UWC so that wikis like DokuWiki (i.e., wikis that store pages on disk in folders corresponding to the hierarchy) should work with it. One thing to look out for, though, is that in Confluence page names must be unique within a space. In DokuWiki, pages that are in different folders may have the same name and thus overwrite each other.

  4. Feb 17, 2007

    Renjith V says:

    The exported fails for with titles having '?'. 1. The Export funtionality works...

    The exported fails for with titles having '?'.

    1. The Export funtionality works fine.

    2. But when "Send Pages to Confluence" is used, the conversion fails (as seen in the command prompt) for all the titles having '?' because windows does not allow file names with '?'

     Any ideas?

    1. Feb 17, 2007

      Brendan Patterson says:

      We need more information than this. Which type of wiki are you trying to convert...

      We need more information than this. Which type of wiki are you trying to convert? Can you email me the output from the command prompt? brendan @ atlassian(dot)com

      thanks!

    2. Feb 21, 2007

      Brendan Patterson says:

      Oh sorry. I didn't read your bug report correctly the first time. Special char...

      Oh sorry. I didn't read your bug report correctly the first time.

      Special characters in page titles are something that we can handle with a bit of tweaking by adding the title to the top of the exported files as metadata.

      Which converter are you using? For which wiki?

  5. Feb 21, 2007

    Patty Case says:

    I'm having a problem similar to one reported above.  I'm trying to convert ...

    I'm having a problem similar to one reported above.  I'm trying to convert DokuWiki.  I have Remote API enabled in Admin, I'm running JDK 1.5, and I'm using an admin login.  I tried to convert just one page.  When I run run_uwc.bat, I get:

    Second(s): 0
    INFO  [Thread-3] - -------------------------------------
    INFO  [Thread-3] - converting page file: file.txt
    INFO  [Thread-3] -                    time to convert 62ms
    java.io.FileNotFoundException: http://<ip addr>/rpc/xmlrpc
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
            at org.apache.xmlrpc.DefaultXmlRpcTransport.sendXmlRpc(DefaultXmlRpcTransport.java:87)
            at org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:72)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178)
            at com.atlassian.uwc.ui.xmlrpcwrapperOld.RemoteWikiBrokerOld.getLoginToken(RemoteWikiBrokerOld.java:241)
            at com.atlassian.uwc.ui.xmlrpcwrapperOld.RemoteWikiBrokerOld.storeNewOrUpdatePage(RemoteWikiBrokerOld.java:155)
            at com.atlassian.uwc.ui.xmlrpcwrapperOld.RemoteWikiBrokerOld.storeNewOrUpdatePage(RemoteWikiBrokerOld.java:99)
            at com.atlassian.uwc.ui.ConverterEngine.sendPage(ConverterEngine.java:547)
            at com.atlassian.uwc.ui.ConverterEngine.writeHierarchy(ConverterEngine.java:508)
            at com.atlassian.uwc.ui.ConverterEngine.writeHierarchy(ConverterEngine.java:477)
            at com.atlassian.uwc.ui.ConverterEngine.convert(ConverterEngine.java:113)
            at com.atlassian.uwc.ui.ConverterEngine.processPages(ConverterEngine.java:77)
            at com.atlassian.uwc.ui.UWCForm2$7$1.construct(UWCForm2.java:349)
            at com.atlassian.uwc.ui.SwingWorker$2.run(SwingWorker.java:108)
            at java.lang.Thread.run(Unknown Source)
    ERROR [Thread-3] - Error while adding page Page
    org.apache.xmlrpc.XmlRpcClientException: Failure writing request
            at org.apache.xmlrpc.XmlRpcClientRequestProcessor.encodeRequest(XmlRpcClientRequestProcessor.java:76)
            at org.apache.xmlrpc.XmlRpcClientRequestProcessor.encodeRequestBytes(XmlRpcClientRequestProcessor.java:102)
            at org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:70)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178)
            at com.atlassian.uwc.ui.xmlrpcwrapperOld.RemoteWikiBrokerOld.storeNewOrUpdatePage(RemoteWikiBrokerOld.java:168)
            at com.atlassian.uwc.ui.xmlrpcwrapperOld.RemoteWikiBrokerOld.storeNewOrUpdatePage(RemoteWikiBrokerOld.java:99)
            at com.atlassian.uwc.ui.ConverterEngine.sendPage(ConverterEngine.java:547)
            at com.atlassian.uwc.ui.ConverterEngine.writeHierarchy(ConverterEngine.java:508)
            at com.atlassian.uwc.ui.ConverterEngine.writeHierarchy(ConverterEngine.java:477)
            at com.atlassian.uwc.ui.ConverterEngine.convert(ConverterEngine.java:113)
            at com.atlassian.uwc.ui.ConverterEngine.processPages(ConverterEngine.java:77)
            at com.atlassian.uwc.ui.UWCForm2$7$1.construct(UWCForm2.java:349)
            at com.atlassian.uwc.ui.SwingWorker$2.run(SwingWorker.java:108)
            at java.lang.Thread.run(Unknown Source)
    Caused by: org.apache.xmlrpc.XmlRpcException: null values not supported by XML-RPC
            at org.apache.xmlrpc.XmlWriter.writeObject(XmlWriter.java:231)
            at org.apache.xmlrpc.XmlRpcClientRequestProcessor.encodeRequest(XmlRpcClientRequestProcessor.java:72)
            ... 15 more
    java.io.FileNotFoundException: http://<ip addr>/rpc/xmlrpc
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
            at org.apache.xmlrpc.DefaultXmlRpcTransport.sendXmlRpc(DefaultXmlRpcTransport.java:87)
            at org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:72)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178)
            at com.atlassian.uwc.ui.xmlrpcwrapperOld.RemoteWikiBrokerOld.getLoginToken(RemoteWikiBrokerOld.java:241)
            at com.atlassian.uwc.ui.xmlrpcwrapperOld.RemoteWikiBrokerOld.populatePageXmlRpcData(RemoteWikiBrokerOld.java:128)
            at com.atlassian.uwc.ui.xmlrpcwrapperOld.RemoteWikiBrokerOld.storeNewOrUpdatePage(RemoteWikiBrokerOld.java:181)
            at com.atlassian.uwc.ui.xmlrpcwrapperOld.RemoteWikiBrokerOld.storeNewOrUpdatePage(RemoteWikiBrokerOld.java:99)
            at com.atlassian.uwc.ui.ConverterEngine.sendPage(ConverterEngine.java:547)
            at com.atlassian.uwc.ui.ConverterEngine.writeHierarchy(ConverterEngine.java:508)
            at com.atlassian.uwc.ui.ConverterEngine.writeHierarchy(ConverterEngine.java:477)
            at com.atlassian.uwc.ui.ConverterEngine.convert(ConverterEngine.java:113)
            at com.atlassian.uwc.ui.ConverterEngine.processPages(ConverterEngine.java:77)
            at com.atlassian.uwc.ui.UWCForm2$7$1.construct(UWCForm2.java:349)
            at com.atlassian.uwc.ui.SwingWorker$2.run(SwingWorker.java:108)
            at java.lang.Thread.run(Unknown Source)
    INFO  [Thread-3] - could not retrieve infor for page space:title - test:Page

    java.io.FileNotFoundException: http://<ip addr>/rpc/xmlrpc
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
            at org.apache.xmlrpc.DefaultXmlRpcTransport.sendXmlRpc(DefaultXmlRpcTransport.java:87)
            at org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:72)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178)
            at com.atlassian.uwc.ui.xmlrpcwrapperOld.RemoteWikiBrokerOld.getLoginToken(RemoteWikiBrokerOld.java:241)
            at com.atlassian.uwc.ui.xmlrpcwrapperOld.RemoteWikiBrokerOld.storeNewOrUpdatePage(RemoteWikiBrokerOld.java:188)
            at com.atlassian.uwc.ui.xmlrpcwrapperOld.RemoteWikiBrokerOld.storeNewOrUpdatePage(RemoteWikiBrokerOld.java:99)
            at com.atlassian.uwc.ui.ConverterEngine.sendPage(ConverterEngine.java:547)
            at com.atlassian.uwc.ui.ConverterEngine.writeHierarchy(ConverterEngine.java:508)
            at com.atlassian.uwc.ui.ConverterEngine.writeHierarchy(ConverterEngine.java:477)
            at com.atlassian.uwc.ui.ConverterEngine.convert(ConverterEngine.java:113)
            at com.atlassian.uwc.ui.ConverterEngine.processPages(ConverterEngine.java:77)
            at com.atlassian.uwc.ui.UWCForm2$7$1.construct(UWCForm2.java:349)
            at com.atlassian.uwc.ui.SwingWorker$2.run(SwingWorker.java:108)
            at java.lang.Thread.run(Unknown Source)
    ERROR [Thread-3] - Failed to update page  Page
    org.apache.xmlrpc.XmlRpcClientException: Failure writing request
            at org.apache.xmlrpc.XmlRpcClientRequestProcessor.encodeRequest(XmlRpcClientRequestProcessor.java:76)
            at org.apache.xmlrpc.XmlRpcClientRequestProcessor.encodeRequestBytes(XmlRpcClientRequestProcessor.java:102)
            at org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:70)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185)
            at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178)
            at com.atlassian.uwc.ui.xmlrpcwrapperOld.RemoteWikiBrokerOld.storeNewOrUpdatePage(RemoteWikiBrokerOld.java:199)
            at com.atlassian.uwc.ui.xmlrpcwrapperOld.RemoteWikiBrokerOld.storeNewOrUpdatePage(RemoteWikiBrokerOld.java:99)
            at com.atlassian.uwc.ui.ConverterEngine.sendPage(ConverterEngine.java:547)
            at com.atlassian.uwc.ui.ConverterEngine.writeHierarchy(ConverterEngine.java:508)
            at com.atlassian.uwc.ui.ConverterEngine.writeHierarchy(ConverterEngine.java:477)
            at com.atlassian.uwc.ui.ConverterEngine.convert(ConverterEngine.java:113)
            at com.atlassian.uwc.ui.ConverterEngine.processPages(ConverterEngine.java:77)
            at com.atlassian.uwc.ui.UWCForm2$7$1.construct(UWCForm2.java:349)
            at com.atlassian.uwc.ui.SwingWorker$2.run(SwingWorker.java:108)
            at java.lang.Thread.run(Unknown Source)
    Caused by: org.apache.xmlrpc.XmlRpcException: null values not supported by XML-RPC
            at org.apache.xmlrpc.XmlWriter.writeObject(XmlWriter.java:231)
            at org.apache.xmlrpc.XmlRpcClientRequestProcessor.encodeRequest(XmlRpcClientRequestProcessor.java:72)
            ... 15 more

    1. Feb 21, 2007

      Brendan Patterson says:

      Hmmm. Can you give me the full URL of a Confluence page...any page within your c...

      Hmmm. Can you give me the full URL of a Confluence page...any page within your confluence instance? Feel free to change the IP address, but just substitute something else in.

      Is it running on a specific port such as 8080?

      Also sometimes when Confluence is being run as a webapp it might not be just like:

      http://www.xyz.com/

      It might something like

      http://www.xyz.com/confluence in which case the UWC setting for Confluence URL needs to be http://www.xyz.com/confluence

      and if there is a specific port it might need to be something like http://www.xyz.com:8080/confluence

  6. Feb 22, 2007

    Patty Case says:

    Thanks!  The problem was that I just specified the IP address when inst...

    Thanks!  The problem was that I just specified the IP address when instead I needed "/confluence" after it.

    1. Apr 10, 2007

      Brendan Patterson says:

      There is now a test settings button that will be a big help for these situation.

      There is now a test settings button that will be a big help for these situation.

  7. Apr 30, 2007

    John Pierce says:

    Trying to do another conversion with version 41 of the universal converter, down...

    Trying to do another conversion with version 41 of the universal converter, downloaded it on Friday...   source pages are dokuwiki format, abut 20-30 of them, I point to the media directory...

    Test Settings works, says "The user was authneticaed on the server and has the following permissions on the space with space key: 'fisWiki'[view, modify, comment, admin]".  

    when I go to do the actual conversion, the console dumps this error....

    INFO  [Thread-7] - ::: total time to convert files: 0 seconds.
    DEBUG [Thread-7] - >buildHierarchy(0 pages)
    Exception in thread "Thread-7" java.lang.NullPointerException
            at com.atlassian.uwc.ui.ConverterEngine.writeHierarchy(ConverterEngine.java:624)
            at com.atlassian.uwc.ui.ConverterEngine.convert(ConverterEngine.java:137)
            at com.atlassian.uwc.ui.ConverterEngine.processPages(ConverterEngine.java:101)
            at com.atlassian.uwc.ui.UWCForm2$8$1.construct(UWCForm2.java:358)
            at com.atlassian.uwc.ui.SwingWorker$2.run(SwingWorker.java:108)
            at java.lang.Thread.run(Unknown Source)
     

    and I can't find my pages on the workspace. 

    1. Apr 30, 2007

      Laura Kolker says:

      Hi John, Thanks for the heads up. I'm unable to reproduce the error you're hav...

      Hi John,

      Thanks for the heads up.

      I'm unable to reproduce the error you're having.

      However, I can tell from the debug message "DEBUG [Thread-7] - >buildHierarchy(0 pages)" that the HierarchyBuilder thinks that you are trying to convert 0 pages, which would cause the NPE that occurs just after it.

      So, some thoughts:

      • Can you think of any reason why the converter might think you had requested 0 files to be converted? If so, let me know, and I'll see what I can do about trying to reproduce it.
      • I'm a little unclear on what you mean by "I point to the media directory".
      • When you add pages, are you adding a directory instead of the individual files (this should work, but it's worth asking)?
      • When you try to do the conversion on 1 of your files, does the same thing happen? If so, can you can you create a JIRA issue for this problem here: UWC JIRA, and attach that file to the issue?
      • I'm in the midst of refactoring the HierarchyBuilder feature that happens to be barfing on you. While refactoring, I've noticed a couple of problems with the way that feature works. It's possible that your problem will go away when I release the new version (42) sometime this week.

      Cheers,
      Laura

      1. Apr 30, 2007

        John Pierce says:

        by pointing to the media directory, I meant the 'attachments' folder... &nb...

        by pointing to the media directory, I meant the 'attachments' folder...    I've explicitly loaded the .txt files. 

        ok, tried loading JUST my start.txt file, and got...
        C:\uwc\uwc>run_uwc.batC:\uwc\uwc>REM set classpath=target\uwc\classes;lib\jakarta-oro-2.0.8.jar;lib\lo
        g4j-1.2.13.jar;C:\uwc\uwc>REM run out of the sample-files dirC:\uwc\uwc>echo off
        DEBUG [main] - initializing listeners
        Second(s): 0
        INFO  [Thread-3] - ::: total time to convert files: 0 seconds.
        DEBUG [Thread-3] - >buildHierarchy(0 pages)
        Exception in thread "Thread-3" java.lang.NullPointerException
                at com.atlassian.uwc.ui.ConverterEngine.writeHierarchy(ConverterEngine.java:624)
                at com.atlassian.uwc.ui.ConverterEngine.convert(ConverterEngine.java:137)
                at com.atlassian.uwc.ui.ConverterEngine.processPages(ConverterEngine.java:101)
                at com.atlassian.uwc.ui.UWCForm2$8$1.construct(UWCForm2.java:358)
                at com.atlassian.uwc.ui.SwingWorker$2.run(SwingWorker.java:108)
                at java.lang.Thread.run(Unknown Source)


        oh.  meant to add...    looks like this box has Sun java 1.5.0_06, which I know isn't the latest.    I'll update it to _11 or whatever (had too many issues with 1.6 on other things, going to avoid for now).

        1. Apr 30, 2007

          Laura Kolker says:

          Hi John, Thanks for checking that. re: just start.txt ok. good to know that i...

          Hi John,

          Thanks for checking that.

          re: just start.txt

          ok. good to know that it happens for just one file.
          I've created a JIRA issue for this:
          http://developer.atlassian.com/jira/browse/UWC-120

          Since I'm not entirely sure what's happening yet, would it be possible for you to attach start.txt to the JIRA issue?

          re: Sun 1.5.0_06
          I would not expect that to be an issue, but I'll bear it in mind.

          Thanks
          Laura

          1. Apr 30, 2007

            John Pierce says:

            updated to J2SE JDK 1.5.0_11 and get exact same problem DEBUG [main] - initial...

            updated to J2SE JDK 1.5.0_11 and get exact same problem

            DEBUG [main] - initializing listeners
            Second(s): 0
            INFO  [Thread-3] - ::: total time to convert files: 0 seconds.
            DEBUG [Thread-3] - >buildHierarchy(0 pages)
            Exception in thread "Thread-3" java.lang.NullPointerException
                    at com.atlassian.uwc.ui.ConverterEngine.writeHierarchy(ConverterEngine.java:624)
                    at com.atlassian.uwc.ui.ConverterEngine.convert(ConverterEngine.java:137)
                    at com.atlassian.uwc.ui.ConverterEngine.processPages(ConverterEngine.java:101)
                    at com.atlassian.uwc.ui.UWCForm2$8$1.construct(UWCForm2.java:358)
                    at com.atlassian.uwc.ui.SwingWorker$2.run(SwingWorker.java:108)
                    at java.lang.Thread.run(Unknown Source)
             
            C:\uwc\uwc>java -version
            java version "1.5.0_11"
            Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
            Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)
            


             

            1. May 01, 2007

              John Pierce says:

              a wrap on this for the sake of anyone else following...   the clue was...

              a wrap on this for the sake of anyone else following...   the clue was (0 pages)...  I removed the *.txt filter from the Confluence Settings page, and it all worked for me.

  8. Jul 11, 2007

    Thomas Lamay says:

    Hi.  I'm using Windows, Java 1.6.0_02, and Eclipse and I'm having a problem...

    Hi.  I'm using Windows, Java 1.6.0_02, and Eclipse and I'm having a problem with the UWC source.  When I grabbed it today and built it, I get the following runtime error:

    Exception in thread "main" java.lang.NullPointerException
        at com.atlassian.uwc.ui.ConverterListForm.createActionListeners(ConverterListForm.java:44)
        at com.atlassian.uwc.ui.ConverterListForm.init(ConverterListForm.java:35)
        at com.atlassian.uwc.ui.ConverterListForm.<init>(ConverterListForm.java:31)
        at com.atlassian.uwc.ui.UWCForm2.<init>(UWCForm2.java:209)
        at com.atlassian.uwc.ui.UWCForm2.getInstance(UWCForm2.java:183)
        at com.atlassian.uwc.ui.UWCForm2.main(UWCForm2.java:148)

    I ultimately want to add my own attachment handling class.  Could this be an Eclipse configuration issue?  Any helpful tips or advice would be great.  Thanks!

    1. Jul 11, 2007

      Brendan Patterson says:

      After you build the UWC try running it from the command line using run_uwc.bat. ...

      After you build the UWC try running it from the command line using run_uwc.bat. If that works (and I think it will) then it is the way you have Eclipse configured. Just make sure that your Eclipse project is including all of the jar files in the lib dir.

      Hope that helps.

      1. Jan 07, 2008

        Blair Motchan says:

        It would appear that the instructions I posted below are no longer necessary for...

        It would appear that the instructions I posted below are no longer necessary for using the UWC within Eclipse.

        1. Nov 01, 2007

          Brendan Patterson says:

          Many thanks Blair!

          Many thanks Blair!

  9. Aug 26, 2007

    Steven Ngo says:

    Hi guys, I was just wondering if I could get some help with the UWC. Do I have...

    Hi guys,

    I was just wondering if I could get some help with the UWC.

    Do I have to run the UWC off the server confluence is running off or will it work of any computer with access to the Wiki?

    Currently I am trying to migrate some jspwiki content to the confluence Wiki with an admin login. The url is in the format (https://abc.au.123.com:10056/wiki/dashboard.action) and I have been using - https://abc.au.123.com:10056/wiki/ in UWC but to no avail. Is this correct?

    Whenever I test the connection it says that the user has been authenticated but does not have access to the space; even if i leave the username/password fields blank or enter a user/pw that does not exist.

    Any help would be much appreciated.

    Thanks in advance.
       

    1. Aug 27, 2007

      Laura Kolker says:

      Hi Steven, It looks like you might have access to the Remote API turned off. H...

      Hi Steven,

      It looks like you might have access to the Remote API turned off.
      Here's some doc (including instructions) on that:
      UWC User Documentation - What you need

      Sorry for the un-useful error message! I've put that in my todo list to fix.

      Let me know if you have any other questions.

      Cheers,
      Laura

      1. Aug 27, 2007

        Steven Ngo says:

        Hi Laura, Thanks for the reply! I have double checked the admin console and...

        Hi Laura,

        Thanks for the reply! I have double checked the admin console and Remote API is turned on.

        Remote API (XML-RPC & SOAP): ON

        Any other suggestions?

        Thanks,
        Steven

    2. Aug 27, 2007

      Brendan Patterson says:

      Steve, https is not currently supported. I think that might be your issue. If y...

      Steve,

      https is not currently supported. I think that might be your issue. If you can somehow run it via http you'll most likely be in better shape.

      Some other ideas

      • any computer with access to that server will work fine
      • try leaving the trailing slash / off your URL....I'm not sure if that's the issue but worth a try
      • just because a user is an admin doesn't automatically mean they have access to a space. this is most likely not the problem but just FYI.

      Brendan

      1. Aug 27, 2007

        Steven Ngo says:

        Thanks Bredan. I've tried leaving the "/" off as well as other variations of th...

        Thanks Bredan.

        I've tried leaving the "/" off as well as other variations of the url but nothing seems to work. I have write access to all spaces on the Wiki so that shouldn't be a problem either.

        I guess I will have to import the .txt files manually through Space Admin.

        Thanks for your help!

        Regards,
        Steven

        1. Aug 27, 2007

          Brendan Patterson says:

          I'm pretty sure it's the http*s* as opposed to http protocol. Can you access i...

          I'm pretty sure it's the http*s* as opposed to http protocol.

          Can you access it via http even temporarily?

          Otherwise I'd recommend

          1. install a personal Confluence instance
          2. import the content to that
          3. export the space
          4. import the space to your server running https via the Confluence admin space import feature
          1. Aug 28, 2007

            Steven Ngo says:

            Thanks Brendan; I just tried it on a localhost server. Worked fine and gave me ...

            Thanks Brendan; I just tried it on a localhost server.

            Worked fine and gave me the same result as importing them through Space Admin.

            Thanks for all the help!
            Steven

            1. Aug 30, 2007

              Brendan Patterson says:

              Great! Glad it worked.

              Great! Glad it worked.

              1. Sep 18, 2007

                Pranav Olkar says:

                Hi Brendan, same problem as Steven.Whatever I do it gives me that same error.Our...

                Hi Brendan, same problem as Steven.Whatever I do it gives me that same error.Our wiki is not using https , its on http(intranet).XML-RPC ON.Still the same problem.

                The wiki is hosted on a unix machine.I have the wiki converter on my windows machine.

                Click here for the screenshot of the error message.

                Any ideas?

                Thanks,

                Pranav

                1. Sep 19, 2007

                  Brendan Patterson says:

                  Hmmm. Well the error message might not be 100% accurate. I created those message...

                  Hmmm. Well the error message might not be 100% accurate. I created those messages based on the Confluence XML-RPC behavior I was seeing so it could mean something different.

                  If it were me I would:

                  • Just double check that the user has complete access to the space in the space permissions. This is probably not the issue but something to check.
                  • Create a new test user with something simple login: test / password: test just to make sure there is not a typo. Then try to use the UWC with that user. (I should probably check to make sure we're stripping trailing spaces from those fields.)

                  Other than that I don't have a lot of ideas at this time. Though not as ideal the same method I described as above would be available to you of creating a local instance of Confluence then migrating the data from there using 'space export'

  10. Aug 30, 2007

    Andrey Simonov says:

    Dear UWC developers, When I convert TWiki pages into Confluence, the converter ...

    Dear UWC developers,

    When I convert TWiki pages into Confluence, the converter "eats" some dots. For example, after conversion I get:

    TestPlan_RegressionTestPackJAN07.doc|^TestPlan_RegressionTestPackJAN07doc

    - in this link, "." is missing before "doc".

    How can this issue be resolved?

    Thank you.

    1. Aug 30, 2007

      Laura Kolker says:

      Hi Andrey, Looks like you've run into a syntax conversion that isn't handled ye...

      Hi Andrey,

      Looks like you've run into a syntax conversion that isn't handled yet. In order for us to help you, we'll need a little more info. Can you give me the Twiki Syntax for that particular conversion?

      I'd also suggest creating a JIRA issue so that we can track it's progress.
      Here's some doc on how we handle Bug Reports:
      UWC Bug Reporting

      Cheers,
      Laura

      1. Aug 31, 2007

        Andrey Simonov says:

        Hi Laura, Thank you for your answer. Here is the Twiki code that was converted...

        Hi Laura,

        Thank you for your answer.

        Here is the Twiki code that was converted:

        * [[%ATTACHURL%/TestPlan_RegressionTestPackJAN07.doc][TestPlan_RegressionTestPackJAN07.doc]]: Regression Test Pack JAN 07
        

        And the result is:

        * [TestPlan_RegressionTestPackJAN07.doc\|^TestPlan_RegressionTestPackJAN07doc|^TestPlan_RegressionTestPackJAN07doc]: Regression Test Pack JAN 07
        

        And I was expecting:

        * [TestPlan_RegressionTestPackJAN07.doc|^TestPlan_RegressionTestPackJAN07.doc]: Regression Test Pack JAN 07
        
        or
        
        * [^TestPlan_RegressionTestPackJAN07.doc]: Regression Test Pack JAN 07
        

        I cannot create an issue in Jira, because after registering and filling in the bug report form, I got the following error:

        Errors
        Assignee: The default assignee does NOT have ASSIGNABLE permission OR Unassigned issues are turned off.


        Thank you.

  11. Oct 15, 2007

    Tomas Edwardsson says:

    I just imported a mediawiki with UWC with over 1300 pages. I put them in a new s...

    I just imported a mediawiki with UWC with over 1300 pages. I put them in a new space. Now when I try to open the space it hangs and a java process goes to 100% CPU. Is this a bug and if it is, is there a workaround?

    1. Oct 22, 2007

      Laura Kolker says:

      Hi Tomas, Sorry for the radio silence. Yes, that is most certainly a bug. No, I...

      Hi Tomas,

      Sorry for the radio silence.
      Yes, that is most certainly a bug.
      No, I haven't see that before.

      I've created a JIRA issue, so we can track this. It is here: http://developer.atlassian.com/jira/browse/UWC-184

      If you get a chance, can you attach to (or comment on) that issue any log errors that occur both in the term that the UWC is run in, and also the atlassian-confluence.log.
      Also, it would help to have info about which Confluence you're using.

      In case you don't know where the logs can be found, here is some info about that:

      To get the log errors that the UWC creates, you can find them in two places:

      1. The terminal you ran the UWC from should have log messages sent to that terminal
      2. The uwc.log file in the root directory of the UWC

      The logs that Confluence creates are in:

      1. [confluence-x.x.x-std]/logs/atlassian-confluence.log

      You can attach the whole file to the JIRA issue, or just copy and paste the relevant error into a comment on that issue. To be sure that the latest error in the logs is related to the problem your experiencing, trigger the error (go to the space, for example) before you attach or comment those logs.

      Thanks for the heads up.
      Laura

    2. Nov 01, 2007

      Brendan Patterson says:

      One issue with the converter right now is that it does not help arrange pages. B...

      One issue with the converter right now is that it does not help arrange pages. Basically all the pages you convert get dumped into the space with no parent and no hierarchy.

      I'm guessing that it's possible that you are trying to display all the pages at one time and it just takes a long time. If your computer isn't very fast and/or doesn't have enough memory that could cause an experience like the one you're having.

      I have had a similar experience, but usually with a few thousand pages and an older computer.

      Perhaps try doing the conversion again (to a different space), but try just converting 200 or 400 pages and see what happens. If it works then it's likely that you either need to up your allocated memory.

      In any scenario if you're trying to show the listing of 1300 pages in the hierarchy or something similar it may take several seconds to render.

      1. Jan 10, 2008

        Blair Motchan says:

        I am currently working with my company's legal department to release some enhanc...

        I am currently working with my company's legal department to release some enhancements I made to the UWC that allows you to specify where within the space your converted documents are placed.  With my enhancements the user is offered the option of orphaning the pages (which is the default action that occurs in the current code base), dropping the converted pages in the home page of the space, or dropping the converted pages in a specified page within the space.

        Wish me luck with the lawyers! 

        1. Jan 10, 2008

          Laura Kolker says:

          Neat feature, Blair. Thanks. Laura p.s. Good Luck!

          Neat feature, Blair.
          Thanks.

          Laura

          p.s. Good Luck!

        2. Jan 10, 2008

          Brendan Patterson says:

          Blair, That would be fantastic. It is a long needed feature. Good luck! I've t...

          Blair,

          That would be fantastic. It is a long needed feature. Good luck!

          I've tried such things at former companies. It helps if you can get a manager or director on your side.

          1. Jan 10, 2008

            Blair Motchan says:

            I am working with a group of managers who are in the enterprise architecture div...

            I am working with a group of managers who are in the enterprise architecture division of our company, so our chances are looking good.

            I have some code for converting Xwiki, so I'll try to get that in there too.

            1. Jan 17, 2008

              Brendan Patterson says:

              Blair, That great news!! Any code for converting XWiki would be greatly apprec...

              Blair,

              That great news!!

              Any code for converting XWiki would be greatly appreciated. That was actually my next target converter and I've started to write a partial test harness for it.

              Please keep me updated and let me know if there is anything I can do to help you share your code

              And handling the orphan pages is also much needed.

  12. Oct 15, 2007

    ak says:

  13. Feb 27, 2008

    Mark Osborne says:

    I may be just being totally ignorant here, but how do I get images attached when...

    I may be just being totally ignorant here, but how do I get images attached when using the uwc?  I run the exporter and then the converter but when I try to use import on the files that get created the images don't get attached they look like they just create empty wiki pages. 

     for example I get a wiki page called foo.jpg when this should actually be an uploaded attachment.  Am I missing something?

    1. Feb 27, 2008

      Brendan Patterson says:

      Mark, It depends on which wiki you're converting. Each wiki 'converter' has it'...

      Mark,

      It depends on which wiki you're converting. Each wiki 'converter' has it's own specific way of finding your original wiki's attachments (which include images). You have to read the wiki specific notes. Those are listed on this page.

      In a simple scenario all of your attachments are stored by your wiki engine in a single directory. You point the UWC at that directory and when it encounters a reference in a wiki page to that attachment it will grab the file and upload it to Confluence as an 'attachment' for that page. The reality is slightly more complicated but that's the gist.

      1. Feb 27, 2008

        Mark Osborne says:

        Thanks Brendan,  I'm trying to convert from a mediawiki installation that ...

        Thanks Brendan,

         I'm trying to convert from a mediawiki installation that has around 10K pages.  I've got the directory for the attachments and I can see the image files in the output directory for the uwc.  The problem is when I specify that directory for import to confluence it creates the pages correctly, but also creates pages for the images without attaching the images.  I'll re-read the notes again on mediawiki and maybe I can get it right.

        1. Feb 27, 2008

          Brendan Patterson says:

          The mediawiki converter actually requires you run an initial export from your da...

          The mediawiki converter actually requires you run an initial export from your database using our custom 'MediaWiki exporter' which Laura Kolker wrote. That is described here. I couldn't tell from your comment if you already knew that.

        2. Feb 28, 2008

          Laura Kolker says:

          Hi Mark, Sounds like the UWC doesn't know where your attachments are located. H...

          Hi Mark,

          Sounds like the UWC doesn't know where your attachments are located. Have you tried setting the Attachment's Directory? Described here:
          UWC Mediawiki Notes - Attachments
          and
          UWC GUI v3 Settings - Attachments

          Cheers,
          Laura

  14. Mar 04, 2008

    John Budris says:

    I am having a problem with the converter.  It seems to do the export from M...

    I am having a problem with the converter.  It seems to do the export from MediaWiki ok and goes through the convert all the way until it tries to connect to Confluence where I get this error.

    Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: biz/arte
    is/confluence/xmlrpcwrapper/ConfluenceServerSettings
            at com.atlassian.uwc.ui.listeners.TestSettingsListener.getSettings(Test
    ettingsListener.java:196)
            at com.atlassian.uwc.ui.listeners.TestSettingsListener.actionPerformed(
    estSettingsListener.java:89)
            at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
            at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sou
    ce)
            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.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)

    I am running the conversion from Windows XP machine.  I have to run it on this because I can only run command line through Putty on the Linux boxes.  The machine originally had Java 6.  I read this may be a problem so I downgraded to Java 5 build 13.  I got the same issue with this so I downgraded to straight Java 5.  I still get the same issue.  I am using admin as the login. 

     Any help you can give me would be greatly appreciated.

    1. Mar 05, 2008

      Laura Kolker says:

      Hi John, That's an odd error. One of the prereq classes for the xml-rpc interac...

      Hi John,

      That's an odd error. One of the prereq classes for the xml-rpc interactions isn't working. Double check anything that could be interfereing with the XML-RPC functionality of your Confluence. For example, make sure it's turned on (that probably isn't the problem, but double check it anyway.)

      What version of the UWC are you using? Will be visible in the upper left corner or the title bar of the GUI.

      Cheers,
      Laura

      1. Mar 05, 2008

        John Budris says:

        I am using v46.  What could be interfering with XML-RPC functionality? ...

        I am using v46.  What could be interfering with XML-RPC functionality?  I decided to test this further and set up a UBUNTU install on a machine and tried to use the converter though there and got the same error.  I am really lost with this one.

        1. Mar 05, 2008

          Laura Kolker says:

          Hi John, I've created a JIRA issue for this: http://developer.atlassian.com/jir...

          Hi John,

          I've created a JIRA issue for this: http://developer.atlassian.com/jira/browse/UWC-198

          Can you help me out by describing everything you can about your experience, even the stupid details? Like where are you running the uwc script from? A user once ran into a NoClassDefFoundError when trying to run the UWC outside of the UWC dir.

          Cheers,
          Laura

      2. Mar 05, 2008

        James Hines says:

        Hi Laura, I am seeing the same error message as John when trying to test my con...

        Hi Laura,

        I am seeing the same error message as John when trying to test my connection to my Confluence instance. I'm running the UWC v.46 from XP, and have verified that the Remote API is turned on. 

        Your assistance would be appreciated. 

        Regards,

        James 

        1. Mar 05, 2008

          Laura Kolker says:

          Hi James I've created a JIRA issue for this: http://developer.atlassian.com/jir...

          Hi James

          I've created a JIRA issue for this: http://developer.atlassian.com/jira/browse/UWC-198

          Can you help me out by describing everything you can about your experience, even the stupid details? Like where are you running the uwc script from? A user once ran into a NoClassDefFoundError when trying to run the UWC outside of the UWC dir.

          Cheers,
          Laura

  15. Mar 05, 2008

    Justin Edelson says:

    Hey - I work with John and think I found the source of this problem. The package...

    Hey - I work with John and think I found the source of this problem. The packaged run_uwc.bat file contains this line:

    set UWCClasspath=%UWCClasspath%;%lib-loc%\confluence-xmlrpc-wrapper.jar
    

    and it should be

    set UWCClasspath=%UWCClasspath%;%lib-loc%\confluence-xmlrpc-wrapper-v4.05.jar 
    

    I made this change and the Test Connection worked. John's running the import now and can confirm once that's complete that this fixed the problem.

    1. Mar 05, 2008

      John Budris says:

      I ran this and it works now.  It connected to confluence and is uploading p...

      I ran this and it works now.  It connected to confluence and is uploading pages.

      1. Mar 05, 2008

        Brendan Patterson says:

        Great find. I updated the file in Subversion so it will make it into our next bu...

        Great find. I updated the file in Subversion so it will make it into our next build. Appreciate the insight.

      2. Mar 05, 2008

        Brendan Patterson says:

        Great find. I updated the file in Subversion so it will make it into our next bu...

        Great find. I updated the file in Subversion so it will make it into our next build. Appreciate the insight.

    2. Mar 05, 2008

      James Hines says:

      Yes, this change resolved my problem.  Thanks.

      Yes, this change resolved my problem.  Thanks.

    3. Mar 06, 2008

      Laura Kolker says:

      Nice work, Justin! And, Thanks. Laura

      Nice work, Justin!
      And, Thanks.
      Laura

  16. Mar 10, 2008

    Jordan Wosnick says:

    I am trying to use the UWC to convert PMWiki pages to a new company-wide Conflue...

    I am trying to use the UWC to convert PMWiki pages to a new company-wide Confluenceinstall and have a couple of questions -

    1. I am using a standalone Windows machine to do the conversion. How can I implement the batch file listed on the PMWiki UWC page to strip out excess data? (Is there a way it could be integrated into the UWC?)
    2. Will the UWC preserve the edit history and group structure of the PMWiki pages?

    Thanks in advance.

    1. May 26

      Laura Kolker says:

      Hi Jordan, re: #1 Not sure if this is the simplest means to your end, but if it...

      Hi Jordan,

      re: #1
      Not sure if this is the simplest means to your end, but if it was me, I'd install Cygwin, so that I had the range of Unix commands and shell languages available to me to just use the script listed.
      Or, if I didn't want to install anything, I might try to rescript in Perl which is Windows friendly. I'm not clear on how comfy you are as a developer, or if you have friendly developers available to you, so it's a little hard to give you more specific details than that.

      As for can it be integrated into the UWC? Sure, but you'll need a developer. You/he/she could create a Pmwiki Exporter.

      re: #2
      Not yet. There is an existing page history framework that a developer could take advantage of, though.

      If this is not something you feel you can handle in house, and it's a significant issue for you to move forward, you might want to consider engaging our custom plugin pack team. Here's some info on that, in case you're
      interested: UWC Pricing for Developing New Wiki to Confluence Converters

      Cheers,
      Laura

  17. Mar 26, 2008

    Patrick Laverty says:

    Converting from mediawiki.  I'm all the way to the point where the UWC is t...

    Converting from mediawiki.  I'm all the way to the point where the UWC is trying to import the converted files into my confluence instance.  But it claims that the user either doesn't have permission to the space or the space doesn't exist.  To test, I just created a brand new space and assigned my user to it.  I log in to Confluence just fine and have checked the spelling of the spackey and that my user has full write access.  Could this be because we have our login behind SSL?  I know I have the URL right, because when I changed that to the wrong one, I got a different error message telling me it's the wrong URL.  I tried putting https in for the site, but it says that SSL is not supported.  Is this where my problem is?  Because the error message that I'm getting about permission or the space not existing is not correct.\

    Thank you.

    Patrick

    1. Mar 27, 2008

      Laura Kolker says:

      Hi Patrick, That seems reasonable. So, a couple of thoughts: When you access ...

      Hi Patrick,

      That seems reasonable. So, a couple of thoughts:

      1. When you access your Confluence do you use https in the URL? If so, then there's nothing you can do to access that Confluence directly with the UWC.
      2. You can work around the problem, in some cases, by doing the import to a local (http) confluence, and then importing those pages to the https confluence via the admin console. Just a warning: if you try this with an already existing space, think carefully about how to do this without losing the existing content on that space. Let me know if you want me to go into more detail on that.
      3. If you normally have access to the Confluence using a regular http protocol. Then, the SSL layer you speak of is still probably the issue, but it's not one our error handling is (as you've noticed) prepared to give good errors for. If this is the case, can you tell me a little more about this SSL layer?

      Cheers,
      Laura

      1. Mar 28, 2008

        Patrick Laverty says:

        Thanks Laura, the Import from Disk worked.  However, all hierarchy is lost....

        Thanks Laura, the Import from Disk worked.  However, all hierarchy is lost.  I'm guessing that's to be expected, since the UWC just puts the files in one of five directories.  Has there been any thought to having the UWC keep this page hierarchy info?  Or am I only seeing this because I had to use the Import from Disk and couldn't import using the UWC?

         Thanks.

        Patrick

        1. Mar 28, 2008

          Laura Kolker says:

          Hi Patrick, re: Import from Disk worked Excellent! re: thought on page hierar...

          Hi Patrick,

          re: Import from Disk worked
          Excellent!

          re: thought on page hierarchy info, or is it just the Import from Disk issue
          Nope, it's not just the Import from Disk issue.

          Have we thought about it? Yes, absolutely.
          So, the issue here is that every wiki handles hierarchies differently. Both technically and philosophically. For example, Confluence's practice of requiring every page in a space to have a unique page name means that wikis who use page hierarchies to determine uniqueness are going to have a nasty problem when doing a conversion.

          So, what we've done is create a framework in which this particular data preservation issue can be handled. However, it is not yet in use for every wiki, Mediawiki included. If you're interested, here is some doc on that feature: UWC Hierarchy Builder Framework.

          Cheers,
          Laura

  18. Apr 14, 2008

    Oren Hurvitz says:

    I have recently converted my company's Wiki from MediaWiki to Confluence, and I ...

    I have recently converted my company's Wiki from MediaWiki to Confluence, and I made a few improvements to the conversion rules which may be useful to others. To add these rules, modify the file conf/converter.mediawiki.properties.

    • Disable automatic recognition of Macros, since we don't use them:
      Mediawiki.0020-no_macros.java-regex=\{([^|]){replace-with}\\\{$1
      
    • Better support for Strikethrough:
      Mediawiki.0085-strikethrough.java-regex=(?i)<strike>(.*)</strike>{replace-with}{-}$1{-}
      
    • Better support for attachments (allow some whitespace inside):
      Mediawiki.0403-re_links_to_images.java-regex=(?i)\[\[Media:\s*([^\]|\s]+)\s*\]\]{replace-with}[^$1]
      Mediawiki.0404-re_links_to_images2.java-regex=(?i)\[\[Media:\s*([^\]|\s]+)\s*\|\s*([^\]]*)\]\]{replace-with}[$2|^$1]
      
    • Better support for links (allow some whitespace inside):
      Mediawiki.0420-re_links_alias.java-regex=\[\[([^|]*)\s*\|\s*([^\]]*)\]\]{replace-with}[$2|$1]
      


    Also, the tables converter was unable to convert any of our tables correctly. In the end I just gave up and converted them manually. To find which pages have tables (so that you can convert them), run the following (assuming "exported_mediawiki_pages" is the directory that contains the MediaWiki files):

    grep -l -r --include=*.txt "{|" exported_mediawiki_pages
    
    1. Apr 14, 2008

      Laura Kolker says:

      Hi Oren, Thanks! re: Improved Converters FYI: I've added a JIRA issue to inte...

      Hi Oren,

      Thanks!

      re: Improved Converters
      FYI: I've added a JIRA issue to integrate some of your suggestions with the project. That's here: http://developer.atlassian.com/jira/browse/UWC-207

      re: Tables
      Yes, tables are complicated, and there are a number of cases that were difficult to anticipate. Can you help me out by adding JIRA issues here: http://developer.atlassian.com/jira/browse/UWC
      using component 'Mediawiki', with examples of the table syntaxes that aren't working? Ideally, it would be also helpful to have the Confluence syntax you were expecting. Here's some doc on our favorite Bug Reporting practices:
      UWC Bug Reporting

      Thanks,
      Laura

  19. Apr 24, 2008

    Craig Hannah says:

    Hi, I'm attempting to convert our DokuWiki content to Confluence and I'm gettin...

    Hi,

    I'm attempting to convert our DokuWiki content to Confluence and I'm getting two class not found errors. I see that this issue was reported on March 13 (UWC-201), but it doesn't appear to have been acknowledged by anyone. Judging by the Subversion comments for these two classes, it appears they were deleted when the gui was redone.

    Does anyone have any thoughts for a solution or work-around?

    Thanks,

    Craig Hannah 

    1. Apr 28, 2008

      Laura Kolker says:

      Hi Craig, Yes, that's very peculiar. Thanks for pointing it out here. I'm takin...

      Hi Craig,

      Yes, that's very peculiar. Thanks for pointing it out here. I'm taking a look into what happened to those files. I'll post here and at the jira issue as I find useful info.

      re: thoughts
      I suspect this is an oversight. Maybe one of the dokuwiki developers tried to move some files to better locations but didn't complete their submit? Not sure yet.

      re: work-around
      Well, if you're comfy with subversion, I'd start by checkingout a local copy, and using a subversion tool like Fisheye, try to get the most recent copy of the deleted files back into an expected directory. Basically, once I find out what happened to the relevant files, I'm probably going to be just trying to put them back where the properties file expects them, so you may find it faster to do that without waiting for me.

      Cheers,
      Laura

    2. Apr 28, 2008

      Laura Kolker says:

      Hi Craig, I believe I've fixed now this problem. The dokuwiki classes have bee...

      Hi Craig,

      I believe I've fixed now this problem.

      The dokuwiki classes have been reverted into the following directory: http://svn.atlassian.com/fisheye/browse/public/contrib/confluence/universal-wiki-converter/devel/src/com/atlassian/uwc/converters/dokuwiki

      Until the next uwc has been released, you can get access to these via the source.
      Checkout a copy from the svn repos.
      Run ant from the root directory.
      Run the uwc from the target/uwc directory.

      Cheers,
      Laura

      1. May 05, 2008

        Craig Hannah says:

        Hi Laura, Thanks for getting those two classes back out. It rebuilt ok and ran,...

        Hi Laura,

        Thanks for getting those two classes back out. It rebuilt ok and ran, but it was unable to upload any attachments.

        It appears that the problem was that the DokuWikiImageConverter method addAttachment was instantiating some old code when it tried to get the attachments directory.

        I changed: 

        ConfluenceSettingsForm confSettings = UWCForm2.getInstance().getConfluenceSettingsForm();
        String baseDir = confSettings.getAttachmentDirectory();

        To:

        String baseDir = this.getAttachmentDirectory(); 

        And it worked.

        Craig 

        1. May 05, 2008

          Laura Kolker says:

          Hi Craig, Nice catch. I've updated the source repos to reflect that change. It ...

          Hi Craig,

          Nice catch. I've updated the source repos to reflect that change. It should get rolled out with the next release of the UWC (47, I think).

          Thanks,
          Laura

  20. May 29, 2008

    Marco Gatti says:

    We're using version 46 of the universal wiki converter. I read all related docum...

    We're using version 46 of the universal wiki converter. I read all related documents, also the wiki specific user notes. I copied the mediawiki images directory localy on my windows machine. For uwc I use java 1.6.0_05-b13. I can connect to mediawiki's mysql server and I got the pages. In the gui I added downloaded mediawiki images directory under attachments.
    In the exported_mediawiki_pages directory I have an Images directory with empty 0 byte .jpg.txt files or pngs etc.

    In the output directory of uwc I have empty .jpg files in the images directory.

    When I convert and upload the mediawiki exported pages to confluence where are emtpy pages with name .jpg

    I also looked in java-src-code of converter but can't find the issue. The regex in converter.prop seems to be fine, I tested regex with buildin regex tester.

    Mediawiki.0403-re_links_to_images.java-regex=(?i)\[\[Bild:(\+)\]\]{replace-with}
    

    We use the german word Bild instead of Media or Image.

    The media wiki src looks like this e.g.:

    [[Bild: imagename.jpg |800px| anylabel]]
    

    see also link to support. There are the uwc.log and catalina.out of tomcat.

    I also tried the whitespace solution of Oren Hurvitz mentioned above.

    1. May 29, 2008

      Laura Kolker says:

      Hi Marco, I'm not entirely clear on what's not working, so bear with me: This i...

      Hi Marco,

      I'm not entirely clear on what's not working, so bear with me:
      This is what I'm hearing:
      1. The pages in the Images directory are not getting uploaded to your Confluence, and
      2. The attachments are not getting uploaded/attached to their associated pages.
      Did I hear you correctly?

      Presuming the above is correct:
      re: #1 (Images directory pages)
      So, a bit of info: The pages in the Images directory are 0 bytes because they have no data associated with them. Mediawiki keeps a page for each image but automatically provides the picture and such via the database directly. That being said, they should still be uploaded to Confluence as an empty page with the name of the page being the same as the Image file. So, for example: My test Images directory looks like this:

      Ed:~/Desktop/exported_mediawiki_pages/Images laura$ la
      total 0
      0 drwxr-xr-x   5 laura  laura  170 May 29 11:32 .
      0 drwxr-xr-x   7 laura  laura  238 May 28 13:56 ..
      0 -rw-r--r--   1 laura  laura    0 May 28 13:56 Abcd.png.txt
      0 -rw-r--r--   1 laura  laura    0 May 28 13:56 Wiki.png.txt
      0 -rw-r--r--   1 laura  laura    0 May 28 13:56 Wiki_file.png.txt
      

      And when I convert, for example, the Images directory, each of those files becomes a page in my space. The Abcd.png.txt file becomes Abcd.png page.
      So, as for where are these pages? They should be in the space.
      Now, I took a look at the log you posted in that support issue, and I noticed we got a couple of "failed to add page" errors.
      The log doesn't have debug messages turned on however, so I think that's the next step in tracking down what's happening.
      So, edit your log4j.properties and change INFO to DEBUG. Delete (or move) your uwc.log. Run the uwc (it'll create a new log), and try converting a couple of pages that you know didn't make it. Then attach those logs to your support ticket, and hopefully the debug messages will have some additional clues.

      re: #2 attachments not uploaded
      So, the uwc.log indicates that at least some of the attachments are getting attached without surrounding errors. For example:

      2008-05-28 15:28:50,486 INFO  [Thread-9] - UWC connected successfully with Confluence.
      2008-05-28 15:28:50,548 INFO  [Thread-9] - attachment written LDAP-Thunderbird.jpg
      2008-05-28 15:28:50,657 INFO  [Thread-9] - attachment written Verfassen_und_Adressieren.jpg
      2008-05-28 15:28:50,673 INFO  [Thread-9] - UWC connected successfully with Confluence.
      

      So, are you telling me that none of the attachments attached? Or some of the attachments didn't attach?
      Again, try converting a small number of pages that should have attachments that aren't getting them with Debug messages turned on and attach the resulting log to the support ticket.

      Or you can email me the logs directly: laura dot kolker at gmail dot com

      Cheers,
      Laura

      1. May 30, 2008

        Marco Gatti says:

        Hi Laura, I really appreciate your help. Now, I finally understand the concept ...

        Hi Laura,

        I really appreciate your help. Now, I finally understand the concept behind the conversation. Sorry I forgot turn on debug for uwc.log, just did for totals.

        So let's clear it up:

        • You're right, the mediawiki empty pages for images are created in exported_mediawiki_pages\Images directory on my uwc machine.
        • I tested six pages with images, in confluence there are no empty pages named <imagename.jpg>

        • But: there are the pages from mediawiki with images as attachments. But there are some pages where the images are not attachted.

        My images:

        So some images are missing.

        E.g. I have following confluence wiki code:

        [Bild__license-Key mundm.jpg]
        [Bild__mundm anmeldung.jpg]
        

        Original mediawiki was:

        [[Bild:license-Key mundm.jpg]]
        [[Bild:mundm anmeldung.jpg]]
        

        So in this special case I think I have to have a closer look on my regex:

        Mediawiki.0403-re_links_to_images.java-regex=(?i)\[\[Bild:\s*([^\]|\s]+)\s*\]\]{replace-with}[^$1]
        Mediawiki.0404-re_links_to_images2.java-regex=(?i)\[\[Bild:\s*([^\]|\s]+)\s*\|\s*([^\]]*)\]\]{replace-with}[$2|^$1]
        

        Another example which dosen't work:

        In confluence
        [800px|DHCP - dom-2k|^DHCP-ILO2.jpg]
        
        In mediawiki
        [[Bild:DHCP-ILO2.jpg|800px|DHCP - dom-2k]]
        

        I'll try to rewrite regex in that manner that I get images inline, is that possible?

        There are still more pics missing.

        I attach the uwc_debug.log and uwc_debug_all_pages.log on ticket

        1. May 30, 2008

          Laura Kolker says:

          Hi Marco, Response below: Sorry I forgot turn on debug for uwc.log, just did f...

          Hi Marco,

          Response below:


          Sorry I forgot turn on debug for uwc.log, just did for totals.

          No worries. I took a look at the logs you posted on the ticket, and I did not see those "failed to add page" errors on the image specific logs (uwc_debug.log). In fact, I saw no errors in that log. I did see some exceptions and errors in the large log uwc_debug_all_pages.log. We ran into a couple of different problems (not really image handling related though).

          1. The most prevelant being variants on dollar sign related errors:
            2008-05-30 11:48:19,270 ERROR [Thread-13] - Exception thrown by converter Mediawiki.0360-re_tables.class on page Besprechungen.txt. Continuing with next converter.
            java.lang.IllegalArgumentException: Illegal group reference
               at java.util.regex.Matcher.appendReplacement(Unknown Source)
            

            a bug probably similar to UWC-214.

          2. We also ran into some File IO issues with a page name that contained quotes already in it.
            2008-05-30 11:48:39,800 ERROR [Thread-13] - Error writing to file output\output\Checkliste "Access Point-Inbetriebnahme".
            Note: Output file cannot be written to disk. Check permissions.
            java.io.FileNotFoundException: output\output\Checkliste "Access Point-Inbetriebnahme" (Die Syntax f?r den Dateinamen, Verzeichnisnamen oder die Datentr?gerbezeichnung ist falsch)
            

            I've created an issue for that: UWC-220

          3. And an unusual decoding entities issue: UWC-219

          I tested six pages with images, in confluence there are no empty pages named <imagename.jpg>

          So, if you choose the pages in the exported_mediawiki_pages/Images directory, and convert those pages, then you should get a page corresponding for each. If, instead, you choose pages from exported_mediawiki_pages/Pages that happen to have attachments, and convert those, you will not get an empty page for each associated image. You will simply get the pages you requested, ideally with all attachments. Are you saying that you choose exported_mediawiki_pages/Images/somefile.png.txt as a page to convert, and after converting it there is no page in your space called somefile.png ?


          So some images are missing.

          It sounds to me like there are some image handling Mediawiki syntaxes that currently aren't supported by the UWC. I would recommend reporting the syntaxes that aren't working for you as individual jira issues on the UWC's jira. You can get more info about reporting these sorts of issues at the UWC Bug Reporting page.


          I'll try to rewrite regex in that manner that I get images inline, is that possible?

          I'm not sure what you mean, so bear with me:
          If you mean: Is it possible to rewrite the regex to get what I want, then I would say:
          You may find adding a new regex to handle that syntax works better than trying to rewrite the old one. But rewriting is certainly an option. If you're looking to do development, I would recommend checking out the UWC Developer Documentation page, particularly the section on the Anatomy of a converter properties file. (Assuming you haven't already. )
          If you mean: Is it possible to rewrite a particular regex so that the images are rendered inline, then I would say:
          Absolutely. In fact, many image conversions (if not all) should be rendered inline already.

          Cheers,
          Laura

    2. Aug 26, 2008

      Buelent Caliskan says:

      Hi!   We use german MediaWiki too and this settings in converter.media...

      Hi!

       
      We use german MediaWiki too and this settings in converter.mediawiki.properties works great!!

      
      Mediawiki.0400-re_links_no_categories.java-regex=(?i)\[\[(category:\|Kategorie:\[^\]\]+)\]\]{replace-with}$1
      Mediawiki.0401-re_links_to_images1.java-regex=(?i)\[\[Bild:\s*(\[^\]\|\s\]+)\s*\]\]{replace-with}\!$1\!
      Mediawiki.0402-re_links_to_images2.java-regex=(?i)\[\[Bild:\s*(\[^\]\|\s\]+)\s*\|\s*(\[^\]\]*)\]\]{replace-with}\!$1\|$2,thumbnail\!
      Mediawiki.0403-re_links_to_images3.java-regex=(?i)\[\[Image:\s*(\[^\]\|\s\]+)\s*\]\]{replace-with}\!$1\!
      Mediawiki.0404-re_links_to_images4.java-regex=(?i)\[\[Image:\s*(\[^\]\|\s\]+)\s*\|\s*(\[^\]\]*)\]\]{replace-with}\!$1\|$2,thumbnail\!
      Mediawiki.0405-re_links_to_images5.java-regex=(?i)\[\[Media:\s*(\[^\]\|\s\]+)\s*\]\]{replace-with}\!$1\!
      Mediawiki.0406-re_links_to_images6.java-regex=(?i)\[\[Media:\s*(\[^\]\|\s\]+)\s*\|\s*(\[^\]\]*)\]\]{replace-with}\!$1\|$2,thumbnail\!
      Mediawiki.0407-re_links_colons.class=com.atlassian.uwc.converters.mediawiki.NamespaceCleaner
      
      &nbsp;
      

       "Categories are currently stripped out, partially because Confluence doesn't really have a Categories concept. Labels would probably be the best equivalent, but it just isn't supported at the moment." Categories left as plain Text, but this is no problem for me...
       
      The only think I misses, is that exclamation marks are not commentated out. Example:
       
      "Our new album hit the charts! It is now also released in" was converted to:
      "Our new album hit the charts!_It_is_now_also_released_in"

      1. Aug 26, 2008

        Laura Kolker says:

        We use german MediaWiki too and this settings in converter.mediawiki.properties...

        We use german MediaWiki too and this settings in converter.mediawiki.properties works great!!

        Thanks for the tip. I've added a JIRA issue to capture this: UWC-249

        The only think I misses, is that exclamation marks are not commentated out.

        I've added this JIRA issue: UWC-250

        Please, feel free to add comments to those issues.
        Thanks!
        Laura

  21. Aug 06, 2008

    JK Collins says:

    We converted 3 mediawiki's just beautifully last month. Now, this month we want ...

    We converted 3 mediawiki's just beautifully last month. Now, this month we want to convert our remaining 4 mediawiki's and it keeps throwing exception errors and crashing at anywhere from 50-71%. Can someone help us figure out what the problem is? Here is the most recent error prior to the crash:

    2008-08-04 13:39:03,742 ERROR [Thread-3] - Exception thrown by converter Mediawiki.0710-images_ws2underscore.class on page updaters.inc. Continuing with next converter.
    java.lang.IllegalArgumentException: Illegal group reference
    at java.util.regex.Matcher.appendReplacement(Matcher.java:706)
    at com.atlassian.uwc.converters.mediawiki.ImageWhitespaceConverter.convertImageWhitespace(ImageWhitespaceConverter.java:33)
    at com.atlassian.uwc.converters.mediawiki.ImageWhitespaceConverter.convert(ImageWhitespaceConverter.java:18)
    at com.atlassian.uwc.ui.ConverterEngine.convertPage(ConverterEngine.java:915)
    at com.atlassian.uwc.ui.ConverterEngine.convertPages(ConverterEngine.java:805)
    at com.atlassian.uwc.ui.ConverterEngine.convertPages(ConverterEngine.java:768)
    at com.atlassian.uwc.ui.ConverterEngine.convert(ConverterEngine.java:329)
    at com.atlassian.uwc.ui.ConverterEngine.convert(ConverterEngine.java:302)
    at com.atlassian.uwc.ui.ConverterEngine.convert(ConverterEngine.java:176)
    at com.atlassian.uwc.ui.UWCGuiModel.convert(UWCGuiModel.java:171)
    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(Thread.java:613)

    1. Aug 07, 2008

      Laura Kolker says:

      Exception thrown by converter Mediawiki.0710-images_ws2underscore.class on page...

      Exception thrown by converter Mediawiki.0710-images_ws2underscore.class on page updaters.inc. Continuing with next converter.
      java.lang.IllegalArgumentException: Illegal group reference

      You've found a bug. Sorry about that. Basically, the java regex library doesn't automatically internally quote special regex characters, so we have to explicitly look for them (not intuitive) and sometimes we forget.

      So, the pages that are going to barf on you probably have '$' in them, although it could be something else. (Symbol to regex engine that a group is coming. When it can't figure out what group it is, it barfs.)

      Possible solutions:

      • handle the pages causing the exceptions either
        • manually, or
        • try commenting out converters like the image whitespace converter for just those pages, and see if that works (it's possible other converters will have the same issue, though)
        • To find out which pages are having the problem, look prior to the exception you listed for lines looking like:
          2008-08-06 15:02:50,392 INFO  [Thread-3] - -------------------------------------
          2008-08-06 15:02:50,400 INFO  [Thread-3] - converting page file: Somefile.txt
          
      • fix the code
        • here's a jira issue for tracking: Jira issue: UWC-241
        • While I can guess at a fix for this, there are two problems - (1) I won't be able to put out a new release for you in the immediate future. (Next release is probably a couple of weeks away.) And (2) without a sample of the failing input, I can't test that my guessed solution actually fixes anything for you. If you want to attach a sample file (feel free to XXX out any proprietary info - I probably just need the syntax and any suspicious looking symbols) to the jira issue, it would help me double check the solution.
        • If you are or know a developer that would prefer to just fix it themselves (might be faster), I'd be happy to answer questions about UWC devel and builds, as well as where I thnk the problem is.

      Cheers,
      Laura

      1. Aug 26, 2008

        JK Collins says:

        Thanks for the advice, Laura. I went through and manually removed all $ from the...

        Thanks for the advice, Laura. I went through and manually removed all $ from the content and re-ran the UWC and it worked!
        Cheers,
        JK

  22. Sep 16, 2008

    Michael Plant says:

    We are importing MediaWiki content into Confluence using the Universal Wiki Conv...

    We are importing MediaWiki content into Confluence using the Universal Wiki Convertor and created a custom regex to convert an extension "getuser: mp12345" that displays an employee name and telephone number into the format:

    [~mp12345]

    and a link to a telephone directory. The regex is shown below:

    Mywiki.0970.tilde.java-regex=(\s)get:user:(.{7}){replace-with}[~$2] {menulink:custom|link=http://q/uid:$2|target=_none}$2{menulink}
    

    All works well except the tilde is replaced with an underscore resulting in:

    [_mp12345]

    This only occurs if the tilde is adjacent to a square bracket. We have tried escaping the tilde and brackets and using unicode, all to no effect.

    1. Sep 16, 2008

      Laura Kolker says:

      Hi Michael, Looks like you've run into a bug from the Illegal Names Handling fr...

      Hi Michael,

      Looks like you've run into a bug from the Illegal Names Handling framework. (The point of the illegal names handling framework is to help avoid situations where Confluence's Remote API would allow us to upload pages with illegal names. Since we have to change pagenames, we also have to handle links. Doing so using some sort of state (only changing links with names we changed) is prohibitive from a performance perspective, so we try to guess what link situations match problem pagenames and disallow those. Unfortunately, this design, while quicker, is prone to false positives.)

      I've created a jira issue here:
      UWC-258

      I probably won't be able to fix this immediately. If there is someone on your team who is comfortable with java development, I'd be happy to provide info about where to start and answer devel questions.

      Cheers,
      Laura

      1. Sep 17, 2008

        Michael Plant says:

        Hi Laura We have some Java developers who can look at this if you can provide t...

        Hi Laura

        We have some Java developers who can look at this if you can provide the info.

        Michael

        1. Sep 17, 2008

          Laura Kolker says:

          Great. You can get a read-only copy of the code here: URL: http://svn.atlassian...

          Great.

          You can get a read-only copy of the code here:
          URL: http://svn.atlassian.com/svn/public/contrib/confluence/universal-wiki-converter/devel

          Build instructions here:
          UWC Developer Documentation#How to check out and build

          So, the critical java file you're interested in is:
          com.atlassian.uwc.converters.IllegalLinkNameConverter.java

          The general method you're interested in is:
          IllegalLinkNameConverter.legalizeLinksWithoutState(String)

          probably you want to add something after the comment

          //link parts: alias, anchor symbol (if any), link
          

          and before the isExternalLink conditional

          if (!isExternalLink(pagename)) //if it's external, it can't have an illegal confluence name.
          

          that will identify the tilda syntax

          There are junit tests for that class in the same package
          IllegalLinkNameConverterTest.java
          although you might want to comment out testDetokenizeCodeBlock which appears to be looping at the moment, and you can expect testRightBracketProblem to fail at the present.

          Cheers,
          Laura

  23. Sep 26, 2008

    Chris Wan says:

    Hey guys, I'm trying to load UWC but am getting the following exception. Any s...

    Hey guys,

    I'm trying to load UWC but am getting the following exception. Any suggestions? I'm running JDK 1.6.

    D:\download\Universal Wiki Converter>run_uwc.bat
    
    D:\download\Universal Wiki Converter>REM set classpath=target\uwc\classes;lib\ja
    karta-oro-2.0.8.jar;lib\log4j-1.2.13.jar;.;C:\Program Files\IBM\WebSphere MQ\Jav
    a\lib\providerutil.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mqjms.
    jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\ldap.jar;C:\Program Files\IBM\Web
    Sphere MQ\Java\lib\jta.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\jndi.jar;C
    :\Program Files\IBM\WebSphere MQ\Java\lib\jms.jar;C:\Program Files\IBM\WebSphere
     MQ\Java\lib\connector.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\fscontext.
    jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mq.jar;C:\Program Files\J
    ava\j2re1.4.2_13\lib\ext\QTJava.zip
    
    D:\download\Universal Wiki Converter>REM run out of the sample-files dir
    
    D:\download\Universal Wiki Converter>echo off
    Exception in thread "main" java.lang.UnsupportedClassVersionError: com/atlassian
    /uwc/ui/UWCForm3 (Unsupported major.minor version 49.0)
            at java.lang.ClassLoader.defineClass0(Native Method)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$100(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    

    Thanks,

    Chris

    1. Sep 26, 2008

      Chris Wan says:

      I think it's picking up ver 1.4 instead of ver 1.6 ... uninstalling now - hopefu...

      I think it's picking up ver 1.4 instead of ver 1.6 ... uninstalling now - hopefully that will do the trick.

      1. Sep 29, 2008

        Chris Wan says:

        nope - no good ... any ideas?

        nope - no good ... any ideas?

        1. Sep 29, 2008

          Brendan Patterson says:

          It appears you might be running with IBM Java Virtual Machine (JVM). Basically i...

          It appears you might be running with IBM Java Virtual Machine (JVM). Basically it's saying that the Java classes were compiled with something that is more up to date than what you're trying to run with.

          At the command line type: java -version
          What does it say?
          if it says 1.4.x or something you do need something newer.

          If you downloaded and installed version 1.6 or 1.5 I think that should work. But it's also possible you downloaded and installed it but it is still not being used by your system. You may need to restart or you may need to explicitly tell your system to use that version of Java.

          I'm pretty sure one or all of these things is happening as that error does occasionally pop up and these reasons have always been the cause - a version of Java is being used which is older than what the UWC was compiled with.

          1. Sep 29, 2008

            Chris Wan says:

            Thanks for the note Brendan.  Looks like it's even older than that (v1.3)&#...

            Thanks for the note Brendan.  Looks like it's even older than that (v1.3)!  I may need to update the class path as well, would you happen to know what the default might be for Windows?  Not sure what the correct path should be.

             C:\Program Files\Java\jre1.6.0_07\lib ...

            1. Sep 29, 2008

              Brendan Patterson says:

              try installing Java from www.java.com then reboot then see what java -version y...

              try installing Java from www.java.com then reboot

              then see what
              java -version yields

              basically you need to set your PATH environment variable to first find %JAVA_HOM%\bin

              where %JAVA_HOME% is the location of your java install. If you're having trouble getting that to work I'd Google around for the issue you're encountering.

              Hope that helps,
              Brendan

  24. Oct 09, 2008

    Kane Wang says:

    I want convert a WackoWiki to confluence wiki. But I found there is no related c...

    I want convert a WackoWiki to confluence wiki. But I found there is no related converter, what I should do?

    1. Oct 09, 2008

      Laura Kolker says:

      Hi Kane, If you want to use the UWC, you have two choices: Develop a Wackowik...

      Hi Kane,

      If you want to use the UWC, you have two choices:

      1. Develop a Wackowiki converter. The UWC is a framework, so it's relatively easy to get up and running. See UWC Developer Documentation.
        or
      2. Hire a contractor to develop one for you. If you're interested in that, let me know, and I'll see if I can set you up.

      There may be other options in existence, of course, but I don't happen to know any off the top of my head.

      Cheers,
      Laura

      1. Oct 13, 2008

        Kane Wang says:

        Thanks! I will develop a Wackowiki converter

        Thanks! I will develop a Wackowiki converter

  25. Oct 09, 2008

    Kelly He says:

    Hi, I am just wondering is there any way to convert the watchlist from mediawik...

    Hi,

    I am just wondering is there any way to convert the watchlist from mediawiki to confluence?  I tried using the API but there isn't such a function.  Is there a plugin available that would do the job?

    Thanks,

    Kelly

    1. Oct 09, 2008

      Laura Kolker says:

      Hi Kelly, I don't happen to know of anything that would provide that feature. ...

      Hi Kelly,

      I don't happen to know of anything that would provide that feature.

      The big problem is that the Confluence Remote API (which is what the UWC uses to communicate with Confluence) does not appear to have watchlist features.

      If you wanted to develop this feature for the UWC you'd have a lot of extra steps:

      1. First, you'd have to create a Confluence RPC plugin to expose watchlist features, and install it.
      2. Second, you'd have to extend the Confluence Remote Java Wrapper to work with your new xmlrpc functionality
      3. Then you'd need to extend the UWC's framework so that the Page object and ConverterEngine know what to do with watchlist information
      4. Extending the MediawikiExporter so you could get the data to convert would be important, as well.
      5. Finally, after all that, you could write a converter that would take advantage of this new framework to get this data into Confluence.

      Ugh.

      Cheers,
      Laura

  26. Oct 17, 2008

    Kelly He says:

    Hi,  We had been using the UWC for quite a while and it has been working f...

    Hi,

     We had been using the UWC for quite a while and it has been working fine.  But somehow lately the converter starts to crash constantly when we are trying to do imports.  It would stop at a certain point, usually at 98% or something close to the end and get stuck there until we restart the import.  We found that we would have to do import more than once in order to get through the whole import.  Does anyone know what is going on with the converter?

    Thanks,

    Kelly

    1. Oct 17, 2008

      Laura Kolker says:

      Hi Kelly, Hard to tell without more information. Have you read this? UWC F.A.Q...

      Hi Kelly,

      Hard to tell without more information. Have you read this?
      UWC F.A.Q.#During a conversion the UWC keeps getting stuck on the 1077th page (or some page). What is the problem?

      Cheers,
      Laura

    2. Oct 17, 2008

      Brendan Patterson says:

      As Laura pointed out the usual suspect in this type of case is a single page tha...

      As Laura pointed out the usual suspect in this type of case is a single page that is unusual.
      Someone may also have uploaded some giant attachment which is 100s of megabytes in size and the UWC is getting stuck on trying to send this. Have a look at the output - is it always getting stuck on the same page?
      How many pages are you converting?
      Have you tried increasing the memory allocation for the UWC?

  27. Nov 07, 2008

    John Baker says:

    It would be good if the source can be packaged with the binary download.  M...

    It would be good if the source can be packaged with the binary download.  Makes it easier to quickly debug a problem should one occur.

    1. Nov 07, 2008

      Laura Kolker says:

      The binary's already 6M in size! If you want to debug the source, that's fabulou...

      The binary's already 6M in size! If you want to debug the source, that's fabulous, but we're not forcing every user to download 28M of gear they don't need. Getting the source is super easy, if that's what you want to do. If you're having any issues getting it, let me know and I'll be happy to walk you through it.

      Cheers,
      Laura

  28. Nov 13, 2008

    Tony Morone says:

    We are currently using clearspace but have thought about moving to confluence (w...

    We are currently using clearspace but have thought about moving to confluence (we already use jira very heavily). A lot of content in clearspace, though. Any thoughts?

    1. Nov 13, 2008

      Brendan Patterson says:

      Hi Tony, Thanks for your interest in Confluence. I'd like to talk to you a bit ...

      Hi Tony,

      Thanks for your interest in Confluence. I'd like to talk to you a bit more about this, what you're looking for, what Confluence offers that would prompt your switch, etc. Please send me an email or feel free to give me a call - my contact info is here: http://tinyurl.com/contact-brendan

      We'll have to look at ClearSpace a bit to understand its content migration options.

      thanks,
      Brendan

  29. Dec 22, 2008

    Naren Salem says:

    I am having a problem with convering tables. The source is in MediaWiki. It look...

    I am having a problem with convering tables. The source is in MediaWiki. It looks like if there is an html tag inside a cell, the whole cell gets dropped in the conversion. There is no error reported in the log file.

    {| border="1" 
    ! No. 
    ! Section 
    ! Severity 
    ! Comment 
    |- 
    | 1 
    | section 1 
    | mi 
    | comment 1 
    |- 
    | 2 
    | section 2 
    | MA 
    | Comment 2 
    |- 
    | 3 
    | Section 3 
    | mi 
    | This comment has <font color="blue">text.</font> 
    |}
    

    The last comment cell doesn't show up in the Confluence page...Anyone seen this? have a quick fix for me?

    TIA

    Naren

    1. Dec 23, 2008

      Laura Kolker says:

      Hi Naren, You could try adding a converter to handle font tags (or whatever oth...

      Hi Naren,

      You could try adding a converter to handle font tags (or whatever other html tags you care about) before the TableConverter gets run.
      If you anticipate nesting, you'll need to do some java development (which is not a quick fix), but if the majority of these sorts of tags look pretty much like your example, you could try something like this (lifted from the jotspot converter):

      Mediawiki.0355.fonttags.java-regex=<font color=\"([^\"]+)\">(.*?)</font>{replace-with}{color:$1}$2{color}
      

      See UWC Developer Documentation for more info on converter development.

      Cheers,
      Laura

      1. Dec 24, 2008

        Naren Salem says:

        What I found was that, that line has to be split in two. As it is, if it is proc...

        What I found was that, that line has to be split in two. As it is, if it is processed before the table converter, the table conversion fails. I am guessing that's because of this line in the mediawiki/tableconverter.java file.

        Pattern mediawikiTable = Pattern.compile("\\{\\|([^}]*?)\\|\\}");	// {| (stuff) |}
        

        It's not a table if it has a } in it.

        So my properties file looks like this:

        Mediawiki.0203-re_color.java-regex=<font color="(.*?)">(.*?)</font>{replace-with}{color:$1a1b2c3$2{colora1b2c3
        .
        .
        .
        Mediawiki.0360-re_tables.class=com.atlassian.uwc.converters.mediawiki.TableConverter
        .
        .
        .
        Mediawiki.0362-re_n8642.java-regex=a1b2c3{replace-with}}
        

        This way I remove the <font> tags before the table converter runs, but I don't yet put in the }s for the color tags. Then, after the table converter has run, I replace the a1b2c3 placeholder with }s. Obviously this is very hackish and can't be the official solution.

        1. Dec 30, 2008

          Laura Kolker says:

          Hi Naren, Nice solution. For future reference, it's also possible that a java-r...

          Hi Naren,

          Nice solution. For future reference, it's also possible that a java-regex-tokenizer property type would do the trick. The java-regex-tokenizer inserts tokens where the problem text is, and then they can be resolved later with the DetokenizerConverter. It's especially useful when later converters would interfere with the replace-text, but I think it could also be used in the situation you described. (Not that your solution isn't perfectly valid. Just thought it might be useful to know about.)

          Cheers,
          Laura

  30. Dec 23, 2008

    Naren Salem says:

    I actually tried that this morning, and the colors started to come through, but ...

    I actually tried that this morning, and the colors started to come through, but in general having the <font> element breaks the table, even though I am converting that to elements before the tableConverter line in the converter.mediawiki.properties file. The original mediawiki table just gets copied through without any conversion....

    I just downloaded the source to look at the table converter. We have a lot of tables in our mediawiki and getting them somewhat right is crucial to this effort to switch to Confluence. I am hoping to get this done over the holiday week when most of our company is out.

    Thanks for your response. I will post what I find.
    Naren

  31. Dec 23, 2008

    Stefan Undorf says:

    Can I use UWC to export a Confluence page to other wikis or plain html? Merry C...

    Can I use UWC to export a Confluence page to other wikis or plain html?

    Merry Christmas,
    Stefan

    1. Dec 23, 2008

      Brendan Patterson says:

      Confluence has a built in feature to export multiple pages as HTML or PDF if you...

      Confluence has a built in feature to export multiple pages as HTML or PDF if you like. The feature is under
      browse space -> advanced -> export as shown in the screen shot.

      It does not export Confluence to other wikis, but I'm curious what your use case is?

  32. Jan 05

    John Baker says:

    Hi, I've got an additional 'cleaner' for Twiki, and I hope you could include it...

    Hi,

    I've got an additional 'cleaner' for Twiki, and I hope you could include it in the next release. You will note that I've also added the space name to the Page objects (created by the Converter class).

    package com.atlassian.uwc.converters.twiki;
    
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    
    import com.atlassian.uwc.converters.BaseConverter;
    import com.atlassian.uwc.ui.Page;
    
    public class TwikiExtensions extends BaseConverter 
    {
       private static final String TOC = "%TOC.*?%";
       private static final String TOPIC = "%TOPIC%";
       private static final String WEB = "%WEB%";
       /**
        * Twiki: %INCLUDE{"%NewAnnouncements%"}%
        * Twiki: %INCLUDE{"NewAnnouncements"}%
        * Twiki: %INCLUDE{"%TWIKIWEB%.NewAnnouncements"}%
        * Confluence: {include:NewAnnouncements}
        */
       private static final String INCLUDE = 
          "%INCLUDE\\\\\\{\"(?:%TWIKIWEB%.)?%?(.+?)%?\"\\\\\\}%";
       /*
        * Twiki:%VARCACHE\{refresh="0.5"\}%  
        */
       private static final String VARCACHE = "%VARCACHE\\\\\\{refresh=\".*?\"\\\\\\}%";
    
       private static final Pattern P_TOC = Pattern.compile(TOC);
       private static final Pattern P_TOPIC = Pattern.compile(TOPIC);
       private static final Pattern P_WEB = Pattern.compile(WEB);
       private static final Pattern P_INCLUDE = Pattern.compile(INCLUDE);
       private static final Pattern P_VARCACHE = Pattern.compile(VARCACHE);
       
       public void convert(Page page) 
       {
          String s = page.getOriginalText();      
          
          Matcher m = P_TOC.matcher(s);
          s = m.replaceAll("{toc}");
          
          m = P_TOPIC.matcher(s);
          s = m.replaceAll(page.getName());
          
          m = P_WEB.matcher(s);
          s = m.replaceAll(page.getSpace());
          
          m = P_INCLUDE.matcher(s);
          s = m.replaceAll("{include:$1}");
          
          m = P_VARCACHE.matcher(s);
          s = m.replaceAll("");
          
          page.setConvertedText(s);
       }
    }
    
    
    
    1. Jan 06

      John Baker says:

      And here's something to convert CamelCase links (that are not surrounded by [ ])...

      And here's something to convert CamelCase links (that are not surrounded by [ ]) into Confluence links:

         /**
          * Find CamelCase words and create links.  
          * This uses zero width negative-look behind (yum).  So this is how it works:
          * (?<![\\|#A-Za-z\\[])  Ensure the previous match is none of these
          * (?:[A-Z]+[a-z]+){2,}  CamelCase word (ignore the ?: - there's a surrounding capture group!)
          * (?:#[A-Za-z]+)?  Optional anchor
          */   
         private static final String CAMELCASE 
            = "(?<![\\|#A-Za-z\\[])((?:[A-Z]+[a-z]+){2,}(?:#[A-Za-z]+)?)";
         private static final Pattern P_CAMELCASE = Pattern.compile(CAMELCASE);
      
         ...
            
         m = P_CAMELCASE.matcher(s);
         s = m.replaceAll("[$1]");
      
      
      1. Jan 07

        Brendan Patterson says:

        John, Thanks for these. Can you tell me where in the list of converters in the ...

        John,

        Thanks for these. Can you tell me where in the list of converters in the converter.twiki.properties file you added these so that they worked effectively?

        Also in the second one to convert CamelCase link where did you put that code? I do want to add these but haven't touched the TWiki code in a while.

        thanks,
        Brendan

        1. Jan 27

          John Baker says:

          (How do I delete this comment - I reposted below.)

          (How do I delete this comment - I reposted below.)

        2. Jan 26

          John Baker says:

          Hi, I added a new converter (copied & pasted one), and added the rule to th...

          Hi,

          I added a new converter (copied & pasted one), and added the rule to the end of the file (so it runs after everything else - i.e. the order number is greater than the others).

          Also, I've since updated my CamelCase reg expression to cope with a few other scenerios:

             /**
              * Find CamelCase words and create links.  So this is how it works:
              * (?<![\\S]) Ensure the previous match is \\s
              * (?:[A-Z]+[a-z]+){2,}  CamelCase word (ignore the ?: - there's a surrounding capture group!)
              * (?:#[A-Za-z]+)?  Optional anchor
              */   
             private static final String CAMELCASE 
                = "(?<![\\S])((?:[A-Z]+[a-z]+[A-Z][A-Za-z]*)(?:#[A-Za-z]+)?)";
          

          And I've also found a bug in the existing NumberListLevel1 class. The constructor defines the reg expression as \\t1
          . - which is wrong as three spaces is valid. So change the constructor to this:

              public NumberListLevel1() {
                  super("[\\t|\\s{3}]1\\.",
                          "#");
              }
          

          And I guess NumberListLevel 2 and 3 are:

              public NumberListLevel2() {
                  super("[\\t|\\s{3}]{2}1\\.",
                          "##");
              }
          
              public NumberListLevel3() {
                  super("[\\t|\\s{3}]{3}1\\.",
                          "###");
              }
          
              public NumberListLevel4() {
                 super("[\\t|\\s{4}]{4}1\\.",
                    "####");
              }
          
          1. Jan 27

            John Baker says:

            The META: filter is also not very useful. It should remove all the META tags, t...

            The META: filter is also not very useful. It should remove all the META tags, text and all, as it's often gonig to be pointless outside of a tag.

               // %META .. %
               private static final String META_TAG = "%META:(?:.*?)\\\\\\}%";
            

            And here's an expression to catch the ! before !CamelCase:

               private static final String NO_CAMELCASE  = "(?<![\\S])!(\\w+)";
            
            1. Jan 27

              John Baker says:

              And here are a few more expressions that you can match and then remove: ...

              And here are a few more expressions that you can match and then remove:

              
                 private static final String STARTSECTION_TAG = "%STARTSECTION\\\\\\{(?:.*?)\\\\\\}%";
                 private static final String ENDSECTION_TAG = "%ENDSECTION\\\\\\{(?:.*?)\\\\\\}%";
                 private static final String STOPINCLUDE_TAG = "%STOPINCLUDE%";
              
              

              I.e.

                 private static final Pattern P_STARTSECTION_TAG = Pattern.compile(STARTSECTION_TAG);
                 private static final Pattern P_ENDSECTION_TAG = Pattern.compile(ENDSECTION_TAG);
                 private static final Pattern P_STOPINCLUDE_TAG = Pattern.compile(STOPINCLUDE_TAG);   
              
                     m = P_STARTSECTION_TAG.matcher(s);
                     s = m.replaceAll("");       
                     
                     m = P_ENDSECTION_TAG.matcher(s);
                     s = m.replaceAll("");      
                     
                     m = P_STOPINCLUDE_TAG.matcher(s);
                     s = m.replaceAll("");      
              
  33. Jan 09

    Chris Wan says:

    Hi all, I'm trying to get UWC to work through single sign-on (SSO).  Does ...

    Hi all,

    I'm trying to get UWC to work through single sign-on (SSO).  Does anyone have experience with this?  Any suggestions?

    Thanks,

    Chris

    1. Jan 10

      Brendan Patterson says:

      Is it not working when you enter the login and password to the UWC? Or are you t...

      Is it not working when you enter the login and password to the UWC? Or are you trying to do something else?

      1. Jan 12

        Chris Wan says:

        Yes, that's correct.  It's not working when I enter the login and password ...

        Yes, that's correct.  It's not working when I enter the login and password into UWC.  Essentially, my computer is outside the SSO layer and Confluence is inside.  I guessing that UWC assumes that it has direct access to Confluence.  Any suggestions on how to make UWC play nice with SSO?

        1. Jan 12

          Brendan Patterson says:

          Hmm. I'm not sure why that wouldn't work. I guess to some degree it could depend...

          Hmm. I'm not sure why that wouldn't work. I guess to some degree it could depend on the 'custom authenticator' you're using to enable Confluence to use your SSO system. If you're not logged into your SSO system in the browser can you still hit the Confluence login screen and then login to Confluence that way?

          What is your SSO system? NTLM, SiteMinder, Crowd, custom?

          1. Jan 12

            Chris Wan says:

            We're using Sun Access Manager for authentication.  If I'm not logged into ...

            We're using Sun Access Manager for authentication.  If I'm not logged into SSO, I can't go directly to Confluence.  It kicks me back to the SSO login page.

            1. Jan 12

              Brendan Patterson says:

              That's good to know. The UWC uses Confluence's web services to send pages and a...

              That's good to know.

              The UWC uses Confluence's web services to send pages and attachments to it. It sounds like the way things are set up most likely no web services would work with Confluence unless they somehow authenticated first with Sun Access Manager.

              I believe this has to do with the custom authenticator you've configured to enable Sun Access Manager.

              Probably the easiest solution for you is going to be to install a stand alone copy of Confluence (very easy with an installer) and run the UWC against that. Then you can export the converted space and import it to your production server. This will work best if you keep out the large attachments and can keep the export down to under 1 gig in size. So make use of this feature

              You can use the same process outlined for the SSL users documented here

              1. Jan 12

                Chris Wan says:

                Thanks for your help Brendan, I'll see if we can give your approach a go. Chris

                Thanks for your help Brendan, I'll see if we can give your approach a go.

                Chris