Active development of JAMWiki has ceased, and bug fixes and support will be limited at best. If you are interested in taking over management of JAMWiki please send an email to the jamwiki-devel mailing list.


This page is for comments, questions, or discussion items below. Related discussion pages include:

  • FAQ - Answers to Frequently Asked Questions. Please check the FAQ page before posting questions or bug reports.
  • Bug Reports - Please report any bugs in the JIRA bug tracker.
  • Feature Requests - If there is a feature that you would like to see added please discuss it on this page. See the Roadmap for a list of planned features.
  • How to Help - For those interested in implementing a specific feature.
  • Roadmap - A list of planned features for future releases.

Any new discussion should be placed at the bottom of this page under its own heading, which can be done by entering the following code:

==This is a new Heading==



This page tends to get crowded, so several older discussions will be archived to appropriate comments pages. Also see the Archived Feedback page for more old discussions.

Mention File System Links in Documentation

IMHO Wiki_Syntax#Links should mention that one can not only link to HTTP sites but also to the file system (at least on Windows and provided that the browser settings allow it):

What it looks like What you type

--tapaya 17-Feb-2009 07:50 PST

If you're willing to make the necessary updates I'd be grateful for any help with documentation, otherwise I'll try to update it next time I have a chance. Thanks for pointing this out. -- Ryan • (comments) • 17-Feb-2009 21:28 PST

--jasper 21-Mar-2011

  • Besides, if the path contains spaces, please mention users to replace space with %20 to avoid path navigation fail.

Various comments and questions

  • It doesn't have the #if function for templates, so is there any other way to do optional template parameters?
  • Possibly a bug: whitespace in template parameter names is recognized. So
is different from
parameter      = value
  • Templates do not appear in the "All Pages" list... but I'm not sure whether MW does this, so maybe it just needs an "All Templates" special page?
  • While editing or previewing a page there ought to be links to the included templates at the bottom, like in MW. Otherwise there's no way to find a link to a template to edit it.
  • Just a comment: Links on a page to itself don't appear "properly" (in MW they're bolded and unlinked).
--Floating World 27-Oct-2009 07:54 PDT
Thanks for the feedback. Here are some quick responses:
  1. The #if function is not yet supported, but in the mean time you can use something like Template:If to implement the same functionality. #if will definitely be included in an upcoming release.
  2. I'll investigate the whitespace in template parameter issues - sounds like a bug. Thanks!
  3. I'll take a look at the "All Pages" list. I vaguely remember a reason for excluding templates (Mediawiki may exclude them?) but it was a long time ago so I'll need to refresh my memory.
  4. The "included templates" is something that I believe Mediawiki added since the initial "Links" functionality for JAMWiki was created. It's definitely something that should be included in a future JAMWiki release since users have come to expect that functionality.
  5. Links to the current page should behave like in Mediawiki, but that may have been overlooked in the initial implementation and no one ever commented. I'll look into getting that fixed for a future release.
Thanks for the feedback, and if you notice anything else please feel free to report it - users tend to not realize how valuable this sort of feedback actually is, even if it's for items that can't be immediately implemented. -- Ryan • (comments) • 27-Oct-2009 08:14 PDT
Thanks for all those pointers! I should have said also that the software is really great. As a very solid re-implementation of MediaWiki that gives attention to wikitext compatibility, it's just what I was looking for.
There's one other point I've been curious about: in the integration of fckeditor you're working on for 0.9 are you able to have it generate wikitext or does it work just in HTML?
I've been playing around with Dijit.Editor and so I was thinking of trying to integrate it with JAMWiki, although I don't know how much time I'd have to spend on it. (And it would also probably take me a long time because I've never worked in Java or JSP before.) --Floating World 27-Oct-2009 14:25 PDT
User:ronin started an integration that generated HTML that was then reversed-parsed back into wiki syntax. My preference would be to generate wiki syntax that could then be batch-parsed via Ajax or something similar as the user edited, but I'm not sure how difficult that approach would be. The WYSIWYG editor has turned out to be vastly more complex than initially anticipated, so at this point I'm sort of hoping that either the new CKEditor project or another project has created something that will somewhat simplify the effort. If you're interested in giving it a shot then by all means please do so - from a design standpoint I just want to make sure that the integration isn't too invasive (I'd like to try to implement the client-side WYSIWYG editor without significant impact on the server-side code). -- Ryan • (comments) • 27-Oct-2009 20:27 PDT
revision 2746 should resolve the template parameter whitespace issue (#2 in the list above). -- Ryan • (comments) • 27-Oct-2009 21:02 PDT
Also, with regards to #3, I'm seeing templates in the All Pages list - see [2], starting around 250. Are they missing from your wiki? It's entirely possible there's a bug somewhere, I just need to figure out how to reproduce it. -- Ryan • (comments) • 27-Oct-2009 21:08 PDT
Yes, they are missing. I've created several templates but even though there are only a handful of pages in my wiki, the templates aren't showing up there. In case it helps to reproduce, I chose the "Internal Database" option during setup. --Floating World 31-Oct-2009 12:42 PDT

revision 2763 and revision 2764 add support for the #if: parser function. That code will be included in JAMWiki 0.9.0. -- Ryan • (comments) • 11-Nov-2009 21:48 PST

I've copied the two remaining bug reports from this discussion to Bug Reports#Templates not appearing in AllPages and Bug Reports#Links to Self. I'll copy the comment about included templates to the Feature Requests page. -- Ryan • (comments) • 11-Nov-2009 21:53 PST

Search returns protected data

I have a wiki with a section of protected pages. The wiki will not allow me to view those pages if I'm not logged in, but I just noticed that it will display information from the protected pages if i search for something on the page. Is there a way to prevent unauthorized users from viewing search results from protected pages?

Likewise it seems that the recent changes page will return results from protected pages.
Other sites with protected pages have handled this by disabling search (via the security configuration) for non-privileged users, which admittedly isn't a great solution. The main problem is that wikis are inherently open platforms, so the ability to protect pages from even being viewed is somewhat anti-wiki and presents core architectural challenges. If you (or anyone else) has suggestions for how to improve the current implementation I'd be very interested in hearing them, and would be happy to implement anything that 1) doesn't break or complicate the happy path, and 2) isn't too difficult or complex to implement. -- Ryan • (comments) • 15-Apr-2010 08:27 PDT

Search returns unformatted data

I set up a wiki for some work related purposes and it includes some tables. Whenever I search for any data the search returns the link to the topic and a text string instead of the actual table or portion of the page. Like the below Craig] |Systems Manager |Operations Control Administration |

I tried to Google for a solution but cannot seem to find anything. I am using 1.0.2 with Lucerne Search Engine. Any ideas?

If I understand right, the issue is that the "summary" in search results is showing wiki text? For example, shows:
==Translations== I've added your latest translations to Subversion in [ revision 1953]. Thanks! -- [[User:wrh2|Ryan]] 14-Dec-2007 18:52 PST
If so, that's a relic of the initial Lucene implementation - since the pre-0.0.1 days JAMWiki has spidered wikitext (rather than HTML) to build the search index, which I suspect is why you're seeing the behavior you do. I've been debating changing that behavior (there are performance implications of doing so) but since no one had raised this as an issue it wasn't a high priority. Let me know if this is actually the problem, and if so I'll bump up the priority and see about changing the behavior for JAMWiki 1.1. -- Ryan • (comments) • 11-May-2011 11:26 PDT
Yes that is what I'm talking about. It would be a very welcome change as I normally have to search for things that are inside tables so the preview becomes fairly hard to read when details are returned. If there is a performance hit perhaps best would be to implement it as an option that can be enabled? Thanks.
I've added this to Tech:JAMWiki 1.1.0#Items Planned for Implementation. It's not guaranteed that it will be included in the next release, but provided there aren't any major barriers to implementation I'll do my best to include it. -- Ryan • (comments) • 11-May-2011 21:06 PDT
Great! Thanks Ryan.
This feature doesn't look like it's going to make the cut for JAMWiki 1.1 - it doesn't appear to be out-of-the-box supported by Lucene, and at this late stage in the development cycle I'm hesitant to implement any major new features. I've re-queued it for JAMWiki 1.2, so there's a chance it will get into that release. Sorry for this, but there's only so much that can be done each release cycle. -- Ryan • (comments) • 05-Jul-2011 15:49 PDT
What is the status of this? Is there a jira entry for this feature request?
This feature won't make it for JAMWiki 1.3.x, and I don't think a Jira issue was ever created (please feel free to create one!). If this feature is important to you please lobby for it for the next major release (probably to be named 2.x), development of which will probably start in the next two months. -- Ryan • (comments) • 13-Sep-2012 07:44 PDT

Underscore in article title

Is there a way to have an underscore in an article title without getting it replaced by a space. E.g. config_file.xml would be created as config file.xml.

As far as I know the magic word DISPLAYTITLE should solve that issue, but this is currently not implemented according to Help:Magic words. Is there any workarround for this, like escaping the underscore somehow?

Currently an underscore would always be escaped... can you provide a bit more detail on the DISPLAYTITLE workaround? Depending on the complexity and impact on other code that might be something that could be put in place for an upcoming release. -- Ryan • (comments) • 28-Jun-2010 07:24 PDT
Please see here Help:Magic words in chapter "Technical metadata" DISPLAYTITLE:title and the details are here: MediaWiki $wgAllowDisplayTitle. The intention is to overwrite the actual title of an article in the case the normalized version (for technical reasons) does "destroy" the actual article title. This is the case e.g. for iPod where normalized version is IPod, or any title which contains underscores, as they are always replaced by spaces.
Thanks! I'll need to read a bit more about this functionality just to make sure I fully understand, but based on the above, and also on this description, it sounds like this might be both useful and relatively painless to introduce. Typically new features are only introduced in major releases, and since 0.9.0 just came out a week ago it may be a while before this shows up in a release, so can you give me some idea of the urgency of getting this feature implemented? Is it just a nice-to-have for you, or is it something you would be willing to implement using a patched version of JAMWiki? -- Ryan • (comments) • 28-Jun-2010 08:47 PDT
We started using JAMWiki for documentation creation. We have typically articles like technical documentation for files, or other things like application packages, which include underscores. So it could be confusing if the underscore is missing then. It is not urgent, but we would for sure use a patched version (as the issue is not blocking but has high visibility).
Please be sure to follow-up on this issue - I won't get to it this week, but (gentle) reminders are always appreciated, otherwise I kind of assume that people have lost interest and I move on to other things that are of more personal interest. This seems like a useful feature and one that won't be hard to put in place once I can find an hour or two to sit down, so I'd definitely like to get it done. -- Ryan • (comments) • 28-Jun-2010 22:35 PDT
Are there any news on this topic? Can I support somehow?
I haven't gotten to it yet, but the reminder is much appreciated. Checking in every week or so is hugely helpful in letting me know that someone is actually interested in the feature. I'll keep this on my to-do list as something to get to ASAP, but please continue to check in until it gets done. -- Ryan • (comments) • 20-Jul-2010 19:07 PDT
I decided to take a stab at this one, and I've got code written and working now. I haven't yet committed it in Subversion as I'll need to put some unit tests together, but that should be done in the coming day or two. I'll try to put it into JAMWiki 0.9.1 if this is an important issue for you - please let me know. -- Ryan • (comments) • 20-Jul-2010 20:59 PDT
If it is not so difficult putting it into JAMWiki 0.9.1 I think this is a good solution. Many thanks for taking care so far.
revision 3136 adds this functionality for JAMWiki 0.9.1. -- Ryan • (comments) • 24-Jul-2010 09:21 PDT
First thank you for implementing the feature. I upgraded to JAMWiki 0.9.1 and tested the feature. On the normal page it is working as expected. What I found so far is that it is not working for preview and also not in category listing or all pages listing.
Thanks for the report - I'll need to investigate, so will move this report to the Bug Reports page. -- Ryan • (comments) • 18-Aug-2010 07:24 PDT

Logo Image

From the docs: "The image name must be relative to the /images folder found in the root wiki install directory"
Why? I would like to positionate it outdoor, in the apache httpd directory (working with the tomcat connector) or in the jamwiki 'File-system directory'... I would avoid to modify the jamwiki install directory (to easy re_deploy the jamwiki war file):
Can I do this in some way ? Thanks.

For legacy reasons the logo image is in the /images folder in the webapp root, so the image must be served from that folder. You could change this by modifying line 31 of the WEB-INF/jsp/wiki.jsp file to point to your image. I would eventually like to make the logo image a wiki image that would be managed just like any other image on the wiki, but since there haven't been requests for such a feature this hasn't been a high priority for implementation. -- Ryan • (comments) • 04-Dec-2010 16:21 PST

How do i Make URL shorter?

I don't want have, but Is that possible? THX 27-Dec-2010 12:14 PST

I haven't personally tried running JAMWiki using the root webapp context, but I can't immediately think of any reason why it wouldn't work. If you encounter problems please file a bug report and I'll investigate. -- Ryan • (comments) • 27-Dec-2010 20:43 PST

Thank you for saving my day

Dear JAMwiki-developers,
thank you so much for all your hard work!
Today I decided to set up a wiki for documenting a software project. I didn't want to run a seperate database so I looked around for wikis that work without one.
First I tried several PHP-based wikis running in quercus, but they all had problems. Then I decided to go for a servlet-based solution and tried JSPwiki. That was very buggy and didn't look good either.
Finally I found this wiki and I am very happy with it. Installation worked like a charm (using v1.0 running in jetty) and I love the mediaWiki-like look of it.

Great job, keep going !!!
Regards from Berlin

Thanks! Positive feedback is often a rare thing, but it's very much appreciated and a great motivating factor. Please provide any feedback you have with respect to any bug reports or feature requests, and hopefully we can get them integrated into a future release. -- Ryan • (comments) • 09-Feb-2011 10:59 PST


You should replace the system error message with a describing text, if no update is available. -- Daniel Beyer 09-Mar-2011 00:32 PST

I'm not sure I understand - can you provide more details? If I go to Special:Upgrade I see a message saying "No upgrade is currently required", not a system error. -- Ryan • (comments) • 09-Mar-2011 07:39 PST
Ok, it could have something to do with our proxy server and firewall. I can see a system error an Special:Upgrade. What happens, if jamwiki cannot reach your server to check whether an update is available or not? -- Daniel Beyer 09-Mar-2011 13:07 PST
Actually there isn't currently any capability in JAMWiki to do remote upgrade checks - the upgrade page is solely used when the JAMWiki code version doesn't match the version in your current files (which happens after an upgrade), in which case you are redirected to Special:Upgrade and that page walks you through the upgrade process. Visiting that page at any other time simply generates a message that no upgrade is necessary. Can you upload a screenshot of what you're seeing, as well as any relevant log messages? Thanks! -- Ryan • (comments) • 09-Mar-2011 14:04 PST
When I open Special:Upgrade I see the following lines:
A system error has occurred. The error message is:
No upgrade is currently required.
No interesting things in the log files. I habe jamwiki on tomcat 7.0.8, Java 6 U24, WinXP. -- Daniel Beyer 10-Mar-2011 02:36 PST
Thanks, that clears up the issue. The messaging can probably be changed to make things clearer - if you'd like you can createa a JIRA issue to track this, otherwise I'll do so and try to get a change made for an upcoming release. -- Ryan • (comments) • 10-Mar-2011 07:53 PST

Edit Section & Template Integration

When I include an other page via {{pagename}}, the edit section links disappear. I think this is a bug. -- Daniel Beyer 04-Apr-2011 04:21 PDT

Thanks - that's logged as JAMWIKI-4 and JAMWIKI-26, but it's a tough one to fix. -- Ryan • (comments) • 04-Apr-2011 07:34 PDT

File Name

Uploaded files are stored in upload directory with -ddhhMMss after the real filename. Is there anyway to make a link to a file in JAMWiki to the real file name, just like it is in database JAM_FILE.FILE_NAME table column? —The preceding comment was added by (commentscontribs) .

I'm not sure I understand what you want to do. Help:Images has details on linking to images, but if that page doesn't answer your question please provide a more detailed example of what you need and I'll try to answer. -- Ryan • (comments) • 22-Jun-2011 12:27 PDT
Sorry about my poor english, Ryan. When i upload a file to my wiki site, the file name is changed. For example: mydocument.pdf after uploaded is renamed to mydocument-ddhhMMss.pdf.
I understand that this is the way JAMWiki controls file history and version. JAM_FILE database table contais the real filename in FILE_NAME column and JAM_FILE_VERSION table contains all file revisons.
What im trying to say is that when i download a file from my Wiki i want the real file name (mydocument.pdf) and not the new name (mydocument-ddhhMMss.pdf).
For most of us its simple to say "Just rename it when u gonna save." or "What is the matter? Its just the filename.", but i'm using JAMwiki to documentation. Some files and PDF documents has numbers on its name, and this is confusing us sometime.
Mediawiki has a diferent way to store and archive old files, keeping the real filename on the newer file version. —The preceding comment was added by felipeavilis (commentscontribs) .
Your English is great - no need to apologize, I just didn't understand the use-case. I'll need to take a look at how Mediawiki handles file naming and see if it's possible to modify JAMWiki to do the same. I'm back from vacation now so I should have some time to investigate, but if this discussion isn't updated in the next day or two please remind me since I've got a number of things on my current TODO list. -- Ryan • (comments) • 22-Jun-2011 16:44 PDT
Hello Ryan. Great job for v1.1. Is this discussion about filename left for 1.2 or maybe some 1.1.x update? Felipe Avilis • 02-Sep-2011 12:17 PDT
Sorry, I lost track of this request. It's logged in JIRA now as and is something that can be done for JAMWiki 1.2. 1.1.x updates are reserved for bug fixes and very minor feature changes, so it is unlikely that it could be included in a minor release since it would potentially be a disruptive change. -- Ryan • (comments) • 03-Sep-2011 17:45 PDT

I upload file File for Save object as ( I try right click on link and choose Save object as. I see a name for the save Image_file_erd.htm instead file_erd.erd. It works like this in the browser IE8. In Firefox21 filename file_erd-19214356.erd. -- shar 22:03, 19 June 2013 (PDT)

According to [3] I might not have Apache configured properly. I'll investigate. -- Ryan • (comments) • 16:10, 20 June 2013 (PDT)
On my server jamwiki installed with Tomcat 7. And the situation is the same. -- shar 00:46, 21 June 2013 (PDT)

Set up user forum

We're using JAMWiki within our organisation to provide self help, instructions, procedures, etc to the business. I want to set up a forum or discussion page to get feedback from users, but have searched and cannot find anything about it. I am a relatively new user of JAMWiki (few months), but a discussion board is going to be the best way for me to get the communication I require from our business.
Any ideas or links would be really appreciated! Ta.

Wikis usually just use comments pages for discussion purposes - see for Wikipedia's discussion of the subject. Currently JAMWiki doesn't offer much support for providing notifications of talk page updates beyond the Special:Watchlist, although the Roadmap includes several enhancements. I'm not sure if that addresses your question, so please let me know if there is any further information that might help you. -- Ryan • (comments) • 14-Jul-2011 08:32 PDT

Help material in standard installation

I've installed JAMWiki 1.1 afresh, and being a newbie I'm hitting the help material a fair bit. But I can't find any in the local installation. If I'm not missing something, what's the easiest way of importing all standard help material?

You can use the Special:Export function on to export topics that you'd like on your local instance, and then use Special:Import on your instance to import them. Alternately, if you have any suggestion for how this could be done better I'd be interested - for example, it probably wouldn't be too difficult to put together a pre-built export of help docs that any site could then just download and import. -- Ryan • (comments) • 16-Sep-2011 07:28 PDT

Password recovery

Is there a way to user request password recovery? —The preceding comment was added by (commentscontribs) .

Currently there is no automated way for a user to request a new password, but the site admin can reset a user's password from the "Reset User Password" tab on the Special:Manage page. -- Ryan • (comments) • 11-Oct-2011 10:23 PDT
Please reset my password and give me permission to contribute with brazilian portuguese translations. User:leokury
Is there an email address I can send you your password at? I've updated your account and permissions but for obvious reasons I'd rather not display the new password here :) -- Ryan • (comments) • 11-Oct-2011 11:17 PDT
*removed*. Please remove from here after you get it.
Thanks, new password sent. -- Ryan • (comments) • 11-Oct-2011 13:50 PDT

"Unable to load default layout" after manual update

Hi Ryan. I finally found the time to update my ancient 0.6.5 installation to the current 1.1.1 version. To not install all (major) version inbetween I decided to go with the manual update. I skipped all those "reload recent changes", "regenerate ...", etc. points and applied the database updates only - all successful as far as I can tell. Then I updated the version in and now I get the following exception for EVERY page (even the login)...

ERROR org.jamwiki.servlets.JAMWikiServlet - Unable to load default layout
java.lang.NullPointerException: null
       at org.jamwiki.servlets.JAMWikiServlet.buildLayout( [jamwiki-web-1.1.1.jar:na]
       at org.jamwiki.servlets.JAMWikiServlet.loadLayout( [jamwiki-web-1.1.1.jar:na]
       at org.jamwiki.servlets.JAMWikiServlet.viewError( [jamwiki-web-1.1.1.jar:na]
       at org.jamwiki.servlets.JAMWikiServlet.handleRequestInternal( [jamwiki-web-1.1.1.jar:na]
       at org.springframework.web.servlet.mvc.AbstractController.handleRequest( [spring-webmvc-3.0.5.RELEASE.jar:3.0.5.RELEASE]

What did I miss? What is wrong? How can I fix that? Thanks! -- Andy 15-Oct-2011 14:47 PDT

The "reload" and "regnerate" tasks are there to ensure that data is populated properly after tables are changed, so without those running it would be tough to tell what specifically went wrong, but a null exception when building a layout means that required data is missing. If you have a backup available I would recommend doing the update again as follows:
  1. Download JAMWiki 0.8.4 and upgrade from 0.6.5 to 0.8.4 using the automated upgrade.
  2. Download JAMWiki 1.0.7 and upgrade from 0.8.4 to 1.0.7 using the automated upgrade.
  3. Upgrade from 1.0.7 to 1.1.1 using the automated upgrade.
If you don't have a backup I'll need to give this some thought to figure out how to manually ensure that the database is upgraded. -- Ryan • (comments) • 15-Oct-2011 15:27 PDT
Well, this is what I wanted to avoid in the first place - I saw some insert/update statements in the manual update process and thought they would be sufficient. I also thought, that I would be able to run the "reload" and "regenerate" tasks once after completing all steps... But there seems to be more "magic" in the automatic update process... :-)
After following your steps everything is back up running now. Thanks for your quick support and keep up your great work! -- Andy 16-Oct-2011 10:02 PDT
Glad it's working for you now. The UPGRADE.txt document and the automated upgrade perform the exact same steps, but the order is very important, and skipping any step will likely produce errors - for example, if a new column is added and there is a step to generate data for that column, future steps may assume that the column is populated. I'll see if I can make that clearer in the documentation. -- Ryan • (comments) • 17-Oct-2011 07:57 PDT

NullPointerException Error while click on 'Edit' link of topic starts with lowercase

Hi Ryan, after migration from 0.9.3 to 1.0.7 and 1.0.7 to 1.1.1 the editing link of topics starting with lower case letter such as ePortal are not editable. The following is the error i got

A system error has occurred. The error message is:
An unknown system error has occurred. The error message is: java.lang.NullPointerException.

When I look at the Edit link, the topic edit url is EPortal instead of ePortal. If I copy the Edit url link and change it from


It works. How should I make all topic starting with lower case editable? Thanks. —The preceding comment was added by (commentscontribs) .

Can you provide any additional information on how to reproduce the exception, or provide the stack trace from the logs? I just created a topic on named ePortal, and like you said it is capitalized incorrectly, but I can edit it without error. Thanks for the report, and I'll try to get this addressed quickly. -- Ryan • (comments) • 19-Oct-2011 18:15 PDT
Thank for your quick response. After I unchecked Allow capitalized topic names under Configuration-> Parser Settings all edit urls are now in lower case. If this is new feature I think it's better leave it unchecked for upgrading process work as before.

Relationship between and JAM_CONFIGURATION table


While looking at Environment.saveConfiguration(), I notice that system properties are stored both in the file and in the JAM_CONFIGURATION database table. Since the properties file is created during the initial configuration step, and that file is used to populate the table, I was wondering what the design intent was for the duplication. Is one the definitive source of properties? Will they remain synchronized if one is updated outside of the webapp (e.g. with a text editor or SQL)?

Thanks, BU

See Tech:Upgrade Simplifications. The plan is to reduce the number of configuration files and settings that are stored in the webapp root, so the jam_configuration table is an attempt to begin that process. That table is not currently used, but will see use starting with JAMWiki 1.2. -- Ryan • (comments) • 09-Nov-2011 07:22 PST
Thanks, this answer was exactly what I needed, and a DB-driven configuration approach will make it much easier to do automated or scripted deployments, or deploy in locked-down environments. BU

Can you prevent third-party search engines from indexing your wiki?

I would like to prevent Google, Yahoo, Bing and any other search engines from indexing my wiki. Is there any way to do this from within the wiki itself? I suppose I could put a few robots.txt files in my file system to deny access, but everytime I upgrade JAMWiki I would have to manually copy in the robots.txt files. Ideally, I'd like to see a checkbox somewhere that says "Allow search robots" and if checked it would automatically include META tags in each page with the NOINDEX and NOFOLLOW directives. Alternatively, I'd take any other method that worked. ;-) A description of the META tags is available here: -- Brian

For now the only option is a robots.txt or directly modifying top.jsp. For JAMWiki 1.2 I've been debating options for allowing custom meta tags, Javascript, etc - I was thinking of a plain text block, editable through Special:Admin, into which sysadmins could enter any HTML that they wanted to appear in the <head> section of the wiki. I haven't yet verified how Mediawiki implements this functionality, but unless they have a better option then something like that will probably appear in the next release. -- Ryan • (comments) • 01-Dec-2011 19:06 PST
Are you still thinking that this editable plain text block idea would be implemented in JAMWiki 1.2? Thanks -- Brian
I've been giving this some thought and haven't come up with a solution I like, and unfortunately a request for feedback didn't generate any ideas on the development mailing list. In addition, Mediawiki doesn't seem to have a good solution to this problem.
My concern with supporting a raw text block is that it wouldn't be particularly flexible for cases where people wanted rules such as "add a noindex for user and comment pages", but a more flexible tool for implementing meta tags seems like overkill. Any thoughts or suggestions would be appreciated. -- Ryan • (comments) • 11-Jan-2012 16:05 PST
Rather than supporting a raw text block, how about specifically supporting a few commonly used META tags? You already support one, the HTML meta description, in the Configuration-->General Settings. In addition to the Robot META tags, how about also supporting the Language META tag? Here are a couple of references: and Thanks -- Brian • 12-Feb-2012

How to setup Jamwiki on JBoss AS 7

I can't even manage to install Jamwiki because it gives me permission denied errors when I want to apply the settings. Lets for example take the following scenario: The application directory of jboss is /websrv/jboss/jboss-as. It is run as user jboss which has it's homedirectory set to /websrv/jboss. Jamwiki is deployed here (as an exploded war): /websrv/jboss/jboss-as/standalone/deployments/jamwiki-1.1.3.war. I create a directory to contain the jamwiki files here: /websrv/jboss/jamwiki. In this directory I create two further subdirectories system and upload. In the configuration webpage of my Jamwiki installation I use the following configuration:

  • directory for system files: /websrv/jboss/jamwiki/system/
  • file upload directory: /websrv/jboss/jamwiki/upload/
  • relative path to upload directory: /upload/

I use the internal database and set some username and password and then press the apply button which spits out the following error message: Fehler beim Schreiben der Datei in /: /jamwiki-test-1322859511416.txt (Permission denied). It says there was an error when it tried to write to /: .... So what am I doing wrong? If the upload directory is supposed to be somewhere special (like it would be when deploying a website on the apache webserver), where would that be on JBoss As 7.1?

Thanks in advance

During setup JAMWiki attempts to write a test file to every directory that it will need, and prints an error if there is a permissions issue. So you'll need to make sure that whatever user JBoss runs as has permission to write to the /websrv/jboss/jamwiki/system/ directory and the /websrv/jboss/jamwiki/upload/ directory. It will also write property file updates and similar changes to the webapp classes directory, so make sure the JBoss user has read/write permission for the /WEB-INF/classes folder under /websrv/jboss/jboss-as/standalone/deployments/jamwiki-1.1.3.war. Provided that is done everything should work as expected. -- Ryan • (comments) • 02-Dec-2011 13:54 PST

Hi and thanks for the quick response. JBoss is run by the user jboss (which I created for the sole purpose of running jboss) who also owns the mentioned directories and has full write permissions to them. The war file is also owned by the user jboss and has the right permissions set. I even once set the permissions to 777 and tried different directories like /tmp/jamwiki. I've had the same issue on a whole different production system at work running on SLES9 with the same issue comming up. I have no clue how to get this to work. It also fails to log any errors/warnings though I have enabled a file logger. It does create a log entry but it is empty.

jboss@gentoo-box /websrv/jboss/jboss-as/standalone/deployments $ ls -ld jamwiki-1.1.3.war/WEB-INF/classes/
drwxr-xr-x 4 jboss jboss 1560  3. Dez 02:16 jamwiki-1.1.3.war/WEB-INF/classes/
jboss@gentoo-box /websrv/jboss/jboss-as/standalone/deployments $ ls -l jamwiki-1.1.3.war/WEB-INF/classes/
insgesamt 1653
-rw-r--r-- 1 jboss jboss  57608  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  66310  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  60394  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  62712  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  50411  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  49930  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  66028  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  47150  2. Dez 21:20
-rw-r--r-- 1 jboss jboss 118146  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  51990  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  46941  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  53641  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  56930  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  61520  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  46879  2. Dez 21:20
-rw-r--r-- 1 jboss jboss 209486  2. Dez 21:20
-rw-r--r-- 1 jboss jboss 158471  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  53121  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  47841  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  68811  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  63636  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  64687  2. Dez 21:20
-rw-r--r-- 1 jboss jboss  44176  2. Dez 21:20 ehcache-sample.xml
-rw-r--r-- 1 jboss jboss  12620  2. Dez 21:20 ehcache.xsd
-rw-r--r-- 1 jboss jboss    797  2. Dez 21:20 jamwiki-configuration.dtd
-rw-r--r-- 1 jboss jboss   7691  2. Dez 21:20 jamwiki-configuration.xml
-rw-r--r-- 1 jboss jboss   2319  3. Dez 02:15 logback.xml
drwxr-xr-x 9 jboss jboss    352  2. Dez 21:20 pages
-rw-r--r-- 1 jboss jboss   1887  2. Dez 21:20 spam-blacklist.txt
drwxr-xr-x 2 jboss jboss    488  2. Dez 21:20 sql 
jboss@gentoo-box /websrv/jboss/jamwiki $ls -l logs/jamwiki.log
-rw-r--r-- 1 jboss jboss 0  3. Dez 02:16 logs/jamwiki.log
jboss@gentoo-box /websrv/jboss/standalone $ ps -af  | grep jboss ps -af  | grep jboss
jboss    29989 29947  0 Dec02 pts/0    00:00:24 /etc/java-config-2/current-system-vm/bin/java -server -Xms64m -Xmx512m
-Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
-Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true 
-jar /websrv/jboss/jboss-as/jboss-modules.jar -mp /websrv/jboss/jboss-as/modules -logmodule org.jboss.logmanager 
-jaxpmodule javax.xml.jaxp-provider -Djboss.home.dir=/websrv/jboss/jboss-as
jboss@gentoo-box /websrv/jboss/standalone $ jboss@gentoo-box /websrv/jboss/jamwiki $ ls -l .              
insgesamt 0
drwxr-xr-x 2 jboss jboss 80  3. Dez 02:16 logs
drwxr-xr-x 4 jboss jboss 96  3. Dez 02:17 system
drwxr-xr-x 2 jboss jboss 48  3. Dez 02:17 upload


Since the "Fehler beim Schreiben der Datei in /: /jamwiki-test-1322859511416.txt (Permission denied)" message only includes "/", and you've specified values for the system directory and upload directory then it's possible that the setup code is unable to determine the class loader root, and thus attempting to validate the wrong /WEB-INF/classes/ directory... I've done testing with JBoss EAP 4.3, but nothing later, although there haven't been any specific error reports with JBoss. One thing you might want to check is to verify that the /WEB-INF/classes/logback.xml file is configured to log to somewhere you can check and change to a DEBUG log level to find out if there are any interesting messages in there, but otherwise I'll need to revisit this later (it's Friday night here) since, provided permissions are correct, then this is an issue I haven't seen before that will require some investigation. -- Ryan • (comments) • 02-Dec-2011 18:08 PST

Confirming this issue in JBoss AS 7, and I have got as far as pinning the likely source of the issue to be the ClassLoader. I'm new to Java Enterprise, so providing a solution is beyond me atm I'm afraid. Running JBoss as root puts the file in /, and JAMWiki works as intended. Also, the initially suggested upload folder is /upload/ instead of /JAMWiki/root/upload/ which ssems to indicate a failure in determining the class loader root.

Thanks for the detailed bug report. I've logged this as JAMWIKI-JAMWIKI-67 and will try to figure out a solution as soon as time allows. -- Ryan • (comments) • 15-Jan-2012 10:26 PST

Temporary workaround: Run JBoss as root during setup and then chown /, the upload folder and the system files folder to the user you usually run JBoss as. Then run JBoss as your normal jboss user. Requires two restarts and that you are comfortable having a configuration file in the root though.

Thanks, I added the above comment to Jira. I'll have to install JBoss 7 to reproduce and fix - hopefully I'll get a chance to do so later this week. -- Ryan • (comments) • 15-Jan-2012 17:42 PST
revision 3956 should fix this issue. It needs more testing and should then be ready for inclusion in JAMWiki 1.1.5. -- Ryan • (comments) • 16-Jan-2012 21:40 PST

Awesome. Thank you.

Model Question: Topic content vs. TopicVersion content


What is the relationship between the topicContent field on a Topic, and the versionContent fields on any given TopicVersion for that Topic? Does it contain a duplicate of the versionContent from the most recent TopicVersion? Is it a transitive copy that only sticks around for editing, then gets put into a TopicVersion versionContent?

Thanks, -- BU 03-Dec-2011 10:24 PST

For the Java object the Topic.topicContent field represents the content to display for the current topic - that's almost always the content for the most recent version, except when viewing an old version of a topic via a page's history tab. -- Ryan • (comments) • 03-Dec-2011 10:44 PST

Convert from JSPWiki to JAMWiki?

Anyone have any idea on the best way to convert a JSPWiki to JAMWiki? The JSPWiki docs are available here: -- Brian

I don't - others might. If JSPWiki can export into Mediawiki format then you can probably do a bulk upload through the Special:Import tool, otherwise I'm not sure. -- Ryan • (comments) • 13-Dec-2011 16:27 PST

Translations de, ru

Hello Ryan,

I would like to receive access to the translations page to update the keys mentioned in JAMWIKI-63 -- justme.

You should now have access to the Special:Translate page. If you get any errors you may need to login and logout for the new roles to go into effect. If there are any issues let me know and I'll investigate. Thanks for helping out! -- Ryan • (comments) • 03-Jan-2012 06:33 PST
You are most welcome -- justme.
Your translation updates have been merged for inclusion in JAMWiki 1.1.4. I expect to put that release out before the end of the week, most likely on Thursday unless any new bug reports come up that need addressing. -- Ryan • (comments) • 03-Jan-2012 10:23 PST

Interaction of virtual Wikis

  1. Virtual Wikis seem to be completely isolated from each other, e. g. a link in wiki A to a topic in Wiki B is an external link. Is it correct?
  2. It is not possible to rename the default »en« Wiki to another name in the administration, right? I do not mean the necessity to hack web.xml afterwards, that is clear, but just renaming in the interface, without hacking the database. -- justme.
I need to take some time to document this better, but a virtual wiki basically allows you to run multiple semi-independent wikis from the same instance while sharing user logins, user blocks, etc. You can link between virtual wikis using syntax of the form [[:es:Special:RecentChanges]] (Special:RecentChanges), and the parser will generate a link that is different from a normal external link - it will not be "nofollow", and it is styled like an internal link rather than an external link.
That was that syntax I was looking for. But, it absolutely refuses to work in my installation - the two wikis seem to be completely unaware of each other' pages. How strange. Your syntax obviously works perfectly in this installation. Should I file a bug? I am starting to be a nuisance with all these minor issues, but that comes from very intensive work with Jamwki in the last days. I like this software very much.
I'm fairly confident that the syntax works in JAMWiki 1.1 ( is currently running JAMWiki 1.2) as I used it heavily with, and there are a number of unit tests in place for it. A few things to verify:
  1. You created the new virtual wiki via the Special:VirtualWiki interface?
  2. You added it to your web.xml file as described in Configuration#Virtual_Wikis?
  3. You are including the colon in front of the virtual wiki name ([[:es:Special:RecentChanges]])? Note that without the colon the virtual wiki links show up in a box in the left nav unless the "Display virtual wiki links inline" option in the "Parser Settings" tab of your Special:Admin page is unchecked.
  4. Is the virtual wiki prefix the same as one of your interwiki prefixes or namespaces? If so then there could be conflicts.
If all of the above are true, can you provide an example of the virtual wiki prefix and the wiki syntax you're trying to use, and perhaps that will provide some insight into what might be going amiss? Thanks! Also, you're definitely not a nuisance, and I'm off of work this week so it works out well that I've got time to investigate any issues that come up! -- Ryan • (comments) • 03-Jan-2012 10:31 PST
I must take care not to lose track of the correct amount of indentations ) Yes, all of the above is true, though I must confess I renamed »en« to something else in the database. It was instantly recognized after restart and ran smoothly ever after.
I would be very grateful if you could just look into the installation but I don't know if it is too much to ask for. Would have to email you the URL, though - wouldn't be appropriate to link to it from here. justme
Feel free to email - I've got free time this week, which is unusual :) That said, I'll be out all afternoon so I may not be able to look at your install right away. Also, note that if you are modifying the database directly then you'll also want to manually clear the JAMWiki cache using the Special:Maintenance tools. Under normal usage JAMWiki manages the cache itself, but if the database changes the application can get out of sync with the underlying data - that may be why things updated properly only after a restart. -- Ryan • (comments) • 03-Jan-2012 11:56 PST
Thank you. Emailed your Sourceforge account. As for the cache, I use Hibernate quite a lot, so I would not have forgotten that ) justme
Renaming the default virtual wiki has been something that has been requested but I've never gotten around to implementing. Currently you can create a new virtual wiki and make it the default, but there is no easy way to get rid of a virtual wiki once created. See Tech:Virtual Wiki Enhancements for the enhancement requests. -- Ryan • (comments) • 03-Jan-2012 09:38 PST
Was there; that's why I asked. »Rename the default en wiki« was stricken out as implemented in 2981, so I assumed you could rename any wiki; in fact, as I now understand, you cannot rename the default wiki, but you just change the default wiki to another one than »en«, right? - justme.
Yes, that's correct. Allowing renaming of virtual wikis would require some serious modifications to the database relationships, something I've been hesitant to attempt. Ideally it would be good to find a less-intrusive workaround to the problem that was acceptable to everyone, such as (perhaps) allowing a virtual wiki to be "disabled" so that it will be effectively deleted but the underlying database content would still be present and no schema modifications would be required. Alternately, since most people seem to just want a URL that doesn't include "en", perhaps making the default virtual wiki something that is configured during setup would make the most sense. -- Ryan • (comments) • 03-Jan-2012 11:07 PST

