Sesat > Docs + Support > Development Guidelines

This page goes through building the Sesat-Kernel. It by itself is not enough to have a functioning search application. A complimentary tutorial exists on building the sesam.com skin.


Get Sesat source

Check out the latest version of Sesat from the Git repository:

git clone https://github.com/michaelsembwever/Sesat.git



Build Sesat

From the working copy of sesat-kernel run the Maven as follows to build the artifacts.
Make sure you have installed all the requirements.
Read Building with FAST to enable FAST APIs within Sesat

mvn install -DskipTests



Building on Windows
generic.sesam/sesam.com/war/src/main/webapp/WEB-INF/SearchPortal.tld is a symlink to war/src/main/webapp/WEB-INF/SearchPortal.tld which will of course not work in Windows. To fix this run from the sesat-kernel directory:
cp war/src/main/webapp/WEB-INF/SearchPortal.tld generic.sesam/sesam.com/war/src/main/webapp/WEB-INF/SearchPortal.tld
java.lang.NullPointerException at com.sun.tools.javac.comp.Check.checkCompatibleConcretes(..)
When maven is building data-model-javabean-impl it fails with the javac crash:
[INFO] Compilation failure
Failure executing javac,  ...
java.lang.NullPointerException at com.sun.tools.javac.comp.Check.checkCompatibleConcretes(..)

try checking out sesat-kernel again with a new name (eg sesat-kernel1) and building again. repeat until it works.
Or use Java7. It's a known bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6218229 related to inodes.

Generating schema files failed due to error: Java heap space
When maven is building generic.sesam/war it fails with:
[INFO] [sesat-mojo:searchModesSchemaGenerator {execution: default}]
[INFO] no.sesat.mojo.SearchModesSchemaGenerator
[INFO] Using: classpath =[snip]
Generating schema files failed due to error: Java heap space
Increase the heap size by adding parameters to MAVEN_OPTS like (for example)
export MAVEN_OPTS="-Xms512m -Xmx1024m -XX:MaxPermSize=256m"
build time
On a dual 2.2GHz machine w/ 4Gb ram & T10 connection the initial build took 6 and a half minutes 27. Subsequent full rebuilds took 1 minute.



Deploy to Container

Tomcat

By defining CATALINA_BASE the maven builds automatically deploys all warfiles into CATALINA_BASE/webapps/

JBoss

In your jboss service instance symlink:
ln -s deploy webapps
and define CATALINA_BASE to point to the service instance directory, eg CATALINA_BASE=$JBOSS_HOME/service/default
(this will be simplified in the future).

sesat-user-api

This must be manually deployed.
Since it is a jar file in JBoss it can be directly deployed as is.
In Tomcat it must be copied into the tomcat's lib directory.



Configure Container

JBoss

Disable filesystem caching

Caching of files within ROOT.war must be disabled (Sesat-Kernel needs to write files into it's own deployed directory and see these files immediately).
This caching can be turned off with tomcat's context.xml ( http://tomcat.apache.org/tomcat-6.0-doc/config/context.html ) but jboss prevents any application's META-INF/context.xml from taking effect.
Fix this by editing jbossweb.sar/context.xml replacing the line
<Context cookies="true" crossContext="true">
with
<Context cookies="true" crossContext="true" cachingAllowed="false" cacheMaxSize="0" cacheTTL="0">

Tomcat + JBoss

UTF-8 Encoding

If your machine is not natively running unicode you should add the jvm option: -Dfile.encoding=UTF-8

You also have to make a change in the server.xml file as tomcat/jboss runs by default ISO-88591.
From:
<Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true"/>
To:
<Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>

unpackWARs="true"

This setting, found in server.xml->Server->Host, cannot be set to false as Sesat requires write access into the deployed application.

port 8080

Note: You need to run your development tomcat on port 8080! (Or make your own maven development profile for your setup).

Browse

Deploy your skins to your container, start your container, and browse http://localhost.com:8080

** !! Every skin deployed, in this case "localhost.com", must have its name added into your hosts file pointing to 127.0.0.1



 © 2007-2009 Schibsted ASA
Contact us