Current development on JAMWiki is primarily focused on maintenance rather than new features due to a lack of developer availability. If you are interested in working on JAMWiki please join the jamwiki-devel mailing list.

Bug Reports/Resolved/0.6.x

This page is an archive of Bug Reports resolved during the JAMWiki 0.6.x release cycle. See Bug Reports/Resolved for an index of all resolved bug reports.

Contents

Images won't show up[edit]

Moved from the Feedback page:

I am using version 0.5.4 atm. I uploaded a png to my wiki called dragbuildxml.png and the Image:drapbuildxml.png site does not show the image at all. If I refer directly to the image, it is shown pefectly. Hence, I can't really use images at all. I renamed the file to dbx.png and uploaded again and the pciture showed up perfectly. What can I do about? THX, Mike

Can you provide any additional information? Were there any errors in the logs? There have occasionally been reports of image upload failures when the file upload settings are incorrectly specified, but yours is the first report I've heard where uploading one image failed but another succeeded. -- Ryan 28-Jun-2007 22:59 PDT
Ryan, thx for you quick answer. I did some more investigation and noticed that AdBlockPlus blocked the image due to regexp. Works now!

Tomcat reports HTTP 500 on image tag[edit]

Moved from the Feedback page:

my config: HP-UX B11.23 IA64N / Tomcat 5.5.20 / Internal database / HP JVM 1.5.0.6 Tested with JAMWiki 0.5.4 using [ [Image:name|right|thumb|<desc>] ] produces exception: can't connect to xserver I started the xserver and now I get:

org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:879)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:774)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:460)
	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:425)
	javax.servlet.http.HttpServlet.service(Unknown Source)
	javax.servlet.http.HttpServlet.service(Unknown Source)
	org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
	org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
	org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
	org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
	org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
	org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
	org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
	org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
	org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
	org.jamwiki.servlets.JAMWikiFilter.doFilter(JAMWikiFilter.java:58)

root cause

java.lang.NoClassDefFoundError
	java.lang.Class.forName0(Native Method)
	java.lang.Class.forName(Class.java:168)
	java.awt.Toolkit$2.run(Toolkit.java:822)
	java.security.AccessController.doPrivileged(Native Method)
	java.awt.Toolkit.getDefaultToolkit(Toolkit.java:805)
	java.awt.Image.getScaledInstance(Image.java:158)
	org.jamwiki.utils.ImageUtil.resizeImage(ImageUtil.java:173)
	org.jamwiki.utils.ImageUtil.initializeImage(ImageUtil.java:90)
	org.jamwiki.utils.LinkUtil.buildImageLinkHtml(LinkUtil.java:158)
	org.jamwiki.parser.jflex.WikiLinkTag.parseImageLink(WikiLinkTag.java:167)
	org.jamwiki.parser.jflex.WikiLinkTag.buildInternalLinkUrl(WikiLinkTag.java:73)
	org.jamwiki.parser.jflex.WikiLinkTag.processLinkContent(WikiLinkTag.java:205)
	org.jamwiki.parser.jflex.WikiLinkTag.parse(WikiLinkTag.java:113)
	org.jamwiki.parser.jflex.AbstractLexer.parseToken(AbstractLexer.java:108)
	org.jamwiki.parser.jflex.JAMWikiProcessor.yylex(JAMWikiProcessor.java:1479)
	org.jamwiki.parser.jflex.JFlexParser.lex(JFlexParser.java:114)
	org.jamwiki.parser.jflex.JFlexParser.parseProcess(JFlexParser.java:252)
	org.jamwiki.parser.jflex.JFlexParser.parseHTML(JFlexParser.java:170)
	org.jamwiki.utils.Utilities.parse(Utilities.java:783)
	org.jamwiki.servlets.ServletUtil.viewTopic(ServletUtil.java:528)
	org.jamwiki.servlets.EditServlet.preview(EditServlet.java:226)
	org.jamwiki.servlets.EditServlet.edit(EditServlet.java:80)
	org.jamwiki.servlets.EditServlet.handleJAMWikiRequest(EditServlet.java:61)
	org.jamwiki.servlets.JAMWikiServlet.handleRequestInternal(JAMWikiServlet.java:74)
	org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
	org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:839)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:774)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:460)
	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:425)
	javax.servlet.http.HttpServlet.service(Unknown Source)
	javax.servlet.http.HttpServlet.service(Unknown Source)
	org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
	org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
	org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
	org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
	org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
	org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
	org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
	org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
	org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
	org.jamwiki.servlets.JAMWikiFilter.doFilter(JAMWikiFilter.java:58)

how can I fix this?

I'm not very familiar with HP-UX, but does the HP-UX JDK have any limitations with the java.awt.image package? JAMWiki is using JDK methods for resizing images, so if the HP-UX JDK doesn't offer those methods then I'll need to implement some sort of workaround. -- Ryan 01-Jul-2007 22:53 PDT
Ryan, I enabled the X-Server manually for java.awt.image but no avail. Can you provide a sample class file to test this on the server? It's actually quite bad to rely on the awt package because it relies on an installed X-Server and most servers don't even have one. None of the image resizers work.
I don't have any java.awt test class available at the moment that would be useful for testing, so unfortunately I can't be of much help. HP-UX is actually the first system I've heard of that has had issues - I use a Windows system for development and jamwiki.org runs on a Linux system installed using the Debian server install, and there have been success reports from Solaris users. Ten minutes of Googling isn't turning up anything that looks relevant to figuring out why HP-UX would be different. As a result, I'm not sure what the best solution for your situation is - if there's a better way to handle image resizing it would definitely be worth investigating, but at the same time I don't want to have to support different solutions for different platforms, which is why the standard JDK packages were used in the first place. Let me know if you come up with anything, and apologies for the trouble you're having! -- Ryan 05-Jul-2007 20:24 PDT
Ryan, if this can't be solved right now, it should be added to known issues. I will write some test classes which resize images and use within HP-UX and will post my results!
Please go ahead and update the known issues page - I very much encourage everyone who is willing to add to the documentation, as that's probably my least favorite aspect of trying to coordinate this project! If you do come up with some code that works with HP let me know, and hopefully we can find some way to get it included in the next release. Thanks! -- Ryan 06-Jul-2007 22:55 PDT
Ryan, I am pleased to help. Can you point me to the classes in the project which resize the images? I wll check them out from SVN and try to rebuilt the failure here! I added it to known issues!
The resizing code is in Subversion as /trunk/src/java/org/jamwiki/utils/ImageUtil.java. The method that performs the resizing is resizeImage(). All that the code does is build a Java BufferedImage object and then calls getScaledInstance(). Hope that helps! -- Ryan 07-Jul-2007 15:38 PDT
Ryan, helps alot. I will take a lot after 18th July after my last exam. So expect an answer by the end of July!

Ryan, I found a solution for the problem which affects all UNIX-like OSes
Solution: If you are running a unix/linux server w/o an X-Server or don't have the priviliges to start it, all BufferedImage operations like thumb (resize) jamwiki crashes with can't connect to x-server because java.awt.Image relies on the graphical subsystem of your OS. If you still want to use those methods you have to tell your VM that you are running headless => no X-Server installed. Add to your JAVA_OPTS/VM args "-Djava.awt.headless=true" and all operations are propably done in soft mode but it works flawlessly here.

