Exceptions, errors, problems and issues encountered during java ee development. Of course, the same exception stack trace can often be caused by many problems. I want to keep track of at least some of the possible solutions.

Monday, May 5, 2008

Environment: ICEFaces 1.7, MyEclipse 6.0.1, Liferay portal server on JBoss.

Problem:
Portlet WAR doesn't get picked up from deploy directory by Liferay.

Liferay creates a default directory in the user's Documents and Settings folder where you drop war files to be installed as portlets. Liferay watches this folder and picks up any new files from it when the server is running. I have an Ant scrip for a portlet project which packages the WAR and drops it into the directory. This always works, but today it did not. The WAR just stayed in the directory, and I had to restart the server for it to be deployed.

Solution: My coworker had the same problem and sent me this solution. The portlet wasn't being picked up is because the faces xsd specification site used to read faces-config.xml was taking longer than usual to respond. Instead of using the web site you can put the xsd inside the server's bin directory and change faces-config.xml header to take it from there instead. The faces-config.xml header will then look like this:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee web-facesconfig_1_2.xsd"
version="1.2">

Note the space before the xsd file name.

No comments: