Upgraded to Apache Roller 5.0, RC4
Upgraded to Apache Roller 5.0, RC4
Join the DZone community and get the full member experience.Join For Free
Atomist automates your software deliver experience. It's how modern teams deliver modern software.
Last Sunday, Dave Johnson released Apache Roller 5.0, RC4. Since I'm an Apache Roller committer, and I've been seeing issues with comments throwing exceptions on this site, I decided to upgrade. In doing so, I discovered a number of issues. Hopefully by documenting them here, you'll be able to upgrade from Roller 4 to Roller 5 without any issues.
To upgrade, I took a snapshot of my existing site and database and copied them locally. After getting everything setup locally (importing existing database and upgrading it), I started Tomcat and began solving problems.
Database settings - JNDI vs. Properties
With Roller 4, I configured by database settings in a ROOT.xml so they'd be read using JNDI. With Roller 5, I got the following error when I tried to do this.
<openjpa-2.0.1-r422266:989424 fatal user error> org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName property. at org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:76)
I was able to get around this issue by adding the following to my roller-custom.properties:
database.configurationType=jdbc database.jdbc.driverClass=com.mysql.jdbc.Driver database.jdbc.connectionURL=jdbc:mysql://localhost/rollerdb database.jdbc.username=root database.jdbc.password= mail.configurationType=properties mail.hostname=localhost
After making this change, I received an error when Planet tried to startup:
ERROR 2011-03-02 09:56:08,502 DatabaseProvider:errorMessage - ERROR: unable to obtain database connection. Likely problem: bad connection parameters or database unavailable. FATAL 2011-03-02 09:56:08,502 RollerContext:contextInitialized - Roller Planet startup failed during app preparation org.apache.roller.planet.business.startup.StartupException: ERROR: unable to obtain database connection. Likely problem: bad connection parameters or database unavailable.
I don't remember why I enabled planet, but turning it off in roller-custom.properties seemed to solve the problem.
The next thing I tried to do was login. When this didn't work, I figured it must be related to password encryption. With Roller 4, I had to have "passwds.encryption.enabled=true" in roller-custom.properties. In Roller 5, I also had to add the encryption algorithm.
At this point, I figured I was good to go, so I zipped up my local WAR and scp'ed it to raibledesigns.com. I stopped Tomcat and attempted to upgrade my production MySQL database (version 3.23.56). Below is the error I received.
$ mysql -u raible -p raible < 400-to-500-migration.sql Enter password: ERROR 1064 (00000) at line 42: You have an error in your SQL syntax near 'as w set lastmodified = lastmodified, datecreated = datecreated, cr' at line 1
At this point, I figured my database might be slightly hosed, but since it was simply creating tables, I was probably OK. I restarted Tomcat and left the old version in place while I waited for a MySQL 5 database instance from my hosting provider, KGB Internet. Once I got the new instance, I imported my backed-up database, ran the upgrade script and everything worked just peachy.
I generally upgrade Roller by coping the new codebase over my old one. This is because I have a lot of symlinks and other files in my "ROOT" directory and like to keep those. In doing this, I found I had to do a couple things after copying everything over:
- Delete WEB-INF/lib and recopy from RC4's WEB-INF/lib.
- Delete WEB-INF/classes and recopy from RC4's WEB-INF/classes.
I then experienced some issues with JARs not being present for Roller's JSPWikiPlugin. I enabled this long ago, but don't use it anymore. However, to keep old posts still working, I wanted to enable it. The downloads for the plugin seem to be gone, but luckily I found a copy and put all the JARs into my WEB-INF/lib directory.
After starting Tomcat and browsing around a bit, I discovered two more issues:
- Search doesn't seem to work. For example, there are no results for jQuery.
- My Archives page's calendar didn't work. It showed the following:
I was able to fix issue #2 by changing #showBigWeblogCalendar() to the following.
The first issue with search seems to remain.If you notice any other issues on this site, please let me know. I'll try to get them fixed asap.
Opinions expressed by DZone contributors are their own.