Friday October 10, 2008
If I could just get the stupid thing to build
Alfresco on Glassfish (short version)
I posted a complete walkthrough on how to get Alfresco up and running on Glassfish earlier . Here's a version for those who don't need all the detail.
Glassfish has an undocumented property that when used in conjunction with the Classloader Delegate feature will allow MyFaces libraries to be loaded before the JSF libraries. You set both of these in the server specific deployment descriptor which is named sun-web.xml and which lives in the WEB-INF directory of the War file. The complete file looks like this:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.1 Servlet 2.4//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd"> <sun-web-app> <class-loader delegate="false"/> <property name="useMyFaces" value="true"/> </sun-web-app>
So create the file, place it in a directory named WEB-INF and then add it to the alfresco.war file:
$ jar uvf alfresco.war WEB-INF/sun-web.xml adding: WEB-INF/sun-web.xml(in = 316) (out= 236)(deflated 25%)
Then deploy the alfresco.war file. If you've done everything else that's needed, you should be able to fire up a browser and connect to Alfresco at http://localhost:8080/afresco
Posted at 11:26PM Oct 10, 2008 by MandyWaite in Open Source | Comments[4]
Thank you. Thank you. Thank you!
Posted by Ken Geis on October 13, 2008 at 11:26 PM BST #
Mine starts OK now, but it comes up blank - just the Alfresco logo and the footer - nothing else. Any ideas?
Posted by Tony Arnold on November 11, 2008 at 08:08 AM GMT #
Without the deployment descriptor it would start ok, but all you would get are the alfresco logo and the footer. So the chances are that the deployment descriptor is either broken or in the wrong place. You can check it's there by going to the directory in which you installed Glassfish, then to domains/domain1/applications/j2ee-modules/alfresco/WEB-INF and checking that sun-web.xml is there. If it's not then something must have gone wrong when you added it to the war file. If it is there, make sure that none of the lines got truncated or wrapped when (if) you cut and pasted the text from the blog entry.
Posted by Mandy on November 11, 2008 at 08:55 AM GMT #
Ahhh, found it. I had some stray Xalan stuck in my domain's teeth :) Now it (kinda) works - onto the learning curve!
Posted by Tony Arnold on November 11, 2008 at 10:41 AM GMT #