Groups and Roles

  1. After having had a look at the database structure I came to think it would be possible to create custom groups for special needs. The interface does not seem to offer this (or have I overlooked something?) Would Jamwiki see a group created in this way and let me further manipulate it or would it lead to system errors?
  2. What is the purpose of creating a new role in the interface? I do not seem to be able to do anything wit a new role (e. g. assign some rights to it) -- justme.
Regarding #1, the design should definitely allow for the use-case you've outlined, but I don't think it was ever fully implemented so I'm not sure if it will work. For example, I'm not sure that the group roles would necessarily be inherited by the user, although if that code isn't already present then it probably would not be hard to add.
Regarding #2, see Help:Permissions for a partial overview. If you create a new role via the Special:Roles interface then you can assign it to users. If you then update your Spring Security configuration you could (for example) restrict access to the Special:OrphanedPages page to only those users with ROLE_NEW_ORPHANED_PAGE_ROLE.
This all needs to be better documented - I should set aside some time to do so, although any contributor is welcome (and encouraged!) to help update the documentation as well. -- Ryan • (comments) • 03-Jan-2012 09:31 PST
The feature should be available from 1.3.0 on .Charles

Dynamic/Variable Page Content or Calling A Template from a Link

I have a need to be able to pass variables to pages, or to call templates using a link in order to make documenting troublshooting steps more specific. here is a very simple example to example to explain my need:


Page Content

 ==Handle Missing File==
 Contact {{{contact}}} and tell them a file named {{{filename}}} is missing.

Page Output

 ==Handle Missing File==
 Contact help desk and tell them a file named abc.txt is missing.
There is currently no out-of-the-box way to handle that, but if you are a programmer it would probably not be difficult to hack the code. Note that if Mediawiki has similar functionality then you can create a feature request at, and link to any documentation about the feature and I'll look into putting something similar into a future release - the concerns I would have would be ensuring that this could be disabled by default since inclusion of request parameters in page output is often a vector for XSS attacks. -- Ryan • (comments) • 04-Jan-2012 11:19 PST

Is there a forum for support JAMWiki ?

I'll be happy to find sample for customyze some functions, like user linked with phhbb forum. —The preceding comment was added by snaps_herve (commentscontribs) .

JAMWiki does not currently have any special forum functionality. -- Ryan • (comments) • 03-Feb-2012 08:50 PST

List all registered users

I am trying to figure out how to list all registered users of my wiki. However, I don't see a way to do that from the administrative pages. I can list all users with a specific role, but with one caveat: users who register themselves (via the register link) don't show up in any of the searches from the Assign User Roles tab of the Special:Roles page. For example, I have my GROUP_REGISTERED_USER set with the permission ROLE_VIEW. However, when I search for all users with ROLE_VIEW, I don't get any of the self-registered users. Why is this? -- Brian • 13-Feb-2012

Does Special:ListUsers cover your needs? As to why searches for users with ROLE_VIEW don't show all users, that permission is assigned to the registered user group, but not explicitly to individual users unless an administrator adds it explicitly; the admin tools will only search for explicit permission assignment, not inherited assignments. -- Ryan • (comments) • 13-Feb-2012 14:16 PST
Yes, ListUsers helps. Also, thanks for the explanation of why everyone doesn't show up under ROLE_VIEW. However, now I have a different problem. Logged in as "admin" with full admin and sysadmin permissions, I go to the ListUsers page and see all of my users. Most of the users listed are in red, a few are in purple (all clickable links). The userid's that are in purple I can click on and be taken to their user page to edit their information. When clicking on the users in red, I am taken to a login page with a note that "Editing requires logging in". However, I am logged in. Why is this happening? Also, I have a number of users that are in the form of "User:XxX1287605844483XxX". What are these? Are these deleted users, and this XxX number is a GUID of some kind? Finally, how do I delete a user? Is that even possible? I guess I could block them for an infinite time period, but is there any better way? Thanks. -- Brian • 14-Feb-2012
Regarding the "editing requires logging in" message, have you modified the applicationContext-security.xml file? I'm guessing a custom permission was added? Alternately, have you restricted ROLE_EDIT_NEW from the registered users group? If so you'll need to explicitly allow individual users to create new pages.
As to users of the form "User:XxX1287605844483XxX", the Special:ListUsers page just displays a list of user accounts that have been created. Are you running a public site that might have had bogus users created by a bot (spambots are now intelligent enough to automatically register user accounts). Finally, there isn't currently a way to delete a user since doing so would also require deleting any topics, history, or other data associated with that user. -- Ryan • (comments) • 14-Feb-2012 10:15 PST
Yes, I removed ROLE_EDIT_NEW from the registered users group. My registered users group only has ROLE_VIEW. I assume that you are saying that these users (the "red" users) don't yet have a user page yet, and when clicking on their userid one cannot be created because that userid does not have the ability to create a new page?
Yes, this is a public site and these XxX users were probably from an automated routine like a spambot, or from a vulnerability scanner. I just wish I could delete them or at least put them in some sort of disabled state where they were not allowed to login to the site and were marked as "disabled" on the UserList. -- Brian • 14-Feb-2012

Postgres Database User Access

For security reasons, we would like to create the JAMWiki tables and grant a different user access to those tables rather than have to use the original table creator. If we modify the file the provided database user is the owner. Is there a way to specify to have another database user make the CRUD database calls? —The preceding comment was added by (commentscontribs) .

Right now only one database user is supported, but you could always change the user's permissions after installing. Be aware, however, that when you perform an upgrade the automatic upgrade steps may attempt to change database tables, so during upgrades you'll want to make sure the user has appropriate permissions.
If Mediawiki or similar wikis support different users for setup/upgrade versus normal running that's a feature that wouldn't be hard to implement in JAMWiki - any pointers to documentations or descriptions of how other wikis handle this would be appreciated. -- Ryan • (comments) • 05-Mar-2012 09:32 PST

Problems with LDAP

We try the LDAP fuctionality of jamwiki. But we have a lot of trouble with spring lDAP Security. In the Logs there are no informations about the LDAP login procedure.

Searching for user 'testuser', with user search [ searchFilter: 'cn={0}', searchBase: 'dc=companyde,dc=company,dc=net', scope: subtree, searchTimeLimit: 0, derefLinkFlag: false ] Interactive login attempt was unsuccessful.

No more Informations are available. If we set a wrong controller no error message appears in the log. We used the following settings:

	<b:bean id="ldapContextSource" class="">
		<b:property name="url" value="ldap://CONTROLER:389" />
		<b:property name="userDn" value="CN=User,OU=Users,OU=DE,DC=companyde,DC=company,DC=net" />
		<b:property name="password" value="pwd" />
		<b:property name="referral" value="follow" />
	<b:bean id="ldapUserSearch" class="">
		<b:constructor-arg><b:ref bean="ldapContextSource"/></b:constructor-arg>


What can we do to analyse the failure? Thanks for help!

I'm not an LDAP expert, but if the logs aren't currently printing any useful info then you might want to try changing to DEBUG level for Spring Security. To do so, edit your logback.xml file to add the following:

<logger name="" level="DEBUG" />

That may produce enough output to diagnose the problem. If you are able to resolve the issue and can update the Permissions#LDAP / CAS / OpenID page to note whatever special case you're experiencing then I would be hugely grateful! -- Ryan • (comments) • 15-Mar-2012 19:44 PDT

Import containing Linking to a Category tag Failing

It appears when we have the following tag [[:Category:NAME|TEXT]] in our text and attempt to import that page, the import just spins and times out. Removing that tag (or just removing the first colon) allows the import to complete. Is there a work around? Or is it just failing for us? We are using a Postgres database. Thanks for your help. —The preceding comment was added by (commentscontribs) .

What JAMWiki version are you using? And can you upload a sample file, either to or to, so that I can try to reproduce and see what's going on? Thanks! -- Ryan • (comments) • 21-Mar-2012 11:35 PDT
I uploaded the text we have in the file to FileExportProblem.txt and the generated export file is called ExportFail.xml The export was taken from version 1.1.1 (HSql) and attempted to import to version 1.1.5 (Postgres). Thanks again for taking a look.
I was able to import Image:ExportFail.xml on my local JAMWiki 1.2 instance, so it's possible that the latest version will resolve the problem. I'll try to reproduce on a JAMWiki 1.1.5 instance as soon as time permits. -- Ryan • (comments) • 22-Mar-2012 21:05 PDT

Cannot view uploaded files

The question is about the correct settings for files uploading. My configuration:

  • tomcat installation dir: /opt/apache-tomcat-6.0.32/
  • webapp is in /opt/apache-tomcat-6.0.32/webapps/wiki
  • folder for uploaded files: /opt/jamwiki/upload
  • relative path for uploaded files (config option): I have tried /wiki/upload/, /upload/, /jamwiki/upload - none of them seems to be working

So. when I upload file (for eg some jpg image) it appears in /opt/jamwiki/upload/en/2012/3/ and in /opt/jamwiki/upload/resized/en/2012/3/. But I cannot view this image on web. I have tried to view it through Special:ImageList and tried to add a link in some Topic. No success. When I click in image I get 404 error page. Is it possible to store uploaded files in another place (not under webapp root folder)?

For versions prior to JAMWiki 1.2 uploaded files must be in a folder that can be served by the web application server or by the web server. Starting with JAMWiki 1.2 that will be changing - the new release should be ready in the next couple of days. -- Ryan • (comments) • 24-Mar-2012 08:25 PDT
Thank you for so quick answer.-- Roman 24-Mar-2012 09:27 PDT

I have the same question. I installed JAMWiki 1.3.0.Upload configure is default. After upload a picture, I can't see it, but a file name displayed as a text. When I used it in my other article, just like Image:example.jgp, or example.jpg, the page is displayed as a link,(not a picture). Click the link, there is no picture displyed. How can I have it right. -- caihb2013 14:19, 21 February 2013 (PST)

Can you verify that JAMWiki has write access to the directory you specified as your file system directory? (see Special:Admin - it's the first entry). There should be an "uploads" folder in that directory with all uploaded files. If the permissions are correct and files are being properly saved to that directory, can you let me know the HTML for the link that JAMWiki is creating when you include the image in an article? -- Ryan • (comments) • 14:40, 21 February 2013 (PST)

Thank you.

Upload: After uploaded I checked my server. There is the uploaded file (gtest-22112539-200px.jpg) in /ROOT/system/resized/en/2013/2/ and /ROOT/system/en/2013/2/. I try it again. I think the uploaded file is right.

Used: Write [[:gtest.jpg]] in a page, as your documents said the picture will be displayed normally, but I get a text link again. The HTML link is "". I don't know why gtest.jpg was changed into Gtest.jpg.

PS: If the file name is chinese characters, there are the same problems.

--caihb2013 20:04, 21 February 2013 (PST)

Are you sure your upload settings are set to "JAMWiki file system directory" (you can check from the "File Upload Settings" tab of Special:Admin). If that setting is used then all files should be stored in an "uploads" folder, but per your previous comment that doesn't appear to be happening. If you are using the JAMWiki file system directory, are there any error messages in your logs when you try to upload or download a file? -- Ryan • (comments) • 22:20, 21 February 2013 (PST)

Sorry. I try to setup with many settings. Maybe something is wrong. Now I do it from deploying the JAMWiki.

(1) Deploy JAMWiki in Tomcat

Copy the JAMWiki 1.3 to C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\ROOT\. I like to do this because if the JAMWiki in /ROOT/, we can easy to access like this "http://localhost:8080".

(2) JAMWiki Install

The key settings is as below


Server system directory:C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\ROOT\

Server URL:http://localhost:8080

Uploads file:

Uploaded file location: JAMWiki file system directory(default)

Path of uploaded file:C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\ROOT\uploads

Uploaded file directory in server:\uploads\

File server URL: http://localhost:8080

Shared file repository: none

(3) Upload file

After uploaded, the page display a text link "File:Cell2.jpg". see the figure frank_error1.jpg (When uploaded the file, I got a message "java.lang.IllegalArgumentException: Illegal pattern character 'I'". I will try it later)

HTML Link of "File:Cell2.jpg" is "http://localhost:8080/en/null/en/2013/2/Cell2-23064426.jpg". Click the link, get a mistake "cann't find this file"

(4) Check the uploaded file in server

It is OK.

C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\ROOT\uploads\en\2013\2\Cell2-23064426.jpg

(5) Used the file in StartingPoint (just for test)

In editor: write [[:Cell2.jpg]] and Saved

In Read: it is a text link "Cell2.jpg". see figure 2 frank_error2.jpg

The HTML link "Cell2.jpg" is "http://localhost:8080/en/Special:Edit?topic=Cell2.jpg"

--caihb2013 15:23, 22 February 2013 (PST)

The IllegalArgumentException is likely the problem - can you send me the output from your logs that contains that exception? I don't understand why you're seeing a problem, but it sounds like something in your configuration isn't being handled properly by JAMWiki. -- Ryan • (comments) • 17:59, 23 February 2013 (PST)

I am very sorry. I make you confused. There is no any exception when I tested my site. The problem is I can't view the upload image. I wanted to send a picture to you to show the result of my site test. When I uploaded the picture to, there is a "IllegalArgumentException".

When upload a image in above (3), the HTML link is "http://localhost:8080/en/null/en/2013/2/Cell2-23064426.jpg". I think "null" in the link is wrong.

In your example you did not include the "Image:" (or "File:") prefix - is that the problem? For example, the wiki syntax [[Image:frank error1.png|thumb|350px|This is an image]] produces the image to the right:
frank error1.png
This is an image
-- Ryan • (comments) • 21:47, 28 February 2013 (PST)

Thank you. my site is ok now.

I changed the uploaded file settings.

Uploaded file location: Web server or app server docroot

[[File:Cell2.jpg]] is correct.

I too am having similar problems the uploaded files are present in the directory but not viewed on the page gives a 404 error. Using version 1.1.5 - Ashutosh

Interest in a revision control package

Within my department we wrote a basic revision control for jamWiki in order to supervise topic commitments by introduction of a moderator role. If non-moderators edit a topic and save their changes, the new version is written into a file on the server. The moderator receives an email-notification and then has to sight the new version and approve it in order to let the changes take effect (or discard the changes). Would there be a general interest in publicating the corresponding classes and methods for further use and/or improvement?
If yes, how should it be done(, Ryan)?

I'd definitely be interested in the approach, and if it can be integrated without increasing complexity of the existing codebase, or if parts of your approach could be integrated, then that would definitely be a task worth pursuing. If you're willing to make your code available in a personal branch in the JAMWiki Sourceforge repository then I can grant you write access if you provide your Sourceforge ID, and your code could then be reviewed to see how feasible integration would be. Thanks for the offer to contribute! -- Ryan • (comments) • 02-Apr-2012 06:32 PDT
Hey, sorry for the delay, I didn't forget about jamWiki. I just finished commenting the concerning classes and jsp's and registered to Sourceforge. How should I pass you my data? Would it be possible to eMail you my ID etc.? -- Frank • 11-Apr-2012 10:25 CET
Sure - you should be able to email me through my Sourceforge account [4]. -- Ryan • (comments) • 11-Apr-2012 07:35 PDT

Successful Upgrade of JAMWiki from 1.1.5 to 1.2.0 using Microsoft SQL DB and Tomcat

I just wanted to provide some feedback that I successfully upgraded my 1.1.5 JAMWiki to the new 1.2.0 version. I run Tomcat 6.0.x and use a MS SQL 2008 database server on the back-end. I am using the jTDS 1.2.5 JDBC driver. -- Brian 6-Apr-2012

Thanks - positive feedback definitely appreciated! -- Ryan • (comments) • 07-Apr-2012 08:12 PDT

How to add the list of content

First of all let me congratulate the initiator and the dev team for this great effort.

I had a look at the top of this page and I could not find out, how the content list is inserted. I also could not find the information in the documentation. Can you give me a short hint on that?

OK. This an addition: I found the magic word __TOC__. I should have taken a bit more time with the docu on mediawiki :-) Charles
The TOC will also appear automatically anytime more than 4 sections (<nwoiki> === section === </nowiki) are included on a page. A TOC can be forced to appear using the __TOC__, and forced not to appear using the __NOTOC__ tag. -- Ryan • (comments) • 28-Apr-2012 08:30 PDT
Thank you Ryan! Yes, in my test page I only had three sections. I will get back with more feedback when I am better acquainted with the features. So far I am feeling really happy. Charles

OutOfMemory error during upgrade

Java on my server has only 24MB of heap, so when I tried to update from current v.1.1.5 to latest v.1.2 the Java ran out of memory.

The workaround, which worked for me was to restart the Tomcat right before running update. Then update was successful, but after that JSP compilation caused the same OutOfMemory. It took me 3 restarting of the Tomcat to compile all JSP pages and now it works fine.

I think this might be worth to mention in the Upgrade notes or in FAQ. —The preceding comment was added by cab (commentscontribs) .

Thanks for the report - this is a bug that will need some investigation. There was a similar report during the beta period, but it wasn't reproducible and nothing was ever done about it. I'll try reproducing with the setup you've outlined and will attempt a fix for the next bugfix release. -- Ryan • (comments) • 02-May-2012 13:57 PDT
See JAMWIKI-79 for the bug report. -- Ryan • (comments) • 02-May-2012 14:06 PDT

Assign users to groups


I am trying to achieve this:

  • Anonymous users should only be able to view the pages and register
  • Registered users should only be able to view the pages
  • Registered users assigned to the group GROUP_EDITORS should be able also to modify and create pages

My idea would be to:

  • Revoke all roles but ROLE_REGISTER and ROLE_VIEW from GROUP_ANONYMOUS
  • Revoke all roles but ROLE_VIEW from GROUP_REGISTERED_USER
  • Create a group GROUP_EDITORS

When a user wants to contribute, he or she would register and submit a request by mail. Assigning that user to the GROUP_EDITOR should do the trick, without having to assign every single role individually.

The user interface does neither allow to create groups nor to assign users to groups. Is it a conscious choice?

I tried to enforce the policy modifying directly the database (I am using PostgreSQL).

  • Insert a new group in jam_group
wiki=# INSERT INTO jam_group (group_id,group_name,group_description) VALUES (3,'GROUP_EDITORS','Users in this group are allowed to edit content.');
wiki=# select * from jam_group;
 group_id |      group_name       |                              group_description                               
        1 | GROUP_ANONYMOUS       | All non-logged in users are automatically assigned to the anonymous group.
        2 | GROUP_REGISTERED_USER | All logged in users are automatically assigned to the registered user group.
        3 | GROUP_EDITORS         | Users in this group are allowed to edit content.
(3 rows)

After that the group appears in the GUI and can be assigned roles. So I assigned the roles ROLE_EDIT_EXISTING, ROLE_EDIT_NEW and ROLE_VIEW to GROUP_EDITORS. I checked the modification again directly in the database.

wiki=# SELECT * FROM jam_group_authorities WHERE group_id = 3;
 group_id |     authority      
        3 | ROLE_EDIT_NEW
        3 | ROLE_VIEW
(3 rows)

Finally I assigned a registered user (in this example with username gianni) to the GROUP_EDITORS. As it is visible before the change gianni is in GROUP_REGISTERED_USER, which is as expected.

wiki=# SELECT * FROM jam_group_members WHERE username='gianni';
 id | username | group_id 
  5 | gianni   |        2
(1 row)

After the modification, not surprisingly, gianni is in the GROUP_EDITORS.

wiki=# UPDATE jam_group_members SET group_id = 3 WHERE username='gianni';
wiki=# SELECT * FROM jam_group_members WHERE username='gianni';
 id | username | group_id 
  5 | gianni   |        3
(1 row)

If I log in on the wiki with username gianni, I am not able to modify or add pages. I guess that the application does not assign the group roles correctly. Am I missing something?

Thank you and enjoy the day. Charles

