Tuesday, January 10, 2006

Spring and TIBCO

I've decided to use Spring as a framework for writing Portlets within TIBCO Portal Builder 5.1. The reasons are:

  • Has support for Portlets as of 2.0M1

  • Doesn't require a bridge layer (unlike Struts)

  • Can be used with JSPs

  • Has a MVC implementation that is supported in 2.0M1



So, I build and attempt to deploy the Spring Portlet Sample sample application. Naturally, it fails, and the debugging begins.

The logging output from Tomcat shows that the applicationContext.xml file is not valid. Examination of the deployed EAR in Tomcat shows that the DOCTYPE definition has been removed from all XML files in the EAR (except for web.xml). By default, the bean configuration reader for Spring has validation enabled, so having the DOCTYPE missing causes the parse of the bean definition XML file to fail.

Initially, I had thought that TIBCO's EAR creation tool was the culprit (used to build the deployable EAR from the portlet WAR), but it turns out the TIBCO Administrator modifies the EAR during deployment to the application servers in the administrative domain.

The next step is to use a custom XmlWebApplicationContext class which disables validation on the XmlBeanDefinitionReader before loading the bean definition files.

Hopefully with this work-around a Spring portlet can be deployed in TIBCO PortalBuilder 5.1.

No comments: