Fastpath opensource upgrade instructions fail

The query at step 5, UPDATE fpWorkgroupProp SET propValue = REPLACE(propValue,

‘com.jivesoftware.openfire.fastpath’,‘org.jivesoftware.openfire.fastpath’) , in the readme file of the opensource Fastpath plugin will fail if executed on a MS SQL Server database. The propValue column in the fpWorkgroupProp table is of the TEXT datatype when using MS SQL Server as the host RDMS for Openfire which cannot be altered by DDL statements such as REPLACE. There are two solutions to this issue dependent upon which version of MS SQL Server being used.

  1. For SQL Server 2005 and greater the column datatype should be changed to VARCHAR(MAX) as it will eventually replace the TEXT data type in future versions of SQL Server and is modifiable by DDL statements.

  2. For versions of SQL Server before SQL Server 2005 the TSQL statement below should be used to alter the propValue column of the fpWorkgroupProp table instead of what’s written in the readme file

DECLARE @FindString    NVARCHAR(100)
DECLARE @ReplaceString NVARCHAR(100) SET @FindString = 'com.jivesoftware.openfire.fastpath'
SET @ReplaceString = 'org.jivesoftware.openfire.fastpath' DECLARE @TextPointer VARBINARY(16) DECLARE @DeleteLength INT DECLARE @OffSet INT SELECT @TextPointer = TEXTPTR(propValue) FROM fpWorkgroupProp SET @DeleteLength = LEN(@FindString) SET @OffSet = 0
SET @FindString = '%' + @FindString + '%' WHILE (
SELECT COUNT(*)
FROM fpWorkgroupProp
WHERE PATINDEX(@FindString, propValue) != 0) > 0 BEGIN SELECT @OffSet = PATINDEX(@FindString, propValue) - 1
FROM fpWorkgroupProp
WHERE PATINDEX(@FindString, propValue) != 0 UPDATETEXT fpWorkgroupProp.propValue
@TextPointer
@OffSet
@DeleteLength
@ReplaceString END

This problem causes workgroup’s created with the enterprise version of fastpath to be no longer accessable or usable under the opensource version of fastpath until one of the two solutions is executed and the server restarted.