Currently the infrastructure is not in place to allow group permissions to be inherited by users (aside from the registered user group), which is why there isn't currently a UI for assigning users to groups. Implementing that functionality shouldn't be terribly difficult, but as it hasn't been highly requested it isn't something that has gotten much attention. If this is a feature you're interested in, would you mind adding a feature request to Jira?
In the mean time, rather than assigning users to a group, adding the ROLE_EDIT_EXISTING and ROLE_EDIT_NEW permissions to individual users should accomplish what you're trying to do - it's a bit messier, but should at least allow you to implement the functionality you want. -- Ryan • (comments) • 15-May-2012 20:37 PDT

Thank you! I made the entry in jira. I might be able to find some time to get into the code to solve this issue. Could you give me some hint at where to look at? Charles
JAMWikiDao.retrieveUserAuthorities would probably be the place to start. In addition, a UI would be needed to assign users to groups. If you find time to work on this let me know your Sourceforge ID and I'll grant write access so that you can set up your own branch. -- Ryan • (comments) • 16-May-2012 21:55 PDT
Hello Ryan. My sourceforge id is cclavadetscher Charles
You should now have permission to create a branch in the Subversion repository (use trunk as the source) - let me know if you have any questions or encounter any problems. Also, see How to Help#Programmers for some tips that might be useful to you. Thanks for offering to help out! -- Ryan • (comments) • 21-May-2012 09:24 PDT
Yes. I could create the branch and download the sources. But now I have a problem compiling with maven (s. next section, although I am not so sure if this is the right place for the question). Bye, Charles

Hello. I finished the implementation and it is now ready for review/testing on sourceforge, under branches/cclavadetscher. Let me know if you see something wrong in it. For the next steps I have two proposals. Since they have an impact on the "freedom" of the admin users I would prefer to hear other opinions before making changes:

  • Disable assignment to and removal from the two "system" groups GROUP_ANONYMOUS and GROUP_REGISTERED_USER. I can't get rid of the impression that these two groups should always be there and assigned automatically at runtime. This modification is minimal and only requires changes in SQL.
  • The roles displayed for the users only refer to those assigned directly. I find it a bit confusing for users not to see the roles assigned over group membership. I would suggest to display checkboxes of roles that are assigned through group membership as checked and disabled. This has the following impact:
    • Users cannot revoke roles directly (wouln't work anyway, because the role is assigned to the group), but must remove users from groups to revoke roles inherited this way.
    • It is still possible for all roles that are not given through a group to be assigned and revoked individually. These are clearly identifiable because they are enabled.
    • direct role assignment and assignment through group membership must not coexist. If a user has been given a role directly and is later added to a group that grants the same role, then the direct assignment is removed from the database.

I could post a message on the devel mailing list, if this is the normal channel for this kind of questions.

Let me know your opinion. Bye Charles

Sourceforge SVN is apparently down for scheduled maintenance tonight, but I'll try to do a review tomorrow when things are back up. Responding to your questions:
  1. I think filtering out the ability to assign to GROUP_ANONYMOUS and GROUP_REGISTERED_USER makes sense.
  2. Your suggestion about displaying inherited roles as disabled makes sense. However, I'm not entirely clear why if a user is given a role and then assigned to a group with the same role the user role would need to be removed. It seems like this would be tough to enforce - if I accidentally update GROUP_REGISTERED_USER with admin permissions and then change it back, would all users with that permission then have it revoked due to the initial assignment?
Again, thanks for all your work, and hopefully this can be merged soon. -- Ryan • (comments) • 05-Jun-2012 20:52 PDT
Sourceforge is back up. Your code looks good - the only things I noticed are all very minor:
  • It looks like an extra closing </div> tag has been added to admin-roles.jsp.
Strange, I can't remember this addition. It may be an unwanted effect of some copy/paste of existing sections for convenience. I removed the last one.
  • The Javadoc for DataHandler.getAllWikiGroups() should be updated - it looks like it was copied from another method.
Yes, I forgot that... It is updated now.
  • There are a few imports that were added to AnsiDataHandler and AnsiQueryHandler that are unneeded since they are from the same package.
I removed the import org.jamwiki.db.* lines from AnsiDataHandler (1 line) and AnsiQueryHandler (1 line). I didn't see any others?
  • Can you update the method comments in the GroupMap class to follow Javadoc format (not the "// comment" format)? Also, it looks like the StringBuffer in the GroupMap.toString() method is unnecessary since it only does a single append - a string can be used instead.
Yes :-) When I started writing the GroupMap.toString() method I thought there would be more information to pack in the returned String. I changed that to String.
I also updated the comments in the class, including those of private elements. Latter is usually not necessary, but it doesn't hurt.
  • RolesServlet.buildGroupMap probably shouldn't be static, in order to be consistent with the rest of the methods in that servlet.
Actually I declared it static in analogy with RolesServlet.buildRoleMap(). But you are correct. The way the method is currently used does not require it to be static. I changed that, too.
I'll build it and take a closer look tomorrow. It would be good if there was a way to consolidate some of the RoleMap and GroupMap code, but I didn't look closely enough to know whether that's possible - let me know there's any consolidation that you think would be useful. -- Ryan • (comments) • 05-Jun-2012 22:18 PDT
Hi. I discovered a bug in my code. I will have a look into it and notify the correction here. Please wait with testing. Charles

I finished the bug fixing and committed the changes to svn branches/cclavadetscher. The "minimal" change of filtering out the system groups turned out to have some consequences that were to expect but I forgot in the first moment. In the previous version there were always the two groups GROUP_ANONYMOUS and GROUP_REGISTERED_USER. For that reason I did not check for emptyness of the group list. This led to a null pointer exception. After the first correction yesterday I discovered that changes to group assignment were not stored in the database if all group assignment of a user were deleted. The reason was that the list of group ids in GroupMap was not initialized (as empty). This also led to a null pointer exception. Now it's all fixed and ready for testing.
About the point "I'm not entirely clear why if a user is given a role and then assigned to a group with the same role the user role would need to be removed". If I am not completely wrong, disabled checkboxes are not posted to the server, even if they are checked. This would cause the deletion of the individual role assignments, because the algorithm first deletes all of them for that user and then creates the ones available in the request.
My point is more that admin users should be able to see all roles that a user has, independently where the assignment comes from. It is true that deleting the individual assignment if a group assignment covers the role may lead to a lot of confusion. As a matter of fact the only thing that is needed is a visual representation that a role is assigned through a group, so that the admin knows which additional rights he needs to give to achieve a specific target or even decide to assign a role redundantly adding an individual entry. Taking all that into account I would suggest a different strategy.
  • The checkboxes must always be enabled, i.e. users may have the same role assigned through a group or individually
  • Individually assigned roles are indicated by the checked checkbox.
  • Group assignment are indicated by other visual means, e.g. the checkbox could have a red box around it (span with background-color: red) or the name of the roles could be bold or in a different color, or have an asterisk or whatever. To this point I am very open for suggestions.

Here how my local installation now looks like. This specific development is not committed to svn yet, because I am not finished with testing and I wait for your opinion. The logic for determining the roles inherited from groups is implemented. It is now just a matter of deciding how to display this information.

The boxes with a red background are roles inherited from groups, the checkboxes selected are roles assigned individually. The unchecked checkboxes without a red background are roles that are not assigned at all. Checkboxes that have a red background and are checked are "redundantly" assigned: through a group and directly. If the admin removes a user from the group(s) that contain that role, the user will still have his individual assignment.

jamwiki roles example.png

I think that RoleMap and GroupMap could be consolidated into one single container. I am still not completely sure if it is good, but I will think a bit more about that and get back to you.

