Comments:Installation

[Edit]Upgrade across multiple versions

Archived from the Feedback page:

I have fallen behind on my upgrades. Can I go directly from 0.1.0 to 0.1.3 or must I run each individual upgrade? Thanks, CB 05-Aug-2006 07:-5 CDT

The code is set up so that all of the updates you need should be applied incrementally, so upgrading from 0.1.0 to 0.1.3 should work fine. The obligatory caveat is that I've not tried it personally, so it's possible a bug might be lurking in there somewhere, but I've also not heard any bug reports and the code is simple enough that I'm confident you'll be fine. For what it's worth, there were no database schema changes after 0.1.0, so the upgrade process shouldn't actually need to do anything for you other than update your system to register it as 0.1.3. -- Ryan 05-Aug-2006 20:50 PDT
>Upgrade from 0.1.0 to 0.1.3 went fine. Had a bit of a scare because I didn't copy mysql jar file into lib directory, but otherwise fine. Still need to see why I need mysql jar file in WEB-INF/lib as I already have it in shared directory. CB 06-Aug-2006 18:34 PDT
That may be due to the way the file is getting loaded - I'll take a look for the next release, but let me know if you discover anything. -- Ryan

[Edit]Problems with installation (DB2/400)

Archived from the Feedback page:

I tried to install jamwiki version 0.4.3 on Windows XP with Tomcat 5.5.17 and Java 1.5.0_06-b05. Database backend should be a DB2/400. I added the newest JTOpen Driver (jt400.jar) to the webapp libs. I get the following error after the first installation page:

Ein unbekannter Systemfehler ist aufgetreten. Die Fehlermeldung lautet: Failure while executing insert into jam_virtual_wiki ( virtual_wiki_id, virtual_wiki_name, default_topic_name ) values ( ?, ?, ? ).

And i can't find any error logs. There is nothing in the standard error logs of Tomcat. There are tables/files created under the schema/lib in the database. Any idea?

By default errors should print to the Tomcat stdout log - there was nothing in those logs? Alternately you can customize the log location by modifying the /WEB-INF/classes/logging.properties file and updating the org.jamwiki.pattern value. I assume there had to be a failure creating tables during your installation, but I don't have a copy of DB2/400 to test with so I'd need a stack trace from the logs. If you do find something please let me know - you can either upload the log here, or email it to me at removed. Sorry for the trouble! -- Ryan 28-Nov-2006 10:35 PST
The problem was that the tables were not journaled. By default if the schema is created with the operating system command CRTLIB then the tables in this library/schema will not be journaled. If the schema is created with the sql command CREATE SCHEMA then the operating system will create everything for you (journals, journal receiver, ...) and every table created in this schema will be journaled. Everything went fine the moment i created the schema with the sql command. -- Mihael
Thanks, I've added this information to Installation#DB2/400.

[Edit]Where is my jamwiki.properties?

Moved from FAQ

I've downloaded the latest final version (0.6.3), unzipped it, and there isn't a jamwiki.properties in folder classes. Since I tried setup my Ldap-Connection, I can't login anymore, so I began searching the configuration ...

See Installation#Upgrades and the FAQ. During upgrades you'll need to backup & restore the jamwiki.properties file from your previous installation. -- Ryan 29-Feb-2008 06:45 PST

[Edit]jamwiki update

Archived from the Feedback page:

Hi Ryan, hi all, I do have a problem with my local jamwiki-installation. After a system-crash I lost my jamwiki-war and all the jamwiki-properties and so on. But I do have a copy of the database-tables. How do I reactivate my jamwiki? Update seems impossible to me. How can I re-use my data? Thanks to all for every tips. Michael Habbert 17-Dec-2007 12:27 PST

I'm not sure if this will work for you, but when I'm testing I do the following:
  1. Backup your database data.
  2. Delete the JAMWiki database table (make sure you have a backup!)
  3. Install a new instance of JAMWiki using the same database settings as your old instance.
  4. Shut down JAMWiki.
  5. Restore you database from the backup.
  6. Restart JAMWiki.
I use that process to make a copy of jamwiki.org on my local machine, and it seems to work well. Hope that helps. -- Ryan 17-Dec-2007 12:57 PST
Hi Ryan, I finally did it. Nearly done but:
-------------
2007-12-20 21:38:34,824 SEVERE: org.jamwiki.model.WikiUser - Unable to retrieve default roles for GROUP_REGISTERED_USER
java.lang.Exception: Failure while executing select * from jam_role where role_name in ( select jam_role_map.role_name from jam_group, 
jam_role_map where jam_group.group_id = jam_role_map.group_id and jam_group.group_name = ? ) 
       at org.jamwiki.db.WikiPreparedStatement.executeQuery(WikiPreparedStatement.java:84)
