Dashboard > blojsom 3.0 > About blojsom > Upgrading
  blojsom 3.0 Log In   View a printable version of the current page.  
  Upgrading
Added by David Czarnecki, last edited by David Czarnecki on Apr 04, 2007  (view change)
Labels: 

Updates to blojsom are made available from the download section of the SourceForge site. Download the appropriate blojsom-(blojsom version)-update.zip and follow the instructions for the particular version of blojsom accordingly.

Backup blojsom Data

Be sure to backup your database and the blojsom web application before upgrading from a previous version of blojsom. In case anything goes wrong in your upgrade, you will be able to revert back to the earlier database and web application.

Upgrading notes
  • JAR file changes should be made in the blojsom web application's /WEB-INF/lib directory unless otherwise indicated.
  • Copy your old JARs and other files to a backup location before updating any JARs and other files in case there is an error.
  • Delete old JAR file versions after you have updated with new JAR file versions before restarting your server.

Upgrading from blojsom 3.1 to blojsom 3.2

  1. Stop the blojsom web application in your application server.
  2. Backup your blojsom database and the blojsom web application.
  3. Copy the blojsom 3.2 JAR files into /WEB-INF/lib. Remove the blojsom 3.1 JAR files.

Upgrading from blojsom 3.0 to blojsom 3.1

  1. Stop the blojsom web application in your application server.
  2. Backup your blojsom database and the blojsom web application.
  3. Copy the c3p0-0.9.0.4.jar file into /WEB-INF/lib. Remove the c3p0-0.8.5.2.jar file.
  4. Copy the ehcache-1.2.3.jar file into /WEB-INF/lib. Remove the ehcache-1.1.jar file.
  5. Copy the hibernate-3.1.3.jar file into /WEB-INF/lib. Remove the hibernate-3.1.2.jar file.
  6. Copy the spring-2.0.jar file into /WEB-INF/lib. Remove the spring-2.0-m2 file.
  7. Copy the blojsom 3.1 JAR files into /WEB-INF/lib. Remove the blojsom 3.0 JAR files.
  8. Copy the appropriate database upgrade script into your /WEB-INF/classes directory. For example, if you are upgrading a MySQL database, you will copy blojsom-3_0-blojsom-3_1-upgrade-mysql.sql into your /WEB-INF/classes directory.
  9. Add or modify the dbloader bean information in /WEB-INF/classes/blojsom.xml with the name of the database upgrade script for the dbScript property and set the value of the upgrading property to true. For example, if you are upgrading a MySQL database.
    <bean id="dbloader" class="org.blojsom.util.database.DatabaseLoader" init-method="init">
            <property name="sessionFactory">
                <ref bean="hibernateSessionFactory"/>
            </property>
            <property name="dbScript" value="/WEB-INF/classes/blojsom-3_0-blojsom-3_1-upgrade-mysql.sql"/>
            <property name="upgrading" value="true"/>
            <property name="servletConfig">
                <ref bean="servletConfigFactoryBean"/>
            </property>
            <property name="detectBlojsomSQL">
                <value>show tables;</value>
            </property>
        </bean>
  10. Restart the blojsom web application. On successful upgrade of the blojsom database, you should see the following from blojsom in your log file.

    Jan 22 11:38:13 INFO [main] database.DatabaseLoader - About to upgrade blojsom database
    Jan 22 11:38:13 INFO [main] database.DatabaseLoader - Read in sql script
    Jan 22 11:38:14 INFO [main] database.DatabaseLoader - Finised upgrading blojsom database

  11. Stop the blojsom web application in your application server.
  12. Remove or comment out the reference to the dbloader bean in /WEB-INF/classes/blojsom.xml.
  13. Restart the blojsom web application.

Site running on a free Atlassian Confluence Open Source Project License granted to blojsom. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators