Titleuserdatabase.xml and groupdatabase.xml date format error moving between windows and linux
Date20-Sep-2006 01:25:33 EEST
Bug criticalityCriticalBug
Browser versionfirefox and IE
Bug statusClosedBug
PageProvider used
Servlet Containertomcat 5.5.17
Operating Systemwin32 and linux
Java versionjdk 1.5.8

Firstly well done JSPWiki is fantastic. We have our central documentation served via JSPWiki on a Linux server, and it works fantastically, except for this annoying minor problem. Our service technicians transfer their doco around with them, some use linux , some use windows, the beauty of a java environment.

However when we transfer our userdatabase and groupdatabase, JSPWiki is unable to parse the date fields. As a consequence we are unable to manage our group memberships.

JSPWiki Log

2006-09-20 07:56:15,153 [main] WARN com.ecyrd.jspwiki.auth.authorize.XMLGroupDatabase  - Could not parse 'created' or 'lastModified' attribute for  group'Admin'. It may have been tampered with.
2006-09-20 07:56:30,545 [http-9080-Processor25] WARN com.ecyrd.jspwiki.auth.user.AbstractUserDatabase JSPWiki:http://localhost:9080/JSPWiki/Login.jsp - Could not parse 'created' or 'lastModified' attribute for  profile 'admin'. It may have been tampered with.

NewGroup.jsp Screen Error

JSPWiki has detected an error

Error Message
    An unknown exception java.lang.NullPointerException was caught by Error.jsp.
Place where detected
    java.util.Calendar.setTime(), line 1032 

It appears that the format used for date storage, differs between OS's in the files.

Windows date format stored - 20/09/2006 07:53:37
Linux date format stored - Sep 16, 2006 7:05:12 PM

I have attached 2 sets of user/group database files from vigin installs I have also attached the jspwiki log and the html error page returned.

Thanking you for any assistance in advance
Chris Lialios

Argh. This is a biggie. Andrew?

-- JanneJalkanen

Just a quick look.....
com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java line 94 has the following stmt:

private DateFormat c_format = DateFormat.getDateTimeInstance();

DateFormat.getDateTimeInstance() gives the default style for the locale, which will very likely be different on several platforms.

I think options are :

  • make it a fixed (default) style (YYYY-mm-dd HH:mm:ss or something like that)
  • optionally make it configurable via a property in jspwiki.properties ?

I cannot oversea any incompatibilites or migration requirements...

Anyway just an idea, you guys probably know better.

--Harry Metske, 20-Sep-2006

Fixed in 2.4.59. I elected to use a standard, fixed date/time format.

--Andrew Jaquith, 25-Sep-2006

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
create_group_htmlerror.txt 1.0 kB 1 20-Sep-2006 01:27
jspwiki.log 1.2 kB 1 20-Sep-2006 01:27
linux_groupdatabase.xml 0.2 kB 1 20-Sep-2006 01:27
linux_userdatabase.xml 0.3 kB 1 20-Sep-2006 01:27
win32_groupdatabase.xml 0.2 kB 1 20-Sep-2006 01:27
win32_userdatabase.xml 0.3 kB 1 20-Sep-2006 01:27
« This page (revision-5) was last changed on 25-Sep-2006 05:36 by Andrew Jaquith