UserDBConversion
Back to current versionRestore this version

Userdatabase conversion#

During the past few years the format of the JSPWiki userdatabase (userdatabase.xml) has changed a bit.

If you want to upgrade to a newer version of JSPWiki you might have to change the contents of your userdatabase.
There is now a prototype conversion utility available that does this for you.
You give it your userdatabase.xml file, and it will create a new one for you in the new format, with both hashed passwords and correct dateformats. If your passwords were already hashed, they will not be changed. The conversion utility will try to parse the dates with three different patterns:

	public static final String c_oldLinuxFormat = "dd/MM/yyyy HH:mm:ss";
	public static final String c_oldWin32Format = "MMM dd, yyyy hh:mm:ss aa";
	public static final String c_NewFormat = "yyyy.MM.dd 'at' HH:mm:ss:SSS z";

So, if you have a mixture of different date formats, they will automatically be transformed to the new one.

Attached you find the necessary code to run it, it also contains the source so that you can verify first what it will do :-) .

You can start it as follows :

java -cp udbconversion.jar:jdom.jar com.ecyrd.jspwiki.converter.UserDBConverter userdatabase.xml myWonderfullNewUserdatabase.xml

I have tested it with all userdatabase that I had available, please let me know what your experiences are.

Download#

You can here download the udbconversion.jar(info) and jdom.jar(info)