Development Environment Setup Walkthrough

Information

This is a walkthrough for setting up a Sakai development environment on a laptop or desktop. These instructions will also work for setting up a development server though I suggest slightly beefier settings for memory. This is currently tailored for Sakai 2.5+. Once you have a Sakai development environment setup you should be able to program your own Sakai tools or modify existing tools.

Notes for developers using Sakai 2.4.x-
Notes for windows users
  • change the "/" to "\" for all directory paths except those specified in the maven build.properties file
  • add the drive letter (C:) to your paths
  • use %VARIABLE% instead of $VARIABLE with environment variables
  • set your environment variables in Control Panel -> System -> Advanced -> Environment Variables
All of sakai and related programs should be installed in an opt directory which you will need full write access to, put this directory anywhere you want, this document will assume you have placed it in your root directory


  1. Install/Verify you have Java 1.5

    1. To check: Run java -version on the command line
    2. If not correct, download the J2SE SDK from:
    3. Install it (the SDK) to /opt/java
      • Note: Install the JRE to a different directory (probably the default, especially under windows) or you will have problems
    4. Set environment variable: JAVA_HOME=/opt/java
      • Mac users: JAVA_HOME=/Library/Java/Home
      • Windows users default: JAVA_HOME=C:\j2sdk1.5.0_xx (where "xx" is the minor version - for example "j2sdk1.5.0_11")
    5. Add $JAVA_HOME/bin to PATH
    6. Set JAVA_OPTS for tomcat in the tomcat/bin/setenv file (see Install Tomcat 5.5)
      JAVA_OPTS='-server -XX:+UseParallelGC -Xmx768m -XX:MaxPermSize=128m -Djava.awt.headless=true'
      
  2. Install/Verify you have MySQL 4.1

    • MySQL - http://www.mysql.com
      • Some have reported that MySQL 5.0.x works just fine as well. If you already have this version, there's likely no point in downgrading to 4.1.*.
    1. To check: Run mysql --help on the command line
    2. If not, download MySQL from:
    3. Custom install to /opt/mysql (options vary slightly based on operating system)
      • Linux users should install MySQL using a package or binaries if possible
      1. Choose standard configuration
      2. Install as a windows service (Windows only)
      3. Launch automatically (recommended)
        • If you choose not to do this, make sure that you startup MySQL before you try to run Sakai
      4. Include the bin directory in Path
      5. Don't use an anonymous account
      6. Set your root password to "mysqlpwd1"
  3. Setup Sakai DB (schema) and user

    1. Create the sakai database and sakai user (password=ironchef)
    2. Run the following from a command line prompt:
      mysql -uroot -pmysqlpwd1
      
      • Note: You can also do the following if you prefer to be prompted for the password: mysql -uroot -p
    3. Then run these commands from the mysql prompt (one command per line):
      create database sakai default character set utf8;
      grant all privileges on sakai.* to 'sakai'@'localhost' identified by 'ironchef';
      flush privileges;
      quit
      
    4. [Optional] Download and install mysql query browser
      1. http://dev.mysql.com/downloads/query-browser/1.1.html
      2. You do not have to do anything with query browser now
  4. Download and setup Maven 2.0.6+ stable package

    1. Download Maven 2.0.x (minimum 2.0.6) - http://maven.apache.org/download.html
    2. Extract to /opt (should create maven-2.0.9 folder)
    3. Set environment variable: MAVEN2_HOME=/opt/maven-2.0.9
    4. Add $MAVEN2_HOME/bin to PATH\
    5. Set the MAVEN_OPTS environment variable
      MAVEN_OPTS='-Xms256m -Xmx645m -XX:PermSize=64m -XX:MaxPermSize=136m'
      
  5. Install/Verify you have Subversion

    1. To check: Run svn --version on the command line
    2. Extract to /opt (should create subversion-1.2.3)
      • Windows users will want to rename the extracted directory
      • Unix users will probably want to use a package for their flavor
    3. Set environment variable: SUBVERSION_HOME=/opt/subversion-1.2.3
    4. Add $SUBVERSION_HOME/bin to PATH
  6. Download and setup tomcat 5.5.17+ (stable only)

    • Apache Tomcat - http://tomcat.apache.org/
    • Note: Always do a fresh install of Tomcat
    • Note: Windows users should ensure that there are no spaces in the complete tomcat path as this causes errors with JSF tools in Sakai
      GOOD: C:\opt\tomcat\, C:\sakaistuff\installs\tomcat\
      BAD: C:\program files\tomcat\, C:\opt\apache tomcat 5.5.18\
    1. Download tomcat 5.5 - http://tomcat.apache.org/download-55.cgi
      • Windows users should get the zip file instead of installing a service
        It makes viewing the tomcat logs easier and it is easier to configure
    2. Extract to /opt (symlink the apache-tomcat-5.5.x directory to tomcat after extracting)
      • Windows users should just rename the directory since they cannot symlink
    3. Download the java 1.4.2 compat patch (compat.zip)
      • NOTE: You should NOT install this patch if you are using Sakai 2.4 or higher
    4. Extract the files to the same location as tomcat itself
    5. Modify conf/server.xml for international character support
      1. Add URIEncoding="UTF-8" to the Connector element
        • <Connector port="8080" URIEncoding="UTF-8" ...
    6. Set environment variable: CATALINA_HOME=/opt/tomcat
    7. Add $CATALINA_HOME/bin to PATH
    8. Setup the SETENV file in the tomcat/bin directory with JAVA_OPTS (from Install Java 1.5)
      1. Mac/Linux: Create a file called setenv.sh with the following:
        export JAVA_OPTS="-server -XX:+UseParallelGC -Xmx768m -XX:MaxPermSize=160m -Djava.awt.headless=true"
      2. Windows(PC): Create a file called setenv.bat with the following:
        set JAVA_OPTS=-server -XX:+UseParallelGC -Xmx768m -XX:MaxPermSize=160m -Djava.awt.headless=true
  7. Download and setup MySQL Connector/J stable

    1. Download connector for your version of MySQL
      1. If running mySQL 4.1
        Download version 3.1.12+ from http://dev.mysql.com/downloads/connector/j/3.1.html
      2. If running MySQL 5.0.x
        Download version 5.0.4+ from http://dev.mysql.com/downloads/connector/j/5.0.html
    2. Extract the file to /opt
    3. Copy mysql-connector-java-<version>-bin.jar to $CATALINA_HOME/common/lib
    4. Delete the extracted folder
  8. Use Subversion to download sakai cafe trunk

    1. Change to the /opt directory
    2. svn checkout https://source.sakaiproject.org/svn/cafe/trunk/ cafe_trunk
      1. If you want a version other than this one, browse the tags and branches at https://source.sakaiproject.org/svn/cafe/
      2. subversion will create a "trunk" directory for you,
        you can use any directory name you like, just add a name after the checkout location:
        svn checkout https://source.sakaiproject.org/svn/cafe/trunk/ cafe-trunk
    3. Checkout will take about 5-10 minutes
    4. The directory created by subversion will be referred to as <sakai-src> directory
  9. Setup sakai.properties file

    1. Create sakai directory in $CATALINA_HOME
      • $CATALINA_HOME should be /opt/tomcat if you have been following these instructions
      • Note: There were previously two configuration files, sakai.properties and placeholder.properties. These have now been combined into sakai.properties. You can attempt to manually combine the two files from a previous version, but it's better to start with the sample included with the sakai source in the reference directory.
    2. Copy sakai.properties from <sakai-src>/reference/docs to $CATALINA_HOME/sakai
    3. Edit the sakai.properties file for a MySQL dev environment. Starting at the section # DATABASE CONFIGURATION:
      1. Set BaseDataSource username
        1. Set username@javax.sql.BaseDataSource=sakai
      2. Set BaseDataSource password
        1. Set password@javax.sql.BaseDataSource=ironchef
      3. Find the section: ## HSQLDB settings and comment out 7+ lines in it
        ## HSQLDB settings - on by default
        #vendor@org.sakaiproject.service.framework.sql.SqlService=hsqldb
        #driverClassName@javax.sql.BaseDataSource=org.hsqldb.jdbcDriver
        #hibernate.dialect=org.hibernate.dialect.HSQLDialect
        #validationQuery@javax.sql.BaseDataSource=select 1 from SYSTEM_USERS
        # two hsqldb storage options: first for in-memory (no persistence between runs), second for disk based
        #url@javax.sql.BaseDataSource=jdbc:hsqldb:.
        #url@javax.sql.BaseDataSource=jdbc:hsqldb:${sakai.home}/db/sakai.db
        
      4. Find the section: ## MySQL settings and uncomment the 6+ lines in it
        ## MySQL settings - make sure to alter as appropriate
        vendor@org.sakaiproject.db.api.SqlService=mysql
        driverClassName@javax.sql.BaseDataSource=com.mysql.jdbc.Driver
        hibernate.dialect=org.hibernate.dialect.MySQLDialect
        url@javax.sql.BaseDataSource=jdbc:mysql://127.0.0.1:3306/sakai?useUnicode=true&characterEncoding=UTF-8
        validationQuery@javax.sql.BaseDataSource=select 1 from DUAL
        defaultTransactionIsolationString@javax.sql.BaseDataSource=TRANSACTION_READ_COMMITTED
        
      • Note that this line may be incorrect in the default file, it should read as shown:
        vendor@org.sakaiproject.db.api.SqlService=mysql
        
    4. Save the changes to the file
  10. Create maven settings.xml file

    1. Create a new xml file in your user home directory in the .m2 directory called settings.xml
    2. Add the following lines:
      <settings xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                            http://maven.apache.org/xsd/settings-1.0.0.xsd">
        <profiles>
          <profile>
            <id>tomcat5x</id> 
            <activation>
              <activeByDefault>true</activeByDefault> 
            </activation>
            <properties>
              <appserver.id>tomcat5x</appserver.id> 
              <appserver.home>/opt/tomcat</appserver.home> 
              <maven.tomcat.home>/opt/tomcat</maven.tomcat.home> 
              <sakai.appserver.home>/opt/tomcat</sakai.appserver.home> 
              <surefire.reportFormat>plain</surefire.reportFormat>
              <surefire.useFile>false</surefire.useFile>
            </properties>
          </profile>
        </profiles>
      </settings>
      • Note: Unfortunately, Sakai does not use the standard appserver.home so you have to specify a sakai.appserver.home
      • Note: The sakai.appserver.home must be C:\opt\tomcat for windows users
      • Note: Do not include trailing / or \ slashes in the directory paths
    • (optional) You can specify the tomcat home to be an environment variable like so:
            <maven.tomcat.home>${env.CATALINA_HOME}</maven.tomcat.home>
      
    • (optional) Users who use a network proxy need to add the following to their file
      ...
        <proxies>
           <proxy>
              <active>true</active>
              <protocol>http</protocol>
              <host>www.your.proxy.host</host>
              <port>80</port>
              <username>your_username</username>
              <password>your_password</password>
              <nonProxyHosts>localhost</nonProxyHosts>
           </proxy>
        </proxies>
      </settings>
      • If you do not use a username or password for your proxy just leave out those 2 lines
      • You only need the nonProxyHosts option if you have a local maven repo that does not require the proxy to be accessed
      • Note: Maven 2 doesn't support Microsoft's NTLN authentification scheme. If you connect to a proxy like ISA you will need to use a tool, such as http://ntlmaps.sourceforge.net/ to proxy your traffic
  11. Use Maven to build Sakai

    1. Open a command line shell
    2. Change directory to /opt/<sakai-src>
    3. Execute mvn clean install to build Sakai using maven
      • Note: The build will take an extra 5-10 minutes to download dependencies the first time
    4. Execute mvn sakai:deploy to deploy Sakai to your tomcat using maven
    5. Unlike in maven1, the maven2 Sakai plugin downloads automatically (this allows you to deploy the parts of projects to the right locations in tomcat)
    6. Partial builds are supported by the maven2 build system
      You can now do a "mvn clean install sakai:deploy" from any subdirectory and build just that code
    7. Once you have downloded the jars you can run maven off-line with mvn -o clean install sakai:deploy
  12. Start Tomcat and check to make sure Sakai runs

    1. Start tomcat using $CATALINA_HOME/bin/startup
    2. Allow 1 minute+ for tomcat to start up
    3. Open http://localhost:8080/ to verify tomcat is running
    4. Open http://localhost:8080/portal to verify sakai is running
    5. Login to sakai as username:admin, password:admin
    6. Shutdown Tomcat using $CATALINA_HOME/bin/shutdown
  13. Install Eclipse 3.2+ stable

    • Eclipse - http://www.eclipse.org/
      • Note: If you already have eclipse 3.1.x installed, your best best is to start over with a fresh install rather than attempting to upgrade
      • Note: If you have not installed eclipse already, you should download the WebTools Platform: All-in-one package for Eclipse 3.3+ which includes Eclipse and all of the necessary webtools packages, this is much faster and easier than downloading them seperately, you can skip the WebTools step if you do this, here are instructions to install the Eclipse WebTools
    1. Download the newest stable version http://www.eclipse.org/
    2. Extract the downloaded file to /opt
      • Windows users should extract to c:\
      • Mac users should use the installer and put it in Applications
    3. Run eclipse to verify it works (/opt/eclipse/eclipse)
      • Windows users: c:\eclipse\eclipse.exe to run eclipse
      • Note: If it does not work, there is probably a problem with your java install
    4. Set the memory settings for Eclipse
      • The default memory settings for Eclipse are much too low to handle the number of webapps in a full Sakai installation
      1. Shutdown eclipse if it is running
      2. Edit the eclipse.ini file in the directory you extracted/installed eclipse
      3. Change the settings from something like this:
        -vmargs
        -Xms40m
        -Xmx256m
        

        to something like this (leave any params that do not match these alone):

        --launcher.XXMaxPermSize
        256M
        -vmargs
        -Xms128m
        -Xmx1024m
        -XX:+UseParallelGC 
        
        • Windows users should not use notepad to edit this file, use wordpad or edit (command line)
        • Mac users will need to take additional steps to edit the eclipse.ini file
        1. Control-click on the Eclipse Application icon and select Show Package Contents
        2. Double-click on the Contents folderD
        3. Double-click on the MacOS folder, the eclipse.ini file should be here
        4. Full path: eclipse/Eclipse.app/Contents/MacOS/eclipse.ini
    5. Set the JVM
      • The default JVM will be the one in the JRE, things will work better if you change this to the one in the J2SE
      1. Startup eclipse if it is not running
      2. Select Window -> Preferences -> Java -> Installed JREs
      3. Select the current installed JRE
      4. Click the Edit button
      5. Click Browse and navigate to the home directory of your JAVA installation (e.g. /opt/java)
      6. Click OK to save and then OK to Finish
        • Running Eclipse with a different JVM from the default
          Add -vm /opt/java/bin/java after the eclipse executable
        • You must include the full path to the java executable file
  14. Add Eclipse Web Tools Project (WTP)

    • Web Tools Project - http://www.eclipse.org/webtools/
    • NOTE: Installing the all-in-one-package or manually installing are far more reliable and definitely recommended over using the updater method (the last one)
    • NOTE: Only install released versions, the development versions tend to be unstable and buggy
    1. WebTools Platform: All-in-one (fastest, recommended)
      • This should only be used if you do not already have Eclipse installed
      1. Go to eclipse downloads
      2. Click Eclipse IDE for Java EE Developers and choose a download mirror
      3. Extract the package to whereever you want to install eclipse (normally your drive root /eclipse)
      4. Adjust the config as indicated in Install Eclipse 3.2+
      5. Startup Eclipse
    2. Manual installation (faster)
      1. Download WTP 1.5.x (Eclipse 3.2) or 2.0.x (Eclipse 3.3) to your desktop
      2. Shutdown Eclipse
      3. Extract the package to your Eclipse installation directory
      4. Startup Eclipse
    3. Install using the Eclipse updater (somewhat easier but not recommended)
      1. Start eclipse
      2. Select Help -> Software Updates -> Find and Install
      3. Select Search for new features to install, click Next
      4. Choose the Eclipse.org Update Site (or The Eclipse Project Updates) and click Finish
      5. Select WTP 0.7 (or newer)
      6. Click Select Required
      7. Click Next and follow installation instructions
      8. Accept terms, click Finish
      9. Click Install All
      10. Restart the workbench when asked
  15. Add subclipse to Eclipse

    1. Startup eclipse
    2. Select Help -> Software Updates -> Find and Install
    3. Select Search for new features to install, click Next
    4. Click New Remote Site
    5. Enter Subclipse for the name
    6. Enter http://subclipse.tigris.org/update_1.4.x for the URL
    7. Click Finish
    8. Check the Subclipse box and click Next
      • Ignore the integrations unless you have a need for them, they can stop the install from working
    9. Accept terms, click Next, click Finish, click Install All
    10. Restart the workbench when asked
    • Add bin and target to global svn ignore in Eclipse (Optional)
      • This will keep you from committing bin and target directory files when you add projects to svn
      1. Click on Window -> Preferences
      2. Select Team -> Ignored Resources
      3. Click on Add Pattern and enter "bin"
      4. Click on Add Pattern and enter "target"
      5. Click on Add Pattern and enter "m2-target"
      6. Click on Apply and then OK
  16. Add SpringIDE to Eclipse

    1. Startup Eclipse
    2. Select Help -> Software Updates -> Find and Install
    3. Select Search for new features to install, click Next
    4. Click New Remote Site
    5. Enter Spring IDE updatesite for the Name
    6. Enter http://springide.org/updatesite for the URL
    7. Click OK
    8. Check the box marked "Spring IDE updatesite" and click Finish
    9. Check the Spring IDE box and click Next
      • Ignore the integrations unless you have a need for them, they can stop the install from working
    10. Accept terms, click Next, click Finish, click Install All
    11. Restart the workbench when asked
  17. Import Sakai source code into Eclipse

    1. Startup eclipse if it is not running
    2. Create a new workspace for Sakai
      1. Click on File -> Switch Workspace
      2. Enter "WS-Sakai" in place of the default "workspace" directory
      3. Click OK (eclipse will restart)
        • The following steps should be done in the WS-Sakai workspace
    3. Add Maven Repository libraries to classpath
      1. Select Window -> Preferences -> Java -> Build Path -> Classpath Variables
      2. Add MAVEN_REPO classpath variable with the path to the local maven repository (Sakai 2.4 or lower)
        • The path should be: $USER_HOME/.maven/repository
      3. Add M2_REPO classpath variable with the path to the local maven repository (Sakai 2.5 or higher)
        • The path should be: $USER_HOME/.m2/repository
    4. Switch to the Java perspective (Window -> Open Perspective -> Java)
      • Make sure you are in the package explorer
    5. Turn off Automatic builds
      • Select Project and uncheck Build automatically
    6. Select File -> Import -> Existing Projects into Workspace
      1. Enter the full path to the sakai source directory for the root directory
        • This should be /opt/cafe-2.2.x if you followed the steps in this document
      2. Click Deselect All to unselect all projects
      3. Select the following projects (you only need most of the APIs, a few utils, and all of the db projects)
        alias-api
        announcement-api
        archive-api
        authz-api
        component-api
        content-api
        courier-api
        cm-api
        db-api
        db-impl
        db-util
        entity-api
        email-api
        event-api
        jsf
        message-api
        master
        site-api
        site-manage-api
        tool-api
        user-api
        user-util
        util-api
        util-util
        velocity
        • NOTE: You can just import all the projects also, this tends to work fine for me
      4. Click Finish to import the selected projects
        • This will take awhile, probably 5+ minutes
    7. Create a working set for Sakai (optional)
      • You do not have to create a working set, these are here in case you want to
      1. Switch to the Java perspective
      2. In the Package Explorer pane click the drop-down arrow menu and choose Select Working Set
      3. Click the New button from the Select Working Set Dialog window
      4. Choose Java for the Working Set Type and click Next
      5. Enter Sakai as the name for your Working Set
      6. Select the imported Sakai projects and click Finish
    8. Build Sakai in Eclipse
      • Initially you will get build failures on almost every Sakai project, this is because they are building in the default order and their dependencies are in a different order, this has been partially addressed in Sakai 2.2
      1. Clean all Sakai projects
        1. Select Project -> Clean
        2. Select Clean all projects
        3. Check Start a build immediately
        4. Click OK
      2. Build All (Project -> Build All)
        • Do this if using working sets:
          Build the Sakai working set (Select Project -> Build Working Set -> Sakai)
        • Repeat this step until no errors remain (should be no more than 3-4 times)
        • There will be hundreds of warnings, do not worry about these
    9. Turn back on Automatic builds
      • Select Project and check Build automatically
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Apr 27, 2006

    casey dunn says:

    Nice work here. Is discussion of a local svn repository discussed anywhere? Aft...

    Nice work here.

    Is discussion of a local svn repository discussed anywhere? After all the developer will be enhancing the value of Sakai to their local organization by modifying and adding to the source they've now exported and loaded into eclipse.

    Would be a shame not to have the local work under revision control.

  2. May 30, 2006

    Ari Consul says:

    Complements to Aaron and contributers to this guide. Worked very well. Comments ...

    Complements to Aaron and contributers to this guide. Worked very well.

    Comments and minor nitpicks after after install:

    • for beginners, a separate page on what PATH is and on setting environmental variables might be helpful at lowering the barrier to installing (especially if using a new OS)
    • Instruction 2.3 (mysql install) - Mac Users installation issue – if you have already installed mysql 5.0 and need to use mysql 4.1, you will run into the error "you cannot continue. there is nothing to install". In my case, this was fixed by removing "mysql-standard-5.0.15-osx10.4-powerpc.pkg" and then installing (apparently mysql expects you to have only one version of mysql installed at a time).
    • Instructions 4.3, 5.3, and 6.7 fail if the user (a) has already installed or (b) chooses a directory other than what is given. Step 8 (svn checkout) and in particular 8.4 provides more flexible instructions.
    • Instruction 9.1 - as mentioned by other commenters - there was no mention of $TOMCAT_HOME before instruction 9.1 - this should be $CATALINA_HOME (or there should be an explicit instruction to set $TOMCAT_HOME).
  3. Nov 02, 2006

    Jae-Woo Park says:

    Question: Do we have to restart Tomcat each time we do a build? I am trying to ...

    Question: Do we have to restart Tomcat each time we do a build?

    I am trying to develop a tool and even after using antiJARLocking="true"
    for Windows, I have to restart Tomcat in order to make my code work and
    it's taking me a long time to develop. Any suggestions?

  4. Nov 13, 2006

    nicolas hulot says:

    Hello, I have to make a new tool in Sakaï, and customizing a little Sakaï. I f...

    Hello,

    I have to make a new tool in Sakaï, and customizing a little Sakaï. I follow this instruction, but a I didn't understand very well the method of developpement...

    My source is in this location :
    c:\sakai-src

    Tomcat is here :
    c:\tomcat-5.5.17\webapp

    I compile the code of Sakaï into Eclipse. But, how can I configure Eclipse to automatically deploy all sakai source into tomcat ? Is this possible ?

  5. Dec 14, 2006

    Gaurav Cedric Bhatnagar says:

    Hi there this is a great guide. Thanks very much to everyone who has contributed...

    Hi there - this is a great guide. Thanks very much to everyone who has contributed.

    I'm working on a project where some of these tools are required to be set up to run Sakai and others are not. When directing people to this site from my documentation, it'd be great to link them directly to the step they need instead of the top of the page. This can be done by placing anchors within the Wiki Markup. The anchors could then be referenced externally (or internally, say, for a table of contents or dependent steps) to jump to certain sections within the page.

    This is a pretty simple task and I'd be happy to do it if it's something the Programmer's Cafe WG finds useful and if I were given permissions to edit the page.

    Thanks.

  6. Sep 21, 2007

    David Megill says:

    Cool, I got it all to work but I had to add the M2REPO variable instead of the M...

    Cool, I got it all to work but I had to add the M2_REPO variable instead of the MAVEN_REPO variable in instruction 17.3. The M2_REPO has to point to /opt/.m2/repository.

    Also you need one more project imported: cm-api

    Thanks

  7. Sep 28, 2007

    Li Qing says:

    Now, Dbimpl, should be reconfiged to M2REPO/commonspool/commonspool/1.3/commonsp...

    Now, Db-impl, should be reconfiged to M2_REPO/commons-pool/commons-pool/1.3/commons-pool-1.3.jar

    Thanks

    1. Sep 29, 2007

      Aaron Zeckoski says:

      This was reported as a bug in:

      This was reported as a bug in: http://jira.sakaiproject.org/jira/browse/SAK-11715
      Hopefully it will be fixed soon.

  8. Sep 30, 2007

    Li Qing says:

    And there is still another we should be careful. The jdk 1.6 seems not to be com...

    And there is still another we should be careful.
    The jdk 1.6 seems not to be compatible with maven 2, use jdk 1.5 !

  9. Oct 30, 2007

    James Marca says:

    Please clarify the following. At the top of this page, the text says "This is cu...

    Please clarify the following. At the top of this page, the text says
    "This is currently tailored for Sakai 2.3.x."

    But if you follow the link in Notes for developers using Sakai 2.4.x-, it says

    If you are developing for 2.5.x, please check out the current Development Environment Setup Walkthrough which covers the newer version of Sakai with the changes for maven 2.

    Confusing. Is that a broken link, or is this really for 2.5.x. I think the latter, but clarification/correction would be good.

    1. Nov 06, 2007

      Anthony Whyte says:

      Yep, a typo. Thanks for pointing it out. I've updated the page.

      Yep, a typo. Thanks for pointing it out. I've updated the page.

  10. Nov 17, 2007

    Willie Wheeler says:

    For Java developers on Windows who already have a lot of Java stuff installed on...

    For Java developers on Windows who already have a lot of Java stuff installed on their machine (for example, Java 6, Tomcat 6.x, etc.) for other projects, you might find the following helpful. Create a separate Windows user account called Sakai, and remove Java, Tomcat, Maven, etc. environment variables from the system variables (if you defined them there). Instead make them user variables, and augment the system Path variable by including a user variable

    Path=%JAVA_HOME%\bin;%MAVEN2_HOME%\bin;%CATALINA_HOME%\bin;%MYSQL_HOME%\bin

    That way your Sakai account will use the correct configuration and you can continue to use Java 6, Tomcat 6.x, etc. for other work. I took this approach and it's working pretty nicely.

    Note that the JDK installer drops the java.exe, javaw.exe and javaws.exe executables in C:\WINDOWS\system32, and that segment appears early on the path. It appears that Windows puts the user-defined path segments after the system-defined path, and the system-defined path includes C:\WINDOWS\system32. I solved that by removing java.exe (along with the other two) from C:\WINDOWS\system32.

    Anyway hope somebody finds that helpful.

    Also, there appears to be an unstated dependency on the Eclipse part. Eclipse is complaining that site-manage-api needs cm-api.

  11. Nov 29, 2007

    Alan Hoyle says:

    There are a few minor errors in this, including the following: Step 1.6: should...

    There are a few minor errors in this, including the following:

    Step 1.6: should be moved into step 6, as we can't do it without having tomcat first.

    Step 10.1: Some flavors of Windows (XP at least) won't let you create or rename a directory that begins with a "." through the GUI. To get around this limitation, go out to a command line, change to the home directory (probably by running something like "cd c:\Documents and Settings\username") and run "md .m2" at the prompt. From there, you can go back into the GUI and work as normal.

    Step 14: Should say to download the "most recent WTP Release build." Having this specified would have saved me hours of frustration. More recent builds from the "Maintenance" or "Stable (Milestone)" sections don't include the "All-In-One" packages, and instead require manual installation of all the prerequisites.

    Step 15 and 16: Both of these installations have "Integrations" as part of the features they attempt to install if you try to install the whole thing by default. (AJDT and Mylyn for SpringIDE; Buckminster and Mylyn for Subclipse.) If you don't uncheck those "Integrations" boxes, Eclipse won't let you install the add-ons: the "Finish" button is disabled and an error message appears at the top of the window.

    Step 17.3.2: MAVEN_REPO is for Maven 1.x. Instead, one should create M2_REPO and set it equal to $USER_HOME/.m2/repository or

    Step 17.6.1: the path should be "/opt/<sakai-src>" or "/opt/cafe_trunk" not the 2.2 version.

    Step 17.6.3: One also needs to select "cm-api" in order to build.

    See you all in Newport Beach!

  12. Dec 02, 2007

    Jean-François Lévêque (old account) says:

    Steps 1.6 and 6.8 have slightly different JAVAOPTS, what about just refering 6.8...

    Steps 1.6 and 6.8 have slightly different JAVA_OPTS, what about just refering 6.8 in 1.6 and not providing a value again.

    Step 2.1, mysql -V (or --version) has a cleaner output if you only want to know the MySQL version.

    1. Sep 09

      will trillich says:

      it would also be very helpful if these memoryrequests specified in JAVAOPTS were...

      it would also be very helpful if these memory-requests specified in JAVA_OPTS were given in the context of how-much-ram-the-example-server-has-available. for example, -Xmx2000m would be relatively meaningless on a 2gb server (who wants to use swap space to run your sakai? yikes!)

      • e.g. on a ##gb server, start with having your JAVA_OPTS include -Xmx####m and look for XXX behavior. adjust up if you see YYY, or down if you see ZZZ...
      • if your database is on the same server for a test-run, watch out for QQQ...

      simply saying "ask for this much ram" isn't all that helpful without a bit-o-context.

  13. Dec 03, 2007

    will trillich says:

    at serensoft, we were experiencing lots of "java.lang.OutOfMemoryError: PermGen ...

    at serensoft, we were experiencing lots of "java.lang.OutOfMemoryError: PermGen space" errors with sakai 2.5.x – until we added

    -XX:+CMSPermGenSweepingEnabled

    to JAVA_OPTS. the server is now very responsive – and no PermGen space errors, no restarts, in over a week, now.

    for now, our full JAVA_OPTS environment variable contains:

    -server
    -Xmx1500m
    -XX:MaxPermSize=200m
    -XX:+CMSPermGenSweepingEnabled
    -XX:+UseParallelGC
    -Djava.awt.headless=true

    1. Sep 09

      will trillich says:

      in fact, we've had tomcat running at Serensoft for MONTHS at a time now, without...

      in fact, we've had tomcat running at Serensoft for MONTHS at a time now, without any PermGen space errors. woo hoo!

      these days (knock on wood), the only time we restart it is after a svn install sakai:deploy as it's been rock solid

  14. Dec 11, 2007

    Benito J. Gonzalez says:

    On a Windows machine, I had issues with Maven 2. The problem was that there were...

    On a Windows machine, I had issues with Maven 2. The problem was that there were spaces in the path to the repository. A bit of googling later, I found the solution: move the local repository.

    C:\Document and Settings\<user>\.m2>edit settings.xml

    add "<localRepository>C:\maven2\repository</localRepository>" before <profiles> stanza

    C:\Document and Settings\<user>\.m2> md C:\maven2
    C:\Document and Settings\<user>\.m2> xcopy /E repository C:\maven2\
  15. Jul 22

    Steve Swinsburg says:

    Just a note re Eclipse 3.4, it's got WTP bundled already.

    Just a note re Eclipse 3.4, it's got WTP bundled already.

  16. Aug 08

    nishanathe dahanayake says:

    For Eclipse 3.4 users doing software updates: 1. WTP is already installed 2. sub...

    For Eclipse 3.4 users doing software updates:
    1. WTP is already installed
    2. subclipse update selection should be made from the udate link given at: http://subclipse.tigris.org/
    3. in springide update there is a dependency for eclipse 3.2; make sure you uncheck this.
    Cheers