I finished my tests yesterday evening and I feel comfortable with the result. I commited all changes to svn (Revision 4073). If anything needs to change (e.g. how to display role assignments through group membership), let me know. Thank you for testing.
As for the question of the consolidation of RoleMap and GroupMap I think that it would be better to keep them separate. They both deal with roles, but in a different manner. Many model classes map to a single relation and have little or no intelligence. In this sense RoleMap manages data in jam_authorities and jam_group_authorities (both directly assigned roles), while GroupMap deals with the combination of jam_group_authorities and jam_group_members to deliver the set of roles of a user. Conceptionally these are different things and it could become somewhat confusing to mix them.
Enjoy Charles
Thanks again for all of your work. I've been keeping an eye on commits and I think things look good, so I will try to get this merged to trunk as soon as possible. I've got company in town this weekend and then have to travel next week, so please be a bit patient if it takes me longer than normal :-). This will actually be the first major new feature for Tech:JAMWiki 1.3, whose development has otherwise been slowed by my own work commitments, so another hearty thank you for helping that process move forward! -- Ryan • (comments) • 08-Jun-2012 08:10 PDT
I am not in a hurry :-) I commited a modified help text ( adding the information about the meaning of the red background on the roles assignment page. Additionally I already made the same change and added the new texts in the Italian and German translations. In the svn commit message I put a list with the exact changes that are needed to update a language file. I hope this helps other translators. Enjoy Charles
Quick update: I started merging this code last night but am getting a unit test failure due to a database setup issue when running the unit tests. As soon as I get that resolved I'll get your code checked in on trunk. -- Ryan • (comments) • 13-Jun-2012 08:34 PDT
Ouch... I always compiled skipping the unit tests. Sorry. Should I take this look or are you already in there? Charles
Follow up question: Why is there a database setup at compilation time? At that time there is no database configured. If there is one, it is configured in the deployed application. I don't understand exactly how that works... Bye Charles
The unit tests set up a minimal test instance using the HSQL database - that tests the wiki setup code, allows testing some of the DataHandler functionality, and allows full parser testing. I'm sure the problem in the new code is a simple one, but I'll be on the road until Sunday night so I haven't had a chance to investigate. You're welcome to look into it, otherwise I'll get it taken care of when I'm home again. -- Ryan • (comments) • 15-Jun-2012 09:05 PDT
Hello. Unfortunately I was a bit under pressure myself in the last days, a situation that is going to last some more days, and could not look for the source of the problem in enough depth. What I could see is, that the compilation process creates a database, although it seems that the method setup() of JAMWikiUnitTest is never invoked (I added a logging warning and even a System.out.println line to check it). I guess that I am not acquainted enough with the way JUnit works, because what I described in the previous lines simply makes no sense. If you find time to have a look it would be great, otherwise I will resume the investigation in a few days. In any case I am very interested in knowing what the problem is, to avoid it in future contributions. Thanks and bye Charles
OK. I found the problem. In the class WikiGroup I initialized the groupId with -1 and then checked that value to decide if the insert statements should be done using autoincrement or not. Something similar applied to the insertion of users in groups. I changed the code and tested it with HSQL and PostgreSQL. The code now compiles including tests without errors and everything seems to work correctly. Bye Charles
Thanks! After three weeks of traveling for work I'm home for a while, so I'll look at this again tonight and try to get everything merged as soon as possible. -- Ryan • (comments) • 18-Jun-2012 08:02 PDT
Looks good - everything merged to trunk. If any bug fixes are needed feel free to make them directly on trunk. -- Ryan • (comments) • 19-Jun-2012 13:13 PDT
Thank you. And if you get any notification on bugs of that part feel free to notify me. Charles

I noticed that searching users by roles only considers roles assigned directly. I think that it would make sense to modify this functionality to select also users that have this role through a group. Since the display differentiate if users have a role directly or indirectly it should not be confusing. I also believe that this should not be a big issue, probably just using a different SQL statement. What do you think of that? If you agree I could make the change and make it available. Bye Charles

I made the change and commited it to branches/cclavadetscher. Since it is not a bug but an enhancement I preferred not to commit to trunk. I could do that next week, however, unless you'd like to review the new code and merge it to trunk yourself. During the week-end I will be busy with friends and won't be able to do much on development. Bye Charles
Thanks - feel free to merge it when you're ready. It might make sense to add a checkbox so that this is optional, so that on large wikis there won't be a huge number of results returned for roles assigned to a group of users, but otherwise the change makes sense. -- Ryan • (comments) • 22-Jun-2012 07:45 PDT
OK. I made the change that you proposed. It definetely makes sense. The inclusion of users inheriting a role from a group is optional and off by default. I will merge to trunk after I am finished with testing. Now it's time for me to take the train. Enjoy the week-end Charles
I merged my changes into trunk. It compiles and works correctly in all tests I made. If there are any issues, let me know and I can take care of them. Bye Charles 25-Jun-2012 11:45 CEST

Problems building from source

I get an error while trying to build JAMWiki from sources. My knowledge of maven is not very good and before I start reading books I thought to check if somebody had the same problem already.

Here is what I get trying to build from source:

Note: The revision number is 4053

mvn package
[ERROR] Failed to execute goal on project jamwiki-core: Could not resolve dependencies for project
org.jamwiki:jamwiki-core:jar:1.3-SNAPSHOT: Failure to find  de.congrace:exp4j:jar:0.2.8
in was cached in the local repository,
resolution will not be reattempted until the update interval of has elapsed or updates
are forced -> [Help 1]

And the config I am using:

Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: /usr/local/maven
Java version: 1.6.0_20, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-41-generic", arch: "i386", family: "unix"

Thanks Charles

It looks like version 0.2.8 may have been removed somehow from the Maven central repository, which is weird. If you go to the pom.xml file in the root directory and update the "exp4j" version to "0.2.9" then I think it should work, per [5]. I'll look at this more closely ASAP and try to get a fix committed. -- Ryan • (comments) • 22-May-2012 07:45 PDT
I've committed a fix to trunk in revision 4054. Thanks for the report. -- Ryan • (comments) • 22-May-2012 21:49 PDT

Here's another person having trouble building from source: The first error message is: [INFO] Unpacking E:\2012Fall\Prjs\JAMWiki\JAMWiki\jamwiki-core\target\classes to

  with includes sql/**,templates/**,pages/** and excludes:null

org.codehaus.plexus.archiver.ArchiverException: The source must not be a directory. [INFO] ------------------------------------------------------------------------

Unfortunately I can't provide much help based on the above. If you have followed the steps in Building from Source and are still seeing the problem, can you upload the full output from the build to, and I'll see if I can figure out what's going wrong? -- Ryan • (comments) • 29-Jun-2012 21:08 PDT

Italian translation

While I find a way to solve my maven problem I could prepare an Italian translation (my mother tongue in spite of my name). Is somebody already working on that? As I see in the sources the labels for the GUI elements are only partially translated. StartingPoints, Footer and Header don't exist yet. Bye Charles

The Italian translations are WAY out of date, so if you're willing to help update them it would be greatly appreciated. I've given you access to Special:Translation, or if you create a translation file on your machine you can either commit it directly to trunk or upload it here and I'll get it committed. Thanks! -- Ryan • (comments) • 22-May-2012 07:47 PDT
It looks like updated translations are in Subversion now - can you let me know how you'd like to be credited, and I'll get this merged to trunk and queued for the 1.2.1 release? For reference, most people use their real name and id, so I'm credited as "Ryan Holliday (wrh2)", although it can be almost anything you prefer. -- Ryan • (comments) • 26-May-2012 20:55 PDT
Hello Ryan. That's correct, although I noticed this morning that after a svn update some text were still not translated, probably missing from my original file. I corrected them and commited the changes in branches/cclavadetscher. The translation is now ready for merging. Thank you for doing that for me :-) Do you have a process in place for error/typos notifications and new texts? I was careful to avoid errors, but something may still not be completely OK...
Besides the properties texts I prepared and committed a subfolder jamwiki-core/src/main/resources/it with a translation of the pages that are generated during installation.
As for the credits, just as usual, i.e. Charles Clavadetscher (cclavadetscher). Bye Charles
Thanks! I've merged your changes to trunk and to the 1.2.x branch (for inclusion in 1.2.1). I've also updated the translation file on, so you should see your changes here if you update your language preference to Italian. Please let me know if there are any issues.
As to error/update notifications, every major release (typically each six months) will have translation updates, and I generally send a request for updates to the jamwiki-devel mailing list once the new release is in beta. If you can suggest an easier method please let me know as I'm very grateful for any translations and would like to make the process as easy as possible. -- Ryan • (comments) • 29-May-2012 21:36 PDT

Two way SSL database authentication

We are looking into using two way SSL authentication for our database connection between our application and database server. We need to get away from using user/password for security reasons. Is JAMWiki setup to support this? Thank you for your help. —The preceding comment was added by (commentscontribs) .

I'm unfamiliar with the process you mention so I can't comment on it specifically. You can configure JAMWiki to work with JNDI, which might be an option for your use case. -- Ryan • (comments) • 25-May-2012 14:15 PDT

Export all topics to XML

How to export the whole wiki to XML from command line? Currently I'm doing thing like this:

java -cp `ls -1 WEB-INF/lib/*.jar | tr '\n' ':'`WEB-INF/classes:/home/vi/clojure-1.4.0.jar clojure.main -e \
'(.exportToFile (org.jamwiki.migrate.MediaWikiXmlExporter.) ( "/home/vi/jamwiki-exported.xml") "en" (.getAllTopicNames (
org.jamwiki.WikiBase/getDataHandler) "en" false) true) (println "Done") (System/exit 0)'

But it looks hacky and requires stopping Jamwiki (because of database lock). How to do it properly? vi

For completeness, here are scripts to delete all topics (prior to importing):
CLASSPATH=`ls -1 WEB-INF/lib/*.jar | tr '\n' ':'`WEB-INF/classes clojure -e '(let [h (org.jamwiki.WikiBase/getDataHandler), vw "en"] (println "Deleting all topics from JamWiki" vw) (doall (map (fn[n] (println "deleting " n) (.deleteTopic h (.lookupTopic h vw n true) nil)) (.getAllTopicNames h vw true))) (System/exit 0))'
(note that topics versions are not deleted from database)
and to import that xml:
CLASSPATH=`ls -1 WEB-INF/lib/*.jar | tr '\n' ':'`WEB-INF/classes clojure -e '(do (doall (map #(println "imported" (.getName %)) (.keySet (.importFromFile (org.jamwiki.migrate.MediaWikiXmlImporter.) ( "/home/vi/jamwiki-exported.xml") "en")))) (System/exit 0))'


There isn't current an "official" way to export the entire contents of a JAMWiki instance in XML format - on a large wiki the performance impact would be huge, so it isn't functionality that has been built yet. If this is a feature that many people would be interested in seeing added to JAMWiki, please add a Jira ticket, and ideally include any description of how other wikis implement this functionality (especially Mediawiki), so there is a model to follow if/when it is developed for JAMWiki. -- Ryan • (comments) • 02-Jun-2012 10:30 PDT

Import Data

I just worked up a solution to use selenium to automatically create wiki pages and templates based on some configuration files we have. The problem is, I am creating pages and making changes very rapidly and I believe the file database changes can't keep up and eventually time out. I was wondering if anyone has encountered this problem before, and if there is a way to write directly to the wiki database so I wouldn't have to make changes through the web interface. Is there any documentation/examples on how I could do this? I'd appreciate any help and feedback! Thanks!

Have a look at org.jamwiki.servlets.EditServlet, which is the interface between the front end and the database. You could also look at org.jamwiki.migrate.TopicImporter, which is used to import content from XML. -- Ryan • (comments) • 13-Jun-2012 08:32 PDT

Wiping Wiki Articles

We have a wiki test instance and I was hoping to delete all the topics that were created and then import the latest file to keep things in sync. What would be the recommended way of deleting all the user created topics? Is there a database script or command I can run? Thanks again for your help!

Hi. I don't understand exactly what you mean by "import the latest file to keep things in sync", but I understand that you want basically to reset the content of your wiki instance to the initial state. If this is what you want there are at least 4 possible strategies:
The statements may vary depending on your DBMS, I did this using PostgreSQL 8.4. In any case make a backup of your database. In PostgreSQL you would use the pg_dump utility:

$ pg_dump <your db name> > backup.sql

1. Restart from scratch
  • Drop your database and recreate an empty one. From a linux shell:

$ dropdb <your db name>
$ createdb -E UTF8 <your db name>

  • Redeploy the wiki application
Explode the jar file to your servlet container, just like you did when you first installed the wiki
  • Restart your servlet containter, e.g. for tomcat 6:

$ sudo service tomcat6 restart

2. Drop db and remove
This way you force jamwiki to run through the setup process again, without redeploying the application. In a typical tomcat installation:

$ dropdb <your db name>
$ createdb -E UTF8 <your db name>
$ sudo rm /var/lib/tomcat6/webapps/<the dir you installed jamwiki>/WEB-APP/classes/
$ sudo service tomcat6 restart

3. Changes in the database
This can be quite complicated and, honestly, I did not make extensive tests. Therefore I am not sure that I may be overseeing some dependencies. In general it is not a good idea to bypass application logic making changes directly in the database. But if you want to give it a try, here is how you may proceed:
There are at least 4 tables that need to be touched:


At setup jamwiki creates 6 topics. So we can base on that and declare that all ids above 6 are new. Additionally you have to deal with the reciprocal dependency between jam_topic and jam_topic_version:

Foreign-key constraints:
    "jam_f_topic_topicv" FOREIGN KEY (current_version_id) REFERENCES jam_topic_version(topic_version_id)::
Foreign-key constraints:
    "jam_f_topicv_topic" FOREIGN KEY (topic_id) REFERENCES jam_topic(topic_id)

Basically you will have to
  • remove temporarily the foreign key constraints in order to be able to delete some records
  • delete the records that were added after the initial installation
  • update the initial topic records to the initial version number
  • restore the foreign key dependencies

DELETE FROM jam_recent_change WHERE topic_version_id > 6;
DELETE FROM jam_topic_links WHERE topic_id > 6;
ALTER TABLE jam_topic_version DROP CONSTRAINT jam_f_topicv_topic;
ALTER TABLE jam_topic DROP CONSTRAINT jam_f_topic_topicv;
DELETE FROM jam_topic_version WHERE topic_version_id > 6;
DELETE FROM jam_topic WHERE topic_id > 6;
UPDATE jam_topic SET current_version_id = topic_id;
ALTER TABLE jam_topic ADD CONSTRAINT jam_f_topic_topicv FOREIGN KEY (current_version_id) REFERENCES jam_topic_version(topic_version_id);
ALTER TABLE jam_topic_version ADD CONSTRAINT jam_f_topicv_topic FOREIGN KEY (topic_id) REFERENCES jam_topic(topic_id);

4. Restore database from initial setup
A much better way, especially if you have to do this often, would probably be to create a pg_dump of your database right after setup, as described above (see backup). This will create a sql file that can be used to reset the database easily from command line. Now let's assume that your database is called jamwiki and that you created your initial dump:

$ pg_dump jamwiki > jamwiki.sql

Now you can do the following:
  • Stop the servlet container if necessary (open session on the db will not allow you to drop the database)
  • Drop and recreate your database
  • Restore the backup file
  • Restart the servlet container

$ sudo service tomcat6 stop
$ dropdb jamwiki
$ createdb -E UTF8 jamwiki
$ psql -d jamwiki -f jamwiki.sql
$ sudo service tomcat6 start

Bye Charles

Configuration Issue

I am trying to get JAMWiki working under Ubuntu 12.04 server with Tomcat6. I deployed it using the management console and navigated to the application. The page to Setup JAMWiki 1.2.0 displays. I have two questions. First, I don't know what would be a reasonable value to use for "File-system directory" in my environment. Second, I'm trying to use an external database which is running on a separate Ubuntu 12.04 server. I set parameters for my database as database type = mysql; JDBC driver class = com.mysql.jdbc.Driver; Database URL = jdbc:mysql://; etc. In this case, I have created a database named jamwiki and it is accessible at on port 3306.

I get two errors when I try to save the configuration. 1. is not a valid directory. This is obvious because I did not specify a value for File-system directory. 2. A connection could not be established with the database; please re-check the settings: Unable to instantiate class with name: com.mysql.jdbc.Driver

That second error seems to be the real show stopper. I googled it and from what I could gather I made the following changes to my system:

sudo apt-get install libmysql-java sudo apt-get install mysql-client Added CLASSPATH=”.:/usr/share/java/mysql.jar:/usr/share/java/mysql-connector-java.jar” to my /etc/environment file rebooted echo $CLASSPATH

I continue to get the error about com.mysql.jdbc.Driver.

It seems like I'm very close to having the system working but I cannot see what's going wrong. Any constructive advice would be appreciated.

-- drgreghall 15-Jun-2012 11:20 PDT

Update: I installed the default-jdk and ran the code sample on and that worked. So java is able to find com.mysql.jdbc.Driver and it was able to establish a connection to my MySQL server.

The driver error means your app server can't find the JDBC driver in its classpath. You can resolve that in several ways, but an easy one is to copy the JAR file containing the JDBC driver into your JAMWiki install's /WEB-INF/lib/ folder.
The file system directory can be anything - you might want to just create a "jamwiki" folder in your home directory, in which case the value would be /home/yourlogin/jamwiki/. -- Ryan • (comments) • 15-Jun-2012 14:59 PDT

Thanks for the information. I picked a suitable directory, ensured that JAMWiki had full permissions to it, and got past that error.

I found that JAMWiki was installed in /var/lib/tomcat6/webapps/jamwiki-1.2/ and I copied mysql-connector-java.jar and mysql.jar into the WEB-INF/lib subdirectory there. That seems to have done the trick! Thank you so much.

-- drgreghall 15-Jun-2012 18:06 PDT

Update to allow for role name flexibility

Hello Ryan, I want to start off with a big 'thanks' (to you and all the other contributors) for JAMWiki. I found it over a year ago when searching for a easy-to-use wiki for my application development team and it has been wonderful so far! Back then, actually, we talked about some questions I had with my LDAP setup. At the time I made some small modifications to allow for the role names to be set in but...I'm ashamed to say that I never followed through on my promise to submit them to the general project. Now, though, I'm ready!

The change itself is small. It adds a few new properties in in jamwiki-core for each of the current roles (and defaults them to the current 'ROLE_*' strings). Then the class is changed to use these new properties. The benefit here is that a user can change to use different strings for the roles instead of having them hardcoded as 'ROLE_ADMIN', 'ROLE_EDIT', etc.

The reason that I made this change for my own use is that I wished to use my company's LDAP setup. The way Spring Security works is to gather the user's group information and match it up against the pre-defined roles it has. If my LDAP group is 'CODEMONKEY' it obviously wouldn't match up with any of the current roles. I do not have the access to add groups like 'ROLE_ADMIN' to my company LDAP. Even if I did I couldn't get away with using such generic names in this shared LDAP environment when this wiki would be specific to my own team.

This change would be transparent to everyone except those that require an extra bit of role flexibility. I've already made the changes in my own copy and I've been testing it with my own team for over a year. I've never used Subversion before but I've spent the last few days reading up on it and I think I'm ready. So what's the best way for me to submit this minor change? Can I submit directly to trunk so you can review it? Or is there a better way? Once you see what I changed you can let me know what you think. Thanks! -- PhilTrimble 17-Jun-2012 21:32 PDT

Hi Phil - have a look at How to Help#Programmers for a quick overview of the code contribution process. If you can let me know your Sourceforge ID I can give you permission to create a branch in Subversion (create it from trunk), and once the changes have been reviewed they can then be merged to trunk. If you're on Windows I highly recommend Tortoise SVN for Subversion development as it makes things very, very easy. Let me know if you have any questions or concerns. -- Ryan • (comments) • 18-Jun-2012 07:46 PDT
Hi Ryan - okay, great. I've read through the page and I'm good to go. My sourceforge ID is the same as my ID here: 'philtrimble' -- PhilTrimble 18-Jun-2012 08:24 PDT
Your Sourceforge account should now have write access to Subversion - let me know if there are any problems. -- Ryan • (comments) • 18-Jun-2012 08:32 PDT

Hi Ryan - I have created a new branch for myself and committed the changes. They are in 'branches/philtrimble'. Sorry for the commit I mentioned I am still learning svn so I got the formatting a little weird. Hopefully that doesn't cause any issues for you.

As a side note, I merged the latest changes you committed to trunk into my local copy but I am unsure if I need to push those updates back to my branch to keep the svn copy in sync. Is it normal for me to then commit them back up to my own branch to keep things in sync or is there a better way to perform the merge from trunk to my branch inside the repo only? Sorry for the basic question but I don't want to muddy up the environment since I plan on contributing more in the future. Thanks! -- PhilTrimble 19-Jun-2012 23:17 PDT

Hi Phil. Yes after the merge in your working directory you must commit the changes to your remote repository. In a way you can look at it as if you had made changes locally yourself. You can check the changes as usual using:
$ svn status
Depending on the time of the last merge you may see some files preceded by the letter M for modified, A for added, D for deleted, etc. Enjoy Charles
Hi Charles, thanks so much! Looks like I did everything right up until the actual commit of the updates from trunk back up to my remote branch directory. I'll give that a shot tonight just to keep things up to date.
I have other questions about merging changes from by branch to trunk but I'll leave those for another time as I continue to get comfortable with svn and with the JAMWiki codebase. Thanks again! -- PhilTrimble 20-Jun-2012 07:20 PDT
Thanks for the contributions Phil. In general you don't need to worry too much about Subversion when working on a local branch - I'm generally able to resolve any issues during the merge to trunk. The biggest thing to worry about is not making changes in a branch that are NOT eventually meant for merging, since in that case I would have to cherry pick commits. I'll review your changes tonight (hopefully - I should have time) and try to get them merged. Thanks again for helping out! -- Ryan • (comments) • 20-Jun-2012 07:45 PDT
Thanks Ryan. Just one more quick note for when you review the changes, I made two unrelated commits. One is the change I originally mentioned, the other is a change to the example LDAP configuration in applicationContext-security.xml. When I attempted to use the existing example I received Spring Security errors, which this change solved. It won't impact users unless they uncomment it and set up their specific options. -- PhilTrimble 20-Jun-2012 18:13 PDT
The changes all looked good and I've merged them to trunk. I also merged the LDAP documentation change for JAMWiki 1.2.1, which should be ready for release as soon as I get around to pushing it out. I've also added you and Charles to the CREDITS, but please let me know if you'd prefer your credit to be something other than "Phil Trimble (PhilTrimble)" -- Ryan • (comments) • 20-Jun-2012 18:43 PDT

User information not updated after login

Hello. I noticed that after a login the last_login_field in the database is not updated. I had a look at that and fixed the bug. The code is committed in branches/cclavadetscher. If it is ok I can merge it to trunk. Bye Charles 27-Jun-2012 07:23 PDT

Thanks! Please go ahead and merge this, although instead of throwing a ServletException it might make sense to just log an error, since failure to update last login isn't a fatal error. -- Ryan • (comments) • 27-Jun-2012 07:57 PDT
Yes, that's true. I already made the change and I will merge to trunk soon. Charles 27-Jun-2012 08:37 PDT
It's done. Bye Charles 27-Jun-2012 09:30 PDT
While testing this tonight I noticed that last login date was being updated on each page view, rather than only after successful login, so I've slightly modified your commit in revision 4096. Let me know if you have any concerns with the modified approach, and thanks for catching this issue. -- Ryan • (comments) • 27-Jun-2012 21:52 PDT
Hello. Of course no concern. That is the correct behaviour. Thank you for checking thoroughly! I updated my version, too, to keep in sync. Eclipse notifies me that the method AbstractAuthenticationProcessingFilter.successfulAuthentication() with 3 parameters is deprecated. My knowledge of the spring security framework is still bad and I guess that I will have to get a bit deeper into the matter to find out if the additional Parameter FilterChain can simply be set to null, or do know that right away? BTW: Do you know how it is possible to find out if and who is logged in the wiki at a given time? Bye Charles 28-Jun-2012 04:55 PDT
Thanks - I was using old Javadoc for reference (oops!), so successfulAuthentication() has now been updated to the four argument version in revision 4097. -- Ryan • (comments) • 28-Jun-2012 20:03 PDT

Cannot configure Custom Tag

I updated my installation to v.1.2, added my jar file to WEB-INF/lib folder and edited the XML file to add definition of my tag. After I restarted the server it logged no errors. However my tag in the text simply get escaped and shows up in the page just like I put it in the Wiki text. Any ideas? -- cab • (comments) • 28-Jun-2012 23:46 EST

To check if Custom tag works at all I included <source> tag as recommended. With provided sample (and even a bit more complex) the tag works, but when I included simple for-loop in the program the whole highlighting breaks down and tag is shows up in the rendered page. The reason was the "<" sign which have to be encoded as in HTML. However I couldn't see errors.

I guess my code misbehaves somehow, but I don't see the way to debug the problem. -- cab • (comments) • 29-Jun-2012 0:49 EST

If the custom tag configuration is correct and your log level is set to "INFO" then you will see log entries like the following in your logs at startup:
2012-06-19 13:11:53,905 INFO org.jamwiki.parser.jflex.AbstractJAMWikiCustomTagLexer - Initializing custom parser tag: org.jamwiki.parser.jflex.GalleryTag
2012-06-19 13:11:53,910 INFO org.jamwiki.parser.jflex.AbstractJAMWikiCustomTagLexer - Initializing custom parser tag: org.jamwiki.parser.jflex.addon.TwitterTag
If you don't see something like the above in the logs there is a configuration issue. If the tag is initializing properly but simple doesn't work in a wiki page then you can upload the code for your tag and I'll take a look. -- Ryan • (comments) • 29-Jun-2012 00:07 PDT

It turned out I did configuration in the wrong place. After I checked the correct location of the File System in Admin page and configured Custom Tag there it is now works. (For Troubleshooting doc) -- cab • (comments) • 11-Apr-2013 14:24 EST

Include brackets in the external link label

I wish the text for the external link to include the square brackets, but the first time the right bracket appears the JAMWiki interprets it as the end of the link's label. I tried to use URL or UTF-8 encoding, but then that encoding text is appear. How I can do that? -- cab • (comments) • 29-Jun-2013 00:33 EDT

Can you give me an example of the syntax you're trying to use? Does the same syntax work with Wikimedia? -- Ryan • (comments) • 12:08, 29 June 2013 (PDT)
You can check the page the page. I would like to have text in bold as a link. However the text in bold contains square brackets in it and this confuses the parser. For example link label with [ in it] ends at the first ] sign and I don't know how to make it include the rest of the label up to the second ] just before word "ends". BTW Wikimedia does the same thing. -- cab • (comments) • 29-Jun-2013 23:53 EDT
I'll need to see what workaround Mediawiki uses for that scenario and then check to see if JAMWiki will do the same. The two options that I tried - using <nowiki>]</nowiki> and a template that outputs the bracket (Template:rbracket) did not work. -- Ryan • (comments) • 07:38, 03 July 2013 (PDT)
They support <nowiki>]</nowiki> as workaround, which doesn't work in JAMWiki. -- cab • (comments) • 07-Jul-2013 10:55 EDT
Thanks, that's clearly a JAMWiki bug then. I'll try to get it fixed in the next bugfix release. -- Ryan • (comments) • 23:15, 07 July 2013 (PDT)
I looked at this tonight, and unfortunately it's not an easy fix. I'll still try to get it resolved quickly, but it will take at least a few days to figure out a solution. -- Ryan • (comments) • 22:44, 08 July 2013 (PDT)

Cannot include custom tag inside the paragraph of text

My custom tag AsciiShape converts the text into SVG drawing, but whenever I try to include it in the text JAMWiki closes the previous paragraph just before my tag. This make impossible to use my tag to draw small pictogram to insert directly into the text. -- cab • (comments) • 29-Jun-2013 00:39 EDT

User preferences

Hello. I started having a look at some additional contribution and I saw that there seem to be a need to improve the user preferences page (Special:Account). This is what I have seen so far on different pages (roadmap, features request, this page):

  • Define custom date/time format
  • Define user time zone
  • Toggle show/hide TOC
  • Signature preview

Since it only make sense to have these preferences, if the application uses them somewhere I would tackle them one after the other (OK, the first two together, because they are very similar).

I have some questions on this:

  • Is anybody already working on these improvements? How can I find out?
  • I guess that if I start I will put a note in the roadmap that the task is in progress.
  • User preferences are stored in jam_wiki_user as a record per user and not, similar to properties as a set of key/value pairs with a reference fiele to wiki_user_id. That means that each addition of a new field requires an alter table on jam_wiki_user. Is this the way that it should go, or would it be better to redesign the way user preferences are stored in the database? -- On a second thought I think that a redesign would be quite difficult to implement, especially in terms of upgrading to the new version of JAMWiki. It would mean to read all existing user records and generate entries in a mapping table... not impossible, but probably not worth the trouble.
  • If we go for the single record per user (current approach), could you point me to the place where the DDL statements for the upgrade must be integrated?
  • About the signature preview: The signature is visible in the preview anyway. What is the advantage of having a dedicated preview on the Account page?
  • Are ther other features that are requested and I have overseen? I had a look on MediaWiki and there are tons of preferences that users can set. I think that I will start with those that have been mentioned on As for the other ones I guess that we will need to prioritize.

Thank you for your feedback -- Charles 04.07.2012 16:16 CEST

It would be great to have more user preferences available in JAMWiki, but as you've noted, one reason why this hasn't been done is that there isn't currently a good design for storing those preferences, aside from adding new columns to the jam_wiki_user table. Responding to your specific questions:
  1. I'm not aware of anyone working on user preferences currently - it was something I've been meaning to do, but haven't gotten around to it.
  2. A note on the Roadmap would be good, and for non-trivial changes I often try to put together a brief design overview such as Tech:Upgrade Simplifications so that there is a place to comment and collaborate.
  3. If only one or two new preferences are being implemented then adding new columns is probably the way to go, but longer term it would be nice if there was a cleaner, more flexible approach - ideally such an approach would be modeled after design patterns used in other software, although I haven't researched how other software handles generic preferences.
  4. See org.jamwiki.db.DatabaseUpgrades and org.jamwiki.web.UpgradeServlet for the code that executes during upgrades. The UPGRADE.txt document has additional info.
  5. The "signature preview" is simply the "Existing signature" field that displays a user's current signature on the user preferences page in Mediawiki. It's simply a way to show the user how their signature will look, so if they change it on the preferences page they'll know what it looks like before they start using it.
  6. Tech:JAMWiki 1.3 is the closest thing available to a prioritized feature list, although additions and subtractions are made to that list throughout the development cycle. You can also browse "Open Issues" in JIRA (, which includes a handful of feature requests in addition to open bug reports. If there's a feature that you'd particularly like to see added that isn't on any request lists, please feel free to suggest it as well - my only request would be to try to model new features after Mediawiki's implementation (note: don't look at their source code though - JAMWiki and Mediawiki use different software licenses) since Mediawiki is a tested platform that has already received significant user feedback on any new features.
Let me know if that's helpful. I haven't been doing as much JAMWiki development as I should be lately - busy with other projects - but I'm hoping to start getting more involved again soon. -- Ryan • (comments) • 04-Jul-2012 08:27 PDT
Yes, that's helpful. I had a look around and, following your advice, I moved the discussion to Tech:User_Preferences. -- Charles 05.07.2012 16:36 CEST

JAMWiki License restrictions

I'm curious about licensing restrictions on JAMWiki. As an LGPL'd library, I'm assuming your intent is to allow JAMWiki to be used in proprietary software, but not to allow derivative works (any code modifications) of JAMWiki for use in proprietary software. I just found about JAMWiki and am impressed with its feature set. We were considering building it in as a module into our proprietary (closed-source) software platform. I don't want to do anything in violation of the license, so I'm just checking on what you will allow. For example, can we include the source code in our platform so that it is included as part of the build process as long as we don't make any modifications? In all likelihood, we would use the java source unchanged and create our own web-based interfaces (with JSP) so that they fit into our platform's UI layout.

I'd also like to just confirm (per my interpretation of the LGPL) that you will not allow modifications to JAMWiki for proprietary use. I'm assuming this is the case, but I wanted to ask to be sure.

Any insight you can offer would be appreciated.

Thanks :)

Brian covers most of the reasons for using LGPL with Java code - basically, you are free to include the JAR or WAR in any application that you'd like without any further restrictions, but any source code modifications must be freely licensed and made available. That includes any modification made for use in a commercial project - you are free to modify JAMWiki and sell it, but those modifications must also be made freely available. Hopefully that answers your questions. -- Ryan • (comments) • 12-Jul-2012 13:54 PDT

How to use the JAMWiki parser standalone?

AFAIK this feature is implemented. However I am not able to run the parser standalone. This is what I tried:

    public void testJAMWiki() throws IOException {
        String wikiText = IOUtils.toString(TEST_WIKIMEDIA.openStream());
        String htmlFragment = ParserUtil.parse(parserInput("test"), null, wikiText);
        writeFragmentToFile("./test-jamwiki.html", htmlFragment);
     * Generate a generic ParserInput object that can be used for testing.
     * (copied from JAMWiki test sources).
    private ParserInput parserInput(String topicName) {
        // set dummy values for parser input
        ParserInput parserInput = new ParserInput("en", topicName);
        parserInput.setLocale(new Locale("en_US"));
        return parserInput;

Which gives:

	at org.jamwiki.parser.ParserUtil.parse(

-- —The preceding comment was added by (commentscontribs) .

The parser still needs some of the support files to run successfully in standalone mode, including a file. Have a look at the jamwiki-core test package, which includes a dummy data handler and a sample file that are used to run the parser in standalone mode for unit tests. I've been debating making it easier to use the parser without a webapp, but that work won't happen before JAMWiki 1.3 at the soonest. Hopefully that helps! -- Ryan • (comments) • 14-Jul-2012 15:34 PDT

Upload Error: No file found in upload

Hello all! I am currently running running JAMwiki on glassfish 3.1.2 and have been having difficulty uploading images. I am using the default upload settings, but every time I try to upload something I get the same error:

"A system error has occurred. The error message is: No file found in upload."

Googling around I was only able to find this similar problem but I don't believe it was resolved ( Am I stuck dead in the water? Any type of workaround? Thanks in advance and I apologize if this is redundant. I've just been messing around with this for the greater part of my day and I'm very frustrated. —The preceding comment was added by (commentscontribs) .

When I investigated the JIRA issue you mentioned the problem seemed to be a bug in Glassfish - see the links from [6], which have potential workarounds, and please let me know if that resolves the problem for you. -- Ryan • (comments) • 16-Jul-2012 11:37 PDT

Thank you so much! Looks like I was on the right track and just unfamiliar with what I was looking at. This fixed everything and I really appreciate you responding in such a timely manner. Thanks again!

Comments configure

Is it possible to configure the display of comments under the article with information on the printed report user? Like:

   It is first Comment


   I will like it too


—The preceding comment was added by (commentscontribs) .

I'm not sure I understand the question, but you might want to take a look at Wiki Syntax to see if that addresses the issue. -- Ryan • (comments) • 03-Aug-2012 07:53 PDT

Lucene / Index

Mit dem Dateiupload können ja auch Office-Dokumente, PDF-A etc. hochgeladen werden. Aber wie bekomme ich Lucene dazu auch diese zu indizieren?

What is to do, do indexing uploaded files like PDF or office document?

—The preceding comment was added by (commentscontribs) .

Currently JAMWiki's Lucene implementation will only index topics, although providing an option to index files might be useful. If you could file a feature request at then that functionality could be considered for a future release. -- Ryan • (comments) • 03-Aug-2012 07:53 PDT

Waffle authentication integration

Hi, I'm trying to integrate a SingleSignOn function with Waffle 1.4 into JAMWikis Spring Security Framework. When I was trying to add just the needed code rows for Waffle Authentication into WEB-INF\applicationContext-security.xml, I had the problem that no windows user was found to be authenticated. I used this tutorial, to be exact the same tutorial in version 1.4 (this is 1.3), which was only available in the downloaded package in v1.4. The only change was that you have to add guava-r07.jar to WEB-INF\lib and the rows for the "waffleSecurityFilterProviderCollection"

<bean id="waffleSecurityFilterProviderCollection" class="waffle.servlet.spi.SecurityFilterProviderCollection">
            <ref bean="negotiateSecurityFilterProvider" />               
            <ref bean="basicSecurityFilterProvider" />               

Also I added some rows to the JAMWiki sidebar (located in wiki.jsp), where I write out request.getRemoteUser(), session.geId() and the fqn name with request.getUserPrincipal().getName(). There were several problems with instantiate the beans (after restart tomcat, another bean throw an exeption) and, as I said before, there was no available user (getRemoteUser() returns NULL).

To check, whether it would work in general I tested it like describe in the turorial with a seperate waffle-filter.xml. Then I get a javax.servlet.jsp.JspException: java.lang.NullPointerException. As I added the output code for remote user and his fqn to the error.jsp, I can see that in general the SingleSignOn worked, because it returns my domain user and with a simple check I tested whether I have ROLE_USER privilege.

Now I'm not sure, where the problem is. As there are exeptions with instantiate the beans, I would suggest there is one (or more) bean i the waffle tutorial which interfer with some bean in the JAMWiki configuration.

Can anyone help me find that issue? my first target is to give a waffle authenticated user access to the edit pages of articles via the ROLE_USER which should begranted via the standard config of waffle 1.4.

I'm not a Spring Security expert, but if I'm understanding you're trying to implement an alternative authentication provider. If that's the case you'll need to ensure that your authentication provider replaces the default provider, otherwise the code will always try to authenticate using the JAMWiki provider. If you change the log level to debug then spring will spit out a lot of information about the filters and providers being loaded, which may help resolve your issue. Hope that helps! -- Ryan • (comments) • 27-Aug-2012 15:18 PDT
Hi, thanks for your fast reply. How do I enable the spring debug log? I googled it, but as mentioned in the spring documentation there has to be a log4j.jar and in META-INF there has to be a context.xml. In the JAMWiki folders there is neither that jar nor the context.xml. is there another way. Thought that it should be part of spring sec framework in general.
But I manage to erase the exceptions. I commented some more lines (e.g. rememberMe-function in the ...-security.xml) and now the server starts without any exception or warning. But still request.getRemoteUser() returns NULL. [Updated the above with the lastest comments] -- Manuel

Maybe it is better to ask here for a solution when I am just using the Waffle code: As I said, the authentification works. When I reactivate applicationContext-security.xml after calling the page only with the waffle-filter.xml, I still have the nullpointer exception and I'm authenticated as my domain user. Maybe someone can explain, why there is a nullpointer.

2012-08-30 14:13:51,831 [http-bio-8080-exec-3] ERROR org.jamwiki.jsp - Error in JSP page
javax.servlet.jsp.JspException: java.lang.NullPointerException
	at org.apache.jsp.tag.webwikiMessage_tag.doTag( ~[na:na]
	at org.apache.jsp.WEB_002dINF.jsp.wiki_jsp._jspx_meth_jamwiki_005ft_005fwikiMessage_005f2( ~[na:na]
	at org.apache.jsp.WEB_002dINF.jsp.wiki_jsp._jspx_meth_jamwiki_005flink_005f10( ~[na:na]
	at org.apache.jsp.WEB_002dINF.jsp.wiki_jsp._jspx_meth_c_005fforEach_005f2( ~[na:na]
	at org.apache.jsp.WEB_002dINF.jsp.wiki_jsp._jspService( ~[na:na]
	at org.apache.jasper.runtime.HttpJspBase.service( [jasper.jar:7.0.29]
	at javax.servlet.http.HttpServlet.service( [servlet-api.jar:na]
	at org.apache.jasper.servlet.JspServletWrapper.service( [jasper.jar:7.0.29]
	at org.apache.jasper.servlet.JspServlet.serviceJspFile( [jasper.jar:7.0.29]
	at org.apache.jasper.servlet.JspServlet.service( [jasper.jar:7.0.29]
	at javax.servlet.http.HttpServlet.service( [servlet-api.jar:na]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( [catalina.jar:7.0.29]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter( [catalina.jar:7.0.29]
	at org.apache.catalina.core.ApplicationDispatcher.invoke( [catalina.jar:7.0.29]
	at org.apache.catalina.core.ApplicationDispatcher.processRequest( [catalina.jar:7.0.29]
	at org.apache.catalina.core.ApplicationDispatcher.doForward( [catalina.jar:7.0.29]
	at org.apache.catalina.core.ApplicationDispatcher.forward( [catalina.jar:7.0.29]
	at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel( [spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.web.servlet.view.AbstractView.render( [spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.render( [spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch( [spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doService( [spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.processRequest( [spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.doGet( [spring-webmvc-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at javax.servlet.http.HttpServlet.service( [servlet-api.jar:na]
	at javax.servlet.http.HttpServlet.service( [servlet-api.jar:na]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( [catalina.jar:7.0.29]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter( [catalina.jar:7.0.29]
	at$VirtualFilterChain.doFilter( [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at$VirtualFilterChain.doFilter( [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at$VirtualFilterChain.doFilter( [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at ccwiki.filter.CCpostauthfilter.doFilter( [CCpostauthfilter.class:na]
	at$VirtualFilterChain.doFilter( [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at$VirtualFilterChain.doFilter( [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at$VirtualFilterChain.doFilter( [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at$VirtualFilterChain.doFilter( [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at$VirtualFilterChain.doFilter( [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at waffle.spring.NegotiateSecurityFilter.doFilter(Unknown Source) [waffle-jna.jar:na]
	at$VirtualFilterChain.doFilter( [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at$VirtualFilterChain.doFilter( [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at$VirtualFilterChain.doFilter( [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at$VirtualFilterChain.doFilter( [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at [spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate( [spring-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter( [spring-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( [catalina.jar:7.0.29]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter( [catalina.jar:7.0.29]
	at org.jamwiki.servlets.JAMWikiFilter.doFilter( [jamwiki-web-1.2.jar:na]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( [catalina.jar:7.0.29]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter( [catalina.jar:7.0.29]
	at org.apache.catalina.core.StandardWrapperValve.invoke( [catalina.jar:7.0.29]
	at org.apache.catalina.core.StandardContextValve.invoke( [catalina.jar:7.0.29]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke( [catalina.jar:7.0.29]
	at org.apache.catalina.core.StandardHostValve.invoke( [catalina.jar:7.0.29]
	at org.apache.catalina.valves.ErrorReportValve.invoke( [catalina.jar:7.0.29]
	at org.apache.catalina.valves.AccessLogValve.invoke( [catalina.jar:7.0.29]
	at org.apache.catalina.core.StandardEngineValve.invoke( [catalina.jar:7.0.29]
	at org.apache.catalina.connector.CoyoteAdapter.service( [catalina.jar:7.0.29]
	at org.apache.coyote.http11.AbstractHttp11Processor.process( [tomcat-coyote.jar:7.0.29]
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process( [tomcat-coyote.jar:7.0.29]
	at$ [tomcat-coyote.jar:7.0.29]
	at java.util.concurrent.ThreadPoolExecutor.runWorker( [na:1.7.0]
	at java.util.concurrent.ThreadPoolExecutor$ [na:1.7.0]
	at [na:1.7.0]
Caused by: java.lang.NullPointerException: null
	at org.apache.jasper.runtime.BodyContentImpl.write( ~[jasper.jar:7.0.29]
	at org.apache.jsp.tag.webwikiMessage_tag._jspx_meth_c_005fotherwise_005f0( ~[na:na]
	at org.apache.jsp.tag.webwikiMessage_tag._jspx_meth_c_005fchoose_005f0( ~[na:na]
	at org.apache.jsp.tag.webwikiMessage_tag._jspx_meth_c_005fif_005f0( ~[na:na]
	at org.apache.jsp.tag.webwikiMessage_tag._jspx_meth_fmt_005fparam_005f0( ~[na:na]
	at org.apache.jsp.tag.webwikiMessage_tag._jspx_meth_fmt_005fmessage_005f0( ~[na:na]
	at org.apache.jsp.tag.webwikiMessage_tag.doTag( ~[na:na]
	... 73 common frames omitted

-- Manuel

Sorry, I'm out of town and have had limited internet access. See Installation#Troubleshooting for some guidance on how to change your log level to DEBUG, which may help in tracking down any Spring Security issues. If that doesn't help then I'll try to take a look through the stack trace you provided when I have more time available. -- Ryan • (comments) • 31-Aug-2012 00:21 PDT
Thanks for your reply. I tried to activate DEBUG-log in logback.xml. I did not manage to write logs to the default folder, so I tried to use the example ( ${catalina.base}/logs ), but this also did not work. (The code below is just for stout. Self-evidently, I costumized the file for output via "jamwiki-dailyfile")
Maybe the reason is, that I am running JAMWiki from Eclipse.
On eclipse console window should be all information available, I think.
But there is no more output than it has been with the default setting (level="WARN").
Thank you for your patience! -- Manuel• (comments) • 3-Sept-2012 15:01 CET
<logger name="org.jamwiki" level="DEBUG" />
<logger name="net.sf.ehcache.pool.sizeof" level="ERROR" />
<root level="DEBUG">
	<appender-ref ref="jamwiki-stdout" />
EDIT: I copied the whole project into tomcats webapp folder and ran it from there. Now I have enabled JAMWiki logging with debug level. I will try to find out, which authentication provider is used. I will update this thread asap. Thanks again for you help! -- Manuel• (comments) • 3-Sept-2012 16:43 CET

Hello again, I still have the exception mentioned above. At first it seamed to be just a problem with activating and integrating waffle authentication. JAMWiki is not able to handle the WindowsPrincipal provided by waffle authentication. Therefore I tried to extend JAMWikiPostAuthenticationFilter, but the mostly private methods/variables made this impossible. So I just copied everything into my own filter class and added the needed code. This brought me to the fact that I missed to switch the filter enty point to entry-pointref="negotiateSecurityFilterEntryPoint". This works perfectly fine. Now I get these information which ensures me that there is a valid authentication and my customized PostAuthenticationFilter calls handleRegisteredUser():

INFO  w.spring.NegotiateSecurityFilter - successfully logged in user: MyDomain\Manu 
DEBUG o.s.s.w.a.AnonymousAuthenticationFilter - SecurityContextHolder not populated with anonymous token, as it already contained: 'waffle.spring.WindowsAuthenticationToken@f2c9d4'
DEBUG o.s.s.w.c.HttpSessionSecurityContextRepository - SecurityContext stored to HttpSession: ' Authentication: waffle.spring.WindowsAuthenticationToken@f2c9d4'
INFO  ccwiki.filter.CCpostauthfilter -  ! Authenticated User found -> calling handleRegisteredUser()
INFO  ccwiki.filter.CCpostauthfilter - Splitted Username: Manu
DEBUG o.s.s.w.a.i.FilterSecurityInterceptor - Authorization successful

Nevertheless I still do not know why I get a NullPointerException. The stack trace do not show me, where the real problem is (yes, it tells me where, but the message do not tell me what exactly it is; 2ERROR org.jamwiki.jsp - Error in JSP page" is too general for me). I my opinion, after successfull authentication handleRegisteredUser should call writeWkiUser(...) to create a new WIkiUser. As I do not get an error message, it should be working. Where could be the NullpointerExecption, when a valid WikiUser is available?

Please help me find the underlying issue. -- Manuel• (comments) • 04-Oct-2012 16:54 CET

Unfortunately, without spending time reproducing the problem I'm not sure there is much I can do to help. If you can narrow the problem down further and point out a specific area in the JAMWiki code that is not behaving as expected then I might be able to help, but as described there are a significant number of places where the interaction between Spring Security and JAMWiki could be breaking. -- Ryan • (comments) • 08-Oct-2012 09:00 PDT
Again, thanks for your patience. I figured out the code line, which is generating (at least I think that) the problem:


 out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(
   "${message.params[0]}", java.lang.String.class, (javax.servlet.jsp.PageContext)this.getJspContext(), null, false)); 
JAMwiki tries to write the jsp but when it does, there is an exception when writing out some fmt:message. But which ;). I am starting to think that it could be a Problem with paramsLength of the message. After mapping the lines from the generated .java to the lines in wikiMessage.tag I am pretty sure that it has to be in the first <fmt:param>-tag


<fmt:message key="${message.key}">
		<c:if test="${message.paramsLength >= 1}">
				<c:when test="${message.params[0].wikiLink}">
                                <jamwiki:link value="${message.params[0].param}" 
                                  text="${message.params[0].paramText}" /></c:when>
I do not understand, what exactly this tag does, so I am not sure, in which relation this could be to my waffle authentication. The only thing I can imagine is a problem to generate the users menu part. But I not sure. Thanks again! -- Manuel• (comments) • 17-Oct-2012 17:58 CET
PS: As there are some hints to wiki.jsp I have to mention, that currently I am using the original wiki.jsp without the added code for showing the principal, session and displayed name
Sorry for not responding sooner - I'll try to take a look at this over the weekend when I've got a bit of free time. -- Ryan • (comments) • 18-Oct-2012 19:25 PDT
That Would be great! Thanks for your help. -- Manuel• (comments) • 19-Oct-2012 10:09 CET
That class is used to render a message from a org.jamwiki.WikiMessage object. You could try modifying wikiMessage.tag to surround it with something like:
<c:if test="${wikiMessage.class.canonicalName == 'WikiMessage'}>...</c:if>
The above is completely untested, but it should sort of give you the idea. There is a bigger issue as to why the error message object is incorrect - that doesn't happen in an out-of-the-box JAMWiki release, so you may want to verify that your changes aren't causing an unexpected error to be thrown. -- Ryan • (comments) • 21-Oct-2012 18:54 PDT
I have not been able to use your code but I tested disabling include user-menu.jsp in wiki.jsp. Now there is no exception anymore, but this didn´t solve the problem itself. Now I can browse through the wiki. As describe before, waffle grants the ROLE_USER privileges. I added ROLE_USER to access authorization for "/**/Secial:Edit" and "/**"
<intercept-url pattern="/**/Special:Edit" access="ROLE_EDIT_EXISTING,ROLE_EDIT_NEW,ROLE_USER" />
<intercept-url pattern="/**" access="ROLE_VIEW,ROLE_USER" />
When I am trying to access an article which has not been created yet, I get the login dialog to authenticate a user.
"To edit you have to login as user" (german translation, original message can be different)
The problem is, that disabling the access to "/**" by deleting ROLE_USER prevents me from accessing any page. So the ROLE_USER is realy granted and the request for it is working (another proof: request.isUserInRole("ROLE_USER") returns TRUE).
Also the log file shows me all necessary information to make sure I was granting access to the page.
DEBUG o.s.s.w.a.i.FilterSecurityInterceptor - Secure object: FilterInvocation: URL: /en/Special:Edit?topic=Testseite; Attributes: [ROLE_EDIT_EXISTING, ROLE_EDIT_NEW, ROLE_USER]
DEBUG o.s.s.w.a.i.FilterSecurityInterceptor - Previously Authenticated: waffle.spring.WindowsAuthenticationToken@1108529
DEBUG - Voter:, returned: 1
DEBUG o.s.s.w.a.i.FilterSecurityInterceptor - Authorization successful
DEBUG o.s.s.w.a.i.FilterSecurityInterceptor - RunAsManager did not change Authentication object
DEBUG - /en/Special:Edit?topic=Testseite reached end of additional filter chain; proceeding with original chain
DEBUG o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'jamwiki' processing GET request for [/sccwiki/en/Special:Edit]
DEBUG o.s.w.s.h.SimpleUrlHandlerMapping - Matching patterns for request [/en/Special:Edit] are [/**/Special:Edit]
DEBUG o.s.w.s.h.SimpleUrlHandlerMapping - URI Template variables for request [/en/Special:Edit] are {}
DEBUG o.s.w.s.h.SimpleUrlHandlerMapping - Mapping [/en/Special:Edit] to DEBUG o.s.web.servlet.DispatcherServlet - Last-Modified value for [/sccwiki/en/Special:Edit] is: -1
DEBUG o.s.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource
DEBUG o.s.j.d.LazyConnectionDataSourceProxy - Connecting to database for operation 'prepareStatement'
DEBUG o.s.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
DEBUG o.s.j.d.LazyConnectionDataSourceProxy - Using existing database connection for operation 'close'
INFO org.jamwiki.servlets.JAMWikiServlet - Loaded page /sccwiki/en/Special:Edit?topic=Testseite (0.0 s.)
DEBUG o.s.web.servlet.DispatcherServlet - Rendering view [org.springframework.web.servlet.view.JstlView: name 'wiki'; URL [/WEB-INF/jsp/wiki.jsp]] in DispatcherServlet with name 'jamwiki'
How is it possible to get the 1 for ACCESS_GRANTED from the AccesDecisionVoter and a login necessary message, too? The only reason plausible to me is that my UserObject has the role but the user authentication does not work properly. But.... On RecentChanges there is an entry for "(New User Log) **:** ... Manu ... New user created" and after adding a DEBUG line for condition "(***.lookupWikiUser(username) == null)" which shows me, whether it is null or not, I am sure that there is also a WikiUser with my name available. I do not know, how this can be possible. There is no exception or anything indicating a problem with accessing the edit pages. Maybe another important hint: When I am trying to access Special:Upload there is an exception (ROLE_USER is not a valid access role):
DEBUG o.s.s.w.a.ExceptionTranslationFilter - Access is denied (user is not anonymous); delegating to AccessDeniedHandler Access is denied at ~[spring-security-core-3.1.0.RELEASE.jar:3.1.0.RELEASE]
Thanks a lot for any help! -- Manuel• (comments) • 01-Nov-2012 13:27 CET
I think the problem is that my authentication always uses "domain\username" as user principal. When I am creating a user entry for only username there is no connection between created user and the principal which authenticated already. That would explain, why I get ACCESS_GRANTED but JAMWiki still opens the login dialog. And the reason for the problems with displaying the user-menu part would be the same: It can not display a username with ***\***. So there are two options to solve the problem:
1. Authenticate user without domain
As there are several waffle users with this intention I have found some discussions about that topic. I would agree with them that authentication of a user in a company environment needs a unique user authentication which is only possible by using domain + username. Another aspect which votes against this option is, that the groups and roles can only be searched via the FQN including the domain name.
2. Edit JAMWiki to accept usernames with *\* in it
Regarding the importance of protecting the wiki against injections the contraint against "\" in usernames is reasonalbe. In my opinion it could check, whether the username mathes with the pattern "domain\username", but I have not found the location where username input is filtered against "\" or "@".
Can anyone imagine another option? the second option has some negativ aspects as well. -- Manuel• (comments) • 02-Nov-2012 14:46 CET
With regards to #2, see Configuration#"Hidden" Properties for the ability to modify allowable user logins. -- Ryan • (comments) • 04-Nov-2012 19:05 PST
Hi there, thanks for your fast reply. I configured the pattern-login-valid value like this
Now I am able to write a FQN of a domain user to the database. But that did not solve the problem with the necessary login to edit/create a topic. When I look at RecentChanges there is the domain users FQN logged as new user.
Noticeable: When I am using my admin account to look at the users roles via Special:Roles both the FQN user and the user without domain name do not have any role marked. But as I mentioned before there has to be a working check of ROLE_USER to visit any page as I get ACCESS_DENIED when ROLE_USER is deleted from <intercept-url pattern="/**" access="******" />. I also tried to mark ROLE_USER (created before as new role). That did not solve it, too. Am I right, that writeWikiUser should always adds a new wiki user to GROUP_REGISTERED_USER which automatically grants all the "normal user" rights? So, when something does not work with the waffle stuff to grant ROLE_USER the other roles should be granted anyway!?!
I am falling into dispair....
Is it possible to look into the database? I read something that HSQL is only in-memory so there is no sql file or something. But there has to be a persitent file with all user information I think. I thought about switching to a "real" database to directly access all data stored to a table. -- Manuel• (comments) • 08-Nov-2012 13:07 CET
After some search I found an article about some issues with the LDAP Authentication. There was explained, that on every page call, a method isEditable() checks whether the user has ROLE_EDIT_EXISTING and ROLE_EDIT_NEW. This is a hardcoded role defintion. I will try to edit this method to check the roles defined in applicationSecurity-Context.xml -- Manuel• (comments) • 11-Nov-2012 11:31 CET
Hi, I edited a page. But as author there is just my IP address. What does that mean for my configuration? Where does the user link gets his information? That should be main question for me to understand why this will not work. Thank you again for your help! -- Manuel• (comments) • 3-Jan-2013 15:48 CET
Hi. I am not sure we are talking about the same thing. Basically the IP address is used instead of the user name, if the editing user is anonymous, i.e. he is not logged on the wiki. Hope this helps -- Charles 00:37, 04 January 2013 (PST)
Sure, but why ;). I have a vaild principal, with a valid role which enables me to access pages. The user was created and in database, the user is in GROUP_REGISTERED_USER. But... I noticed that only the roleVoter is called when deciding, whether the user has access. Where does the JAMWIKIAuthenticationProcessingFilter gives the user the attribute IS_AUTHENTICATED_FULLY or how does the voter decides that. ADDITION: Maybe I was a bit to fast... I do not know why, but now there is no IP address: User:0:0:0:0:0:0:0:1 is shown which is equals to request.getLocalName() or request.getRemoteAddr(). But the first user who was editing my testartikel was ! Maybe, when I was trying to debug, I disabled some parts so I was able to access the editing page with the anonymous token. This cryptic username could be the reason, why the usermenu can not be loaded. When I am right, this would be a hint, that there is a valid user, but just a display problem... Again it would be helpfull to understand, what the usermenu is loading from the user principal? -- Manuel• (comments) • 4-Jan-2013 12:58 CET
I'm not sure what specific problem you're hitting, but you might want to look at JAMWikiPostAuthenticationFilter which is used with LDAP to ensure that a user authenticated by LDAP also has a JAMWiki user record. If there is no JAMWiki user in the database then there is no way to display username, tie an edit to a user, etc. -- Ryan • (comments) • 08:47, 05 January 2013 (PST)
Hi Rayn, thanks for your reply. I have edited the postAuthenticationFilter to handle WindowsPrincipal as waffle do not provide a principal like 'UserDetails' or 'WikiUserDetails'.
else if (principal instanceof WindowsPrincipal) {
			username  = ((WindowsPrincipal)principal).getName();
			logger.debug("WindowsPrincipal: " + username);  //returns 'MyDomain\Man' in logs
I also added these lines to the waffle package where the filter is generating the principal:
if (username != null) {
try {
    String[] splittedName = username.split("\\\\");
    if (WikiBase.getDataHandler().lookupWikiUser(username) == null) {
	logger.debug("NOT FOUND: No user with username " + username + " found. Creating new WikiUser object...");
	// if there is a valid security credential & no JAMWiki record for the user, create one
	WikiUser user = new WikiUser(username);
	// default the password empty so that the user cannot login directly
	String encryptedPassword = "";
	WikiBase.getDataHandler().writeWikiUser(user, username, encryptedPassword);
	user = WikiBase.getDataHandler().lookupWikiUser(username);
	if (!splittedName[1].isEmpty() && user.getDisplayName().isEmpty()){
		logger.debug("Changed display name: " + user.getDisplayName());
     } else {
	logger.debug("FOUND: username " + username + " found. Continue without creating WikiUser object...");
This is also controlled in PostAuthFilter, where JAMWiki was already catching the LDAP authentication 'problem'. So there is a valid entry in the database (checked via pgadmin as I am now using a postgreSQL db)and the logs are saying that there is a valid authentication - otherwise handleRegisteredUser() would not be called and no user would be created in db. But I still have the problem with the user menu which obviously is related to the problem with the anonymous user which is displayed, when I am editing or creating an article.
I hoped that generating the WikiUser object before AnonymousAuthenticationFilter is firing would solve my problem.
Does the user menu part checks in any way whether there is a valid ip address in the database? Because the in db there is just the default ''. Could that be a reason?
Or could that be related to this exeption?
DEBUG - Voter:, returned: -1
DEBUG - Voter:, returned: 0
DEBUG o.s.s.w.a.ExceptionTranslationFilter - Access is denied (user is anonymous); redirecting to authentication entry point Access is denied
	at ~[spring-security-core-3.1.0.RELEASE.jar:3.1.0.RELEASE]
        at ~[spring-security-core-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at ~[spring-security-core-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at ~[spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at ~[spring-security-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
This is displayed on first time access to any page, before the negotiateSecurityFilterEntryPoint from waffle is called to authenticate the user. Is this a 'normal' exception? In other words: Is this exception regular, or should this be handled elsewhere? In my opinion this could not be the reason for my issues. Because after this exception the log file shows all normal outputs I would expect from it (as you can see above). I noticed that I have not written down the logfile lines where the voter is called...
DEBUG o.s.s.w.a.i.FilterSecurityInterceptor - Secure object: FilterInvocation: URL: /en/Special:Edit?topic=Blabla; Attributes: [ROLE_EDIT_EXISTING, ROLE_EDIT_NEW, ROLE_USER]
DEBUG o.s.s.w.a.i.FilterSecurityInterceptor - Previously Authenticated: waffle.spring.WindowsAuthenticationToken@189dd6e
DEBUG - Voter:, returned: 1
DEBUG o.s.s.w.a.i.FilterSecurityInterceptor - Authorization successful
DEBUG o.s.s.w.a.i.FilterSecurityInterceptor - RunAsManager did not change Authentication object
DEBUG - /en/Special:Edit?topic=Blabla reached end of additional filter chain; proceeding with original chain
-- Manuel• (comments) • 8-Jan-2013 12:00 CET
Hopefully, this will provide another hint to what is going on. This is the output, generated at the wiki.jsp for showing the authenticated user (based on the sample in waffle example). First is my admin user
You are logged in as remote user admin in session E48845B105C886AD43764C52F2624752, local name: 0:0:0:0:0:0:0:1, remote address: 0:0:0:0:0:0:0:1.
Principal.toString: Principal: org.jamwiki.authentication.WikiUserDetailsImpl@1fba592; Credentials: [PROTECTED]; Authenticated: true; Details: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: E48845B105C886AD43764C52F2624752; Granted Authorities: ROLE_EDIT_NEW, ROLE_MOVE, ROLE_UPLOAD, ROLE_VIEW, ROLE_EDIT_EXISTING, ROLE USER, ROLE_ADMIN, ROLE_IMPORT, ROLE_SYSADMIN, ROLE_TRANSLATE
Your user principal name is admin.
ROLE_USER has NOT been granted. ROLE_EDIT_EXISTING has been granted.
In contrast to that, the output for the authenticated user with the waffle plugin:
You are logged in as remote user waffle.servlet.WindowsPrincipal@413ad in session 90D80E14D4293C1569CC0BA134780351, local name: 0:0:0:0:0:0:0:1, remote address: 0:0:0:0:0:0:0:1.
Principal.toString: waffle.spring.WindowsAuthenticationToken@13bfd9
Your user principal name is MyDomain\Manu.
ROLE_USER has been granted. ROLE_EDIT_EXISTING has NOT been granted.
The user menu is generated by JAMWikiServlet.buildUserMenu(). It will look for permissions on the principal to determine what links to show, so that may be the source of your issue (user has/doesn't have ROLE_ANONYMOUS), or there may be a problem when retrieving the user credentials from the servlet context. Those are my two best guesses. -- Ryan • (comments) • 21:43, 09 January 2013 (PST)
This was the most helpful hint!!! Thanks. I added some output to the servlet and this is what I get:
DEBUG org.jamwiki.servlets.JAMWikiServlet - CurrentUserDetails.Username: roleAnonymous, Authorities: [ROLE_USER,...]
DEBUG org.jamwiki.servlets.JAMWikiServlet - BuildUserMenu: CurrentUser is not in ROLE_ANONYMOUS
DEBUG org.jamwiki.servlets.JAMWikiServlet - WikiUser.DisplayName: null, DefaultLocale: null
We found our NullPointerException, when userMenu is included! So there is a valid user in db, but currentWikiUser and currentUserDetails are returning cra... nothing usefull. I will try to find the place, where the normal jamwiki authentication sets currentWikiUser and currentUserDetails. Thank you again, that was very useful! -- Manuel• (comments) • 10-Jan-2013 14:38 CET

Czech translation

Hi. I can add Czech translation (my mother tongue). I already have almost full translation. Bye Vrecion 17-Sep-2012 17:05 CET

That would be great - see How to Help#Translations for details on how to get the translations included in the next release. If you'd like access to the Special:Translation tool on please let me know and I'll update your account permissions, otherwise you can upload the translation file here, or (if you prefer) you can send me your Sourceforge ID and I'll give you permission to commit directly to Subversion. -- Ryan • (comments) • 17-Sep-2012 08:59 PDT
Done. I have uploaded resource file to this wiki. I usually make translation off-line, so most convenient way for me is to just upload new version to wiki. Vrecion 18-Sep-2012 16:20 CET
Thanks! How would you like to be credited in the release notes? Most people use their real name and login - "Ryan Holliday (wrh2)", for example, although whatever you prefer (within reason!) is fine. -- Ryan • (comments) • 18-Sep-2012 07:27 PDT
I will follow crowd, so let it be Pavel Vrecion (vrecion). (comments) • 18-Sep-2012 16:35 CE
Thanks! I've committed your translation in revision 4179 for inclusion in JAMWiki 1.2.3, and I've updated to include the new translations. I've also given you access to Special:Translation - if you need to make any updates you can either use that tool or just upload a new version of the translation file, whichever is easiest for you. Thanks again for contributing! -- Ryan • (comments) • 18-Sep-2012 21:47 PDT
Not at all. However, Czech translation on this wiki is not quite correct. There is double encoded HTML (probably during file upload). I have just uploaded new resource as zip archive. This is full and final (so far) version. Ryan, can you update it in your sources, please? Thanx -- vrecion 20-IX-2012 03:13 PDT

JAMWiki works fine on Ubuntu 12.04

On my development machine I made an upgrade from Ubuntu 10.04 LTS to Ubuntu 12.04 LTS. This worked without problems. Afterwards I made an upgrade from PostgreSQL 8.4 to PostgreSQL 9.1, which also worked fine. After restoring the JAMWiki database everything worked normally. Finally I made a full cleanup (drop database, create a new empty one, remove JAMWiki) and reinstalled JAMWiki as usual (i.e. svn update source, compile and exploded deployment to Tomcat). Everything worked fine.

So I can assess that the following configuration is supported:

OS: Ubuntu 12.04 LTS Precise
Servlet engine: Apache Tomcat
DB: PostgreSQL 9.1.5

Unfortunately the Supported Configurations is not maintained anymore. For that reason I put this feedback here.

Enjoy -- Charles 18.09.2012 10:39 CEST

Thanks for the update! As the list of supported configurations has grown, and the number of JAMWiki releases have increased, it's been tough to document them in a way that is readable, so that page has definitely fallen out of use. If anyone has suggestions for improving things please go ahead and make any changes that might be helpful. -- Ryan • (comments) • 18-Sep-2012 07:28 PDT

No permissions to access the file system

Hi folks, I would like to deploy JAMWiki in Cloudbees, but the Run@Cloud service does not allow writing to the local filesystem, except using the folder in context-param javax.servlet.context.tempdir (a servlet standard). And this is just a temporary folder... Can you help me ? Of course I will share the experience of using JAMWiki in the cloud.

I tried to set the directory to /tmp/JAMWiki but i get this error:


... 18 more

Caused by: /tmp/JAMWiki/cache/ (Permission denied)

The JAMWiki code assumes that there will be a writable directory to store local cache files and other data, so without changes to the code I'm not sure that there will be a way to get things working without a writable directory. If you find a workaround please post it so that others can follow your example, but my guess is that the only way to workaround this limitation would be changing the underlying JAMWiki code. -- Ryan • (comments) • 20-Sep-2012 12:36 PDT
Thanks for reply Ryan. The data in this directory are only temporary? I saw that it creates the directory and the data, if I'm not customize settings.xml (I think this is the name) the directory will only be used for temporary data?
I edited the code to retrieve the temporary directory by ServletContext when I set the initial settings (on SetupServlet). This way it worked correctly on CloudBees.
Thanks for the followup! If this is a temp directory you may encounter problems after a restart - your search index will probably be gone, for example - so if there is any way to use a permanent directory then that would likely be better; if not, then this may be the best available workaround. -- Ryan • (comments) • 22-Sep-2012 08:56 PDT

500 Startup Error (Sometimes)

On occasion we have seen the following error when we try to access the site when we start the server. Note, usually restarting the server fixes the error and pages display fine.

org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.jamwiki.parser.jflex.JAMWikiCustomTagLexer
        ... Method)

I can give you the full stack trace if needed. Thanks!

What application server are you using? "NoClassDefFoundError" would seem to indicate that the app server isn't finding a class in a JAR file. Alternately, do you have any old JAMWiki JAR files in your classpath? JAMWikiCustomTagLexer was (I believe) introduced in JAMWiki 1.1, so if it's finding an older JAR in the classpath then that would explain the error. -- Ryan • (comments) • 09-Oct-2012 11:13 PDT
Thank you for your quick reply. We are using JAMWiki version 1.1.5 installed on tomcat 7.0.25. We cannot upgrade at this time (but hope to do so at a later date). I double-checked our jar files and they do match what is in the 1.1.5 release not including our custom jar (which I don't see referencing the JAMWikiCustomTagLexer) and the database jar file.


i would like to know if i can use this plugin with jamwiki: (to organize info in nodes/treeview and to design dynamic and editable charts/flowcharts, etc) also, if i can use my own choice WYSIWYG editor thanks! —The preceding comment was added by (commentscontribs) .

WYSIWYG editor support is unfortunately not available, although it has been a TODO item for a long time. There may be some way that you could integrate the pages mentioned with JAMWiki, but no out-of-the-box support exists. -- Ryan • (comments) • 17-Nov-2012 12:27 PST


I would like to know if i can clone an existing virtual wiki into a new one and, if it's possible, how i can do it. Thanks in advanced!

There isn't an out-of-the-box way to do this at this time. It might be possible by manually copying data, but I'd recommend against doing that without first making a backup of your database as any errors in manual SQL could break the wiki badly. -- Ryan • (comments) • 20-Nov-2012 09:18 PST
Thanks Ryan for your quick answer!


I would like to build a custom package of Jamwiki and install the same and help fellow users to do the same and avoid the hassle of installation. I have made privileges to input the details required for the installation. However, I am unable to get the password encryption which is causing everything to fail. Please suggest —The preceding comment was added by rafina (commentscontribs) .

Can you clarify what is meant by "unable to get the password encryption"? Passwords are one-way encrypted, so once written there is no way to convert it back. -- Ryan • (comments) • 20-Nov-2012 23:31 PST
What encryption method is been used to encode the password ? So that I can encrypt the password I get from the users in a similar fashion and proceed with the installation.
Encryption of passwords is SHA-512. See org.jamwiki.utils.Encryption#encrypt. This may change in a future release, but backwards-compatibility for older installations will be maintained. -- Ryan • (comments) • 23-Nov-2012 11:00 PST

Empty links CSS class

I have a couple of JamWikis running, and I noticed that in one of them, new links appear in 'blue' instead of 'red'... A bit of comparative research suggests that all new links now have class="interwiki" instead of class="edit". Any pointers to what triggers this ?

See Help:Links#Interwiki links for an overview of interwiki links. If that doesn't answer the question, please provide a sample of the wiki syntax you're using to generate the link. -- Ryan • (comments) • 03-Dec-2012 07:53 PST
Thank you for a swift reply. Getting wiser with the interwiki-thing, but what puzzles me a bit is, that the exact same link syntax 'behaves' differently in two seperate jamwikis (running on two different JBoss servers)... The syntax I'm using is
[[somelink|text for somelink]]
I think Help:Links#Interwiki links should provide you with an answer. That said, the text "somelink" should not be interpreted as an interwiki link unless you configured it as one, so I assume this is just sample text - if not it's possible you've found a bug, although it would have to be something specific to your configuration since that text works for other installations. If you cannot resolve the issue via local configuration changes (as described in the help page) please provide a sample of real data from your site that's producing the problem and perhaps I can provide some insight. -- Ryan • (comments) • 03-Dec-2012 19:28 PST

Bug in trunk

Hello Ryan. I have a fresh deployment of trunk on my dev machine (rev. 4217). I get a NullPointerException when I try to register as a new user. I did not investigate the reason yet, but I guess that something changed during the last refactoring of the user preferences features. Here an extract from catalina.out:

java.lang.NullPointerException: null
   at java.text.SimpleDateFormat.<init>( ~[na:1.6.0_24]
   at java.text.SimpleDateFormat.<init>( ~[na:1.6.0_24]
   at org.jamwiki.servlets.RegisterServlet.validate( ~[jamwiki-web-1.3-SNAPSHOT.jar:na]
   at org.jamwiki.servlets.RegisterServlet.register( ~[jamwiki-web-1.3-SNAPSHOT.jar:na]
   at org.jamwiki.servlets.RegisterServlet.handleJAMWikiRequest( ~[jamwiki-web-1.3-SNAPSHOT.jar:na]
   at org.jamwiki.servlets.JAMWikiServlet.handleRequestInternal( ~[jamwiki-web-1.3-SNAPSHOT.jar:na]

Bye -- Charles 12.12.2012 10:46 CET


The problem was that the method validate in RegisterServlet tested the values of and user.time.format for all user, including the new ones. Since new users are not able to enter these values, they are always null. I added a test for user ID = -1 and it now works correctly.

Along the way I also made these changes:

  • I modified the default value to "d MMMM yyyy", which is the same that is listed by DateUtil.getDateFormats(user).
  • I modified the setupDefaultValues method to include defaults for and user.time.format. If these values are not available and the user saves his preferences without any changes, i.e. using the defaults for them, then the app creates entries in jam_user_preferences. These entries are not necessary.

I committed the changes to trunk and I guess that you will take a look at them.

I hope this helped. Bye -- Charles 12.12.2012 12:38 CET

Thanks for fixing the registration bug - it's great to have someone who can code review me. I'm not sure I understand the change to the WikiDatabase setup code though - if the preference is null, wouldn't it just use the system default? Or was something breaking due to having a null preference? -- Ryan • (comments) • 11:08, 12 December 2012 (PST)

Hello Ryan

Your assumption is correct. If there is no preference set, the system uses the default and, if there is no default then the system property. What happens is that if the default is not assigned, even the value of the system property is understood as a user's choice and therefore stored in the table jam_user_preferences if the user changes anything in his account settings.

You can see what happens with this test (on PostgreSQL):

At the beginning I have the defaults set:

wiki=# select * from jam_user_preferences_defaults;
       pref_key        |  pref_value   |               pref_group_key                | seq_nr 
 user.default.locale   | en            | |      1
 user.timezone         | Europe/Zurich | |      2
 user.preferred.editor | toolbar       |              |      1
 user.signature        |               |              |      2
 user.time.format      | HH:mm         | |      4      | d MMMM yyyy   | |      3
(6 rows) 

Now I went into my Account and changed the display name (none of the date/time settings). As you can see nothing was written in the DB.

wiki=# select * from jam_user_preferences;
 wiki_user_id | pref_key | pref_value 
(0 rows)

Removing the two default entries and changing again the display name in my account, now causes my preferences to be stored in the DB, although they are exactly the same as the system properties:

wiki=# update jam_user_preferences_defaults set pref_value = null where pref_key = 'user.time.format';
wiki=# update jam_user_preferences_defaults set pref_value = null where pref_key = '';
wiki=# select * from jam_user_preferences_defaults;
       pref_key        |  pref_value   |               pref_group_key                | seq_nr 
 user.default.locale   | en            | |      1
 user.timezone         | Europe/Zurich | |      2
 user.preferred.editor | toolbar       |              |      1
 user.signature        |               |              |      2
 user.time.format      |               | |      4      |               | |      3
(6 rows)
wiki=# select * from jam_user_preferences;
 wiki_user_id |     pref_key     | pref_value  
            1 | user.time.format | HH:mm
            1 | | d MMMM yyyy
(2 rows)

Restoring the values and making a change in the account removes the entries from the user's preferences:

wiki=# update jam_user_preferences_defaults set pref_value = 'HH:mm' where pref_key = 'user.time.format';
wiki=# update jam_user_preferences_defaults set pref_value = 'd MMMM yyyy' where pref_key = '';
wiki=# select * from jam_user_preferences_defaults;
       pref_key        |  pref_value   |               pref_group_key                | seq_nr 
 user.default.locale   | en            | |      1
 user.timezone         | Europe/Zurich | |      2
 user.preferred.editor | toolbar       |              |      1
 user.signature        |               |              |      2
 user.time.format      | HH:mm         | |      4      | d MMMM yyyy   | |      3
(6 rows)
wiki=# select * from jam_user_preferences;
 wiki_user_id | pref_key | pref_value 
(0 rows)

This discussion brought me to two questions which we may address soon, although they are not really issues:

  1. The problem above also applies to the user signature. Since there also is a system default for the user signature it may make sense to add an insert at DB setup for it.
  2. System properties and user preferences defaults should be kept separated. If an admin decides after some time of operations to change a system property, this would not affect the preferences of the users who are using a default value. However, there is currently no page in the admin interface that allows changing the values of the user preferences defaults.

The idea behind having the user preferences defaults is to optimize the size of the DB. It would be possible to consider user preferences defaults as system properties, but that would need some changes in the software and I am not really sure if it is a good idea. What do you think?

Bye, -- Charles 13.12.2012 11:33 CET

I think I understand the preferences issue now. The only downside of this approach is that if a user believes he has selected a preference, but that preference happens to be the system default, then their preference will change if the system default is changed. Since that's a weird corner case it may not hurt to just store the preference, although I don't feel strongly on the matter. Responding to your two issues above:
  1. I've modified the code so that signatures no longer use a preference for date. This approach is the same as what Mediawiki does, and makes some sense since you want some consistency in how dates are displayed to multiple users. As to the signature itself, as mentioned I don't feel strongly about storing a default value for the specific user or not.
  2. I've got a change queued that removes the hard-code date and time formats (DateUtil.DATE_FORMATS, DateUtil.TIME_FORMATS) and moves them to jamwiki-configuration-1.3.xml. That gives an admin more flexibility to control what date options are available. If we also declare the first preference from jamwiki-configuration-1.3.xml to be the system default that should eliminate any inconsistencies between the system formats and the preference formats. I can also update the setup code to use the default formats and remove the hard-coding, thus we would have one source for all date/time formats. Given this change, the "system preference" becomes much less important since it will mostly only apply to new and anonymous users.
Given the above I'm less concerned existing users seeing changes when the "system defaults" are changed, since they will have already seen a date format and have the ability to change it if they want to. Do you see any issues with committing these changes? I think it simplifies management of the system and provides more options for admins who want to control what date and time formats are available for user selection. -- Ryan • (comments) • 09:15, 16 December 2012 (PST)
  1. No date in signatures: Does the signature use no timestamp at all or is it just using always the same?
  2. Is the information in jamwiki-configuration-x.x.xml the configuration for choosable items in the GUI?

In general terms I would say that it is always good not to have hard coded elements (although sometimes unavoidable, at least in the short term). People in Europe, as I have seen in some feedbacks, tend to be more interested in having a correct time zone. The format, I think, is less important. Now I am not sure that I understand all changes and I will take some time to look at them a bit closer. Unfortunately I have to go now and can't do it yet. Bye -- Charles 07:52, 17 December 2012 (PST)

I've committed the change to move date patterns to jamwiki-configuration-1.3.xml - if you're already running a JAMWiki 1.3 instance you'll need to copy the new jamwiki-configuration-1.3.xml and jamwiki-configuration-1.3.xsd to your JAMWiki /setup/ folder in your JAMWiki home directory. The patterns that you include in your config file will be the same ones shown to users when selecting preferences. And yes, the signature date pattern will always be the same now, which is the same behavior as Mediawiki, but dates on the recent changes, history, etc pages are now displayed in the user's preferred format. -- Ryan • (comments) • 22:17, 18 December 2012 (PST)

Thank you for the information. The same issue applies, btw, to the database upgrades. If somebody has the earlier beta installed, he will also have part of the db changes in place. After deployment this will probably lead to SQL exceptions because tables cannot be created, columns cannot be added or dropped. The newest changes would then work normally. Do you think that there is a need to fix this? Some DBMS allow something like "CREATE TABLE IF NOT EXISTS...", but I am not sure if that is standard. Another way would be to test if a change is needed beforehand. Maybe I will check that out. Bye -- Charles 00:04, 19 December 2012 (PST)

I installed now the newest version on my server and noticed that some changes must be done manually. So I put a small guide together.

Moving from 1.3.0 before 19.12.2012 to 1.3.0 after 19.12.2012

Open a shell on your DB and perform the following steps:

ALTER TABLE jam_users ADD COLUMN challenge_value varchar(100);
ALTER TABLE jam_users ADD COLUMN challenge_date timestamp;
ALTER TABLE jam_users ADD COLUMN challenge_ip varchar(39);
ALTER TABLE jam_users ADD COLUMN challenge_tries integer default 0 not null;

This will modify the jam_users table to use the new mailing functionality.

Then you need the following modifications for the account page to display correctly:

DELETE FROM jam_user_preferences_defaults WHERE  pref_key = 'user.datetime.format';

This will remove the old user preference for date and time. Now the preference is split into two different ones. Since the application uses the table jam_user_preferences_defaults to build the GUI in the account page, this entry would create a section on the page that is not needed.

If you have an error because one or more users set their datetime preference, then you need to remove those entries first:

delete from jam_user_preferences where pref_key = 'user.datetime.format';

Take a look at your jam_user_preferences_defaults table now. You should get something like this:

       pref_key        |  pref_value   |               pref_group_key                | seq_nr
 user.default.locale   | en            | |      1
 user.timezone         | Europe/Zurich | |      2      | d MMMM yyyy   | |      3
 user.time.format      | HH:mm         | |      4
 user.preferred.editor | toolbar       |              |      1
 user.signature        |               |              |      2

If you don't, then do the necessary changes using updates and inserts.

If you are not comfortable with SQL and want a simpler way then follow these steps (copy the statements into your SQL shell and execute them):

1. Create a copy of your user preferences:

Note that this step assumes that you already removed the entries with user.datetime.format keys. If you did not do that step, then do in now (see above).

create table tmp_prefs as select * from jam_user_preferences;

2. Remove all entries from the user preferences:

delete from jam_user_preferences;

3. Remove all entries from the user preferences defaults:

delete from jam_user_preferences_defaults;

4. Create the entries in the user preferences defaults:

insert into jam_user_preferences_defaults values('user.default.locale','en','',1);
insert into jam_user_preferences_defaults values('user.timezone','Europe/Zurich','',2);
insert into jam_user_preferences_defaults values('','d MMMM yyyy','',3);
insert into jam_user_preferences_defaults values('user.time.format','HH:mm','',4);
insert into jam_user_preferences_defaults values('user.preferred.editor','toolbar','',1);
insert into jam_user_preferences_defaults values('user.signature',null,'',2);

5. Restore the preferences of your users and drop the temporary table:

insert into jam_user_preferences (select * from tmp_prefs);
drop table tmp_prefs;

Now that the changes in the DB have been done, you can deploy the new version of JAMWiki on your server, as you usually do.

After that copy, as Ryan mentioned above, the jamwiki-configuration-1.3.xml to your setup folder.

Don't forget. All this is only necessary if you already installed a 1.3 version from sources before 19.12.2012. If you are running a 1.2.x version or making a completely new install, then the upgrade and setup utilities built in the application will do the job for you.

Feel free to update these notes if you find something that is not correct... -- Charles 06:15, 19 December 2012 (PST)

Thanks for gathering this info in one place - I had put some of it at Tech:User Preferences#Updates, but it's easier to have it all together. I've been trying to figure out a more automatic way for the system to track database changes - perhaps even using something like Liquibase - but thus far I haven't delved too deeploy into it. I'm not sure that this is a high priority, but it would be nice to make schema changes easier to deal with. -- Ryan • (comments) • 21:49, 19 December 2012 (PST)

I was thinking of something simpler like perfoming a select on the table to be created and put the create table statemente in the catch clause, e.g. (since the statement is not available yet, some pseudo code):

try {
    SELECT * FROM jam_user_preferences_defaults LIMIT 1
catch(SQLException ex) {
    try {
        WikiBase.getDataHandler().queryHandler().executeUpgradeUpdate("STATEMENT_CREATE_USER_PREFERENCES_DEFAULTS_TABLE", conn);
        messages.add(new WikiMessage("upgrade.message.db.table.added", "jam_user_preferences_defaults"));
    } catch (DataAccessException e) {
        DatabaseConnection.rollbackOnException(status, e);
        logger.error("Database failure during upgrade", e);
        throw new WikiException(new WikiMessage("upgrade.error.fatal", e.getMessage()));
    } catch (SQLException e) {
        DatabaseConnection.rollbackOnException(status, e);
        logger.error("Database failure during upgrade", e);
        throw new WikiException(new WikiMessage("upgrade.error.fatal", e.getMessage()));

A bit primitive and makes the code much longer, but could work. Any way I agree with you that this is not a high priority. I expect users that already installed a 1.3 version to be able to make the changes in the database manually as described above. It took me about 5 minutes to do it. -- Charles 06:24, 21 December 2012 (PST)

Language updates

I updated the texts for Italian and German using the JAMWiki translation tool. Bye -- Charles 02:25, 03 January 2013 (PST)

UML diagram integration

Plantuml is a GPL/LGPL library written in Java that allows adding UML diagrams into wikis (see running). Since Plantuml is written in Java, integrating it into Jamwiki should be easy (see api).

I don’t know how to develop plugins into Jamwiki, but if you are interested in this integration, we can work together on this subject.

Regards, —The preceding comment was added by plantuml (commentscontribs) .

Plugin support is unfortunately limited at the moment, but you can look at Help:Tag extensions to see how the <facebook> and similar extensions were developed. If you would be interested in writing code How to Help#Programmers has details, and I can easily give you write access to Subversion where you can create your own branch. -- Ryan • (comments) • 22:56, 02 February 2013 (PST)

Bugs in role admin display capabilities

I have seen two bugs in the way group membership for display is managed in the role admin page:

  1. When a new user is inserted, he is added to the registered group. In the role admin page, this user should be visible each time the admin searches for any role in that group. This does not happen. The reason for it is that the CACHE_ROLE_MAP_GROUP is not updated. [solved]: I added a line to flush the cache in that specific case.
  2. The CSS for highlighting the roles that a user has through group membership has been added to the system CSS. The CSS is in the database and is not updated during upgrade or redeployment. So it must be modified manually over the wiki editing facility. Is there a better way to make sure that this information is updated without doing it manually?

Thank you & bye -- Charles 00:41, 04 February 2013 (PST)

JAMWiki:System.css will be automatically updated when the wiki upgrade process runs. If you have already upgraded (example: developer who has been running from trunk) then just as you would with database changes, you'll need to manually apply CSS changes since the system will already be at version 1.3 and the automated upgrade process won't run. I'm looking at tools like Flyway as a possible solution to make this process more automated for those who run development branches, but that won't be ready until the next major release, at the soonest. -- Ryan • (comments) • 07:53, 04 February 2013 (PST)

Error while saving page

Hello Ryan. I made an upgrade of the software from trunk. When I now try to save changes of a page I get the following error message:

An unknown system error has occurred. The error message is: java.lang.AbstractMethodError: org.apache.lucene.analysis.Analyzer.tokenStream(Ljava/lang/String;Ljava/io/Reader;)Lorg/apache/lucene/analysis/TokenStream;.

Any idey what the reason could be? Thanks & bye, -- Charles 07:16, 14 May 2013 (PDT)

I tried an install using the downloadable war file, but I get the same error.

Trunk is running Lucene 4.3. Can you verify that when you rebuilt from trunk that you also pulled in the latest JAR dependencies? If you don't have Lucene 4.3 then you'll definitely encounter issues. -- Ryan • (comments) • 16:16, 14 May 2013 (PDT)

Export/Import images

I exported the topic with the image. When I do the imports are only entries in the tables of topics (topics and updates), but in the table of files entries are not created. Then I copied the files (in the correct directory), but the system does not see them. What to do? -- shar 00:37, 20 June 2013 (PDT)

When you exported you used Special:Export and then Special:Import to import? If so, those tools will only export/import topics (just like Mediawiki). Are you trying to move an instance to a new database? If so you can migrate the database via Special:Maintenance#data. Otherwise, if you are just migrating a small number of images you can re-upload the image with the same name, and it should then appear correctly. Suggestions for improvements would be welcome. -- Ryan • (comments) • 16:06, 20 June 2013 (PDT)
No migration. Need to transfer a portion of that to the new server. But the number of those about 100 with many pictures. Re-download all the pictures handed :(. Plus after import/export Created the topic Image. Therefore manually download a file with the same name does not work. However, I understood that the transport mechanism of topics with pictures missing. This is sad. We'll have to write a program to generate entries in the file table. :( -- shar 01:48, 21 June 2013 (PDT)

Update developers info about VCS

The page How_to_Help still only mentions SVN and nothing about GIT. As I understand now the source was transferred to GIT and all check-ins should be done there. Am I correct? -- CAB • 23:37, 17 July 2013 (EDT)

Yes, the site now uses Git, but it looks like documentation needs to be updated. [7] has the latest code and the repository details. -- Ryan • (comments) • 07:48, 18 July 2013 (PDT)

Parsing error (v.2.0)

Error in IE8

Сведения об ошибке на веб-странице

Агент пользователя: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.3) штамп времени: Mon, 1 Jul 2013 07:11:11 UTC

Сообщение: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)
Строка: 0
Символ: 0
Код: 0

Restarting Wiki

My server crashed, and I was able to save my Wiki directory files and my Glassfish application folder. I am now trying to restart my Wiki and get it working back to normal, but I need help because I don't know which files I need.

User Infos within wiki

Hi, Is there a way to use the username of the logged in user to create pages or includes based on his name like a Template:{{CURRENTUSER}}_Menu which could be included in the JAMWiki:Header ?

Not at present that I can think of - the current user is not available through a magic word, and the header is a cached component so it would save the first version that was rendered and show that to all users. -- Ryan • (comments) • 13:52, 18 November 2013 (PST)

Adding a Calender

I just wanted to know if there was any support for adding a calender to JAMWIKI as of now or not? I am a very junior developer and have this set up on a linux box. Thanks, Faran

To the best of my knowledge no one has developed a calendar extension, but an interested developer could probably do so as a tag extension. -- Ryan • (comments) • 18:21, 09 January 2014 (PST)
Thank you so much. Is that terribly hard to do? Sorry I am really not that knowledgeable. How much time would this take by your estimate? Faran
I think it depends on how well the person doing the coding knows Java - anywhere from a few hours for an experienced developer to a few weeks for a novice. -- Ryan • (comments) • 09:55, 11 January 2014 (PST)


How can I deleted a group? i created a new group to associate some roles, but just for Test, and now I need delete this group but only options is AddNew or Edit some existing. —The preceding comment was added by (commentscontribs) .

Once created, groups cannot be deleted. -- Ryan • (comments) • 07:12, 12 December 2014 (PST)