Version 3

    Database schema was not changed between 2.4 and 2.6 release, but some portlets are not present in default 2.6 deployment and others are packed differently. All references to portlets are in 3 tables:

     

    • JBP_INSTANCE

    • JBP_WINDOW

    • JBP_OBJECT_NODE

     

    If you run JBoss Portal 2.6 using 2.4 database and try to display portal page containing such non existing portlet you'll end up with 404 error and "The requested resource() is not available" message. Whole migration process is mostly about cleaning up those legacy references to either remove them or let portal recreate them properly. This can be made easier in 2.4 Admin portlet. All references (instances and windows) to portlets listed below should be removed before the migration as they are not present in 2.6 deployment:

     

    • HeaderContentPortlet

    • URLPortlet

    • TestPortlet

    • PortletA

    • PortletB

    • SecuredTestPortlet

    • CharsetPortlet

    • CounterPortlet

    • CachedCounterPortlet

    • ExceptionPortlet

    • PortletSessionPortlet

    • EncodingPortlet

     

     

    Simple step by step migration describing needed changes in the database level:

     

    1. Download and install JBoss Portal 2.4.2-CR1 bundle and configure it to use MySQL

    2. Run portal login as admin and add as folow:

         few new users and roles

         Add new page 'New Page 1' and add a portlet window for  'JSPPortletInstance'

         Add new page 'New Page 2' and add a portlet window for  'JSPPortletInstance'

    1. Shutdown portal

    2. Download and install JBoss Portal 2.6.4.GA bundle and configure it to use MySQL - the same database as previously with 2.4.2.

    3. Perform proper changes in the database (the easiest way is to use MySQL Query Browser):

    • In JBP_INSTANCE table

      • Change 'local.samples.JSPPortlet' in the PORTLET_REF column to 'local./portal-jsp-samples.JSPPortlet'

      • Change 'local.portal.CMSPorlet' in the PORTLET_REF column to 'local./portal-cms.CMSPortlet'

      • Change 'local.portal.CMSAdminPorlet' in the PORTLET_REF column to 'local./portal-cms.CMSAdminPortlet'

      • Change 'local.portal.ManagementPorlet' in the PORTLET_REF column to 'local./portal-admin.AdminPortlet'

    • Some portlets are not packaged by default now and for some packaging changed and its better to let portal recreate instance:

      • In the JBP_INSTANCE table remove:

        • row containing NewsPortletInstance2 in the ID column

        • rows containing 'local.portal.NavigationPortlet' in the PORTLET_REF column.

        • rows containing 'local.samples.HeaderContentPortlet' in the PORTLET_REF column

        • rows containing 'local.samples.WeatherPortlet' in the PORTLET_REF column

        • rows containing 'local.samples.NewsPortlet' in the PORTLET_REF column

        • rows containing 'local.samples.URLPortlet' in the PORTLET_REF column

        • rows containing 'local.samples.TestPortlet' in the PORTLET_REF column

        • rows containing 'local.samples.PortletA' in the PORTLET_REF column

        • rows containing 'local.samples.PortletB' in the PORTLET_REF column

        • rows containing 'local.samples.SecuredTestPortlet' in the PORTLET_REF column

        • rows containing 'local.samples.CharsetPortlet' in the PORTLET_REF column

        • rows containing 'local.samples.CounterPortlet' in the PORTLET_REF column

        • rows containing 'local.samples.CachedCounterPortlet' in the PORTLET_REF column

        • rows containing 'local.samples.ExceptionPortlet' in the PORTLET_REF column

        • rows containing 'local.samples.PortletSessionPortlet' in the PORTLET_REF column

        • rows containing 'local.samples.EncodingPortlet' in the PORTLET_REF column

      • In the JBP_WINDOW table remove:

        • rows containing 'NavigationPortletInstance' in the INSTANCE_REF column

        • rows containing 'URLPortletInstance' in the INSTANCE_REF column

        • rows containing 'PortletAInstance' in the INSTANCE_REF column

        • rows containing 'PortletBInstance' in the INSTANCE_REF column

        • rows containing 'EncodingPortletInstance' in the INSTANCE_REF column

        • rows containing 'PortletSessionPortletInstance' in the INSTANCE_REF column

        • rows containing 'CachedCounterPortletInstance' in the INSTANCE_REF column

        • rows containing 'CounterPortletInstance' in the INSTANCE_REF column

        • rows containing 'CharsetPortletInstance' in the INSTANCE_REF column

        • rows containing 'SecuredTestPortletInstance' in the INSTANCE_REF column

        • rows containing 'ExceptionPortletInstance' in the INSTANCE_REF column

        • rows containing 'HeaderContentPortletInstance' in the INSTANCE_REF column

        • rows containing 'TestPortletInstance' in the INSTANCE_REF column

        • rows containing 'MissingPortletInstance' in the INSTANCE_REF column

      • In the JBP_OBJECT_NODE table remove:

        • rows containing 'NavigationPortletWindow' in the NAME column.

        • rows containing 'URLPortletWindow' in the NAME column

        • rows containing 'PortletAWindow' in the NAME column

        • rows containing 'PortletBWindow' in the NAME column

        • rows containing 'MissingInstanceWindow' in the NAME column

        • rows containing 'EncodingPortletWindow' in the NAME column

        • rows containing 'PortletSessionPortletWindow' in the NAME column

        • rows containing 'CachedCounterPortletWindow' in the NAME column

        • rows containing 'CounterPortletWindow' in the NAME column

        • rows containing 'CharsetPortletWindow' in the NAME column

        • rows containing 'SecuredTestPortletWindow' in the NAME column

        • rows containing 'ExceptionPortletWindow' in the NAME column

        • rows containing 'MissingPortletWindow' in the NAME column

        • rows containing 'HeaderContentPortletWindow' in the NAME column

        • rows containing 'TestPortletWindow' in the NAME column

    • Open the JBP_OBJECT_NODE table in your database schema. Look at the PATH column to identify any occurrences of CMS in your JBoss Portal deployment. Identify any row referring to CMSPortletWindow, and remember the number in PK column. The PK number is needed in the following steps:

      • Go to the JBP_WINDOW table and find a row with the same PK value from the JBP_OBJECT_NODE table. In such a row, replace CMSPortletInstance with a path to your CMS resource. For default resource use '/default/index.html'

      • Go to the JBP_PORTAL_OBJECT_PROPS table and add a row containing:

        • The PK number remembered from the OBJECT_KEY column.

        • 'portal.windowContentType' in the NAME column.

        • 'cms' in the jbp_VALUE column.

     

     

    Now run JBoss Portal 2.6.4

     

     

    Users, roles and pages created in JBoss Portal 2.4 should be accessible in 2.6 deployment.

     

     

    For any CMS migration issues its safe to simply backup jbp_cms_ tables and recreate them in 2.6 database. There were no schema changes for CMS between the releases.