-------------

So can I fix this by hand? ;-) -- Michael Habbert 20-Dec-2007 12:34 PST

Hi Ryan, I fixed it by hand! After some try and error I did setup a clear new jamwiki-site and transferred the old jam_topic and jam_topic_version tables into the new site. After that I rebuilded the StyleSheets and so ;-) the only thing will be to register again and change the sites with the category-tags so the categories become rebuild. Year!! Puh my last error from system crash is fixed ;-) Thanks. -- Michael Habbert 02-Jan-2008 00:21 PST

[Edit]Upgrade blurs

Archived from the Feedback page:

I'm new to jamwiki, first of all thank you for that great tool. I'm sure it will help us a lot! Installation of 0.5.1 was plain sailing, but now I don't understand how to upgrade. Neither I can't find the everywhere mentioned UPGRADE.txt nor I know what to do when I'm told to "Remove the old JAMWiki installation" (running tomcat on a SuSE 9.2 box). Does that mean to delete the jamwiki dir tree? fmr 20-Mar-2007 00:20 PST

Documentation is unfortunately not a strong point of this project thus far, but contributions are always welcome. You're right that there isn't an UPGRADE.txt file, so any references should probably be removed. Step-by-step upgrade instructions can be found in the release notes as JAMWiki 0.5.2#Upgrades. "Removing the old installation" means deleting the JAMWiki files in your web application server, although that step isn't 100% necessary - it just avoids problems if (for example) a JAR file was updated and having two versions could produce problems. If you have suggestions as to how to make the upgrade steps clearer please feel free to edit JAMWiki 0.5.2#Upgrades and I'll be sure to use the updated steps for the next release. -- Ryan 20-Mar-2007 21:27 PST

[Edit]Upgrade from 0.5.4 to 0.6.1

Archived from the Feedback page:

Today I did upgrade to 0.6.1 (using tomcat 5 with java 1.5 on a linux machine with mysql -> everything worked fine! Thanks to all of you. -- Michael Habbert 29-Oct-2007 07:46 PST

Glad it went smoothly, and thanks for the positive report! Given some of the recent bug reports I was beginning to fear that I was the only person who was able to upgrade without incident! -- Ryan 29-Oct-2007 22:16 PST

[Edit]successful upgrade from jamwiki 0.5.0 to 0.6.5

Archived from the Feedback page:

After resolving some problems with my local tomcat installation (jamwiki is not running with the default configuration on kubuntu using the security manager ;-/). So I turned it of and then my old jamwiki (0.5.0) was working as befor. Upgrade then to 0.6.5 was excellent! Thanks Ryan and all the other Supporter. -- Mbert 01-May-2008 05:35 PDT

Thanks for the continued success stories! I test upgrades using a number of different configurations, but it's great to hear from others that it works as expected for them, too. -- Ryan 01-May-2008 08:03 PDT

[Edit]Upgrade from 0.5.1 to 0.7.1 with database migration

Moved to Bug Reports#Upgrade from 0.5.1 to 0.7.1 with database migration

[Edit]H2 database

Archived from the Feedback page:

tapaya 28-Jan-2009 11:49 PST

Currently running Windows XP / Tomcat 6.0 / HSQLDB (internal db) / Sun JDK 1.4 / JAMWiki 0.6.7.
I tried to move from the internal HSQLDB to a H2 database, so I did the following:

  1. copied h2-1.1.107.jar to C:\Programme\Apache Software Foundation\Tomcat 6.0\webapps\jamwiki-war-0.6.7\WEB-INF\lib\
  2. configured JAMWiki such that the jamwiki.properties contained the following:
    ...
    database-type=org.jamwiki.db.AnsiDataHandler
    db-password=
    db-user=sa
    dbcp-max-active=10
    dbcp-max-idle=3
    dbcp-min-evictable-idle-time=600
    dbcp-num-tests-per-eviction-run=5
    dbcp-test-on-borrow=true
    dbcp-test-on-return=true
    dbcp-test-while-idle=true
    dbcp-time-between-eviction-runs=120
    dbcp-when-exhausted-action=2
    default-topic=StartingPoints
    driver=org.h2.Driver
    ...
    homeDir=C\:\\Programme\\Apache Software Foundation\\Tomcat 6.0\\webapps\\jamwiki-war-0.6.7\\JAMWiki-Systemdateien
    ...
    persistenceType=DATABASE
    print-new-window=true
    props-initialized=true
    ...
    url=jdbc\:h2\:tcp\://localhost/~/../../Programme/Apache Software Foundation/Tomcat 6.0/webapps/jamwiki-war-0.6.7/JAMWiki-Systemdateien/h2/jamwiki
    use-preview=true
    use-spam-filter=true
    user-handler=org.jamwiki.db.DatabaseUserHandler
    ...
    
  3. re-started Tomcat
  4. started H2
  5. pointed my browser at http://localhost:8148/jamwiki-war-0.6.7/en/
  6. --> error message javax.servlet.jsp.JspException: java.lang.Exception: Failure while executing select * from jam_virtual_wiki

What was I missing?
Can anyone provide step-by-step instructions on how to use H2 database?

You would either need to do a fresh install with H2 (delete your old jamwiki.properties file) or else migrate the data from your old setup using the database migration tool on Special:Maintenance; the approach outlined above will assume that all tables already exist in the database, which won't be the case for a new instance. Note that the migration tool is experimental, so while it should work any bug reports would be appreciated. -- Ryan • (comments) • 28-Jan-2009 12:57 PST
I tried what you said (this time on my Mac): I set up a fresh JAMWiki including the .../apache-tomcat-6.0.18/webapps/jamwiki-war-0.6.7/WEB-INF/lib/h2-1.1.107.jar. The first access now yields "... Failure while executing CREATE UNIQUE INDEX jam_u_wuser_login on jam_wiki_user (lower(login)) ..." (cp. screenshot). What now? -- tapaya 28-Jan-2009 14:10 PST

Thanks for re-trying. If you're willing to continue help debugging, any error message & stack trace from your log files (the default log file path is shown at the bottom of your screenshot) would be helpful. Others have had success installing with H2, so there is either something unique about your setup or else there is an unresolved H2 bug that simply hasn't affected others. -- Ryan • (comments) • 28-Jan-2009 14:44 PST
Back at work on my Windows machine I noticed that the error message is different than on the Mac; whatever, here's the last entries in the jamwiki.log.0:
2009-01-29 09:08:24,504 SEVERE: org.jamwiki.jsp - Error in JSP page
javax.servlet.jsp.JspException: java.lang.Exception: Failure while executing select * from jam_virtual_wiki
...
...
...
Caused by: org.h2.jdbc.JdbcSQLException: Tabelle JAM_VIRTUAL_WIKI nicht gefunden
Table JAM_VIRTUAL_WIKI not found; SQL statement:
select * from jam_virtual_wiki [42102-107]
        at org.h2.message.Message.getSQLException(Message.java:103)
        at org.h2.message.Message.getSQLException(Message.java:114)
        at org.h2.message.Message.getSQLException(Message.java:77)
        at org.h2.command.Parser.readTableOrView(Parser.java:4245)
        at org.h2.command.Parser.readTableFilter(Parser.java:973)
        at org.h2.command.Parser.parseSelectSimpleFromPart(Parser.java:1504)
        at org.h2.command.Parser.parseSelectSimple(Parser.java:1601)
        at org.h2.command.Parser.parseSelectSub(Parser.java:1498)
        at org.h2.command.Parser.parseSelectUnion(Parser.java:1343)
        at org.h2.command.Parser.parseSelect(Parser.java:1331)
        at org.h2.command.Parser.parsePrepared(Parser.java:392)
        at org.h2.command.Parser.parse(Parser.java:288)
        at org.h2.command.Parser.parse(Parser.java:260)
        at org.h2.command.Parser.prepareCommand(Parser.java:232)
        at org.h2.engine.Session.prepareLocal(Session.java:406)
        at org.h2.engine.Session.prepareCommand(Session.java:367)
        at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1048)
        at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:71)
        at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
        at org.jamwiki.db.DatabaseConnection.executeQuery(DatabaseConnection.java:169)
        ... 72 more

So it seems like the JAM_VIRTUAL_WIKI table doesn't exist; I was under the impression that any tables be created when first accessed ... -- tapaya 29-Jan-2009 00:31 PST

The JAMWiki setup process is triggered when no jamwiki.properties file is found - the error above looks like a wiki with an existing setup was used on a new database - let me know if that's incorrect. The screenshot posted yesterday looks like a failure during setup with H2, which may be a bug - there have been numerous reports of successful setups with H2, but it's not a database that I've ever used so I can't personally confirm whether there might be any issues with that database. If there are logs available that report the specific failure (the logs will contain the error from the database) then it might be easier to determine if the problem is a JAMWiki bug, a database configuration error, a security/permission error, etc. -- Ryan • (comments) • 29-Jan-2009 08:13 PST
You're right, when I remove the existing jamwiki.properties and go through the initial JAMWiki setup with H2 again, I always get the very error message from my screenshot. I hope my jamwiki.log.0 will shed some light on this! --tapaya 30-Jan-2009 00:55 PST
Thanks, the log is hugely helpful. It doesn't show any configuration errors, but for some reason it's unable to execute this line in the /WEB-INF/classes/sql.ansi.properties file:
CREATE UNIQUE INDEX jam_u_wuser_login on jam_wiki_user (lower(login))
The specific database error message is:
Syntax Fehler in SQL Befehl CREATE UNIQUE INDEX JAM_U_WUSER_LOGIN ON JAM_WIKI_USER (LOWER([*]LOGIN))  ; erwartet )
Syntax error in SQL statement CREATE UNIQUE INDEX JAM_U_WUSER_LOGIN ON JAM_WIKI_USER (LOWER([*]LOGIN))  ; expected ); SQL statement:
CREATE UNIQUE INDEX jam_u_wuser_login on jam_wiki_user (lower(login))  [42001-107]
I suspect that your version of H2 may not support using "lower" as a unique key, but I'll need to check the provided error code (42001-107) and investigate further. If you have time you can try changing that line in your /WEB-INF/classes/sql.ansi.properties file to the following and re-testing:
CREATE UNIQUE INDEX jam_u_wuser_login on jam_wiki_user (login)
One additional question - what version of H2 are you using? I'm surprised that others have not hit this issue, so I'm wondering if you have an older version. I'll look into this further this weekend, thanks for all of your patience. -- Ryan • (comments) • 30-Jan-2009 07:03 PST
I tried what you said, now the error message is different. I'll attach my jamwiki.log.0 again. I'm using the latest version of H2 (1.1.107). --tapaya 30-Jan-2009 08:05 PST
Thanks again. The message this time is:
NULL nicht zulssig fr Feld REMEMBER_KEY
NULL not allowed for column REMEMBER_KEY [90006-107]
I'm not sure why that would ever happen, so I'll need to try to replicate this weekend. Thank you very much for your patience. -- Ryan • (comments) • 30-Jan-2009 08:12 PST
I installed H2 today and got the errors you've indicated when I chose the "ANSI" database. Choosing "HSQL" worked, however - I'll update JAMWiki 0.7.0 to add a separate option for H2 that uses the HSQL configuration. Thanks for all of your help in debugging. -- Ryan • (comments) • 31-Jan-2009 22:34 PST
Could you please outline all the steps you've taken to get it working (I'm still getting errors when choosing HSQL)? And please let me know about your software setup! I'm especially wondering whether you start H2 on JAMWiki access or in a separate JVM. Thanks for all you help! --tapaya 02-Feb-2009 00:51 PST
First I installed the JAMWiki 0.6.7 WAR file. I had done some earlier tests with H2 so I shutdown the H2 server, cleared out the old H2 database files from my home directory, and then restarted H2 from the command prompt. Next I copied the "h2-1.1.107.jar" file to my /WEB-INF/lib directory, then started the app server (Tomcat), viewed the http://localhost/wiki/ page to start the setup process, and chose "HSQL" as the database type and used "org.h2.Driver" as the JDBC driver and "jdbc:h2:tcp://localhost/~/jamwiki" as the URL. After that the setup proceeded as normal. I also updated the 0.7.0 code to add a database option specifically for H2, and setup with H2 using that option that worked as well. This was all done on a Windows Vista laptop using Tomcat. Hope that helps! -- Ryan • (comments) • 02-Feb-2009 07:49 PST
Finally, I've got it all running! I wasn't aware that one must provide an administrator password. I've written up the steps I'd taken here. Thanks again for your help, Ryan! --tapaya 03-Feb-2009 03:25 PST
Glad it's working, and thanks for being so patient! Would it be OK if I moved the configuration information to Installation#Database Configuration? You've done a great job with the writeup and I suspect it will be very helpful to others. -- Ryan • (comments) • 03-Feb-2009 07:37 PST
It would be great if you put my writeup some place where everybody can find it quickly! Thanks! --tapaya 03-Feb-2009 15:11 PST