Thanks for investigating! If you'd like feel free to add this information to the Installation guide - just create a new section called "Other Configuration Settings" (or something similiar). I'll try to remember to add some error handling around that method in the future to log a note indicating the solution you've pointed out, so hopefully this issue won't bite anyone else. -- Ryan 19-Jul-2007 08:51 PDT
Ryan, it's done. Just added another section! But what bothers me the most is that tomcat displays the regular error page for 404 or 500 which is really extremely confusing for a novice. Should be handled with custom pages.
Thanks! I agree that's bad - my previous comment wasn't clear (first thing in the morning I'm not the sharpest tool in the shed) but unless I forget I'll add some error handling to prevent that problem from propagating to the user in the future, which should get rid of the 500 error. -- Ryan 19-Jul-2007 15:14 PDT
OK, the reason that this issue caused a crash is that the code was catching exceptions, but this one threw an error. In ten years of Java programming that may be the first time that the distinction between the two has bit me. In any case I've modified a few chunks of high-level JAMWiki code to catch Throwable instead of Exception, which should hopefully stop this kind of error from biting anyone else. In addition, I've added logging around the image resizing code to note that the java.awt.headless parameter (or X) should be enabled in the case of resize failures on a UNIX box. In addition, the code should return the non-resized image as a fallback. For anyone keeping score at home it's Subversion revision #1550.
Hopefully these changes will make life easier for other UNIX admins in the future! Thanks again, and let me know if you'd like a credit in the CHANGELOG - I just need to know what name to use to credit you with. -- Ryan 19-Jul-2007 19:54 PDT
Ryan, it would be kind of you to mention me in the CHANGELOG. Just add my name: Michael Osipov. Btw, I am planning to commit source too in the near future. I am quite excited about this wiki so my commitment is yet to come!

Changing LinkUtil#buildImageLinkHtml() method?[edit]

Moved from the Feedback page:

IMO the image class determination in the method LinkUtil#buildImageLinkHtml() should be changed to:

		if (frame || thumb || StringUtils.hasText(align)) {
			html += "<div class=\"";
			if (thumb || frame) {
				html += "imgthumb ";
			}
			if (align != null && align.equalsIgnoreCase("left")) {
				html += "imgleft ";
			} else if (align != null && align.equalsIgnoreCase("center")) {
				html += "imgcenter ";
			} else if (align != null && align.equalsIgnoreCase("right")) {
				html += "imgright ";
			} else {
				// default alignment
				html += "image "; 
			}
			html = html.trim() + "\">";
		}

At least, if there's no alignment defined in the Image tag, Wikipedia uses class "image".

It looks like you've investigated this issue, so feel free to commit a patch to trunk. Alternatively, if I get a chance I'll look into this a bit further and try to get something committed. Thanks! -- Ryan 19-Jul-2007 08:47 PDT

JNDI Datasource[edit]

Moved from the Feedback page:

Hi, i've found a problem in the handling of a JNDI datasource. The DatabaseConnection.testDatabase function does not undestand the JNDI url. I've produced a patch to this problem that you can found here testDatabase.patch -- mnencia 02-Jun-2007 10:13 PDT

Thanks for the patch! I'll see if I can get it integrated the next time I sit down to write code. The JDK 1.3 compatibility stuff shouldn't be necessary since JAMWiki requires JDK 1.4 or greater, but otherwise this looks good! -- Ryan 03-Jun-2007 11:09 PDT
The jdk 1.3 compatibility code is the same i've found in getConnection(), so I've included it because I think that testDatabase() function should have the same behavior of getConnection() -- mnencia 04-Jun-2007 08:25 PDT
Thanks for pointing that out - I suspect it's legacy code from the old Very Quick Wiki days. I'll integrate your patch as-is next chance I get, and will add a to-do item to remove any 1.3 compatibility stuff at some point in the future. Thanks again for the patch! -- Ryan 04-Jun-2007 08:47 PDT

Viewing the history of a deleted topic gives NPE[edit]

  1. Delete a topic.
  2. From Special:RecentChanges click on the history link for that topic.
  3. Try to view any version.
  4. NPE.
java.lang.NullPointerException
	at org.jamwiki.servlets.HistoryServlet.viewVersion(HistoryServlet.java:85)
	at org.jamwiki.servlets.HistoryServlet.handleJAMWikiRequest(HistoryServlet.java:47)
	at org.jamwiki.servlets.JAMWikiServlet.handleRequestInternal(JAMWikiServlet.java:74)

-- Ryan 05-Aug-2007 18:54 PDT

An appropriate error message has been added in Subversion for 0.6.0 - revision 1776. -- Ryan 05-Aug-2007 23:11 PDT

Character problem[edit]

I installed jamwiki on Tomcat 5.5.17 with a MySQL 5.0-DB. I'm using german characters like ü,ö,ä,ß.

Here's a little export from table jam_topic:

topic_name topic_content
Systemübersicht ä,ö,ü,ß

As you can see, the german characters in topic_content column look fine, but not in topic_name. There is an ü character instead the ü. It must be Systemübersicht and not Systemübersicht!

Any ideas why that happens?

Just to be sure, was your database was set up for UTF8 support using create database NAME character set UTF8, and have you added URIEncoding="UTF-8" to the Tomcat Connector descriptions as described on the Installation document? If both of those are true, what page encoding do you see (in your browser: View → Character Encoding)? -- Ryan 22-Aug-2006 10:32 PDT
Yes, i followed the instructions from the Installation document. To be sure i checked the settings in tomcats server.xml and created a new database. Character encoding in my browser shows UTF8. Than i did the same test case again, but the problem is still there. -- Norman 23-Aug-2006 09:20 GMT
OK, it's after midnight here now, but I'll do a round of testing with MySQL tomorrow morning to see if I can reproduce the problem. I normally use Postgres and am not as familiar with MySQL, but I can't think of any obvious reason why a VARCHAR column would have problems with non-ASCII characters while a TEXT column would not. One last question - do other non-ASCII characters in topic names cause this problem, or is just the ü character? -- Ryan 23-Aug-2006 00:38 PDT
I decided not to go to sleep yet. Using MySQL 4.1.20 and Tomcat 5.5.7 on a test machine I'm able to create a link like Systemübersicht, click on it, add text, and save the topic, and everything works as expected. It's possible that the "ü" you're entering is different from the one I copied and pasted - for example, Microsoft uses characters that aren't UTF-8 compatible, so copying and pasting from Word would cause errors. It could be another issue as well - I'm very willing to work with you to figure this out, but since I can't reproduce it I'd need the exact steps you're taking to get that value into the database - for example, are you creating a link in a page, clicking on it, and then saving the new topic, or is there some other way you create the topic? Any other information that might be relevant would also help in figuring this out. Sorry to not have a quick solution! -- Ryan 23-Aug-2006 01:02 PDT
Sorry for keeping you awake ;o). Here the steps to do:
- create a new database jamwikiTest
- click on StartingPoints
- click on edit page
- add > * \[\[TestüÜöÖäÄß\]\] underneath * \[\[StyleSheet\]\]
- save the page
- click on the new link TestüÜöÖäÄß
- now you should see on top of the page TestüÜöÖäÄß instead of TestüÜöÖäÄß.
- edit the new page and save it.
- now you should see in the database column topic_name of jam_topic-table Testü�ö�ä��
-- Norman 23-Aug-2006 10:24 GMT
Heading to bed now, but one last question - which version of JAMWiki are you using? Is it 0.2.1? -- Ryan 23-Aug-2006 01:32 PDT
Yes, i'm using 0.2.1. gn8 -- Norman 23-Aug-2006 10:51 GMT
(re-indenting) So from this description it looks like the topic name is getting mangled when it is added to a URL - the name should be getting escaped (http://jamwiki.org/wiki/en/Systemübersicht should be http://jamwiki.org/wiki/en/System%C3%BCbersicht) but for some reason it seems like it might not be. Some browsers may allow non-ISO-8859-1 in the URL bar, which could be the culprit, so I'll look into it. -- Ryan 23-Aug-2006 14:27 PDT

I think I've found a fix for this issue, and the new code is now running on jamwiki.org and will be included in JAMWiki 0.3.1 beta3. Once the new beta is available I'd be grateful if you would be willing to test the fix to see if the issue is resolved - please let me know if that's possible. -- Ryan 27-Aug-2006 00:16 PDT

JAMWiki 0.3.1 beta3 is now available at http://jamwiki.org/jamwiki-0.3.1-beta3.war. If you're willing, could you let me know if this release still has the bug? The standard caveats about not installing a beta in a production environment or on top of a working configuration apply. -- Ryan 27-Aug-2006 22:10 PDT
Hi Ryan. I checked the new version 0.3.2 of jamwiki. The problem is still there and even more worse ;o(.
Here's what i did:
- created a page called Systemübersicht
- edit the page Systemübersicht
- save the page
- a new row in the database is created. Under topic_name there ist "Systemübersicht" instead of "Systemübersicht".
- and now the new thing
- edit the page again.
- the old content is gone and the headline is "System�¼bersicht" insted of "Systemübersicht".
- store the page
- another new row in table jam_topic is created.
Every time i edit a page and store the changes, the result is that a new row in the database is created. Norman 30-Aug-2006 18:31 GMT
Shoot. The problem (I believe) is that when it reads the topic name from the URL the code assumes the "ISO-8859-1" character set, which (as I understand the standard) is what the value should be encoded as. However, cutting and pasting directly into Firefox I was able to reproduce your problem, but changing the encoding to "UTF-8" fixed it. It may be that for some reason it's reading the values in some other encoding, so I'll have to see if there's an easy way to figure out what encoding is being used and trying converting to that. Sorry this is taking so long to fix, but without being able to easily reproduce the problem (which I think would require using the same OS version and browser version as you are) it's difficult to do. -- Ryan 31-Aug-2006 22:51 PDT
I added a slight change for JAMWiki 0.3.3, but I don't think it's going to fix the problem for you. I'd like to figure out if the issue is with your browser or your server - could you let me know if you can see the article content after clicking on this link: Systemübersicht (content is "this is a test")? And can you click on this link and then edit & save some content: Systemübersicht Test? If one of those fails then I think the problem is with the browser, and I can research further. If both of those tests work then I suspect the problem is with the server, and in that case if you're willing can you email me your server.xml and web.xml files? My email address is removed. Sorry again for the problems, but since I can't reproduce the problem it's very difficult to track down. -- Ryan 01-Sep-2006 15:29 PDT
I suspect that this issue is the same as Bug Reports#Incorrect link for special characters. The problem seems to have been app-server specific, but a fix has been added to the Subversion repository for JAMWiki 0.6.0. -- Ryan 19-May-2007 17:35 PDT
I'm marking this one resolved. I saw the same problem with Tomcat 5.5 and have added a fix in revision 1477. If anyone encounters a similar problem please open a new bug report. -- Ryan 05-Aug-2007 23:27 PDT

Character problem II[edit]

The UTF-8 hex value for the percent sign (%) is 25. When trying to use a percent sign in a topic name, the system errors out. For example, try to go to http://jamwiki.org/wiki/en/Percent_50%25_test and it will have issues (while http://jamwiki.org/wiki/en/Ampersand_%26_test works fine). In my instance, this is the stack trace I get:

2006-09-18 12:39:46,236 [tcpConnection-14609-0] ERROR [JAMWikiServlet] Unable
to load topic value in JAMWikiServlet
java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in
escape (%) pattern - For input string: "_t"
        at java.net.URLDecoder.decode(URLDecoder.java:173)
        at org.jamwiki.utils.Utilities.decodeURL(Utilities.java:157)
        at org.jamwiki.servlets.JAMWikiServlet.getTopicFromURI(JAMWikiServlet.java:153)
        at org.jamwiki.servlets.JAMWikiServlet.loadDefaults(JAMWikiServlet.java:280)
        at org.jamwiki.servlets.JAMWikiServlet.viewError(JAMWikiServlet.java:385)
        at org.jamwiki.servlets.TopicServlet.handleRequestInternal(TopicServlet.java:58)

Try doing the same thing at wikipedia and it does work (http://en.wikipedia.org/wiki/Percent_50%25_test). -- scroco 18-Sep-2006 12:57 PDT

The request never reaches the application server, and shows up in the web server logs as HTTP 400, which is "400 - Bad Request: The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications." It almost looks like a bug with Apache, but I'll dig around a bit. -- Ryan 18-Sep-2006 13:09 PDT
On second look it appears that it may be the redirect to the error page or something similar that fails in Apache. I think that the root problem is that the utility method to encodes and decodes topic names may be called more than once, and after decoding the percent sign it later tries to decode "%_t", which fails. I got the message "The error message is: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "_t"." while trying to create an edit URL for the topic. I'll look into it and try to get a fix out, thanks for the report. -- Ryan 18-Sep-2006 13:19 PDT
I think it's fixed now (see Topic name with a % sign in it). Since request.getParameter() automatically decodes values, the JAMWiki Utilities.decodeURL() method was inappropriate for values that weren't retrieved using request.getURI(). I've added a new decodeFromRequest() method and it seems to have solved the problem, although I'll have to do more testing to make sure I didn't break anything in the process. The final fix will be in the next release - thanks for the bug report. -- Ryan 18-Sep-2006 16:08 PDT
Never mind, I can now create and edit the topic, but viewing it is apparently busted. Give me a bit longer... -- Ryan 18-Sep-2006 16:09 PDT

While working on this can you also test and verify for %22 (quotation mark)? -- scroco 18-Sep-2006 17:11 PDT

Quotation marks are currently disabled in topic names, but I'll look into re-allowing them. As to the % sign, the remaining problem looks like Apache to me - Wikitravel has the same problem (see http://wikitravel.org/en/Topic_name_with_a_%25_sign_in_it). I'm digging around looking for a solution, but haven't found one thus far. If anyone else has experience with this issue any help would be appreciated. -- Ryan 18-Sep-2006 21:57 PDT
The new beta (0.3.4 beta6) is less restrictive for topic names. As to the % issue, the error I'm currently getting looks like it may be coming from mod_jk. The specific message is the following:
[Mon Sep 18 16:13:29 2006] [info] jk_handler::mod_jk.c (1853): No body with status=400 for worker=worker1
Apache shows the following:
localhost - - [18/Sep/2006:16:13:29 -0700] "GET /wiki/en/link_with_%25_sign HTTP/1.1" 400 440 "http://127.0.0.1:81/wiki/en/Special:RecentChanges" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20060917 BonEcho/2.0"
There's no indication that I can see that the request ever makes it to Tomcat. If anyone has any suggestions or ideas I'd be interested. -- Ryan 19-Sep-2006 00:45 PDT

Once I get that new functionality into my installation, I'll check it out and see if I have any ideas. What version of apache are you running? -- scroco 19-Sep-2006 10:27 PDT

I get error reports both on my Windows and Linux boxes - Apache 2.0.55 and 1.3.33 respectively. I can view URLs with %25 in them that are NOT Tomcat URLs, so I suspect that it's a mod_jk issue, but need to investigate further. Again, if you have any ideas I'd be grateful. -- Ryan 19-Sep-2006 10:34 PDT
... and Resin seems to work fine, so this is definitely Tomcat-specific. -- Ryan 19-Sep-2006 10:50 PDT
Well, that's good news for me. -- scroco 19-Sep-2006 11:36 PDT
This issue does not occur with later versions of Apache / Tomcat, so it does not appear to be a JAMWiki issue. Marking as resolved. -- Ryan 05-Aug-2007 23:27 PDT

web.xml erros leading to GlassFish Issue as well as RAD/WebSphere Issues[edit]

JAMWiki 0.5.4 is having an issue deploying on GlassFish v1. The previous version (JAMWiki 0.5.3) deploys fine. Here's the deployment error on JAMWiki 0.5.4:

Deploying application in domain failed; Error loading deployment descriptors for module [jamwiki-0] Line 1 Column 1 -- Deployment descriptor file WEB-INF/web.xml in archive [jamwiki-0]. Content is not allowed in prolog. Error loading deployment descriptors for module [jamwiki-0] Line 1 Column 1 -- Deployment descriptor file WEB-INF/web.xml in archive [jamwiki-0]. Content is not allowed in prolog.

Strange - the web.xml file changed slightly due to a failure deploying with Debian Etch, and I didn't test it as thoroughly as I probably should have. If you change the beginning of the new web.xml to the following, will it deploy properly?

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>

-- Ryan 12-May-2007 10:33 PDT

It is working now. I changed the "web-app xmlns" to:


<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">

--amerigo5 12-May-2007 13:05 PDT

Thanks! Provided there aren't issues with other app servers I'll push this fix out for the next release. -- Ryan 12-May-2007 13:34 PDT

Unfortunately, if you use the schema declaration, you also need to wrap the taglib elements into a jsp-config element. -- Cay Horstmann, 29-May-2007 09:04 PDT

Now I can deploy, but I run into another issue. When I try to launch for the first time, I get a exception java.lang.NoClassDefFoundError org/apache/tools/ant/BuildListener. This is with the GlassFish package on Ubuntu 7.04. -- Cay Horstmann, 29-May-2007 09:15 PDT

Thanks for the report - I'll try to remember to download GlassFish to investigate, although if you find a solution please let me know! -- Ryan 30-May-2007 22:38 PDT

Same errors in the web.xml as described above (additional space in the schemalocation, missing jsp-config element surrounding the taglib elements) also create problems for IBM Rational Application Developer 7.0 (web.xml does not validate when running XML validation) and IBM WebSphere Application Server 6.1 (deployment fails) -- Carsten Seiffert 02-Jul-2007 07:05 PDT

If you're willing to help test, could you try the latest Subversion web.xml file (available here) and let me know if that works? Thanks! -- Ryan 02-Jul-2007 21:11 PDT
Never mind, having just re-read your comments I see that additional changes need to be made. If you get a version working and are willing to contribute it back to the project it would be much appreciated, otherwise I'll revisit this issue in the future when I have time to test with different app servers. -- Ryan 02-Jul-2007 21:13 PDT
No probs - the following web.xml works for me (the only changes compared to the 0.5.4 download are: removed superfluous space from namespace URL, added missing jsp-config element): -- Carsten Seiffert 03-Jul-2007 01:10 PDT

<?xml version="1.0" encoding="ISO-8859-1"?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">
    <!--
	NOTE: do not use the context-param element to initialize the
	ApplicationResources resource bundle here due to a bug in the JSTL and
	Tomcat4 that causes response encoding to be finalized and thus prevents
	setting page encoding to UTF-8.  Instead, load the resource bundle in
	page-init.jsp.
	-->

	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>/WEB-INF/applicationContext-acegi-security.xml</param-value>
	</context-param>

	<!-- set encoding, cache headers, etc. -->
	<filter>
		<filter-name>JAMWikiFilter</filter-name>
		<filter-class>org.jamwiki.servlets.JAMWikiFilter</filter-class>
		<init-param>
			<param-name>encoding</param-name>
			<param-value>UTF-8</param-value>
		</init-param>
	</filter>
	<filter>
		<filter-name>Acegi Filter Chain Proxy</filter-name>
		<filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
		<init-param>
			<param-name>targetClass</param-name>
			<param-value>org.acegisecurity.util.FilterChainProxy</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>JAMWikiFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	<filter-mapping>
		<filter-name>Acegi Filter Chain Proxy</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>

	<servlet>
		<servlet-name>jamwiki</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>jamwiki</servlet-name>
		<url-pattern>/en/*</url-pattern>
	</servlet-mapping>
	<!-- virtual wiki mapping(s) -->
	<servlet-mapping>
		<servlet-name>jamwiki</servlet-name>
		<url-pattern>/test/*</url-pattern>
	</servlet-mapping>

	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>

	<jsp-config>
		<taglib>
			<taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
			<taglib-location>/WEB-INF/c-rt.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
			<taglib-location>/WEB-INF/fmt-rt.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>http://jamwiki.org/taglib</taglib-uri>
			<taglib-location>/WEB-INF/jamwiki.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>http://acegisecurity.org/authz</taglib-uri>
			<taglib-location>/WEB-INF/authz.tld</taglib-location>
		</taglib>
	</jsp-config>

</web-app>

Fix added to Subversion as revision 1512. -- Ryan 05-Aug-2007 23:36 PDT

Incorrect link for special characters[edit]

Link mit üöä und Ä can not be edited correctly. -- Ryan 14-May-2007 10:17 PDT

See also ვეპხის. Note that things seem to be broken on my local box as well, meaning I've screwed something up in a recent release since this worked fine earlier... -- Ryan 15-May-2007 23:37 PDT
Just a note to say that I don't have time to investigate this issue tonight, but if anyone would like to help fix this problem it would be helpful to know exactly when the problem started occurring. If you're running any JAMWiki version starting with 0.4.0 up through 0.5.4, please let me know if you are or are not seeing this issue on your local installation. To do so, simply copy either of the topic names in this bug report into a topic in your wiki, and then click on the link to see if it is correctly editable. Thanks! -- Ryan 16-May-2007 21:26 PDT
I think this is fixed now in Subversion, although I'd like to get more testing. It appears that this bug has been around for a while, which is surprising as I would have expected to have received bug reports. If anyone has been able to successfully edit topics containing non-ASCII characters during the 0.5.x release cycle please let me know what version of JAMWiki you were using. -- Ryan 19-May-2007 11:16 PDT
People edited non-ASCII topics on jamwiki.org as recently as mid-April, however when I attempted to do so with version 0.5.0 on my local laptop it failed, which leads me to believe that this is a bug that affects only certain app servers (jamwiki.org was upgraded to Tomcat 5.5 in April). The new code will hopefully be more robust, and should address a few of the lingering bug reports for non-ASCII character issues. -- Ryan 19-May-2007 17:35 PDT
Fix added to Subversion as revision 1477. -- Ryan 05-Aug-2007 23:36 PDT

Oracle Installation Problem - root cause identified[edit]

JAMWiki 0.5.4 with corrected web.xml (see above), AppServer: WebSphere 6.1.0.2, DB: Oracle 10g XE, driver: oracle.jdbc.driver.OracleDriver

Just as User:bensayers, I am running into error "Failure while executing insert into jam_topic_version ( topic_version_id, topic_id, edit_comment, version_content, wiki_user_id, edit_type, wiki_user_ip_address, edit_date, previous_topic_version_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ? )." when configuring JAMWiki to use Oracle as an external database. When looking into the app server log, I find the following messages below:


[7/4/07 17:33:06:844 CEST] 00000029 DatabaseConne W   Rolling back database transactions
[7/4/07 17:33:06:875 CEST] 00000029 DatabaseConne W   Rolling back database transactions
[7/4/07 17:33:07:047 CEST] 00000029 SetupServlet  E   Setup error
                                 java.lang.Exception: Failure while executing insert into jam_topic_version
 ( topic_version_id, topic_id, edit_comment, version_content, wiki_user_id, edit_type, wiki_user_ip_address, edit_date,
 previous_topic_version_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ? )
	at org.jamwiki.db.WikiPreparedStatement.executeUpdate(WikiPreparedStatement.java:119)
	at org.jamwiki.db.AnsiQueryHandler.insertTopicVersion(AnsiQueryHandler.java:534)
	at org.jamwiki.db.AnsiDataHandler.addTopicVersion(AnsiDataHandler.java:106)
	at org.jamwiki.db.AnsiDataHandler.writeTopic(AnsiDataHandler.java:1239)
	at org.jamwiki.db.WikiDatabase.setupSpecialPage(WikiDatabase.java:249)
	at org.jamwiki.db.WikiDatabase.setupSpecialPages(WikiDatabase.java:263)
	at org.jamwiki.db.WikiDatabase.setup(WikiDatabase.java:180)
	at org.jamwiki.db.AnsiDataHandler.setup(AnsiDataHandler.java:1081)
	at org.jamwiki.WikiBase.reset(WikiBase.java:184)
	at org.jamwiki.servlets.SetupServlet.initialize(SetupServlet.java:138)
	at org.jamwiki.servlets.SetupServlet.handleJAMWikiRequest(SetupServlet.java:72)
	at org.jamwiki.servlets.JAMWikiServlet.handleRequestInternal(JAMWikiServlet.java:74)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:839)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:774)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:460)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:425)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:972)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
	at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
	at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
	at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
	at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
	at org.jamwiki.servlets.JAMWikiFilter.doFilter(JAMWikiFilter.java:58)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:701)
	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:646)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
	at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
	at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
	at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:290)
	at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
	at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
	at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
Caused by: java.sql.SQLException: Data size bigger than max size for this type: 7624
	at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
	at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
	at oracle.jdbc.ttc7.TTCItem.setArrayData(TTCItem.java:147)
	at oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(DBDataSetImpl.java:2492)
	at oracle.jdbc.driver.OraclePreparedStatement.setItem(OraclePreparedStatement.java:1194)
	at oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement.java:1614)
	at org.apache.commons.dbcp.DelegatingPreparedStatement.setString(DelegatingPreparedStatement.java:132)
	at org.jamwiki.db.WikiPreparedStatement.loadStatement(WikiPreparedStatement.java:143)
	at org.jamwiki.db.WikiPreparedStatement.executeUpdate(WikiPreparedStatement.java:110)
	... 67 more


10 tables have been created successfully, but the "Data size bigger than max size for this type" looks like being the root cause. Does this help to identify the problem? -- Carsten Seiffert 04-Jul-2007 08:36 PDT

Weird - I just installed JAMWiki on Oracle at work the other day without incident. Just to verify, when you installed you selected database type "Oracle", right? Oracle needs the version_content column to be a CLOB rather than a TEXT field to avoid issues with content size. If that's not the issue then I'll need to investigate further. Thanks for the report! -- Ryan 04-Jul-2007 10:22 PDT
I found it when debugging - the ojdbc14.jar installed on the Application Server was outdated (I had not been aware of that). Oracle's version 9 driver has a limitation of 4k for CLOB size - using the 10g driver instead did fix it, everything works now. -- Carsten Seiffert 05-Jul-2007 02:00 PDT
Thanks for taking the time to debug & then update the Supported Configurations page. Hopefully in the near future everyone will have upgraded to the latest & greatest Oracle version and this type of issue won't crop up as frequently. -- Ryan 05-Jul-2007 20:04 PDT

Page with no content causes errors[edit]

It is possible to create a new page with no content. This page will then throw a NPE when it is diffed or any attempt is made to edit it. I believe the problem is due to the fact that a new version is not created if a page has not changed or has no content, but that rule should be ignored when a page is first being created. -- Ryan 26-Jul-2007 11:13 PDT

This issue may be Oracle specific - I'm unable to reproduce it on an installation running Postgres with the latest 0.6.0 code. -- Ryan 26-Jul-2007 19:11 PDT
Stack trace when doing a diff against the new topic:
2007-07-27 09:00:34,989 SEVERE: org.jamwiki.db.AnsiDataHandler - No versions found for 543 against 0
2007-07-27 09:00:34,989 SEVERE: org.jamwiki.servlets.ServletUtil - Servlet error
java.lang.Exception: No versions found for 543 against 0
	at org.jamwiki.db.AnsiDataHandler.diff(AnsiDataHandler.java:401)
	at org.jamwiki.servlets.DiffServlet.diff(DiffServlet.java:83)
	at org.jamwiki.servlets.DiffServlet.handleJAMWikiRequest(DiffServlet.java:42)
	at org.jamwiki.servlets.JAMWikiServlet.handleRequestInternal(JAMWikiServlet.java:74)
Stack trace when trying to save an edit of the new topic:
2007-07-27 09:02:00,333 SEVERE: org.jamwiki.servlets.ServletUtil - Servlet error
java.lang.NullPointerException
	at org.jamwiki.servlets.EditServlet.save(EditServlet.java:281)
	at org.jamwiki.servlets.EditServlet.handleJAMWikiRequest(EditServlet.java:59)
	at org.jamwiki.servlets.JAMWikiServlet.handleRequestInternal(JAMWikiServlet.java:74)
-- Ryan 27-Jul-2007 08:42 PDT
Oracle converts empty strings to null values, which seems to have been the cause of the problem. An ugly hack has been implemented in revision 1782 so that if a topic is retrieved and the topic content is null it will be automatically converted to an empty string. -- Ryan 11-Aug-2007 10:40 PDT

Indentation spacing[edit]

Is there supposed to be a clear line above all indentations, the way there is following no indentation? Or is there not supposed to be a blank line following no indentation.

Regular/none indentation

Single indentation, will have blank line above
Double indentation, will NOT have blank line above
Triple indentation, will NOT have blank line above

Regular/none indentation

Double indentation, after regular, will have a blank line

Regular/none indentation

Triple indentation, after regular, will have a blank line
Single indentation, following triple, half-height blank line
Single indentation, no blank line
Double indentation, no blank line
Double indentation, no blank line

Just a note to say I didn't miss this one, but since it doesn't seem critical I was planning on pushing it to the next release. My guess is that the problem is the paragraph parser again, which has been an ongoing battle. -- Ryan 16-Aug-2006 16:09 PDT

Looks like this is CSS - the HTML generated seems to be the same as what Mediawiki is generating. I've updated the default JAMWiki stylesheet to more closely conform to this list tag parsing, let me know if it helps. -- Ryan 22-Aug-2006 16:39 PDT
This issue seems to have been resolved by revision 1778. -- Ryan 11-Aug-2007 12:12 PDT

MessageDigest problem[edit]

I'm trying to install jamwiki on a server which runs jrun4. Having navigated to the page, filled it out and clicked "save changes" the page reloads with the following error at the top:

"An unknown system error has occurred. The error message is: SHA-512 MessageDigest not available."

Any ideas??

http://www.adobe.com/products/jrun/ indicates that JRun 4 is JDK 1.3 compatible, and JAMWiki requires JDK 1.4 or greater. The error you received is due to the fact that JAMWiki stores passwords encrypted using the SHA-512 algorithm, which according to http://java.sun.com/j2se/1.4.2/docs/guide/security/CryptoSpec.html#AppA should be a part of JDK 1.4. I suspect that a check should probably be added to JAMWiki to verify that the JDK is 1.4 or greater - sorry it won't work for you, but thanks for the report! -- Ryan 01-Dec-2006 02:25 PST
I'm getting the exact same error with JDK 1.4.1_02-b06. Some quick googling seems to suggest that SHA-512 was introduced with JDK 1.4.2, which , if true, leads me to the conclusion that JAMWiki in fact requires JDK 1.4.2 or above, not just 1.4 or above, as indicated on Installation. Couldn't there be a fallback for JDK 1.4.0/1.4.1? -- 77.57.12.10 12-Jun-2007 07:50 PDT
Thanks for pointing this out. I'll add a fallback to JAMWiki 0.6.0 unless someone else submits a patch first (hint to developers out there!) -- Ryan 12-Jun-2007 09:05 PDT
This does the trick for me. Please review carefully, though, I'm by no means an expert. -- Luzi 77.57.12.10 12-Jun-2007 14:51 PDT
Thanks for the time you've spent investigating, it's very much appreciated! I'll take a closer look at the linked solution and make sure that it or something similar is included in the next release. -- Ryan 12-Jun-2007 22:35 PDT
I've committed this to Subversion with only one addition to the patch you provided. If someone is using a JDK that does not support the SHA-512 algorithm and then later upgrades, their existing user passwords would be unavailable since the code would then try to use the SHA-512 algorithm. To work around that issue the code will now save a property value with the encryption algorithm, so that even if the JDK is upgraded the old algorithm can still be used and the old passwords can still be validated against. Thanks again for the patch, and let me know if you want a credit in the CREDITS.txt file - I'd just need to know what name to credit you with (typically something like "Ryan Holliday (wrh2)"). -- Ryan 20-Jun-2007 22:10 PDT
Nice to see this getting fixed! The contribution is hardly large enough to deserve being credited, but just in case, the name is "Luzius Thöny (luzi)". -- 77.57.12.10 28-Jun-2007 09:04 PDT
Resolved in revision 1498. -- Ryan 11-Aug-2007 12:25 PDT

Another Oracle NPE[edit]

Oracle's "can't save an empty string" issue cropped up again...

2007-08-30 16:16:49,507 SEVERE: org.jamwiki.servlets.ServletUtil - Servlet error
java.lang.NullPointerException
            at org.jamwiki.servlets.EditServlet.save(EditServlet.java:285)
            at org.jamwiki.servlets.EditServlet.handleJAMWikiRequest(EditServlet.java:59)
            at org.jamwiki.servlets.JAMWikiServlet.handleRequestInternal(JAMWikiServlet.java:74)
            at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
            at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
            at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:857)
            at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)

-- Ryan 31-Aug-2007 11:17 PDT

Resolved by revision 1820. -- Ryan 02-Sep-2007 23:13 PDT

link problem with identical link names[edit]

Create a document with some headlines, such that an outline is created. If two headlines carry the same name, the link from the outline always only navigates to the first headline.

This should be resolved by revision 1836. -- Ryan 10-Sep-2007 23:35 PDT

Internal links and toc[edit]

Something like ==== [[page header|text]] ==== leads to a page header|text entry in the toc, the body appearance is o.k. I think that's not what one expects to happen... ;) -- fmr 07-May-2007 10:11 PDT

This should be resolved by revision 1846 and will be included in the next release. Note that the code isn't yet on jamwiki.org, but will be copied over in the next day or two. -- Ryan 16-Sep-2007 22:20 PDT

Upload File Spam[edit]

Anonymous users can upload files even if anonymous posting is not allowed. It is causing lots of spam in my wiki page. This is a critical issue IMO.

JAMWiki 0.6.0 allows uploading to be restricted to specific users. In the mean time have a look at the upload blacklist / whitelist settings in Special:Admin - eliminating html uploads got rid of the vast majority of spam on jamwiki.org. -- Ryan 31-Aug-2007 10:04 PDT

Upgrade to 0.6.0 not working[edit]

Archived from the Feedback page:

After I followed the upgrade procedure (as I have done in previous versions) I get the following error message:

org.apache.jasper.JasperException: This absolute uri (http://java.sun.com/jsp/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application
	at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:60)
	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:385)
	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:109)
	at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:116)
	at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:312)
	at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:339)
	at org.apache.jasper.compiler.Parser.parseElements(Parser.java:749)
	at org.apache.jasper.compiler.Parser.parse(Parser.java:77)
	at org.apache.jasper.compiler.ParserController.parse(ParserController.java:159)
	at org.apache.jasper.compiler.ParserController.parse(ParserController.java:111)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:185)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:355)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:198)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:138)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2459)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:132)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:126)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Unknown Source)

normally I should see a textbox tp typ my usernae and password for the database upgrade! I'm working with Tomcat version 4.1.34 and JDK 1.5 together with MSSQL

Can anyone help me with this problem?

I'm not sure if this will solve the problem, but two things to check: first, have you made any modifications to the web.xml file? If so, make sure that the taglib definitions include the URI above for the JSTL core library. Second, is it possible that Tomcat is using cached files? You can get rid of any cached JSPs by deleting the contents of the tomcat/work/ directory. Hopefully one of those will help, if not I'll need to investigate further. Thanks for the report! -- Ryan 26-Sep-2007 07:38 PDT

I didn't made any changes to the web.xml file. Just using the one enclosed in de war-file. Deleted the cached files as you sugested but did't made any difference. I'm upgrading from version 0.5.3 i'm skipping a version, could that be a problem? --Angel 27-Sep-2007 00:14 PDT

I have upgrade my Tomcat installation to version 5.x and jdk 1.5. This seems to work. Only have some trouble updating my tables.

Automatic update of my database doesn't work. Manually it work until the last Query :

              INSERT into jam_role_map (role_name, wiki_user_id)
                   select 'ROLE_ADMIN', wiki_user_id
                   from ictwiki.jam_wiki_user where is_admin = 1;
              INSERT into jam_role_map (role_name, wiki_user_id)
                   select 'ROLE_DELETE', wiki_user_id
                   from ictwiki.jam_wiki_user where is_admin = 1;
              INSERT into jam_role_map (role_name, wiki_user_id)
                   select 'ROLE_SYSADMIN', wiki_user_id
                   from ictwiki.jam_wiki_user where is_admin = 1;
              INSERT into jam_role_map (role_name, wiki_user_id)
                   select 'ROLE_TRANSLATE', wiki_user_id
                   from ictwiki.jam_wiki_user where is_admin = 1;
              ALTER TABLE ictwiki.jam_wiki_user DROP COLUMN is_admin;

This give me the following error :


(1 row(s) affected)

Server: Msg 547, Level 16, State 1, Line 4
INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'jam_fk_role_map_role'. The conflict occurred in database 'wiki', table 'jam_role', column 'role_name'.
The statement has been terminated.

(1 row(s) affected)


(1 row(s) affected)

Server: Msg 5074, Level 16, State 1, Line 13
The object 'DF__jam_wiki___is_ad__7D78A4E7' is dependent on column 'is_admin'.
Server: Msg 4922, Level 16, State 1, Line 13
ALTER TABLE DROP COLUMN is_admin failed because one or more objects access this column.

Got it working again. updated my database manually, but had to alter the given statements slightly. --Angel 28-Sep-2007 05:02 PDT

Glad it's working for you - if there are any errors and you're willing to submit a patch it would be gladly accepted :) Sorry I couldn't provide more help in debugging, but I've been buried in work the past two weeks. -- Ryan 28-Sep-2007 07:22 PDT

Since I fixed most problems manually. I'm unable to give a patch. I can give you a detailed description on what I had to do to get it all working again. Let me know if you want that. --Angel 01-Oct-2007 02:29 PDT

If it's something that would be helpful to others then feel free to provide more info, but it sounds like this was a custom solution that worked just for you. I've been giving some thought to improving the upgrade process, since it seems like that's where the majority of the bug reports come from, so hopefully the next major release will go a bit smoother. -- Ryan 01-Oct-2007 23:26 PDT

Including images[edit]

Archived from the Feedback page:

Is there a possibility to include images without being links to their original upload files? I just want to get rid of the dotted line below images... -- Frank 11-Sep-2007 03:09 PDT

Presently no. I've been following Mediawiki's lead on wiki syntax, and I don't think that they offer that functionality. However, there shouldn't be any decoration for images - if there is it's possible the CSS that's implemented in the StyleSheet topic is wrong. What browser are you using, and do you see lines under the images on this page? -- Ryan 11-Sep-2007 22:19 PDT
I'm using Firefox 2.0 in a Linux box. And, there are no dotted lines under the images on the Parser Test page. What do I have to do? -- Frank 12-Sep-2007 05:09 PDT
CSS for a site is controlled using the StyleSheet topic. jamwiki.org runs the default StyleSheet for JAMWiki, and upgrades automatically upgrade the stylesheet using the file that can be found in /WEB-INF/classes/pages/StyleSheet.txt. If you paste the contents into the StyleSheet topic for your site then the CSS should match that of jamwiki.org, and the lines under images should go away. Note that if you've customized the CSS for your site then you'll need to re-update that file with your customizations after copying the default styles. -- Ryan 12-Sep-2007 08:00 PDT
You're right! Upgrading to 0.6.0 made those lines disappear..... and my CSS customizations alike. One more for the upgrade todo list. ;) -- Frank 13-Sep-2007 02:25 PDT
In order to fix the problem with people losing CSS customizations during upgrades I'll probably need to split the stylesheet into a system stylesheet that can't be modified and a customizable stylesheet. A side benefit of that approach is that it would allow people to start developing JAMWiki skins, which I suspect would be a popular feature. In the mean time the hope was that since the stylesheet is a wiki topic it would be easy enough to see what changed during an upgrade and to restore an old version if necessary. Sorry about any trouble! -- Ryan 14-Sep-2007 06:29 PDT

Upgrade problems[edit]

Archived from the Feedback page:

Tried to switch to 0.6.0. Running tomcat5 on a opensuse10.2 box I stopped tomcat and moved the jamwiki dir to a save plave (upload and system dirs are underneath). Then I replaced jamwiki.war with the new .war file. Restarting tomcat and browsing the JW URL brings up the JW setup page and creates the JW dir (shouldn't that happen immediately after starting tomcat without browsing the URL?). Now I copied dirs system and upload to their appropriate places and the .properties files specified in the Upgrade section. Restarting tomcat and browsing the URL brings up a virginal JW, though dirs system and upload contain the old files. Any suggestions? -- fmr 05-Sep-2007 07:59 PDT

Upgrades are a bit trickier than installs - see Installation#Upgrades. At present it's necessary to deploy the war file as an exploded war, and additionally you'll want to re-use your existing jamwiki.properties file so that you don't lose database settings, wiki preferences, etc. Hopefully that helps! -- Ryan 05-Sep-2007 08:21 PDT
After RTFM (-> Upgrade.txt) I tried to create the tables like delineated. Executing
java -jar /usr/share/java/hsqldb.jar --sql "CREATE TABLE jam_role ( role_name VARCHAR(30) NOT NULL, role_description VARCHAR(200),
CONSTRAINT jam_pk_role PRIMARY KEY (role_name), CONSTRAINT jam_unique_role_name UNIQUE (role_name) );" jamwiki

seems to work w/o error (no message), but trying to create jam_role_map referencing the other tables induces an error message telling that jam_role does not exist. That links to the hsql problem depicted above that one can browse data but can not manipulate the database that way. -- fmr 07-Sep-2007 04:04 PDT

I'm the first to admit that the JAMWiki documentation isn't as good as it needs to be,
Did I blame JWs documentation? Wouldn't dare.... ;) ... and didn't.
but just to clarify - did the automatic upgrade process (ie deploy the new WAR,
Deliberately you did not mention removing the old WAR and the associated JW directory, did you? This should work by only deploying the new WAR? Acting that way nothing happens to my JW installation, browsing the wiki delivers everything like it was before, considering the other steps you mentioned.
copy the old properties file, view a wiki page - which redirects to the upgrade page - and then let the upgrade happen automatically) not work? The manual instructions in UPGRADE.txt should only be needed if the automatic upgrade fails.
I thought that was how far we got after your first reply........ ;)
That said, it looks like I need to set up a way to interact with HSQL when installed as the internal JAMWiki database. I'll see what I can come up with. -- Ryan 07-Sep-2007 07:35 PDT
In any case interaction with HSQL is an interesting issue. -- fmr 07-Sep-2007 07:55 PDT
Upgrades should be easy, so my comments about potential improvements to the documentation were more meant as self-criticism than in reference to anything you've said :) I'll have to try a Tomcat deployment using just the WAR file to see if I can reproduce your issue - there are known issues when installing or upgrading from a WAR file that isn't exploded, and I haven't actually tried it on Tomcat yet, so I'll see if I can figure anything out. Apologies for the troubles, and thanks for helping out by providing feedback. -- Ryan 07-Sep-2007 09:15 PDT
I just copied a JW backup to my linux box to try out again... and oops, it worked! Becoming audacious I did it again on our server. The difference between my box and the server was, the latter ignored the new WAR file (the first time I deployed the JW WAR it took only seconds to auto-explode). I had to extract/explode the WAR manually, but after that everything looks fine. -- Frank 12-Sep-2007 04:21 PDT

ROLE_VIEW Problem[edit]

JAMWiki Version 0.6.0

I unchecked ROLE_VIEW for GROUP_ANONYMOUS in Role view. After that the login page was not formated (no css) and when I tried to login the browser redirected me to the JAMWiki logo. Anyone else with this problem?

Wow, weird. I can confirm that I'm seeing that issue as well and will try to get a fix ready today. Thanks for the bug report. -- Ryan 21-Oct-2007 09:47 PDT
I think I've found the problem - try modifying your /WEB-INF/applicationContext-acegi-security.xml file to add a pattern for /**/*.css and /images/** as shown in the example below:
	
<bean id="filterInvocationInterceptor" class="org.acegisecurity.intercept.web.FilterSecurityInterceptor">
	<property name="authenticationManager">
		<ref local="authenticationManager" />
	</property>
	<property name="accessDecisionManager">
		<ref local="accessDecisionManager" />
	</property>
	<property name="objectDefinitionSource">
		<value>
			PATTERN_TYPE_APACHE_ANT
			/**/Special:Admin=ROLE_SYSADMIN
			/**/Special:Edit=ROLE_EDIT_EXISTING,ROLE_EDIT_NEW
			/**/Special:Login=ROLE_ANONYMOUS,ROLE_USER
			/**/Special:Maintenance=ROLE_SYSADMIN
			/**/Special:Manage=ROLE_ADMIN
			/**/Special:Move=ROLE_MOVE
			/**/Special:RecentChangesFeed=ROLE_ANONYMOUS,ROLE_USER
			/**/Special:Roles=ROLE_SYSADMIN
			/**/Special:Setup=ROLE_ANONYMOUS,ROLE_USER
			/**/Special:Translation=ROLE_TRANSLATE
			/**/Special:Upload=ROLE_UPLOAD
			/**/Special:Upgrade=ROLE_ANONYMOUS,ROLE_USER
			/**/*.jsp=ROLE_ANONYMOUS,ROLE_USER
			/**/*.css=ROLE_ANONYMOUS,ROLE_USER
			/images/**=ROLE_ANONYMOUS,ROLE_USER
			/**=ROLE_VIEW
		</value>
	</property>
</bean>

That fixes the issue for me - let me know if it works for you as well. -- Ryan 21-Oct-2007 10:03 PDT
That fixes the issue for me. Thanks. I love JAMWiki. Jonas 22-Oct-2007 17:16 CET
Glad it fixed the problem, and the JAMWiki love is much appreciated - most people tend to comment only when there's a problem, so it's great to receive some positive feedback as well :) -- Ryan 22-Oct-2007 21:01 PDT

WebSphere support[edit]

Moved from the Feedback page:

To get jamwiki 0.4.1 and 0.5.2 working with WebSphere 5.1.1.12 on SuSE 8.1 (Linux) I found it was necessary to replace the hsqldbmain jar file with hsqldb.jar. Unfortunately, I don't know exactly what version this jar is from.

Additionally, WebSphere Enterprise seems to be quite picky. The web.xml elements must appear in the same order they are listed in the DTD. For reference, here is the web.xml I put together for jamwiki 0.5.2

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
   <web-app>
	<!--
	NOTE: do not use the context-param element to initialize the
	ApplicationResources resource bundle here due to a bug in the JSTL and
	Tomcat4 that causes response encoding to be finalized and thus prevents
	setting page encoding to UTF-8.  Instead, load the resource bundle in
	page-init.jsp.
	-->
      <display-name>jamwiki</display-name>
      <description>jamwiki</description>
      <context-param>
       	 <param-name>contextConfigLocation</param-name>
       	 <param-value>/WEB-INF/applicationContext-acegi-security.xml</param-value>
      </context-param>
      <!-- set encoding, cache headers, etc. -->
      <filter>
         <filter-name>JAMWikiFilter</filter-name>
         <filter-class>org.jamwiki.servlets.JAMWikiFilter</filter-class>
         <init-param>
            <param-name>encoding</param-name>
            <param-value>UTF-8</param-value>
         </init-param>
      </filter>
      <filter>
         <filter-name>Acegi Filter Chain Proxy</filter-name>
         <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
         <init-param>
            <param-name>targetClass</param-name>
            <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
         </init-param>
      </filter>
      <filter-mapping>
         <filter-name>JAMWikiFilter</filter-name>
         <url-pattern>/*</url-pattern>
      </filter-mapping>
      <filter-mapping>
         <filter-name>Acegi Filter Chain Proxy</filter-name>
         <url-pattern>/*</url-pattern>
      </filter-mapping>
      <listener>
       	 <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>
      <servlet>
         <servlet-name>jamwiki</servlet-name>
         <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
         <servlet-name>jamwiki</servlet-name>
         <url-pattern>/en/*</url-pattern>
      </servlet-mapping>
      <!-- virtual wiki mapping(s) -->
      <servlet-mapping>
         <servlet-name>jamwiki</servlet-name>
         <url-pattern>/test/*</url-pattern>
      </servlet-mapping>
      <welcome-file-list>
         <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>
      <taglib>
         <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
         <taglib-location>/WEB-INF/c.tld</taglib-location>
      </taglib>
      <taglib>
         <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
         <taglib-location>/WEB-INF/fmt.tld</taglib-location>
      </taglib>
      <taglib>
         <taglib-uri>http://jamwiki.org/taglib</taglib-uri>
         <taglib-location>/WEB-INF/jamwiki.tld</taglib-location>
      </taglib>
      <taglib>
         <taglib-uri>http://acegisecurity.org/authz</taglib-uri>
         <taglib-location>/WEB-INF/authz.tld</taglib-location>
      </taglib>
   </web-app>
Thanks - I'll take a look this weekend. -- Ryan 15-Mar-2007 22:30 PST
Sorry for the delay. I used to test with Websphere before my trial license expired, and to get things working I had to update the JAMWiki web.xml to the current version that is shipped with JAMWiki. As far as I can tell the only difference between the current web.xml and your version is the display-name and the description elements - does Websphere 5.1 fail without those? Also, the hsqldbmain.jar issue is an odd one - according to the HSQL docs the only difference should be some support files. If you happen to notice any relevant messages in the logs that might explain the problem I'd be interested. Thanks for the report! -- Ryan 20-Mar-2007 19:57 PST
The current web.xml file is incorrect - it specifies version 2.4 instead of 2.3. The web.xml information specified above looks more correct. -- Ryan 21-Oct-2007 13:39 PDT
The web.xml specification issue has been corrected for the 0.6.2 release in revision 1894. -- Ryan 23-Oct-2007 21:40 PDT
Note that the 2.3 web.xml causes issues with JSP code of the form:

<input type="<c:out value="${foo}" />" />

Needs investigation - if anyone knows whether this is expected behavior and there is a workaround, or if it's a configuration issue, any insights would be appreciated. -- Ryan 28-Oct-2007 21:52 PST

Anonymous access problems in 0.6.0[edit]

Since upgrading from JAMWiki 0.5.4 to 0.6.0, anonymous users are unable to view the wiki.

When Tomcat is first started, if anyone tries to access the wiki site they are presented with a login page and told that they don't have access to the "Home" article (our default page). If they click any other pages, they get the same result. The CSS and image files also aren't served up properly.

In "User/Group Roles", GROUP_ANONYMOUS is set to have the ROLE_UPLOAD and ROLE_VIEW roles, as per the default settings.

If I set GROUP_ANONYMOUS to also have the ROLE_ADMIN role, click save, then untick the ROLE_ADMIN role and save again, suddenly everyone can view the wiki (at least until Tomcat is restarted).

Any ideas?

Our environment is as follows:

  • JAMWiki 0.6.0, using embedded hsqldb database
  • Apache Tomcat 6.0.13
  • Java 1.6.0_02-b05
  • Windows Server 2003 R2 Enterprise SP1

Thanks for your help. -- Wayne

Unfortunately I haven't seen anything like that on the installations I manage. My first suggestion would be to make sure that all of the old 0.5.4 files have been purged from Tomcat's cache - clear the tomcat/work directory. If the problem persists let me know and I'll see if I can figure out how to address it. Thanks for the bug report, and sorry for the trouble. -- Ryan 25-Sep-2007 19:23 PDT

Hi wiki gurus,

i have the similar problem after upgrading to 0.6.0 from 0.5.1, the only difference is my environment Our environment is as follows:

  • JAMWiki 0.6.0, using oracle 10g database
  • BEA weblogic 9.2 Mp2
  • BEA jRockit 1.5.0-11 (jrockit-R27.3.0-jdk1.5.0_11)
  • SUSE Linux 9.2 64 bit

Please some one help me, our users are stuck, and my knowledge base is totally stored in this wiki. appreciate your help -- Durga

Just to verify, was this installation done with an exploded WAR file? It is extremely important that the new (0.6.0) version of the /WEB-INF/applicationContext-acegi-security.xml file be used. If possible, could you upload your version of that file to jamwiki.org? Also, did you see any errors in your log file during the upgrade? Sorry for the trouble, and hopefully it will be easy to resolve. -- Ryan 12-Oct-2007 14:15 PDT

-- thanks for the reply, the deployment is done through exploded. the i have uploaded the /WEB-INF/applicationContext-acegi-security.xml file here i saw some errors while upgrading, saying i cant create the table(s), so i followed the manual upgrade as per the UPGRADE.txt file.

Please email me dkothapa@bear.com for faster resolution for the above problem, or else will give you a call. --Durga 15-Oct-2007 08:49 PDT


I'm at work so don't have a lot of time to work through issues right now, but could you also include the output of the following queries? Thanks!
select * from jam_role_map;
select * from jam_role;
select * from jam_group;
select * from jam_wiki_user where wiki_user_id = 1;
Sorry again for the trouble - I performed numerous upgrade tests without issue prior to the release of 0.6.0, including with Oracle, so it's frustrating to see that people are encountering bugs. -- Ryan 15-Oct-2007 10:09 PDT


Thanks ryan, uploaded the SQL Output, Please find that file here --Durga 15-Oct-2007 10:30 PDT

Thanks for the upload - I know this is a critical issue for you, so I'll take a look over my lunch hour, which will probably be sometime between noon and 2:00 PDT. -- Ryan 15-Oct-2007 10:48 PDT
Looking at your database vs. mine the following are different, and it looks like there was a typo for group names in the UPGRADE.txt file that might be causing your problems:
update jam_group set group_name = 'GROUP_ANONYMOUS' where group_name = 'ANONYMOUS_USERS';
update jam_group set group_name = 'GROUP_REGISTERED_USER' where group_name = 'LOGGED_IN_USERS';
You may also want to do the following, depending on what you're using ROLE_ANONYMOUS for:
delete from jam_role_map where user_id = 0; // bogus user id
delete from jam_role where role_name = 'ROLE_ANONYMOUS'; // keep only if you need it
delete from jam_role where role_name = 'ROLE_DELETE'; // unused role
delete from jam_role_map where group_id = 1 and role_name = 'ROLE_ADMIN'; // don't give anonymous admin access

After making these changes you will need to restart BEA, and with any luck you will be OK. Let me know if that works! -- Ryan 15-Oct-2007 13:43 PDT


Yahoo.. It is resolved. Thanks a zillion ryan. the main culprit in my Wiki is the group names, as per the typo in UPGRADE.txt the GROUP NAMEs are created. --Durga 15-Oct-2007 14:49 PDT

Glad it worked, and apologies again for the trouble. I'll have to remember to quadruple check the UPGRADE.txt document next time! I've got some ideas for making the automatic upgrade process more robust, so with any luck the need for that file may eventually go away. -- Ryan 15-Oct-2007 15:45 PDT

Default Topic[edit]

I have changed Default Topic. But after "Login" or "Logout" do not redirect to my default topic

It looks like there's definitely a problem in the code somewhere. I'll look into it. Thanks for the report! -- Ryan 30-Sep-2007 01:29 PDT
I think I figured it out. The "Default Topic" on Special:Admin is the default topic to use when creating new virtual wikis (which can be done from Special:Maintenance). Changing the default for the virtual wiki in question seems to work. I'll add a help text label to the next release to hopefully make this clearer, as I was confused when I tried this last night, and I wrote it - doh! -- Ryan 30-Sep-2007 09:16 PDT

Missing SQL entry in Upgrade.txt[edit]

i found a error in the UPGRADE.txt document.

  • in line 126 it tries to insert a role map entires for a role called "ROLE_DELETE", but that role is not there in section 3 e. Please check. --Durga 15-Oct-2007 08:49 PDT
ROLE_DELETE is not actually used and was included in 0.6.0 by mistake. It has been removed from 0.6.1. -- Ryan 15-Oct-2007 10:05 PDT

Index Content Doesn't Display in IE 6.0 SP2[edit]

The indexed content (which has been replaced by DIV tags in 0.6.1) doesn't display at all in IE 6.0 SP2. Firefox 2.0.0.8 (latest) works fine. Symptoms are that the index that displayed on 0.6.0 displayed fine on IE 6.0 SP2, but are blank on 0.6.1. This is true of both my site on my server and also the main JAMWiki Site --Bulldog 23-Oct-2007 06:35 PDT

Additional information. The site (JAMWiki.org) _does_ display correctly in IE 7.0. --Bulldog 23-Oct-2007 06:54 PDT

Thanks for the report. Can you clarify which page (full URL) you are referring to when you say "indexed content"? I've noticed the the "Documentation" section on http://jamwiki.org/wiki/en/StartingPoints isn't showing up with IE6, but I haven't noticed any other issues. I've only done a quick run-through with IE6, so I've likely missed something. -- Ryan 23-Oct-2007 07:45 PDT
Sorry - I was referring to the auto-generated "Documentation" section that you mention (I wasn't sure what it was called). But the bug reports list also doesn't show up - the same issue I suspect. I know most of the world has upgraded (or will shortly) to IE 7.0, but we're stuck on IE 6.0SP2 for now. So the two URLs that I'm specifically talking about are http://jamwiki.org/wiki/en/StartingPoints as well as http://jamwiki.org/wiki/en/Bug_Reports. Let me know if you need more detail. --Bulldog 23-Oct-2007 09:44 PDT
Thanks, that helps narrow it down. If I have some time after work today I'll see if there's an easy update to the StyleSheet that can be made to update the issue. Hopefully this one will be an easy fix. Also, for the record, I'd definitely like to make sure IE6 works properly - the last metric I looked at for directv.com (where I'm working) was something like 30% IE6 usage. -- Ryan 23-Oct-2007 10:33 PDT
Okay - a few more points. When loading in IE 6, the auto-generated list "flashes" on and then appears to be cleared. If I take the HTML, and paste it into new file and then load in a browser that allows everything to show, which essentially removes the stylesheet. I probably should help debug it, since I have the ability :-) --Bulldog 24-Oct-2007 06:31 PDT
If you take a look at the history for StyleSheet, the last two changes (http://jamwiki.org/wiki/en/Special:Diff?type=arbitrary&topic=StyleSheet&diff%3A6581=on&diff%3A6514=on) fix the TOC issue for me. Let me know if you're still seeing any problems! Note that the home page is still a bit messed up, but since that's custom CSS that affects only jamwiki.org I'm a bit less worried about it. -- Ryan 24-Oct-2007 08:00 PDT
That fixes it for me. Thanks! --Bulldog 24-Oct-2007 10:22 PDT

Characters bad presented in TOC[edit]

I'm writing contents in Spanish, using characters such as á, é, ñ, etc... The text looks fine, but the TOC does not. It shows the caracters like their HTML representation: &aacute, &eacute...

This is the same issue as the TOC umlaut bug report and this bug report, which was fixed for the next release by revision 1899. Since several people have reported the same problem I may need to get the next release out sooner... thanks for the report! -- Ryan 15-Nov-2007 05:47 PST

Ok, I see. Thanks you for all your effort. Yes, I'am willing to see the next version! Maybe I could help in some way, perhaps with a spanish translation. :-D Angel Pinazo

If you're interested in helping out with translations it would be much appreciated - the Spanish translations are very out-of-date! See How to Help#Translators for some details, and if you're interested I can give you access to the Special:Translation page on jamwiki.org. Thanks! -- Ryan 15-Nov-2007 08:29 PST

/TEST/<rep>/issue - the special character issue[edit]

Using a header with greater than/lower than signs (<>) causes escape (> <) in html on TOC. See http://www.jpox.org/servlet/wiki/en/Building_JPOX_using_Ant.

Of course, I could not reproduce the issue here :-) - erik Rendering_TOC_for_a_page_with_umlaut_%28%26auml%3B%2C%26ouml%3B%2C%26uuml%3B%2C_...%29_in_a_title

I think the fix that was applied for the TOC umlaut bug report (revision 1899) probably resolves the problem, but I'll verify that that's why it works on jamwiki.org but not in your local wiki. Thanks for the report! -- Ryan 11-Nov-2007 17:03 PST

Rendering TOC for a page with umlaut (ä,ö,ü, ...) in a title[edit]

I discovered a silly "bug" in the rendering of the TOC on top of a new page. If you use an (german) umlaut (ä,ö,ü, ...) in the head-line of an article you will see the html-encoding for the umlaut e.g.: &auml; in the generated TOC -- Michael Habbert 29-Oct-2007 07:40 PST

I have the same problem with french accented characters. Louis Martin 02-Nov-2007 02:37 PST

The problem seems to be in the class org.jamwiki.parser.TableOfContents in the method public String toHTML().

The line

text.append("<a href=\"#").append(Utilities.encodeForURL(entry.name)).append("\">").append(HtmlUtils.htmlEscape(entry.text)).append("</a>");

should be

text.append("<a href=\"#").append(Utilities.encodeForURL(entry.name)).append("\">").append(entry.text).append("</a>");

because the entry text is alraedy encoded when it arrive there. Louis Martin 02-Nov-2007 06:00 PST

Thanks for invesigating! I'll get a fix ready for the next release and will be sure to credit you in the CHANGELOG. -- Ryan 02-Nov-2007 06:18 PST

It's almost default virtual wiki's login page[edit]

I have created a virtual wiki (for example /zh_CN/). when i will edit some topic before i login in my virtual wiki, jamwiki will redirect to login page, but it almost default virtual wiki's login page, not my virtaul wiki's login page!

Thanks for the report - it is a long holiday weekend here this weekend, but I will try to look at this issue by Monday. If you don't see any update by then please add a reminder note so that I don't forget! -- Ryan 21-Nov-2007 22:06 PST
I believe that revision 1957 will solve this problem. -- Ryan 16-Dec-2007 09:33 PST

Default Virtual Wiki[edit]

Application server: tomcat5.5 OS:FreeBsd 6.2 Context Path: ""

error information: I change DEFAULT_VWIKI from "en" to "mn" on WikiBase.java. And I build source and upgrade my jamwiki 0.5.4 to jamwiki 0.6.0. But I have an error HTTP Status 404 - /en/Special:Login. not /mn/Special:Login I found my error. I some change on applicationContext-acegi-security-cas.xml and applicationContext-acegi-security.xml. Now my wiki looks ugly. Sorry my bad english

I'll investigate - I didn't test the new Acegi code very carefully with virtual wikis, so it's possible that something obvious was broken by those changes. Thanks for the bug report! -- Ryan 23-Sep-2007 20:10 PDT
I think this is the same issue as the one above, which should be solved by revision 1957. -- Ryan 16-Dec-2007 09:33 PST

Page stretch[edit]

Look at the last update I made to Baby Elephant. For some reason it stretches the page out. Is this a bug, or is there something in the syntax of that piece of content that forces the stretching? -- scroco 13-Nov-2006 18:02 PST

In Mediawiki syntax any line that starts with a space is considered to be preformatted text, and is therefore surrounded by <pre></pre> tags which the browser displays as it was entered - in this case as a very long line. Mediawiki also stretches the page for that syntax, although it looks like they might have done some CSS magic to ensure that the "edit" links and other page attributes still appear in the correct place. I'd be happy to apply a CSS fix if anyone has one, otherwise we can leave this bug report open in the hopes that someone will eventually submit a solution. Alternately I could add an option to disable preformatted text for lines beginning with spaces, but since that would be parser-specific I'd rather make that a secondary solution. -- Ryan 13-Nov-2006 18:34 PST
I've added some CSS to handle long <pre> lines, but it is only working for me on Firefox, and the implementation I've done simply hides any portion of the line that extends beyond the right margin. It's not ideal, but I'm not sure if there's a good solution for this problem. Anyone who has CSS suggestions (preferably tested) please submit, and you will be rewarded with fame, glory, and an entry in the CREDITS file. -- Ryan 25-Jan-2007 23:14 PST

List numbering problem[edit]

Problem :

  1. One
  2. Two
  3. dfdf
  4. sdfsd
  5. sdf
  6. sdfsd
  7. sdfsd
  8. sdfsdf
  9. sdfsdg
  10. Should'nt it be ten ???
  11. Eleven
  12. Twelve
I see ten - can you clarify what you're seeing? -- Ryan 01-Dec-2006 12:00 PST
Even on this wiki, I see "0. Should'nt it be ten ???" with a 0, not a 10. In case it might be of any help (which I doubt), I am using Internet Explorer 6.0.28. Even after the "supposed" ten, I see 1 instead of 11, 2 instead of 12, ... (Benoit - 04/10/2006)
Works OK for me with IE 7, but unfortunately I don't have a version of IE 6 to test with. The generated HTML is totally standard, so I suspect that perhaps it's a layout problem, and that there isn't enough room allocated to display two digit numbers with the current CSS. I'll investigate further. -- Ryan 04-Dec-2006 00:07 PST

Hi Ryan, I see only a single digit as well for numbering > 9 using IE6. Do check out the problem for this. Thanks. -- Kwee Tin 12-Feb-2007 18:06 PST

I just popped by to report this as well. It's got to be a CSS problem as it only affects IE6. I'd hate to see what happened if numbering went to 3 or more digits though. -DanR
I think this may have been resolved by revision 1778, but I won't be able to test with IE6 until Monday - if anyone else can verify it would be appreciated. -- Ryan 11-Aug-2007 12:19 PDT

IIS and French characters on Windows 2000 SP4[edit]

Copied from the Feedback page:

We've got the Wiki working fine with IIS using Resin for the .jsp files. However once a topic is entered with French accents such as è for example, IIS reports a 404 error while trying to access the page, while going through Resin on port 8080 works fine with the same link.

This works in Resin : someserver.somewhere.com:8080/wiki/syst%C3%A8me_d%27exploitation

But this doesn not : someserver.somewhere.com/wiki/syst%C3%A8me_d%27exploitation

I'm thinking it's the %C3%A8 encoding that IIS has problems with. Any ideas ?

-- Mike

This issue may be similar to Bug Reports#Character problem, although that user was using Tomcat. Just to be certain, IIS is configured for UTF-8 support, right? With Tomcat the server.xml file had to be modified to support UTF-8, so I suspect there may be a similar setting within IIS.

upload file problem[edit]

Copied from the Feedback page:

Hi Ryan, I do have a problem with the file-upload. Wen I do use the navigation-link: Special:Upload to upload a image It fails. Entering the image path and a description I click on save, after that I get a result-page - everything is fine but when I click on the link I get:

HTTP Status 404 - /upload/2007/2/wombat-left-17151531.gif
type Status report
message /upload/2007/2/wombat-left-17151531.gif
description The requested resource (/upload/2007/2/wombat-left-17151531.gif) is not available.
Apache Tomcat/5.0

Any Ideas? Thanks -- Michael Habbert 17-Feb-2007 06:15 PST

I haven't seen any upload issues myself, but the number one issue I want to address for 0.5.2 is the upload issue above, so I can investigate while working on that. Are there any messages in your logs about any errors being thrown when you do a file upload? -- Ryan 18-Feb-2007 00:54 PST

Hi Ryan, I found my test-file in the jamwiki-upload directory. But how do I access the image? Is there a page where I can see all the upload-files, or a file-explorer to select the image - to use inside a page? The jamwiki-logs don't show any errors at all. --Michael Habbert 18-Feb-2007 08:18 PST

Hi Michael, I had the same problem - not with upload, but with displaying the uploaded image a. in the page displayed directly after the upload and b. within the wiki page. I resolved the problem by changing the relative path to the upload folder (on the administration page, right under the absolute path. This worked for me: - absolute path: C:/tomcat/webapps/jamwiki-0.5.3/files - relative path: /jamwiki-0.5.3/files/ Hope it helps. --Markus 26-Apr-2007 06:17 PDT

Upgrade Problem[edit]

I am upgrading from GlassFish v2 and PostgreSQL 8.2. Here's the error (I have the server log but it could not fit in this page anymore:

Unable to complete upgrade to new JAMWiki version.: Failure while executing insert into jam_role_map ( role_name, wiki_user_id ) select 'ROLE_ADMIN', wiki_user_id from jam_wiki_user where is_admin = 1
Was there a "...caused by" in the server log? Typically SQL exceptions are logged with the failed SQL, followed by a cause, such as "primary key violation". I've done a few upgrades using Postgres, so it appears that you've hit something new and I'd definitely like to figure out what it is :) -- Ryan 27-Aug-2007 21:24 PDT
I just ran another upgrade, this time going from 0.5.4 to 0.6.0 beta3 with Postgres 8.0, and it seems to have gone OK, so I'd definitely be interested in knowing more about any problem you encountered! -- Ryan 27-Aug-2007 21:54 PDT

Here's the error log:


Log Level: SEVERE
Logger: org.jamwiki.servlets.UpgradeServlet
Name-Value Pairs: _ThreadID=14;_ThreadName=httpSSLWorkerThread-8080-1;_RequestID=64bae4a1-6ed4-401b-af9e-15a9c4dd44c6;
Record Number: 1029
Message ID: Unable to complete upgrade to new JAMWiki version. java.lang.Exception
Complete Message:
Failure while executing insert into jam_role_map ( role_name, wiki_user_id ) select 'ROLE_ADMIN', wiki_user_id from jam_wiki_user where is_admin = 1 at
 org.jamwiki.db.DatabaseConnection.executeUpdate(DatabaseConnection.java:210) at org.jamwiki.db.DatabaseUpgrades.upgrade060(DatabaseUpgrades.java:207) at org.jamwiki.servlets.UpgradeServlet.upgrade(UpgradeServlet.java:123) at org.jamwiki.servlets.UpgradeServlet.handleJAMWikiRequest(UpgradeServlet.java:65) at org.jamwiki.servlets.JAMWikiServlet.handleRequestInternal(JAMWikiServlet.java:74) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:857) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:475) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:440) at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.jamwiki.authentication.JAMWikiExceptionMessageFilter.doFilter(JAMWikiExceptionMessageFilter.java:70) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.jamwiki.authentication.JAMWikiAnonymousProcessingFilter.doFilter(JAMWikiAnonymousProcessingFilter.java:62) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:229) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.jamwiki.servlets.JAMWikiFilter.doFilter(JAMWikiFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
 Caused by: org.postgresql.util.PSQLException: ERROR: column "is_admin" does not exist at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:337) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:283) at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228) at org.jamwiki.db.DatabaseConnection.executeUpdate(DatabaseConnection.java:202) ... 66 more

Perfect - the cause is "org.postgresql.util.PSQLException: ERROR: column "is_admin" does not exist at...". I'm not sure why that column wouldn't exist unless there wasn't a previous installation available or if code had already been upgraded. Is there any chance you were already running a version of the 0.6.0 code? I'm not quite sure how this error could occur, but I'll look through the code again to see if I've overlooked something. Thanks again for the report. -- Ryan 28-Aug-2007 09:10 PDT

I got it to upgrade now. I restored the database and re-run the upgrade successfully. The cause of the above error was wrong password when I tried to upgrade it the first time. Thanks for you attention. --amerigo5 28-Aug-2007 19:38 PDT

Upgrade Issue[edit]

While testing an upgrade with Oracle I hit the following issue:

  1. Push the exploded WAR file.
  2. Entered wrong password on the upgrade login screen.
  3. Got error, entered correct password.
  4. Upgrade completed successfully.
  5. However, when the system started the DataHandler wasn't using the OracleDataHandler.
  6. Restarting Tomcat solved the problem.

-- Ryan 19-Oct-2007 08:09 PDT

Broken image files[edit]

I am trying upload a jpeg-file. The upload works file, but the image link and image is not served. shows broken image. --Durga 02-Nov-2007 11:08 PST

This seems very similar to my case. Feedback#How_do_I_upload_and_use_an_image_in_jamwiki what do you think? I still not figured out what the reason is. Did you find some hints in any logfile? -- Michael Habbert 05-Nov-2007 11:26 PST

I am adding to this section because it sounds like the same problem. Feel free to delete it if this is not the case.

Goal: Store everything outside of the Tomcat default directories for easier backup.
Problem: Images don't seem to work if stored outside of Tomcat default directories.

Created this directory structure:

C:\z
C:\z\data
C:\z\thewar	jamwiki-0.6.2.war
C:\z\upload

Created this context fragment

<Context docBase="C:\z\thewar\jamwiki-0.6.2.war" debug="0" privileged="true" />

and stored it as C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\Catalina\localhost\jmw.xml

Started Tomcat and did these configurations on http://127.0.0.1:8080/jmw/en/Special:Setup:

File-system directory:	    C:\z\data
File upload directory:      C:\z\upload   (Default was: C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\jmw\upload)
Relative file upload root:  <empty>       (Default was: /jmw/upload/)

Uploaded an image and clicked on the link in "File History":
http://2007/12/Winter-19200930.jpg

Of course this does not work.

Then I changed the "Relative file upload root:" to "\z\upload\"

Relative file upload root: \z\upload\

The link in "File History" now became:
http://localhost:8080/z/upload/2007/12/Winter-19200930.jpg

This does not work either. I do not see how I can steer JAMWiki to a directory outside of Tomcat for serving images using "Relative file upload root:". I had a look at Feedback#How_do_I_upload_and_use_an_image_in_jamwiki but to me it seems that this only works with Tomcat directories.

I do not know Tomcat well - am I just making a mistake with the configuration? --138.190.15.46 19-Dec-2007 11:32 PST

If the files show up correctly in your c:/z/upload/ directory but you are unable to access them via a browser then the issue is almost certainly a Tomcat configuration issue. For comparison, I use Apache to serve images, so my settings look like:
File upload directory
/data/www/jamwiki.org/files
Relative file upload root
/files/
If you look at Image:baby elephant.jpg it has been placed into the file upload directory as /data/www/jamwiki.org/files/2006/8/baby_elephant-09164740.jpg. The URL for the image is /files/2006/8/baby_elephant-09164740.jpg. The Apache docroot is setup for /data/www/jamwiki.org, so any requests to http://jamwiki.org/files/ will be served by Apache from the docroot's /files/ directory.
Hope that helps. -- Ryan 19-Dec-2007 13:22 PST
Thanks a lot Ryan! You are absolutely right, the problem is not with JAMWiki, it is with my lack of understanding of Tomcat. I have switched to Jetty now and was able to figure out how to serve static HTML with it (from any place). JAMWiki finds and displays the images correctly now. Please feel free to delete my comments. (Yeah, I know, different IP... wrote it in the office)--212.60.41.18 20-Dec-2007 15:00 PST

Special:RecentChanges and Special::Allpages not working with 0.6.1 and Oracle 10[edit]

I have upgraded from 0.5.2 to 0.6.1. Solaris 10, Oracle 10, Sun Application Server 9.1. I followed the upgrade procedure and copied over the old logging.properties and jamwiki.properties and everything went fine.

Everything appears to work except for the "All Pages" and "Recent Changes" which gives the following errors in the server log:

[#|2007-11-09T14:35:16.890+0200|SEVERE|sun-appserver9.1|org.jamwiki.servlets.ServletUtil|_ThreadID=17;_ThreadName=httpSSLWorkerThread-80-0;_RequestID=6e1d4df4-f99c-46e6-a88a-696d0814016f;|Servlet error
java.lang.Exception: Failure while executing select * from jam_recent_change where virtual_wiki_name = ? order by edit_date desc limit ? offset ?
        at org.jamwiki.db.WikiPreparedStatement.executeQuery(WikiPreparedStatement.java:84)
        at org.jamwiki.db.WikiPreparedStatement.executeQuery(WikiPreparedStatement.java:61)
        at org.jamwiki.db.OracleQueryHandler.getRecentChanges(OracleQueryHandler.java:66)
        at org.jamwiki.db.AnsiDataHandler.getRecentChanges(AnsiDataHandler.java:338)
...
Caused by: java.sql.SQLException: ORA-00933: SQL command not properly ended
[#|2007-11-09T14:35:42.083+0200|SEVERE|sun-appserver9.1|org.jamwiki.servlets.ServletUtil|_ThreadID=18;_ThreadName=httpSSLWorkerThread-80-1;_RequestID=34d3a38b-2246-417b-9334-2c9421e676ba;|Servlet error
java.lang.Exception: Failure while executing select topic_name from jam_topic where jam_topic.virtual_wiki_id = ? and jam_topic.topic_type = ? and jam_topic.delete_date is null order by jam_topic.topic_name limit ? offset ?
        at org.jamwiki.db.WikiPreparedStatement.executeQuery(WikiPreparedStatement.java:84)
        at org.jamwiki.db.WikiPreparedStatement.executeQuery(WikiPreparedStatement.java:61)
        at org.jamwiki.db.OracleQueryHandler.lookupTopicByType(OracleQueryHandler.java:131)
        at org.jamwiki.db.AnsiDataHandler.lookupTopicByType(AnsiDataHandler.java:834)
...
Caused by: java.sql.SQLException: ORA-00933: SQL command not properly ended

My only guess is that it is missing Oracle specific queries (as far as I know Oracle does not have limit and offset). -- Conny Gyllendahl 09-Nov-2007 14:44 EET

If you restart your application server does it solve the problem? See Bug Reports#Upgrade Issue, which sounds like the same issue - when I upgraded with Oracle it used the wrong DataHandler for some reason, but worked after the app server was restarted. I'm planning on investigating this further for 0.6.2, but didn't make any changes for 0.6.1 since there was an easy fix and it was late in the development cycle. -- Ryan 09-Nov-2007 07:20 PST
*scratches head* I could have sworn I restarted the application server several times last week without any luck, but for some reason it works today after restarting it. Oh well, it works now which makes me happy. :) -- Conny Gyllendahl 12-Nov-2007 11:28 EET

Cannot dispaly [Recent Changes] 's diff in IE6.0(firefox2 is ok)[edit]

my environment:
windows xp2
jamwiki 0.62
tomcat 5.0
jdk 5.0

URL:
http://192.168.10.73:8080/jamwiki6/en/Special:Diff?topic=%E5%9B%BE%E7%89%87&version2=25&version1=27

[jamwiki.org] cannot display too.
URL:
http://jamwiki.org/wiki/en/Special:Diff?topic=Sandbox&version2=7107&version1=7108

css 's problem? in the page 's source,have diff 's code.I think only display problem.
(jamwiki 0.54 is ok)
thank you very much! --legendsen 13-Dec-2007 01:45 PST

Thanks, I missed this issue in my testing. It's definitely a CSS problem, so I'll investigate and hopefully have a fix ready soon for inclusion in the next release. -- Ryan 13-Dec-2007 07:55 PST
I think revision 1955 will fix this issue, but don't have IE6 on my laptop so I'll need to check at work on Monday. I'll also try to get this change to jamwiki.org before the end of the weekend, so hopefully others may be able to verify that all is well. Thanks for the bug report. -- Ryan 15-Dec-2007 14:13 PST
Never mind, it's still broken. If I get a chance I'll resolve this in the next few days. -- Ryan 17-Dec-2007 07:49 PST
revision 1960 fixes it on my IE6 box at work. Updating to the StyleSheet code that is currently on jamwiki.org may resolve it for people seeing the issue, although I also made a minor modification to diff-include.jsp. -- Ryan 17-Dec-2007 19:43 PST

Non-latin characters are double-escaped in the header[edit]

See my name on the following screen shot (should be "Толик", but it is &#1058;&#1086;&#1083;&#1080;&#1082;)

http://img88.imageshack.us/my.php?image=editingbugreportsjamwikks4.png

Replacing line 264 in jamwiki/jamwiki/src/main/java/org/jamwiki/utils/LinkUtil.java with

html += StringEscapeUtils.escapeHtml(StringEscapeUtils.unescapeHtml(text));

fixed it

Thanks, I'll take a look and try to get this included for the next version. If you'd like credit in the CHANGELOG just let me know what name to use to credit you with. -- Ryan 13-Dec-2007 07:53 PST
revision 1954 fixes this issue on my local box. I've credited you in the CHANGELOG as "Толик", but please let me know if you would prefer something different. Thanks for the report & suggested fix! -- Ryan 15-Dec-2007 11:32 PST

Updateproblem with 0.6.2[edit]

It may be a CSS-Problem with the new jamwiki-version. Besides my other problem: Feedback#jamwiki_update I recognize a problem with the layout. I do not know the reason but, on my local installation the left navigation is on top of the (each) page. Is there a manual fix for this? How are the tables/frames are generated and what might be the solution. -- Michael Habbert 30-Dec-2007 03:59 PST

I occasionally have issues after upgrading with Tomcat serving old (cached) JSP files. Since there haven't been other reports of layout problems with 0.6.2, can you try clearing your web application server's cache, just to make sure that's not the problem? If that doesn't fix it let me know and I'll investigate further. -- Ryan 31-Dec-2007 18:29 PST
Thanks Ryan, I fixed the problem - see my feedback note Feedback#jamwiki_update - myself. The StyleSheet is an element in the jam_topic(_version) table and did change a lot during the update. So the manual merge with my old data did overwrite the new StyleSheets with the old one. btw: why did you change the Styles to avoid tables and iframes? Is there a good reason? Thanks -- Michael Habbert 02-Jan-2008 00:30 PST
There were two main reasons for switching from tables to divs:
  1. There is more inconsistency across browsers when using tables, so the switch helps to resolve some longstanding rendering issues.
  2. Using divs instead of tables allows more flexibility for individuals who want to create their own JAMWiki "skin" - tables force you into a specific layout, but with divs you could (for example) easily move the navigation bar from the left side of the screen to the right or change backgrounds and spacing.
My hope is that 0.7.0 or some future version will split the StyleSheet topic into two - one will be the jamwiki.css stylesheet, which will no longer be editable and will hopefully make upgrades easier since it won't be necessary to overwrite people's customized stylesheets. The second stylesheet WILL be user-editable and will allow people to customize their site by overriding the jamwiki.css styles. If that is done, then by shipping with different user-editable stylesheets users can choose different "themes" for their wikis. Whether that actually gets done for 0.7.0 or not... hopefully I'll find the time :) -- Ryan 02-Jan-2008 06:53 PST

CSS Problem with 0.6.2[edit]

Hi Ryan, I 'm not shure if you know there is a problem with the styles at jawiki. I will upload a Png-File to illustrate the phenomenon - not really a bug in my opinion.By the way how do I resize the image? Can I only link to it? ;-) Happy new year anyway. -- Michael Habbert 05-Jan-2008 09:43 PST Bildschirmphoto1.png

Thanks, I'll take a look. -- Ryan 06-Jan-2008 08:47 PST
revision 1968 should fix it. -- Ryan 09-Jan-2008 21:12 PST

Installation woes on Postgres/Mac OS X[edit]

I'm using Mac OS X (Leopard), Postgres 8 and Tomcat. I can successfully install Jamwiki using its internal db, but if I use my external Postgres 8 database then I get an error as the following image shows: SafariScreenSnapz002.tiff

Having looked at the schema (ANSI properties I'm presuming) then I see that the create_ip_address and last_login_ip_address are the only varchar(15)s so it is probably something to do with the population of these fields. I then wrote a little Java program to see if my machine returns something weird for an IP address. Here's the code:

import java.net.*;

public class test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			InetAddress thisIp = InetAddress.getLocalHost();
			System.out.println(thisIp.getHostAddress());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}

All that gets reported is "10.0.1.202" so that should be ok...

Finally the log file reports:

ERROR:  relation "jam_virtual_wiki" does not exist
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "jam_p_vwiki" for table "jam_virtual_wiki"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "jam_u_vwiki_name" for table "jam_virtual_wiki"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "jam_p_wuser" for table "jam_wiki_user"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "jam_p_wiki_uinfo" for table "jam_wiki_user_info"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "jam_u_wuinfo_login" for table "jam_wiki_user_info"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "jam_p_topic" for table "jam_topic"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "jam_u_topic_name" for table "jam_topic"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "jam_p_topic_ver" for table "jam_topic_version"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "jam_p_file" for table "jam_file"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "jam_u_file_url" for table "jam_file"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "jam_u_file_topic" for table "jam_file"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "jam_p_file_ver" for table "jam_file_version"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "jam_u_filev_url" for table "jam_file_version"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "jam_p_category" for table "jam_category"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "jam_p_group" for table "jam_group"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "jam_u_group_name" for table "jam_group"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "jam_p_role" for table "jam_role"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "jam_u_rmap" for table "jam_role_map"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "jam_p_rc" for table "jam_recent_change"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "jam_p_watchlist" for table "jam_watchlist"
ERROR:  value too long for type character varying(15)

...which leads me to think that it is only the last error reported that is causing a problem for me.

Incidentally I note that the postgres.properties file is empty. I presume that this is because Postgres is ANSI compliant and you just use the ANSI properties...

Any help appreciated as I'm looking forward to getting up to speed with this great initiative.

First, thanks for a very detailed bug report - it makes it much easier to figure out what might be going wrong. Second, I haven't installed on a Mac, but I use Postgres both locally on for jamwiki.org, so it definitely should work. And yes, the SQL file for Postgres is empty because it just inherits all of the ANSI SQL. As to your error, it looks like none of the JAMWiki tables ever got created. It is apparently making the connection correctly, so it's possible that there may be a permission problem in the database or some other issue. What was the first exception reported in your logs (full stack trace)? Usually the first exception stack trace will contain the error message from the database, which generally pinpoints the problem. -- Ryan 10-Jan-2008 21:00 PST
Thanks for the fast response. I was thinking that the schema creation/population might have been one transaction that rolled back which explains why I don't see a schema. Here's the error log in full:
2008-01-11 16:39:15,363 CONFIG: org.jamwiki.Environment - Loading properties from /Applications/apache-tomcat-5.5.23/webapps/jamwiki-0.6.2/WEB-INF/classes/sql.ansi.properties
2008-01-11 16:39:15,364 CONFIG: org.jamwiki.Environment - Loading properties from /Applications/apache-tomcat-5.5.23/webapps/jamwiki-0.6.2/WEB-INF/classes/sql.ansi.properties
2008-01-11 16:39:15,364 CONFIG: org.jamwiki.Environment - Loading properties from /Applications/apache-tomcat-5.5.23/webapps/jamwiki-0.6.2/WEB-INF/classes/sql.ansi.properties
2008-01-11 16:39:15,365 CONFIG: org.jamwiki.Environment - Loading properties from /Applications/apache-tomcat-5.5.23/webapps/jamwiki-0.6.2/WEB-INF/classes/sql.postgres.properties
2008-01-11 16:39:15,381 INFO: org.jamwiki.db.DatabaseConnection - Executing SQL: CREATE TABLE jam_virtual_wiki ( virtual_wiki_id INTEGER NOT NULL, virtual_wiki_name VARCHAR(100) NOT NULL, default_topic_name VARCHAR(200) NOT NULL, create_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, CONSTRAINT jam_p_vwiki PRIMARY KEY (virtual_wiki_id), CONSTRAINT jam_u_vwiki_name UNIQUE (virtual_wiki_name) )
2008-01-11 16:39:15,546 INFO: org.jamwiki.db.DatabaseConnection - Executing SQL: CREATE TABLE jam_wiki_user ( wiki_user_id INTEGER NOT NULL, login VARCHAR(100) NOT NULL, display_name VARCHAR(100), create_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, last_login_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, create_ip_address VARCHAR(15) NOT NULL, last_login_ip_address VARCHAR(15) NOT NULL, remember_key VARCHAR(100) NOT NULL, default_locale VARCHAR(8), CONSTRAINT jam_p_wuser PRIMARY KEY (wiki_user_id) )
2008-01-11 16:39:15,549 INFO: org.jamwiki.db.DatabaseConnection - Executing SQL: CREATE TABLE jam_wiki_user_info ( wiki_user_id INTEGER NOT NULL, login VARCHAR(100) NOT NULL, email VARCHAR(100), first_name VARCHAR(100), last_name VARCHAR(100), encoded_password VARCHAR(100) NOT NULL, CONSTRAINT jam_p_wiki_uinfo PRIMARY KEY (wiki_user_id), CONSTRAINT jam_f_wuinfo_wuser FOREIGN KEY (wiki_user_id) REFERENCES jam_wiki_user(wiki_user_id), CONSTRAINT jam_u_wuinfo_login UNIQUE (login) )
2008-01-11 16:39:15,587 INFO: org.jamwiki.db.DatabaseConnection - Executing SQL: CREATE UNIQUE INDEX jam_u_wuser_login on jam_wiki_user (lower(login)) 
2008-01-11 16:39:15,604 INFO: org.jamwiki.db.DatabaseConnection - Executing SQL: CREATE TABLE jam_topic ( topic_id INTEGER NOT NULL, virtual_wiki_id INTEGER NOT NULL, topic_name VARCHAR(200) NOT NULL, delete_date TIMESTAMP, topic_read_only INTEGER DEFAULT 0 NOT NULL, topic_admin_only INTEGER DEFAULT 0 NOT NULL, current_version_id INTEGER, topic_type INTEGER NOT NULL, redirect_to VARCHAR(200), CONSTRAINT jam_p_topic PRIMARY KEY (topic_id), CONSTRAINT jam_f_topic_vwiki FOREIGN KEY (virtual_wiki_id) REFERENCES jam_virtual_wiki(virtual_wiki_id), CONSTRAINT jam_u_topic_name UNIQUE (topic_name, virtual_wiki_id, delete_date) )
2008-01-11 16:39:15,609 INFO: org.jamwiki.db.DatabaseConnection - Executing SQL: CREATE TABLE jam_topic_version ( topic_version_id INTEGER NOT NULL, topic_id INTEGER NOT NULL, edit_comment VARCHAR(200), version_content TEXT, wiki_user_id INTEGER, wiki_user_ip_address VARCHAR(15) NOT NULL, edit_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, edit_type INTEGER NOT NULL, previous_topic_version_id INTEGER, CONSTRAINT jam_p_topic_ver PRIMARY KEY (topic_version_id), CONSTRAINT jam_f_topicv_topic FOREIGN KEY (topic_id) REFERENCES jam_topic(topic_id), CONSTRAINT jam_f_topicv_wuser FOREIGN KEY (wiki_user_id) REFERENCES jam_wiki_user(wiki_user_id), CONSTRAINT jam_f_topicv_pver FOREIGN KEY (previous_topic_version_id) REFERENCES jam_topic_version(topic_version_id) )
2008-01-11 16:39:15,616 INFO: org.jamwiki.db.DatabaseConnection - Executing SQL: ALTER TABLE jam_topic add constraint jam_f_topic_topicv FOREIGN KEY (current_version_id) REFERENCES jam_topic_version(topic_version_id) 
2008-01-11 16:39:15,633 INFO: org.jamwiki.db.DatabaseConnection - Executing SQL: CREATE TABLE jam_file ( file_id INTEGER NOT NULL, virtual_wiki_id INTEGER NOT NULL, file_name VARCHAR(200) NOT NULL, delete_date TIMESTAMP, file_read_only INTEGER DEFAULT 0 NOT NULL, file_admin_only INTEGER DEFAULT 0 NOT NULL, file_url VARCHAR(200) NOT NULL, mime_type VARCHAR(100) NOT NULL, topic_id INTEGER NOT NULL, file_size INTEGER NOT NULL, CONSTRAINT jam_p_file PRIMARY KEY (file_id), CONSTRAINT jam_f_file_vwiki FOREIGN KEY (virtual_wiki_id) REFERENCES jam_virtual_wiki(virtual_wiki_id), CONSTRAINT jam_f_file_topic FOREIGN KEY (topic_id) REFERENCES jam_topic(topic_id), CONSTRAINT jam_u_file_url UNIQUE (file_url), CONSTRAINT jam_u_file_topic UNIQUE (virtual_wiki_id, topic_id) )
2008-01-11 16:39:15,649 INFO: org.jamwiki.db.DatabaseConnection - Executing SQL: CREATE TABLE jam_file_version ( file_version_id INTEGER NOT NULL, file_id INTEGER NOT NULL, upload_comment VARCHAR(200), file_url VARCHAR(200) NOT NULL, wiki_user_id INTEGER, wiki_user_ip_address VARCHAR(15) NOT NULL, upload_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, mime_type VARCHAR(100) NOT NULL, file_size INTEGER NOT NULL, CONSTRAINT jam_p_file_ver PRIMARY KEY (file_version_id), CONSTRAINT jam_f_filev_file FOREIGN KEY (file_id) REFERENCES jam_file(file_id), CONSTRAINT jam_f_filev_wuser FOREIGN KEY (wiki_user_id) REFERENCES jam_wiki_user(wiki_user_id), CONSTRAINT jam_u_filev_url UNIQUE (file_url) )
2008-01-11 16:39:15,654 INFO: org.jamwiki.db.DatabaseConnection - Executing SQL: CREATE TABLE jam_category ( child_topic_id INTEGER NOT NULL, category_name VARCHAR(200) NOT NULL, sort_key VARCHAR(200), CONSTRAINT jam_p_category PRIMARY KEY (child_topic_id, category_name), CONSTRAINT jam_f_cat_child_id FOREIGN KEY (child_topic_id) REFERENCES jam_topic(topic_id) )
2008-01-11 16:39:15,657 INFO: org.jamwiki.db.DatabaseConnection - Executing SQL: CREATE TABLE jam_group ( group_id INTEGER NOT NULL, group_name VARCHAR(30) NOT NULL, group_description VARCHAR(200), CONSTRAINT jam_p_group PRIMARY KEY (group_id), CONSTRAINT jam_u_group_name UNIQUE (group_name) )
2008-01-11 16:39:15,661 INFO: org.jamwiki.db.DatabaseConnection - Executing SQL: CREATE TABLE jam_role ( role_name VARCHAR(30) NOT NULL, role_description VARCHAR(200), CONSTRAINT jam_p_role PRIMARY KEY (role_name) )
2008-01-11 16:39:15,663 INFO: org.jamwiki.db.DatabaseConnection - Executing SQL: CREATE TABLE jam_role_map ( role_name VARCHAR(30) NOT NULL, wiki_user_id INTEGER, group_id INTEGER, CONSTRAINT jam_u_rmap UNIQUE (role_name, wiki_user_id, group_id), CONSTRAINT jam_f_rmap_role FOREIGN KEY (role_name) REFERENCES jam_role(role_name), CONSTRAINT jam_f_rmap_wuser FOREIGN KEY (wiki_user_id) REFERENCES jam_wiki_user(wiki_user_id), CONSTRAINT jam_f_rmap_group FOREIGN KEY (group_id) REFERENCES jam_group(group_id) )
2008-01-11 16:39:15,668 INFO: org.jamwiki.db.DatabaseConnection - Executing SQL: CREATE TABLE jam_recent_change ( topic_version_id INTEGER NOT NULL, previous_topic_version_id INTEGER, topic_id INTEGER NOT NULL, topic_name VARCHAR(200) NOT NULL, edit_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, edit_comment VARCHAR(200), wiki_user_id INTEGER, display_name VARCHAR(200) NOT NULL, edit_type INTEGER NOT NULL, virtual_wiki_id INTEGER NOT NULL, virtual_wiki_name VARCHAR(100) NOT NULL, CONSTRAINT jam_p_rc PRIMARY KEY (topic_version_id), CONSTRAINT jam_f_rc_topic_ver FOREIGN KEY (topic_version_id) REFERENCES jam_topic_version(topic_version_id), CONSTRAINT jam_f_rc_p_topic_v FOREIGN KEY (previous_topic_version_id) REFERENCES jam_topic_version(topic_version_id), CONSTRAINT jam_f_rc_topic FOREIGN KEY (topic_id) REFERENCES jam_topic(topic_id), CONSTRAINT jam_f_rc_wuser FOREIGN KEY (wiki_user_id) REFERENCES jam_wiki_user(wiki_user_id), CONSTRAINT jam_f_rc_vwiki FOREIGN KEY (virtual_wiki_id) REFERENCES jam_virtual_wiki(virtual_wiki_id) )
2008-01-11 16:39:15,703 INFO: org.jamwiki.db.DatabaseConnection - Executing SQL: CREATE TABLE jam_watchlist ( wiki_user_id INTEGER NOT NULL, topic_name VARCHAR(200), virtual_wiki_id INTEGER NOT NULL, CONSTRAINT jam_p_watchlist PRIMARY KEY (wiki_user_id, topic_name, virtual_wiki_id), CONSTRAINT jam_f_wlist_userid FOREIGN KEY (wiki_user_id) REFERENCES jam_wiki_user(wiki_user_id), CONSTRAINT jam_f_wlist_vwiki FOREIGN KEY (virtual_wiki_id) REFERENCES jam_virtual_wiki(virtual_wiki_id) )
2008-01-11 16:39:15,781 WARNING: org.jamwiki.db.DatabaseConnection - Rolling back database transactions
2008-01-11 16:39:15,781 WARNING: org.jamwiki.db.DatabaseConnection - Rolling back database transactions
2008-01-11 16:39:15,782 SEVERE: org.jamwiki.servlets.SetupServlet - Setup error
java.lang.Exception: Failure while executing insert into jam_wiki_user ( wiki_user_id, login, display_name, create_date, last_login_date, create_ip_address, last_login_ip_address, remember_key, default_locale ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ? )
	at org.jamwiki.db.WikiPreparedStatement.executeUpdate(WikiPreparedStatement.java:119)
	at org.jamwiki.db.AnsiQueryHandler.insertWikiUser(AnsiQueryHandler.java:784)
	at org.jamwiki.db.AnsiDataHandler.addWikiUser(AnsiDataHandler.java:181)
	at org.jamwiki.db.AnsiDataHandler.writeWikiUser(AnsiDataHandler.java:1405)
	at org.jamwiki.db.WikiDatabase.setupAdminUser(WikiDatabase.java:212)
	at org.jamwiki.db.WikiDatabase.setup(WikiDatabase.java:184)
	at org.jamwiki.db.AnsiDataHandler.setup(AnsiDataHandler.java:1052)
	at org.jamwiki.WikiBase.reset(WikiBase.java:201)
	at org.jamwiki.servlets.SetupServlet.initialize(SetupServlet.java:136)
	at org.jamwiki.servlets.SetupServlet.handleJAMWikiRequest(SetupServlet.java:71)
	at org.jamwiki.servlets.JAMWikiServlet.handleRequestInternal(JAMWikiServlet.java:74)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:858)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
	at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
	at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at org.jamwiki.authentication.JAMWikiExceptionMessageFilter.doFilter(JAMWikiExceptionMessageFilter.java:70)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at org.jamwiki.authentication.JAMWikiAnonymousProcessingFilter.doFilter(JAMWikiAnonymousProcessingFilter.java:62)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
	at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at org.jamwiki.servlets.JAMWikiFilter.doFilter(JAMWikiFilter.java:58)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
	at java.lang.Thread.run(Thread.java:613)
Caused by: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(15)
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:305)
	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
	at org.jamwiki.db.WikiPreparedStatement.executeUpdate(WikiPreparedStatement.java:111)
	... 58 more
2008-01-11 16:39:15,783 INFO: org.jamwiki.servlets.JAMWikiServlet - Loaded page /jamwiki-0.6.2/en/Special:Setup (0.456 s.)
2008-01-11 16:39:15,783 INFO: org.jamwiki.servlets.JAMWikiServlet - Loaded page /jamwiki-0.6.2/en/Special:Setup (0.456 s.)

--huntc 10-Jan-2008 21:26 PST

Yep, you're right - table creation fails and everything gets rolled back. It may be that your host is resolving to an IPv6 IP address or something similar - if you modify the /WEB-INF/classes/sql.ansi.properties file and change lines 149 and 150 so that the jam_wiki_user table is created with create_ip_address and last_login_ip_address fields that have field type VARCHAR(100) does that solve the problem? If so I'd be interested to know what eventually gets inserted into those fields... -- Ryan 10-Jan-2008 21:42 PST
I changed everything to a VARCHAR(101) (so that I could easily identify the ip addresses and change them back later) and presto, everything worked. The value being stored was "0:0:0:0:0:0:0:1%0" which looks like ipv6 to me. You might want to consider ipv6! Thanks for your help. Please let me know what you might do about this so that I can alter my schema to support your future updates. Cheers. --huntc 11-Jan-2008 01:21 PST
Thanks! It looks like I'll have to increase the length of that field to support IPv6 for the next release - I'll update this bug report to let you know what change is made. -- Ryan 11-Jan-2008 06:45 PST
It looks like the solution will be to increase the maximum IP address field size to 39 (4 * 8 = 32 characters for the hexadecimal groups, plus 7 characters for the colon separators) and make sure that anything after and including the "%" is stripped from the address since that portion of the address represents a zone index for the local interface. I'll hopefully get a patch together either today or tomorrow and will include it in the final 0.6.3 release. -- Ryan 12-Jan-2008 09:50 PST
Thanks for the attentive responses. I look forward to 0.6.3 and to fully utilising Jamwiki! --huntc 12-Jan-2008 17:40 PST
Thanks for having fixed this up in 0.6.3 - installation is now very smooth under Mac OS X --huntc 18-Jan-2008 02:21 PST

Registration problem[edit]

Since version 0.6.2 I cannot register a new user. Anoymous users have no access permission for the page special:account. The view role is set for anonymous users. I'm using version 0.6.2 of jamwiki with an SQL 2000 database and Tomcat 5.5.25 --Angel 10-Jan-2008 02:20 PST

Thanks for the report. I haven't seen this issue personally (new users have been registering on jamwiki.org) and this is the first report, so it could be database-specific. One request - can you make sure your Tomcat cache is clear and restart, just to ensure that the problem isn't due to old files? The cache is located under your Tomcat installation in the /work/Catalina/ directory. I'll also take a closer look at the code tonight and see if I can figure out anything else that might cause the problem. -- Ryan 10-Jan-2008 07:47 PST
Can anonymous users see other pages on your wiki, such as StartingPoints and Special:RecentChanges? Also, have you made any changes to /WEB-INF/applicationContext-acegi-security.xml or /WEB-INF/web.xml? Provided you haven't configured web.xml to use something other than applicationContext-acegi-security.xml, and provided there haven't been any changes to that file, I don't see any reason why if anonymous users have ROLE_VIEW that they shouldn't see Special:Account. -- Ryan 10-Jan-2008 20:01 PST

Cleared the chache en restarted Tomcat but didn't fix the problem. Anonymous users can't see anything. They seem to have no access to any of the special pages. I didn't made any changes on the xml you mentioned. Even if an set all the roles for anonymous users the can't access anything. This leaves us with a problem with the database. How should the database-structure look like? And which entries in which table, if any, should the be for anonymous users. --Angel 11-Jan-2008 02:52 PST

OK, I didn't realize it was all pages. This report sounds very similar to Bug_Reports/Resolved/0.6.x#Anonymous access problems in 0.6.0, which was due to a typo (since corrected) in the UPGRADE.txt file that caused the anonymous user group to be incorrectly named. Since this was fixed prior to the 0.6.2 release I wouldn't think it would affect you, but the debugging steps listed in that report may help fix your problem - specifically knowing the output of the following queries:
   select * from jam_role_map; 
   select * from jam_role; 
   select * from jam_group; 
   select * from jam_wiki_user where wiki_user_id = 1; 
It may be possible that a group name or role name is wrong in your setup. -- Ryan 11-Jan-2008 06:44 PST

Ryan, thanks for your reply, my output before changing anything is found here. I have looked at the topic you mentioned and altered jam_group as suggested. It works fine now. Do I need to make more changes?

It probably went wrong when I updated to version 0.6.0 since I did that manually. Thanks for the help --Angel 14-Jan-2008 02:21 PST

Glad the bug is fixed for you now - with the group names corrected you should now be fine. Apologies for the original error in the UPGRADE.txt file - you're the second person (at least) who had problems due to that typo, and as a result I've been giving a lot of thought lately about how to simplify the upgrade process to avoid these sorts of issues. -- Ryan 14-Jan-2008 08:38 PST

German Characters In The Table Of Contents[edit]

Moved from the Feedback page

Hi, I'm an administrator of a german wiki. We started just a few weeks ago. If I use german characters like ö, ü or ä in the headings. But in the auto-generated table of contents, the characters are shown as html code (& auml;). It seems like the parser ignores the html. how can i change that? thank you for an answer!

Can you confirm what JAMWiki version you're using? 0.6.2 fixed a bug that caused some characters to be double-escaped in the TOC - see the last three issues on Bug_Reports/Resolved/0.6.x. If your problem is something else let me know, and thanks for the feedback. -- Ryan 07-Dec-2007 07:42 PST
Thank you for your answer! We're using version 0.6.1. So I'll try with the new version 0.6.2. I'll let you know if it functions.
Ok, we've upgraded to version 0.6.2 and if functions perfectly! thanks a lot!
Glad it's fixed, and thanks for the feedback. -- Ryan 10-Dec-2007 07:43 PST

How to use the Javascript in Wiki Pages[edit]

Moved from the Feedback page

We are planing to use the wiki as a dashboard for some data which is spread across the enterprise. And we can achive this through Javascript which talks to all of our servers and show the data by talking to them and show in wiki pages. By which i can make my wiki installation dynamic. Could you please help me why the below "hello world" javascript code is no working in my wiki, we set the property in admin to allow javascript to yes.

<SCRIPT LANGUAGE="JavaScript">
alert('Hello World');
</SCRIPT>

--Durga 15-Jan-2008 08:29 PST

Your code is fine, but it looks like some JAMWiki parser changes made several releases ago are causing problems with script tags. If you remove the language="javascript" attribute and replace quotation marks with single quotes it should work around the issue for now, and I'll make sure it gets fixed for the next release. As an example, the following works on my local box:
<script>
alert('Hello World');
</script>
-- Ryan 15-Jan-2008 08:51 PST
I don't know when exactly Javascript parsing broke, but revision 1990 fixes it on my local machine. If this is a critical issue for you please let me know and I can try to speed up the next release, otherwise this change will be available whenever JAMWiki 0.6.4 comes out. -- Ryan 15-Jan-2008 20:40 PST

Update problem from 0.5.4 to 0.6.2[edit]

I've tried to update from 0.5.4 to 0.6.2 and think I have followed the update steps (backup mysql and jamwiki-0.5.4-installation, unpacked 0.6.2 and copied jamwiki.properties and logging.properties from the old to the new installation). After being asked for the admin-account and password, I'm getting following output

Added jam_group table
Added jam_role table
Unable to complete upgrade to new JAMWiki version.: Failure while executing CREATE TABLE jam_role_map (
role_name VARCHAR(30) NOT NULL, wiki_user_id INTEGER, group_id INTEGER, CONSTRAINT jam_u_rmap UNIQUE
(role_name, wiki_user_id, group_id), CONSTRAINT jam_f_rmap_role FOREIGN KEY (role_name) REFERENCES
jam_role(role_name), CONSTRAINT jam_f_rmap_wuser FOREIGN KEY (wiki_user_id) REFERENCES
jam_wiki_user(wiki_user_id), CONSTRAINT jam_f_rmap_group FOREIGN KEY (group_id) REFERENCES jam_group(group_id) )
Updated stylesheet for virtual wiki en

This happened on our production system (I was able to get 0.5.4 running again) as well as on our test system.Tom 02-Jan-2008 05:21 PST

Are there any errors in your log files? Also, which database are you using? Thanks! -- Ryan 02-Jan-2008 06:53 PST
I'm using MySQL 5.0.* and there is following exception in the log file:
java.lang.Exception: Failure while executing CREATE TABLE jam_role_map ( role_name VARCHAR(30) NOT NULL, wiki_user_id INTEGER, group_id INTEGER, CONSTRAINT jam_u_rmap UNIQUE (role_name, wiki_user_id, group_id), CONSTRAINT jam_f_rmap_role FOREIGN KEY (role_name) REFERENCES jam_role(role_name), CONSTRAINT jam_f_rmap_wuser FOREIGN KEY (wiki_user_id) REFERENCES jam_wiki_user(wiki_user_id), CONSTRAINT jam_f_rmap_group FOREIGN KEY (group_id) REFERENCES jam_group(group_id) )
	at org.jamwiki.db.DatabaseConnection.executeUpdate(DatabaseConnection.java:210)
	at org.jamwiki.db.DatabaseUpgrades.upgrade060(DatabaseUpgrades.java:187)
	at org.jamwiki.servlets.UpgradeServlet.upgrade(UpgradeServlet.java:123)
	at org.jamwiki.servlets.UpgradeServlet.handleJAMWikiRequest(UpgradeServlet.java:65)
	at org.jamwiki.servlets.JAMWikiServlet.handleRequestInternal(JAMWikiServlet.java:74)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:858)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
	...
Caused by: java.sql.SQLException: Can't create table '.\jamwikidb\jam_role_map.frm' (errno: 150)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
	at com.mysql.jdbc.Connection.execSQL(Connection.java:3170)
	at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1316)
	at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1235)
	at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
	at org.jamwiki.db.DatabaseConnection.executeUpdate(DatabaseConnection.java:202)
	... 62 more
Thanks for the quick response. I'm at work now, but provided I don't get home too late I'll take a look to try and figure out why MySQL doesn't like that syntax, and will try to get a fix ready. -- Ryan 02-Jan-2008 08:20 PST
I just got done with a long day at work, so installing MySQL doesn't sound like a fun way to finish the day, but looking at the error you've provided, errno 150 is a foreign key error, although I don't see anything in the SQL that should cause any issues on MySQL or any other database. I'm reasonably certain that I tested with MySQL prior to releasing 0.6.0, and it definitely works with Oracle, Postgres, and HSQL, so I'm a bit stumped... any other clues you can provide about your setup? Are you using standard JDBC drivers? Have any of the default database settings been changed that might affect foreign key creation? Sorry for not having a better answer, but you seem to have found a weird edge case :) -- Ryan 02-Jan-2008 21:32 PST
We are using MySQL with the default driver (com.mysql.jdbc.Driver; mysql-connector-java-5.0.4-bin.jar in <tomcat-5.0.30>/common/lib/), no special setup. Unfortunately, I'm neither a MySQL nor database expert, so don't expect much help from my side.Tom 03-Jan-2008 04:29 PST
Thanks for the response. I've got to work Saturday, but will try to get MySQL re-installed on my laptop and run some tests as soon as time permits. -- Ryan 04-Jan-2008 22:19 PST
I just tried this on my laptop, and was able to upgrade successfully using MySQL 5.0.45. It's possible there is some configuration setting in your environment that is causing issues, so you may want to try the manual upgrade steps outlined in the UPGRADE.txt file, and hopefully those will work for you. Sorry for the trouble, and please let me know if you find anything else. -- Ryan 06-Jan-2008 11:15 PST
Sorry for the long delay. If our wiki would not contain secret information, I could have sent you the database dump. What could I do to help you to solve the problem? Using the manual upgrade steps does not solve, but only might work around the problem. Tom 10-Jan-2008 09:44 PST
Hi Tom - I apologize for not responding sooner, but I missed your response when it was posted. At this point I'm not sure if there is much more I can do to help you resolve this issue - the error appears to be specific to your MySQL configuration instead of something in JAMWiki code, so to address that I'd probably have to spend a significant amount of time reading database documentation and news group postings. After 10-12 hours each day at the office the prospect of coming home to a few hours of reading database manuals isn't all that appealing :) If you do solve the issue please provide any feedback that you can, and perhaps someone else may read this report and be able to help. Thanks for taking the time to report the issue. -- Ryan 17-Jan-2008 22:52 PST
I've given the manual upgrade a chance and have the same problem:

When I execute this statement from the "mysql" command prompt (logged in as root):

CREATE TABLE jam_role_map (
   role_name VARCHAR(30) NOT NULL,
   wiki_user_id INTEGER,
   group_id INTEGER,
   CONSTRAINT jam_u_rmap UNIQUE
       (role_name, wiki_user_id, group_id),
   CONSTRAINT jam_f_rmap_role FOREIGN KEY
       (role_name) REFERENCES jam_role(role_name),
   CONSTRAINT jam_f_rmap_wuser FOREIGN KEY
       (wiki_user_id) REFERENCES jam_wiki_user(wiki_user_id),
   CONSTRAINT jam_f_rmap_group FOREIGN KEY
       (group_id) REFERENCES jam_group(group_id)
);

I'm getting following error:

ERROR 1005 (HY000): Can't create table '.\jamwikidb\jam_role_map.frm' (errno: 150)
For MyISAM engine, the failing CONSTRAINT is jam_f_rmap_wuser. Without this CONSTRAINT, the table creation succeeds. Now, MyISAM does not support CONSTRAINTS due to http://dev.mysql.com/doc/refman/6.0/en/innodb-foreign-key-constraints.html anyway. So solution is either to remove the CONSTRAINT or convert all tables to "InnoDB" (ALTER TABLE ... ENGINE=INNODB).
Thanks much for debugging this. I'll investigate in the next day or two to see if there's a workaround for MySQL and make sure it gets implemented for the next JAMWiki release - if I don't post an update here feel free to post a gentle reminder. -- Ryan 28-Jan-2008 11:47 PST
Does the following query work? It looks like CONSTRAINTs are fine, but in older versions of MySQL all columns must have an index. Does the following CREATE statement work for you?
    CREATE TABLE jam_role_map ( 
     role_name VARCHAR(30) NOT NULL, INDEX jam_i_rmap_rname (role_name), 
     wiki_user_id INTEGER, INDEX jam_i_rmap_wuser (wiki_user_id), 
     group_id INTEGER, INDEX jam_i_rmap_gid (group_id), 
     CONSTRAINT jam_u_rmap UNIQUE (role_name, wiki_user_id, group_id), 
     CONSTRAINT jam_f_rmap_role FOREIGN KEY (role_name) REFERENCES jam_role(role_name), 
     CONSTRAINT jam_f_rmap_wuser FOREIGN KEY (wiki_user_id) REFERENCES jam_wiki_user(wiki_user_id), 
     CONSTRAINT jam_f_rmap_group FOREIGN KEY (group_id) REFERENCES jam_group(group_id) 
   )
-- Ryan 28-Jan-2008 21:25 PST
revision 2071 should have fixed this issue for JAMWiki 0.6.4, although if anyone sees this problem again please re-open this bug. -- Ryan 15-Mar-2008 11:04 PDT

OutOfMemoryException / DoS from invalid wiki name[edit]

If you put a double // before the virtualwikiname, such as /wiki//en/blah, WikiUtil.retrieveDirectoriesFromURI gets stuck in an infinite loop and will cause an OutOfMemoryException. This can be fixed by making the following change in WikiUtil.retrieveDirectoriesFromURI:

if (slashIndex == -1) {

to

if (slashIndex == -1 || slashIndex == 0) {


and the following change in WikiUtil.getVirtualWikiFromURI

if (slashIndex == -1) {

to

if (slashIndex == -1 || slashIndex == 0) {

Thanks for the great wiki software!

Thanks for the bug report, I'll make sure the fix is integrated for the next release. -- Ryan 18-Jan-2008 11:33 PST
This is fixed in Subversion now as revision 1998 - I modified your fix slightly to also catch instances of three or more slashes. Thanks again for the bug report, and also for the fix - having someone else track down the problem makes it much quicker to resolve! -- Ryan 19-Jan-2008 10:59 PST

Issue in viewing the contributions in JAMWiki0.6.3[edit]

Hi,

New Year Greeting to you. I have upgraded the JAMWiki version from 0.6.0 to 0.6.3, I didn't face any issues in it. The problem I am facing is in the contributions link. The contributions of the username in the following format 'firstname_lastname' is not getting displayed. Can you please look into this issue and resolve at the earliest? Contributions for other usernames without '_' is getting displayed properly. Thank you very much. --yesesnono 02-Feb-2008 04:55 PST

Happy New Year to you, too! I'll investigate this bug (hopefully this weekend) and if there is an easy workaround I'll let you know how to update your JAMWiki version, otherwise I'll try to make sure a fix is included in the next version. -- Ryan 02-Feb-2008 09:37 PST
revision 2030 resolves this issue for me. There isn't a "quick fix" to apply since this fix required changing Java code, so if this is a critical issue you can either build a version of the 0.6.3 source with this fix applied, or if you would prefer let me know and I'll see if I can put something together. If it's not a critical issue then the fix will be available in the next release, which hopefully will be ready in the next 3-6 weeks. -- Ryan 02-Feb-2008 14:33 PST
Hi Ryan,
Thank you for the immediate response. I terribly fail in integrating the jamwiki source with the eclipse ide. Can you put up detailed steps to do that? Also i am in very much need of it cos the fix given by you requires to build again to get it done. Please help me out at the earliest. Also I have installed the maven and svn plugin in the eclipse IDE.
I don't use Eclipse and only recently tried to get things to build with Eclipse, so the Eclipse instructions are incomplete (sorry!). I'll see if I can get an updated WAR built for you in the next couple of days that applies the fix to the 0.6.3 release - alternatively, if you don't mind working with a beta release I can put out 0.6.4-beta1 soon, but I'll need to do some additional testing first. -- Ryan 05-Feb-2008 20:16 PST
Thank you for the response. Any thing that help me out this issue before friday is OK for me. Also when i try to build, it is saying some plugin for surefire is missing. If possible put up the detailed steps to do it in the command line atleast(Anyone help please!).
  • Also when I downloaded the sourcecode as zip from the sourceforge.net, it had three folders jamwiki, jamwiki-parent and javadiff. But when i tried checking out from the trunk directory it contains folders in different format in jamwiki-core, jamwiki-web, jamwiki-war, javadiff, repository. Why is the difference and which one to use? --yesesnono 05-Feb-2008 23:56 PST

I've updated the Building from Source page and fixed a typo ("maven" instead of "mvn") that may have caused problems. As to the 0.6.3 source zip, the project layout is being changed in the 0.6.4 development cycle, so while 0.6.3 had three Maven projects, 0.6.4 will probably have four - sorry for the confusion!

I've also rebuilt a version of 0.6.3 that should fix the contributor problem:

Hopefully this works for you - the ONLY change is the fix for the contributions page, so aside from that change this version should behave exactly like vanilla 0.6.3, although I didn't do any testing other than to build it and make sure the contributor page worked. Also, in case anyone else is watching this bug report, 0.6.3.1 is NOT an official release. Please do not link to it from Freshmeat or anywhere else. Sorry for the bug, and thanks for being patient while a fix was put together. -- Ryan 06-Feb-2008 20:59 PST

Hi Ryan,
Thank you very much for the fix. I am desperately in need of this. I will check it out by the EOD. Thank you once again.

--yesesnono 07-Feb-2008 01:13 PST

Hi Ryan,
It served the need. Thank you once again for the fix. --yesesnono 10-Feb-2008 23:43 PST

Database field length overflow errors[edit]

Most database fields need checks for max-lengths to prevent database overflow errors. For example, the jam_topic_version edit_comment field has a maximum length of 200 characters. -- Ryan 10-Feb-2008 21:02 PST

This issue is resolved by revision 2039 which adds field-length checks prior to all inserts/updates. This code is not yet on jamwiki.org but will be copied over after a bit more testing is done. -- Ryan 11-Feb-2008 22:28 PST

Parsing inside NOINCLUDE tags[edit]

JAMWiki appears to have problems parsing Wiki syntax of anything inside a <noinclude> tag. You cannot use template transclusions inside of <noinclude> tags; if you try, it will simply leave {{MyTemplate}} as unparsed text. It's almost as if it's treating <noinclude> the same way it treats <nowiki> tags.

I have also previously reported, in my request for an "All Templates" page, that links to Categories placed inside of <noinclude> tags don't get picked up like they're supposed to.

Thanks for the report - could you create an example template on jamwiki.org that demonstrates the problem? I should hopefully have some time this weekend to dig into the parser and see what's going on. Also, with regards the "all templates" page, the holdup right now is simply figuring out how best to implement it - I'd prefer to do a namespace search like Mediawiki, although there is a fair bit of work required to do that properly. -- Ryan 12-Feb-2008 18:25 PST
No problem Ryan. I made a couple pages for you. The NoincludeBug page successfully uses Template:NoincludeBug correctly. However, if you look at the section of Template:NoincludeBug, you'll see that it does NOT successfully use Template:TranscludeMe correctly. There are more notes on the pages themselves. --Ean 13-Feb-2008 07:10 PST
Thanks! If you don't see an update from me on this issue by the end of the weekend please feel free to add a gentle reminder to this bug report - there's a lot going on right now, and occasionally my tiny brain forgets about things, requiring reminders to get them back in there. -- Ryan 13-Feb-2008 07:40 PST

There were three separate issues:

  1. The content of <noinclude> was not being parsed for templates and other values that require parser pre-processing. revision 2040 should fix that issue.
  2. Category pages were not displaying templates. revision 2041 should fix that issue.
  3. <includeonly> tags had the same problem as <noinclude> tags. revision 2042 should fix that problem.

I'll copy the new code to jamwiki.org by the end of the weekend so the fixes can be verified against the test templates, although I have already tested using the same templates on my local machine. Thanks again for the help in debugging. -- Ryan 16-Feb-2008 11:45 PST

The latest code is now on jamwiki.org. As far as I can tell everything is now working correctly, but please let me know if you still see any issues. -- Ryan 17-Feb-2008 22:03 PST

JAMWiki 0.6.4 beta 1 bug with <br>[edit]

The <br> (invalid XHTML) tag breaks page layout badly with JAMWiki 0.6.4 beta1. -- Ryan 26-Feb-2008 08:20 PST

revision 2076 should fix this problem. -- Ryan 26-Feb-2008 20:22 PST

Conflict in the locale in Recent Changes page & History page[edit]

I suddenly noticed that in the recent changes page(also in History page), the months are displayed in some other language and not in english. How can I change back it to english? I also checked in the JAMWiki site. Here also it is displaying in a different language. what is the problem? please look into it.Thank you in advance.I already posted this in FAQ as I didn't get reply there posting it here. --yesesnono 14-Mar-2008 23:12 PDT

Can you copy the text that you're seeing and add it to this bug report? I've tried choosing different languages in Special:Account, but so far the month seems to always display in the language I've selected. Is it possible that your browser is for a locale other than English? If so that might explain the problem, but I'm not sure... -- Ryan 15-Mar-2008 08:33 PDT
Yes the problem was with my browser's locale. Got it resolved. Sorry. --yesesnono 17-Mar-2008 08:57 PDT

Error in the Special link in contributions page[edit]

While we click the contributions link of an author, the contributions are listed. Then there is a link called Special appears in that page itself. When that link is clicked the following error is seen in the page.

Error
A system error has occurred. The error message is:
An unknown system error has occurred. The error message is: java.lang.Exception: Failure while executing BEGIN DECLARE
@COUNT int DECLARE @TOP int DECLARE @OFFSET int DECLARE @LIMIT int DECLARE @WIKI_NAME varchar(100) DECLARE @WIKI_USER
 varchar(100) DECLARE @SQL varchar(900) SET @WIKI_NAME = ? SET @WIKI_USER = ? SET @LIMIT = ? SET @OFFSET = ? SET @TOP =
 @LIMIT SET @COUNT = (select count(*) from jam_topic, jam_virtual_wiki, jam_topic_version, jam_wiki_user where 
jam_virtual_wiki.virtual_wiki_id = jam_topic.virtual_wiki_id and jam_wiki_user.wiki_user_id = 
jam_topic_version.wiki_user_id and jam_topic.topic_id = jam_topic_version.topic_id and jam_virtual_wiki.virtual_wiki_name = 
@WIKI_NAME and jam_wiki_user.login = @WIKI_USER and (jam_topic.delete_date is null or jam_topic_version.edit_type = 5)) IF
 (@OFFSET > @COUNT) SET @OFFSET = @COUNT IF (@COUNT < @OFFSET + @LIMIT) SET @TOP = @COUNT - @OFFSET SET @SQL = 'select *
 from ( '+ 'select top '+CONVERT(VARCHAR, @TOP)+' * from ( '+ 'select top '+CONVERT(VARCHAR, @OFFSET + @LIMIT)
+' '+ 'jam_topic_version.topic_version_id, jam_topic_version.topic_id, '+ 'jam_topic_version.previous_topic_version_id, 
jam_topic.topic_name, '+ 'jam_topic_version.edit_date, jam_topic_version.edit_comment, '+ 'jam_topic_version.wiki_user_id,
 jam_topic_version.edit_type, '+ 'jam_wiki_user.login as display_name, 
jam_topic.virtual_wiki_id, '+ 'jam_virtual_wiki.virtual_wiki_name '+ 'from jam_topic, jam_virtual_wiki, jam_topic_version,
 jam_wiki_user '+ 'where jam_virtual_wiki.virtual_wiki_id = jam_topic.virtual_wiki_id '+ 'and jam_wiki_user.wiki_user_id = 
jam_topic_version.wiki_user_id '+ 'and jam_topic.topic_id = jam_topic_version.topic_id '+ 'and 
jam_virtual_wiki.virtual_wiki_name = '''+@WIKI_NAME+''' '+ 'and jam_wiki_user.login = '''+@WIKI_USER+''' '+ 'and 
(jam_topic.delete_date is null or jam_topic_version.edit_type = 5) '+ 'order by edit_date desc '+ ') a '+ 'order by 
edit_date '+ ') b '+ 'order by edit_date desc 'EXEC(@SQL) END.

--yesesnono 14-Mar-2008 00:25 PDT

Thanks, it looks like that may be a fairly easy fix. I don't know if I broke it during 0.6.4 (henceforward to be called the "Ryan should spend more time testing" release) or previously and just never noticed, but it should be simple to resolve. -- Ryan 14-Mar-2008 08:18 PDT
revision 2101 should fix this problem. -- Ryan 15-Mar-2008 14:03 PDT

Can not use Manage function (0.6.4)[edit]

When attempting to use the Manage tab to delete a test page I received the following error:

Manage ReSTricted
A system error has occurred. The error message is:

org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 35 in the jsp file: /WEB-INF/jsp/admin-manage.jsp
Generated servlet error: ServletUtil.PARAMETER_TOPIC cannot be resolved An error occurred at line: 58 in the jsp file: /WEB-INF/jsp/admin-manage.jsp
Generated servlet error: ServletUtil.PARAMETER_TOPIC cannot be resolved An error occurred at line: 80 in the jsp file: /WEB-INF/jsp/admin-manage.jsp
Generated servlet error: ServletUtil.PARAMETER_TOPIC cannot be resolved 

It looks like there should be a static field named PARAMETER_TOPIC in the ServletUtil class. As a temporary fix I modified the admin-manage.jsp page hardcoding the field name to "topic" in all three instances. Here is an example of the change:

<%-- <input type="hidden" name="<%= ServletUtil.PARAMETER_TOPIC %>" value="<c:out value="${pageInfo.topicName}" />" />
--%>
<input type="hidden" name="topic" value="<c:out value="${pageInfo.topicName}" />" />

With the hardcoded field name the delete function worked correctly. --Tom 12-Mar-2008 15:53 PDT

Thanks, that's a regression in 0.6.4. It looks serious enough that it may make sense to get a 0.6.5 release out fairly soon. Thanks for reporting this. -- Ryan 12-Mar-2008 16:02 PDT
revision 2085 should fix this problem, and there will most likely be a 0.6.5 release this weekend to address the issue. I've added your name to the CHANGELOG as "tfschueller", but let me know if you'd prefer something different. -- Ryan 12-Mar-2008 21:11 PDT

Topic Caching bug[edit]

Apologies if this is a non-bug and I am just misinterpreting the code, but in AnsiDataHandler.java, function lookupTopic(String, String, boolean, Object), it seems that the test to see if the object is cached: (transactionObject != null) is the wrong way round and should be (transactionObject == null)? In addition, conn = WikiDatabase.getConnection(transactionObject); should not take place until after the cache check as if the object exists in cache then it will needlessly allocate a DB connection.

Thanks again for the great wiki software!

Thanks for pointing these out. It would be hugely embarrassing if the cache lookup was incorrect, so I'll investigate tonight. As to checking the cache before getting the connection, you're right - strangely I noticed the same issue while making a fix over the weekend, but didn't correct it at the time since it was so close to the final release. -- Ryan 10-Mar-2008 15:11 PDT
OK, I've taken a closer look at the code. The code in question is below:
if (transactionObject != null) {
    // do not use cache if part of a transaction
    Element cacheElement = WikiCache.retrieveFromCache(CACHE_TOPICS, key);
    if (cacheElement != null) {
        Topic cacheTopic = (Topic)cacheElement.getObjectValue();
        return (cacheTopic == null || (!deleteOK && cacheTopic.getDeleteDate() != null)) ? null : new Topic(cacheTopic);
    }
}
Basically what's happening is that the topic will always be retrieved from the cache UNLESS lookupTopic() is called as part of a transaction. In that case the cache version may not yet have been updated - the transaction could be performing multiple steps, and only after they all successfully complete will the cache be updated. So in this case transactionObject != null is the correct way to go. Let me know if that's not clear, and thanks for investigating. Additionally, the next release cycle will definitely see the cache checks moved prior to the database connection initialization. -- Ryan 10-Mar-2008 19:58 PDT
I need to get more sleep. You're right - the code is backwards; hopefully I can blame this one on a late-night coding session, and it's not due to a simple brain fart. I'll get a patch in soon, and please let me know if you'd like credit (and what name to use) in the CHANGELOG. -- Ryan 10-Mar-2008 20:01 PDT
Happens to the best of us (I only spotted it because I did the exact same thing elsewhere in my local fork), but that is why we use open source :) - Jim
revision 2086 should address this issue. I've credited you in the CHANGELOG as "Jim", but please let me know if you'd prefer something different. Thanks again for catching this. problem. -- Ryan 12-Mar-2008 21:27 PDT
I just wanted to add that since changing that code on my local fork, memory usage has been quite obscene and has rocketed by 250M from about 200M to 500M on my server. I am investigating, but for now have set the size of the cache to be much lower (100 items) which seems to be holding stable. I'll update here with more information if I can track down the source. - Jim
Thanks for this feedback... there has been some weirdness with the ehcache code lately, and upgrading to the latest version caused regressions that forced a rollback, so it's very possible there is something else that is not right there. -- Ryan 17-Mar-2008 08:02 PDT
Upon further analysis, the memory leap was due to unrelated code in another part of my webapp. The cache seems to work fine so please disregard my previous comment -Jim
Thanks for following up! It definitely saves me from some tedious debugging, so much appreciated! -- Ryan 19-Mar-2008 18:31 PDT

Install of 0.6.1 hangs when using MSSQL Server 2000 as External Database[edit]

I've tried to do the install on MSSQL Server 2000 twice, on two separate machines and the install script hangs on both. The end of the jamwiki.log.0 file looks like so:

2007-10-30 10:43:42,871 INFO: org.jamwiki.utils.Utilities - File pages\en_US\StartingPoints.txt does not exist
2007-10-30 10:43:42,871 INFO: org.jamwiki.utils.Utilities - File pages\en\StartingPoints.txt does not exist
2007-10-30 10:43:43,044 CONFIG: org.jamwiki.Environment - Loading properties from C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\jamwiki-0.6.1\WEB-INF\classes\interwiki.properties

Any idea why this would hang? I've successfully installed 0.6.1 at least 3 times using the internal database. Let me knwow if there is any other data that would be relevant to troubleshooting. --Bulldog 30-Oct-2007 08:01 PST

I don't have an MS SQL server to test with, so I'm not sure. The log messages look harmless, and there have been reports of users successfully installing with MS SQL. Let me know if you figure anything out. -- Ryan 31-Oct-2007 19:08 PST

I'm having the same issue with JAMWiki 0.6.2, MSSQL 2005 and JBoss 4.2 using the Opta database driver, has anyone gotten JAMWiki 0.6.2 or greater to install with MSSQL 2000 or 2005? -- Kevin

Are there any error messages in the JAMWiki logs? If it's a SQL error then an error with a stack trace should be generated. Without access to a MS SQL server instance this one is unfortunately tough for me to debug without a better idea of where the error is being generated. -- Ryan 19-Dec-2007 13:31 PST

During Setup, MSSQL 2000/2005 runs in a deadlock situation. I am not quite shure about why, but I could debug out where the deadlock occures: In WikiDatabase.setupSpecialPages() the first one works (SPECIAL_PAGE_STARTING_POINTS), but the second one (SPECIAL_PAGE_LEFT_MENU) is waiting for the first one to be committed. WikiDatabase.setupSpecialPage() should do an conn.commit() finally, I quess. Maybe (for MSSQL) autocommit could be set true. -- peter 13-Mar-2008 09:04

Thanks for debugging this. If you discover anything else please let me know, and I'll take a look into this early in the 0.6.5 development cycle - worst case, it shouldn't hurt to set autocommit true for the MS SQL setup process since any setup failure should be cleaned up after setup completes. -- Ryan 11-Mar-2008 07:57 PDT
It looks like Feedback#Database_connections is the same problem. As mentioned in that discussion the solution isn't immediately obvious, but there are a couple of different options to address it. Unless someone beats me to it I'll put something together by the end of the weekend, and hopefully it will solve this problem (finally!). -- Ryan 13-Mar-2008 19:51 PDT
Hopefully revision 2100 will solve this issue. The fix will be included in the 0.6.5 release. -- Ryan 15-Mar-2008 10:34 PDT

Only one time to edit on jamwiki 0.5.2[edit]

This is error information:


产生了一个系统错误,错误消息是:

javax.servlet.jsp.JspException: The database is already in use by another process: 
org.hsqldb.persist.NIOLockFile@d2aafeb9[file =E:\jamwiki\database\jamwiki.lck, exists=true, 
locked=false, valid=false, fl =null]: java.lang.Exception: java.io.IOException: 另一个程序已锁
定文件的一部分,进程无法访问。 : E:\jamwiki\database\jamwiki.lck

i use jamwiki's default config. database is hsqldb.

According to the HSQL documentation that problem is due to an incorrect shutdown. I'll investigate further, but in the mean time you might want to try the following:
  • Restart your application server. That should hopefully clear the lock.
  • If restarting doesn't work then delete the e:\jamwiki\database\jamwiki.lck file.
I don't use file persistency by default, but I'll try to use it on my test machine during the 0.5.3 release cycle to hopefully catch this sort of bug. Thanks for the report. -- Ryan 08-Mar-2007 21:45 PST

Hi, I'm a new user of JAMWiki and I also encountered this error using an out-of-the-box install of 0.6.4 to Apache Tomcat 5.5.16 using the hsqldb in-process internal database. The error would occur whenever I edited the wiki configuration (including the initial configuration changes) and could only be cleared by shutdown/restart of Tomcat and deleting the hsqldb lock file.

I have diagnosed the problem as follows: -

  1. Context reloading was enabled (reload="true" attribute in the context.xml used to deploy)
  2. Updating the configuration writes the file jamwiki.configuration to the WEB-INF/classes directory, triggering application reload
  3. The connection pool held via static reference in the org.jamwiki.db.DatabaseConnection class is not closed during the ServletContext termination, so the database remains open.
  4. The application restarts with its new ClassLoader, and the DatabaseConnection class within this classloader cannot access the in-process db due to the outstanding lock

In order to fix the problem, I did the following: -

  1. Added the connection parameter ";shutdown=true" to the hsqldb connection URL for the default in-process database, so that the in-process database would shutdown when there are no remaining connections
  2. Created a ServletContextListener class (org.jamwiki.servlets.JAMWikiListener) which would close the connection pool on a contextDestroyed event (refactored org.jamwiki.db.DatabaseConnection to make closeConnectionPool protected & org.jamwiki.db.WikiDatabase to add a public shutdown method to be called by the ServletContextListener#contextDestroyed method.

-- Dallas 12-Mar-2008 10:43 PDT

Awesome, thanks for the detailed analysis! Any chance you could provide the JAMWikiListener source, either as an upload to jamwiki.org, or if you'd prefer I can add you to the Subversion committer list if you can provide a Sourceforge login? Thanks again for helping to debug a reasonably obscure issue. -- Ryan 12-Mar-2008 13:17 PDT
Changes checked-in for 0.6.5. Cheers -- Dallas 14-Mar-2008 05:14 PDT
Thanks! -- Ryan 14-Mar-2008 08:09 PDT

can not create page[edit]

Environment: Jamwiki 0.6.6, Database - hsql, Application Server - Apache Tomcat 5.5.26

Description: When create a page:

java.lang.IllegalStateException: popTag called on an empty tag stack or on the root stack element.

Can you provide the content you were using to create the new page, or does this happen with any new page creation attempt? Thanks for the bug report. -- Ryan 25-May-2008 10:22 PDT

Thanks a lot!! Page name ‘链接’in Chinese,just this page. PS. Could you please tell me how to delete a Category exited? Thanks again. DS 26-May

Thanks, I've been able to reproduce this issue by creating a new page whose only text is "</b>". I'll get this problem fixed. To delete a category you can either use the "Manager" tab on the category page to delete it, or if you want to remove it from the Special:Categories page you will need to make sure that no article contains a [[Category:]] tag for that category. -- Ryan 25-May-2008 20:14 PDT
I believe that revision 2225 will resolve this problem. I'll push the new code to jamwiki.org soon, and try to get JAMWiki 0.6.6 beta 2 out by the end-of-day tomorrow. -- Ryan 25-May-2008 23:16 PDT

Funny Formatting[edit]

Copied from the Feedback page:

Hi Ryan, I started editing my private Wiki-page. While I was entering some webtest-documentation I hit the preview-button on the bottom (please try to edit my Notes and press the preview-button). The whole page looked funny;-) I found the reason: the ":" in front of the last line. OK the content of the line is quite unusual, I agree.

MichaelHabbert, 2006-12-13 21:23 ECT
  • Eine Abhänigkeit über IDs - auch wenn sie über das Properties.file referenziert werden - müssen vermieden werden! Die Lösung

für diese Problem stellt der storeReqEx-Task von Webtest dar. Hiermit lassen sich auch IDs aus der Antwortseite bestimmen und für die weitere Arbeit verwenden (mittels #{visibleTaskID}):

<storeRegEx description="Extract visibleTaskID." text="Task-Nummer</td>\W*<.*>(\w{1,3}-[0-9]{5})</td>" group="1" property="visibleTaskID" />
</code>
Wow - that is a crazy line. I'll see if I can get the parser fixed, but in the mean time you can wrap <nowiki> tags around the troublesome content and that should temporarily solve the problem. -- Ryan 13-Dec-2006 13:51 PST
Hi Ryan, Yes of course, it's no problem at all, if you save the page. But still a funny parsing ...;-) Michael Habbert 17-Dec-2006 06:24 PST
Btw: The funny line is part of a regular Expression to grep a html-page for a special ID;-). Michael Habbert 17-Dec-2006 12:00 PST
Turns out that this issue is pretty difficult to solve - so long as a site has allowed HTML, JAMWiki doesn't do any checking to make sure that HTML tags are properly closed. As a result, adding a </div> or </td> can really screw up the page layout. It's a fairly serious problem, but I don't know if it's one that can be easily solved so I think the solution might have to wait until JAMWiki 0.5.1, rather than disrupting things so late in the 0.5.0 release cycle... -- Ryan 18-Dec-2006 22:32 PST
I think that some of the changes made in revision 2111 should make it tougher for unbalanced tags to break page layout, and the 0.6.6 release cycle should solve this problem entirely. Note that the changes aren't yet on jamwiki.org but will show up here once they're a bit further along. -- Ryan 23-Mar-2008 22:41 PDT

Definition Lists[edit]

Copied from the Feedback page:

Definition lists do render different depending on whether the colon is on the same line or not:

Definition 1
colon is on same line
Definition 2
colon is on new line

For Definition 1 only

tags are created, no
tags. Is this the intended behavior? -- Rainer 10-Jan-2007 01:19 PST
I just never realized Mediawiki supported the first format :) I'll put it on my to-do list for 0.5.1. Thanks! -- Ryan 10-Jan-2007 22:44 PST

Did you get the solution, i have the same problem

I haven't gotten around to this one yet - the fix isn't as easy as I had hoped, and since there is an alternative (lists on two lines) I've been pushing it down my to-do list for a while. If enough people feel this is important I'll make an effort to get to it sooner. -- Ryan 14-Nov-2007 21:13 PST
revision 2118 adds support for definition lists of the form "; term : definition". The code isn't yet on jamwiki.org (as of 26-March) but will be once the current round of parser changes is further along and has been more thoroughly tested. -- Ryan 26-Mar-2008 21:12 PDT

Template name with spaces(underscores) are not displayed[edit]

I created a template that had spaces in its name. If i add the template it is not displaying in the page. --yesesnono 14-Mar-2008 00:25 PDT

I haven't had a chance to investigate this issue yet but will try to look into it soon. Thanks for the bug report. -- Ryan 15-Mar-2008 15:39 PDT
revision 2192 should resolve this issue - {{Test Template}} and {{Test_Template}} will now produce the same result. -- Ryan 20-Apr-2008 11:16 PDT

Problem in selection while viewing the history of a page[edit]

In the history of a page when we select the check boxes to view the differences. If we select the last checkbox first all the previous checkboxes get disabled giving no option to select another checkbox. --yesesnono 14-Mar-2008 00:25 PDT

That's actually a design problem that's been present since version 0.0.1 - the first checkbox selected disables all previous checkboxes. It's bugged me forever, but since no one else seemed to care I never did anything. I'll see if I can change the history interface to be more like Mediawiki for a future release. -- Ryan 14-Mar-2008 08:22 PDT
revision 2152 implements the same radio-button UI for diffs on the history page that is used by Mediawiki. I'll copy the new code to jamwiki.org within the next few days. -- Ryan 08-Apr-2008 22:00 PDT
There is one additional change that needs to be made for browsers that do not enable Javascript - for those browsers all radio buttons should be visible by default since Javascript cannot display/hide anything. To fix this problem Javascript should be used to initially hide the buttons, rather than hiding them from JSP code, allowing the pages to still be functional for non-Javascript browsers. I'll hopefully get this fixed tonight. -- Ryan 10-Apr-2008 08:12 PDT
Fixed by revision 2162. I'll copy the new code to jamwiki.org shortly. -- Ryan 10-Apr-2008 19:53 PDT

Image Caching Design Curiosity[edit]

In ImageUtil.java, the function BufferedImage loadImage(File file), what is the purpose of caching the images? The operating system should handle file/disk caching with any excess memory it has available and I have found that allowing the image caching in jamwiki really eats up available memory in the JVM and could theoretically lead to JVM memory overflow issues in larger wikis with many multiple MB pictures. I have changed loadImage to contain one line:

return ImageIO.read(file);

And have noticed a significant improvement in memory performance, and have much more cache space available for caching actual articles. - Jim

Looking at that code now, I'm not sure what the original reason for caching of the image was, and you're right that storing image files in the cache seems unnecessary and could cause memory issues. Let me dig a bit deeper just to make sure that the caching really is a mis-design or cruft left over after some other change/cleanup, and if so then your suggested change looks like a good one. Thanks for the report! -- Ryan 17-Apr-2008 08:16 PDT
I looked into this issue a bit more and can't see any reason at all why image files were ever added to the cache - this may have been one of those changes that went in at 4AM one night and seemed like a great idea at the time :) revision 2184 resolves the issue. I've credited you as "Jim" in the CHANGELOG, but please let me know if you'd like a full name or some other credit given. Thanks for taking the time to investigate this issue and report the problem! -- Ryan 19-Apr-2008 08:28 PDT

Wiki syntax for plurals more similar to Mediawiki[edit]

To render the plural 's' inside the resulting HTML link, in the following wiki text:


Dolphins are [[aquatic mammal]]s that are closely related to [[whale]]s and [[porpoise]]s.

which code must be changed in JAMWiki?

Is it the LinkUtil#parseWikiLink(String raw) which has to be refactored to a LinkUtil#parseWikiLink(String raw, String pluralSuffix). If pluralSuffix!=null when append the given suffix to the WikiLinks text? -- Axel Kramer 30-Apr-2008 10:07 PDT

I wasn't previously aware of that Mediawiki syntax... since the "s" is outside of the actual link itself (the [[...]]) I think the default parser would need to be modified so that jamwiki-process.jflex included the "s" when parsing. Is there some documentation online about this feature besides the "Wikilink Tricks & Demos" note on http://meta.wikimedia.org/wiki/Help:Link#Syntax ? It seems like the rules for what is "plural" would vary wildly by language, so it would be good to have a better idea of what is required before attempting to implement anything. -- Ryan 30-Apr-2008 10:44 PDT
I'm not sure, but from a test in the Wikipedia Sandbox it seems, that one can check the immediately following characters after the link with the Character#isLowerCase() method. -- Axel Kramer 30-Apr-2008 13:56 PDT
I looked at this last night, and the fix is pretty simple - all I had to do was modify jamwiki-processor.jflex so that the "wikilink" pattern included "[a-z]*", and then modify the WikiLinkTag.parseWikiLink() method. However, the JFlex plugin now reports out of memory, and rather than force people to increase their Java heap size I'd like to see if it's possible to optimize that file a bit. Once that's done I'll commit the change. -- Ryan 01-May-2008 08:00 PDT
revision 2211 should resolve this issue. I haven't yet copied the new code to jamwiki.org, but will do so as soon as I've had a chance to test a bit more thoroughly. -- Ryan 03-May-2008 00:00 PDT

"Remember Me" Login Problems After Server Restart[edit]

I suspect that this may be an Acegi problem but haven't yet been able to figure it out. Steps to reproduce:

  1. Login with "Remember Me" checked.
  2. Restart the app server.
  3. While the app server is restarting, refresh the wiki web page.
  4. Once the app server has finished restarting, refresh the wiki web page again. The user name will show up as "null", but all user permissions will be properly set.

Having investigated, the Acegi Authentication object is missing the username field, but the JAMWikiDaoImpl method is never called so apparently Acegi thinks the user is correctly logged in. I was hoping to fix this issue for 0.6.6, but having spent several hours investigating I think this may have to wait until the next release, which has an Acegi upgrade planned. -- Ryan 11-May-2008 13:50 PDT

User name reset to null[edit]

I found a bug in the 0.6.6 beta 1. Deploy jamwiki on a tomcat 5.5.x, use the internal Database, login as admin, open tomcat manager in a new tab, restart jamwiki context, witch to jamwiki again, refresh starting points and you see that the user name on the top row changes to null --Michael-O 17-May-2008 11:56 PDT

Thanks for the report - I think that this is the same issue as the "Remember Me" issue above. I spent a few days investigating and believe that the problem may be a bug somewhere in the Acegi framework, so if it isn't fixed for the next JAMWiki release (0.6.6) hopefully the planned Acegi upgrade for 0.7.0 will resolve it. -- Ryan 17-May-2008 23:13 PDT
Ryan, that's right. I did notice that after I filed this issue. Did you try already the latest acegi snapshot? --Michael-O 18-May-2008 05:35 PDT
Acegi seems to have switched their focus to the next version (2.0) which is a major change, so the switchover to that version isn't planned until the next JAMWiki release - see Tech:Acegi Upgrade. I'll give this issue a bit more attention prior to the final 0.6.6 release in the hopes of finding a workaround, and if anyone else discovers a solution then a patch is welcome. -- Ryan 19-May-2008 07:31 PDT
Upgrading from Acegi 1.0.6 to 1.0.7 hasn't solved this issue, nor has upgrading from Spring 2.5.3 to 2.5.4. I'd like to fix this issue prior to the final 0.6.6 release, so I'll spend some time looking for a workaround. -- Ryan 22-May-2008 21:36 PDT
revision 2224 resolves this issue on my local machine, but it needs a bit more testing before getting moved to jamwiki.org. The workaround is fairly ugly, but as the problem seems to be coming from Acegi I'm not sure whether there's a better way to handle it. This change will clear the Acegi SecurityContextHolder and load a default set of anonymous user credentials if the SecurityContext appears to be invalid, and so in the rare cases where the bug triggers the user will appear as logged-out on the first page they view, but will then be automatically logged-in via the remember me cookie on successive page views. -- Ryan 25-May-2008 22:43 PDT

Save without changes[edit]

Somewhere during the 0.6.6 development cycle it looks like it has become possible to save a topic version with no changes. That needs to be fixed. -- Ryan 29-May-2008 21:49 PDT

revision 2232 resolves this issue. -- Ryan 01-Jun-2008 10:13 PDT

IE7 Layout Issue[edit]

ie7 layout issue.jpg
Screen shot of the issue

When a table of contents and an image (aligned to the right) are both displayed in the header the left side menu is covered by the contents div.

The issue only occurs in IE7. The same pages display fine in firefox.

I did have some luck editing the stylesheet, but nothing that looked good in both ie and firefox.

If any comments/suggestions please leave a subheader in under this heading, thank you and my apologizes if this issue was already solved.

-wbryan, 2008-04-02

Thanks for the detailed report, I'll look into it tonight and see if I can find a decent workaround. In the mean time if anyone else has a suggestion feel free to post the CSS below. -- Ryan 02-Apr-2008 13:35 PDT
Try getting rid of the "clear:both" on the toc-container style - that worked for me with both Firefox and IE7, although I haven't tried IE6 yet. Hope that helps! -- Ryan 02-Apr-2008 21:10 PDT
It worked like a charm. Thanks for the quick answer. You do a fine job.
-wbryan, 2008-04-03

Changing the location of the Table of Contents[edit]

I've tried the following code in my page to set the position of the TOC (just like in MediaWiki):


{| align="right"
|__TOC__
|}

Unfortunately this seems not to be working, there just appears "__TOC__" on the right (no ToC as such as all).--Sil86 01-Apr-2008 23:54 PDT

Thanks, I'll move this one to Bug Reports and get it fixed for the next release. -- Ryan 01-Apr-2008 07:59 PDT
revision 2142 will fix this issue. The fix will be included in the next release - thanks for the bug report. -- Ryan 01-Apr-2008 20:26 PDT
Cool! :)

Some minor glitch:


{| class="wikitable" align="right"
|-
|__TOC__
|-
|}
== Heading #1 ==
Paragraph #1

== Heading #2 ==
Paragraph #2

== Heading #3 ==
Paragraph #3

== Heading #4 ==
Paragraph #4

== Heading #5 ==
Paragraph #5

and the resulting page looks like


                               +---------------+
Heading #1            [Edit]   | 1. Heading #1 |
------------------------------------------------
Paragraph #1                   | 2. Heading #2 ]
                               | 3. Heading #3 ]
Heading #2            [Edit]   | 4. Heading #4 |
------------------------------------------------
Paragraph #2                   | 5. Heading #5 ]
                                +--------------+
Heading #3                                [Edit]
------------------------------------------------
Paragraph #3

Heading #4                                [Edit]
------------------------------------------------
Paragraph #4

Heading #5                                [Edit]
------------------------------------------------
Paragraph #5

--Sil68 05-Apr-2008 05:27 PDT

Just a note to say that I saw this bug report - I suspect it can be fixed via a CSS change, but haven't yet had time to investigate. Hopefully tomorrow... -- Ryan 05-Apr-2008 23:30 PDT
revision 2149 will fix this issue. For those who need a quick fix, simply edit the StyleSheet topic and add "background-color: #fff" to the ".toc-content" style. As a side note, your ASCII art is really good :) -- Ryan 06-Apr-2008 22:51 PDT

Table Caption[edit]

I've tried the following code in my page to add a table caption to a table (just like in MediaWiki):


{| class="wikitable" style="text-align:left"
|+align="bottom"|My special table caption for {{{TopicName|<Name of Topic>}}}
|-
|'''Start'''
| colspan="3" | {{{Period|<From Date - To Date>}}}
|-
|}

The generated output was


align="bottom"|My special table caption for {{{TopicName|<Name of Topic>}}}
Start {{{Period|<From Date - To Date>}}}

--Sil68 02-Apr-2008 02:03 PDT

Thanks, I'll look at this one too. The parser has undergone significant revisions thus far in the 0.6.6 development cycle, so with any luck this issue may already be resolved. The bug reports are much appreciated, and will definitely be incorporated into unit tests for future releases. -- Ryan 02-Apr-2008 08:10 PDT
revision 2143 adds support for table attributes for table captions - this was overlooked when table parsing was originally written. Thanks again for the report. -- Ryan 02-Apr-2008 20:22 PDT
The new code is now on jamwiki.org:
My special table caption for {{{TopicName|<Name of Topic>}}}
Start {{{Period|<From Date - To Date>}}}
-- Ryan 03-Apr-2008 22:10 PDT
Super! :) --Sil68 04-Apr-2008 23:40 PDT

Heading issues[edit]

When using something like


== Chapter #1 ==

== Chapter #2 ==

=== Chapter #2.1 ===

=== Chapter #2.2 ===

== Chapter #3 ==

I'd expected the created TOC looking like


  1. Chapter #1
  2. Chapter #2
     2.1. Chapter #2.1
     2.2. Chapter #2.2
  3. Chapter #3

Instead it is appearing as


  1. Chapter #1
  2. Chapter #2
     1. Chapter #2.1
     2. Chapter #2.2
  3. Chapter #3

Which of those is the intended way?--Sil68 04-Apr-2008 05:46 PDT

I can investigate - when the JAMWiki TOC was originally built (about two years ago) I think the implementation followed Mediawiki, but either the initial TOC implementation was incorrect or else Mediawiki has changed TOC styles. Either way, this shouldn't be too tough to resolve. -- Ryan 04-Apr-2008 08:04 PDT
revision 2147 should resolve this issue. I'll get the new code on jamwiki.org soon. -- Ryan 05-Apr-2008 15:44 PDT

Numbered List Issue[edit]

Hi everybody, I would like to ask, if there is any possibility to let the numbered list start at a given number e.g. 4 instead of 1. In mediawiki, this can be achieved using html tag <ol start:4>. But Jamwiki does not support html list tags. Or how to make the numbered list continue from where the previous one ended, because for example if aI want the list item to contain some code element, the list number counter would reset and start at 1 again. example :

  1. list item 1
  2. list item 3 <Connector port="8443" address="${jboss.bind.address}"
              maxThreads="100" strategy="ms" maxHttpHeaderSize="8192"
              emptySessionPath="true"
              scheme="https" secure="true" clientAuth="false" 
              keystoreFile="${jboss.server.home.dir}/conf/server.keystore"
              keystorePass="****" sslProtocol = "TLS" />
    
  3. it would be great to have a number 3 instead of 1.

Thanks a lot. Greetings Matus Majchrak

This feature will be supported with JAMWiki 0.6.6, which (barring surprises) will be available soon. jamwiki.org is running this new code already:
  1. this list starts at 3
  2. four
  3. five
Any help in testing 0.6.6 beta two is appreciated, and unless serious bugs are found the final version should be out in a few days. -- Ryan 28-May-2008 08:00 PDT

Section links[edit]

Links within a page of the form [[#My Page Section]] do not work and result in links that produce an error page. Clearly the developer of this functionality has no business writing code and should be summarily flogged. -- Ryan 11-Aug-2008 09:16 PDT

revision 2296 will fix this issue. -- Ryan 10-Sep-2008 22:05 PDT

Saving a topic with no content doesn't work[edit]

Apparently 0.6.6 broke the ability to save a topic with no content, which is useful with categories. -- Ryan 12-Aug-2008 11:53 PDT

revision 2292 should fix this problem. -- Ryan 06-Sep-2008 13:32 PDT

Watch Tab Bug[edit]

On a brand new install (Tomcat 6, JDK 1.6, MySQL), I got this error:


java.lang.Exception: Failure while executing 
select jam_topic_version.topic_version_id, 
       jam_topic_version.topic_id,  
       jam_topic_version.previous_topic_version_id, 
       jam_topic.topic_name, 
       jam_topic_version.edit_date, 
       jam_topic_version.edit_comment, 
       jam_topic_version.wiki_user_id, 
       jam_topic_version.edit_type, 
       jam_wiki_user.login as display_name, 
       jam_topic.virtual_wiki_id, 
       jam_virtual_wiki.virtual_wiki_name 
from jam_topic, 
     jam_virtual_wiki, 
     jam_topic_version, 
     jam_wiki_user, 
     jam_watchlist 
where jam_virtual_wiki.virtual_wiki_id = jam_topic.virtual_wiki_id 
and jam_wiki_user.wiki_user_id = jam_topic_version.wiki_user_id 
and jam_topic.current_version_id = jam_topic_version.topic_version_id 
and jam_topic.topic_name = jam_watchlist.topic_name 
and jam_virtual_wiki.virtual_wiki_id = ? 
and jam_watchlist.wiki_user_id = ? 
and (jam_topic.delete_date is null 
or jam_topic_version.edit_type = 5) 
order by edit_date desc limit ? offset ?

.....

Caused by: java.sql.SQLException: Column 'login' not found.

Upon returning to the 'StartingPoints' page, the 'watch' tab is now 'unwatch', so I guess the watch was successful.

This happened while logged in as the admin user.

-Doug Donohoe

I haven't seen that issue and haven't heard any similar reports (and many people use MySQL successfully), so this will require some investigation. What version of MySQL are you using? The query syntax looks fine, and a wiki without the jam_wiki_user.login would break badly, so I'm wondering if this problem might be specific to a particular MySQL version. -- Ryan 24-Feb-2008 08:22 PST
I'm on MySQL 4.1.22-standard. I agree the syntax looks fine too. I pasted the above directly into mysql command line and it worked correctly. I don't see to be having issues with any other functionality.
Leading up to the release of JAMWiki 0.6.4 I'll have to do a lot of testing with different databases, so I'll investigate this issue with MySQL and see if I can reproduce and hopefully fix it. Thanks again for the bug report. -- Ryan 24-Feb-2008 21:49 PST
Update: I've tested this issue with MySQL 5 and MySQL 4.1 on my Windows laptop and haven't hit any problems. I used the "development box" setup during the MySQL installation, which selects the InnoDB engine and a few other defaults. It's possible that the other engine used by MySQL (the name escapes me) has an issue, but given that the weather is awesome outside on this Saturday I'm not going to spend much more time investigating database installation and configuration :) I'd like to leave this issue open to see if anyone else reports the same problem, which might help narrow down what exactly is the issue and thus make it easier to find and fix the problem. -- Ryan 08-Mar-2008 12:42 PST
I confirm this bug in my install (Sun Application Server 9, JDK 1.6.0_06b2, JAMWiki 0.6.5, MySQL 5.0.51a). Have not checked the MySQL installed component yet but will do it soon.david 08-May-2008 23:24 PDT
Update: I've exactly the same error and I found the issue, it is with Java 6. The WikiResultSet constructor uses the getString(columnName) of the ResultSet to retrieve the value of the designated column. Up to Java 1.5 it was exact but Java 6 changed the method and now the column label has to be used instead (Very bad change from Sun!). In this case the statement is "select ... jam_wiki_user.login as display_name ..." where the column name is 'login' and the column label is 'display_name' and only the column label is known in the ResultSet. If I could suggest a quick fix would be to change the line 'String columnName = rsmd.getColumnName(i);' by 'String columnName = rsmd.getColumnLabel(i);'. As documented in the API if the column label doesn't exist the column name will be returned instead. -- Luc 01-Aug-2008
Thanks! I'll be sure to get this fix included in the next JAMWiki release. I'll credit you as "Luc" in the changelog unless you would prefer something different - just let me know. Thanks a lot for investigating! -- Ryan 02-Aug-2008 09:36 PDT
revision 2256 has been added in Subversion. -- Ryan 02-Aug-2008 13:32 PDT

Preserve formatting issue[edit]

I don't use a leading space too often to preserve original formatting so I'm not sure if this is new in 0.6.6. Using the <pre> tag here is an example of my expected results:

wiki text line one

pre line one

wiki text line two

pre line two
pre line three

wiki text line three

pre line four
pre line five
pre line six

The same text displayed using leading spaces for the lines that had been enclosed in the pre tags:

wiki text line one

pre line one

wiki text line two

pre line two
pre line three

wiki text line three

pre line four
pre line five
pre line six

It appears that the first line is always skipped but I noticed that if the leading space is used on a single line just after a section it appears to work. For example:

Section Header[edit]

preserved formatting here

--Tom 14-Jun-2008 20:05 PDT

Thanks for the report - I will investigate further when I get back from vacation in mid-July. The parser changes in 0.6.6 may have broken something... -- Ryan 19-Jun-2008 10:38 PDT
revision 2301 should resolve this issue. Thanks for the report. -- Ryan 13-Sep-2008 22:03 PDT

Using the '+' character in a link has inconsistent results[edit]

Hi,

I was trying to create pages which contain the '+' sign, and I noticed that this character is usually substituted with a '_'. I guess it happens because URL's use the + as a blank, so jamwiki changes it also to blank (which is represented by _). However, there are some strange behaviours. Below is a table with some tests. My jamwiki version is 0.7.0.

Markup Output
[[+]] +
[[+ start]] + start
[[end +]] end +
[[at the + middle]] at the + middle

It should be noted that all this examples work in mediawiki. That means, the '+' symbol appears there, both in the url link and in the name.

Mario 03-Jul-2008 10:57 PDT

Thanks for catching this - the same escaping that is used with the underscore symbol (_) will probably also need to be used with the plus sign (+). I think this will be an easy fix for the next release. -- Ryan 05-Jul-2008 06:01 PDT
revision 2298 should resolve this issue, but I'm going to do a bit more testing before pushing it to jamwiki.org in order to (hopefully) catch any regressions. -- Ryan 12-Sep-2008 21:28 PDT

"Edit" link above each section not showing up in IE[edit]

Using IE version 6.

Thanks, I see that as well with IE6, and the page also seems to get stretched out at times. I'll investigate, although if anyone has some time to play around with CSS and get a fix together a patch would be gladly accepted :) -- Ryan 24-Jul-2008 11:35 PDT
I believe that revision 2315 will resolve this issue. -- Ryan 21-Sep-2008 10:58 PDT
It's still broken. I'll need to dig deeper into the CSS when I have time. -- Ryan 22-Sep-2008 07:50 PDT
revision 2319 really fixes the issue. -- Ryan 22-Sep-2008 19:36 PDT

IE6 Image issues[edit]

Moved from the Feedback page:

I did my best to research this, but I don't seem to be making any progress. For some reason my images are not showing up in IE6 when I use the "frame" option for example (You should see 2 images):

You can see this in IE6 sp2

collaboration w text.gif
But you can't see this in IE6 sp2

I'm sure you've answered this question many times so forgive me for my ignorance. Just as a FYI, I also have the latest stylesheet

It looks like a CSS change in a previous release caused some IE6 display issues - there is already a similar bug report on the Bug Reports page, I believe for section edit links. I'll try to move this up the priority list and get a fix available (it will be a CSS change) unless someone else beats me to figuring out what needs to be changed. Thanks for the bug report! -- Ryan 04-Sep-2008 16:20 PDT
revision 2320 fixes the issue. You can fix this locally by adding "position:relative" to the imgthumb style in your StyleSheet topic. -- Ryan 22-Sep-2008 19:36 PDT

Request not terminating on a slash[edit]

request for http://jamwiki.org/wiki/en

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

revision 2289 should resolve this issue. -- Ryan 02-Sep-2008 21:31 PDT

Problem with german 'umlaut' in anchors[edit]

We are using jamwiki version 0.6.6 on oracle 11 database with tomcat 6.0.16 on solaris. But this behaviour already existed in jamwiki 0.6.2. We have a problem with linking to header anchors when german umlauts like äöüÜÖÄ are used. It seems different encodings are used for toc/header anchor encoding and anchor encoding in links. Example:

head line
== PLD 1: Erfassung der Prüfungsleistungen durch Prüfungsämter ==
resulting anchor in page/toc
#PLD_1:_Erfassung_der_Pr%26uuml%3Bfungsleistungen_durch_Pr%26uuml%3Bfungs%26auml%3Bmter
resulting anchor in links to page like [[page#PLD 1: Erfassung der Prüfungsleistungen durch Prüfungsämter]]
#PLD_1:_Erfassung_der_Pr%C3%BCfungsleistungen_durch_Pr%C3%BCfungs%C3%A4mter

We wonder if this is a jamwiki problem or are we missing something? --HB 15-Sep-2008 04:31 PDT

Thanks for the report - I'll try to reproduce this issue, and as long as I'm able to see it on my test instance it should probably be fairly easy to fix. Since the 0.7.0 release is probably still a few months from being ready let me know if this is a critical issue for you and it might be possible to put together a 0.6.7 bugfix release. -- Ryan 15-Sep-2008 08:42 PDT
I'm able to reproduce this locally but probably won't be able to figure out the source & a fix tonight - football is on :) Please be sure to add a reminder to this bug report if I don't address it in the next couple of days. -- Ryan 15-Sep-2008 20:19 PDT
I ended up investigating - the problem is in WikiHeadingTag.parse, and it looks like it's been there for a while. What's happening is that the heading text is HTML escaped and then URL escaped, but links are only URL escaped. I'm not 100% sure what the best way to fix this issue will be, but it's definitely fixable. -- Ryan 15-Sep-2008 22:53 PDT
Couldn't sleep - this issue was bugging me. revision 2304 should resolve it, but it needs more testing. Please let me know how high of a priority this problem is for you and if necessary I can help get an updated version of 0.6.6 with this fix in it to you. -- Ryan 15-Sep-2008 23:29 PDT
Hello Ryan, thanks for your responses. It would be great if we could get a solution soon. We noticed this problem in version 0.6.2 but though it would be fixed since 0.6.3 (a misunderstanding because in 0.6.3 release notes we found a hint regarding another problem with 'umlauts'). We have to store some 'official' texts from our university which are very long and can't be split in parts, but we also want to build a glossary with links to the different sections. From this application my example comes from. We can't realize this until we get a fix or work around. A similar (?) problem exists in files with names including 'umlauts' (I will add a separate bug report) --HB 16-Sep-2008 07:06 PDT

Problem with german 'umlaut' in file names[edit]

We are using jamwiki version 0.6.6 on oracle 11 database with tomcat 6.0.16 on solaris. Probably connected to the previous bug report (problem with umlauts in anchors) is the behaviour of JAMWiki when trying to upload files with german umlaut characters in the name. I just loaded a file with name 'Umlaute äöü.txt' into this wiki. On the upload page I see this file name:

'Umlaute %C3%A4%C3%B6%C3%BC.txt'

But the link construction Image:Umlaute %C3%A4%C3%B6%C3%BC.txt is not existing for JAMWiki. The link construction Image:Umlaute äöü.txt is existing for JAMWiki but not working. I seems impossible to reach the file after you leave the page (even the link on Special:RecentChanges is not working) --HB 16-Sep-2008 07:06 PDT

I think revision 2308 will resolve this problem, although I need to do more regression testing. I didn't see the issue on my local machine (Tomcat 5.0, Windows), although as you pointed out there was a problem on jamwiki.org. I've uploaded the latest code to jamwiki.org and your sample image works now, so hopefully the problem is resolved. I'll see what I can do about putting a 0.6.7 bugfix release together soon. -- Ryan 16-Sep-2008 21:14 PDT
Hello Ryan, a 0.6.7 version would be great! But probably you could take a look at the next paragraph because my cooworkers just found a third problem with umlauts. --HB 19-Sep-2008 06:55 PDT

Problem with german 'umlaut' in file/images alternate text[edit]

We are using jamwiki version 0.6.6 on oracle 11 database with tomcat 6.0.16 on solaris. I will use the file I uploaded for demonstration of the previous bug report Problem with german 'umlaut' in file names: If I want to add an alternate text to a file with umlauts it seems to do double quoted:

wiki code
[[Image:Umlaute äöü.txt|Umlaute äöü.txt]]
results in this display text
'Umlaute &auml;&ouml;&uuml;.txt'
Umlaute äöü.txt

The now running 0.7.0 installation on JAMWiki.org seems to behave in the same way --HB 19-Sep-2008 06:55 PDT

Thanks for the report. revision 2313 will fix this issue. -- Ryan 20-Sep-2008 11:05 PDT