Friday, 11 June 2010

IBM WebSphere Portal Content Templates Catalog - The Fun Continues, this time on Windows

Following two earlier posts about the rather excellent Portal Templates Catalog, I was helping a colleague, Stuart, with an implementation of the same on WebSphere Portal Express 6.1.5 on a VMware image running Windows XP SP3.

Previously, I'd only ever deployed the Catalog onto Linux, as per my previous postings here: -

and here: -

whereas it was somewhat more tricksy on Windows.

In the first instance, I was seeing the following exception: -

D:\IBM\WebSphere\PortalServer\IBM.WebSphere.Portal.Content.Templates.Catalog\components\sample.ctc.content\config\includes\sample.wcm.content.common_cfg.xml:12: The following error occurred while executing this line:
D:\IBM\WebSphere\PortalServer\IBM.WebSphere.Portal.Content.Templates.Catalog\components\sample.ctc.content\config\includes\wcm_cfg.xml:18: Warning: Could not find file D:\IBMWebSpherewp_profile\PortalServer\wcm\config\wcm60_conf.xml to copy.

even though I'd modified install.bat as follows: -

set installPath      =    d:\IBM\WebSphere\PortalServer
set assemblyRoot     =    %installPath%\IBM.WebSphere.Portal.Content.Templates.Catalog
set profilePath      =    d:\IBM\WebSphere\wp_profile
set portalServerPath =    d:\IBM\WebSphere\PortalServer
set wasUserName      =    wpsadmin
set wasUserPassword  =    passw0rd
set pwdUserName      =    wpsadmin
set pwdUserPassword  =    passw0rd
set hostName         =    localhost
set portalConfigUrl  =    http://localhost:10040/wps/config
set soapPort         =    10033

and also modified d:/IBM/WebSphere/PortalServer/IBM.WebSphere.Portal.Content.Templates.Catalog/ as follows: -

profile_dir          =    d:\IBM\WebSphere\wp_profile

to match my environment.

Reading the error message more fully ( ...D:\IBMWebSpherewp_profile... ), I wondered whether script was ignoring the back slash (\) characters in the paths set in the .bat and .properties file, as I've seen similar issues before. To prove this, I replaced them with forward slash (/) characters, doubled up in case one character was being treated as an escape character.

Therefore, the path-related statements in the .bat and .properties files changed to look like this: -

set installPath      =    d://IBM//WebSphere//PortalServer
set assemblyRoot     =    %installPath%//IBM.WebSphere.Portal.Content.Templates.Catalog
set profilePath      =    d://IBM//WebSphere//wp_profile
set portalServerPath =    d://IBM//WebSphere//PortalServer

and: -

profile_dir          =    d://IBM//WebSphere//wp_profile


This helped in that the script ran for slightly longer, but still failed, this time with: -

[6/11/10 13:44:31:609 BST] 00000049 SysViewConten E endElement javax.jcr.RepositoryException: d:\IBM\WebSphere\PortalServer\IBM.WebSphere.Portal.Content.Templates.Catalog\components\sample.ctc.content\content\wcm\shared\rootworkspace\jcr_root\423dc4e4\8632bc4e\%57orkflow\%41ctions\18bdfa32\e910e1b8.value (The system cannot find the path specified.)
                                 javax.jcr.RepositoryException: d:\IBM\WebSphere\PortalServer\IBM.WebSphere.Portal.Content.Templates.Catalog\components\sample.ctc.content\content\wcm\shared\rootworkspace\jcr_root\423dc4e4\8632bc4e\%57orkflow\%41ctions\18bdfa32\e910e1b8.value (The system cannot find the path specified.)

This baffled me completely, until I compared the message with the content / path of the contents of the extracted IBM.WebSphere.Portal.Content.Templates.Catalog directory, which needs to be copied into D:\IBM\WebSphere\PortalServer.

The error message referred to: -


whereas when I explored the file system via Windows Explorer, I was seeing: -


I don't claim to understand WHY this is the case, but I'm assuming that it's something to do with Windows Explorer and, perhaps, 255 character path lengths ?

Interestingly, the Windows DIR command shows the same weirdness e.g.


rather than: -


In the end, I was able to resolve the problem by avoiding the use Windows Explorer etc. and manually extracting the content of the ZIP file (  ) from the Windows command prompt using the PKZip utility, unzip.exe, and then copying the IBM.WebSphere.Portal.Content.Templates.Catalog directory structure into place using the XCopy /S command.

By this time, however, the repeatedly failing import had left my JCR repository in a bit of a muddle; I had to manually delete the content libraries that had already been imported e.g. TB_Catalog, TB_Core etc. using the Web Content Libraries portlet whilst logged in as wpsadmin. I then restarted WebSphere Portal for good measure.

Having done all of the above, I was able to successfully run the install.bat script and, after 19 minutes and 28 seconds, the CTC installed, and I now have lots of content loveliness at which to look.

The moral of the story ? Stick to the command line :-)

I'll feed this back to the Dublin lab. in case there's anything that I'm doing wrong ...

PS I'm running the VM on a Thinkpad W500 with 4 GB total, and 2 GB allocated to Windows.

No comments:

TIL - read-only variables in Linux

 A co-worker was seeing an exception: -  line 8: TMOUT: readonly variable when trying to SCP a file from a remote Linux box. I did some digg...