Installing Pluto into Sun Application Server (GlassFish)

This document is guide for the manually installation of Pluto 1.1.0 into Sun Application Server (Glassfish) v9.1. There are several tasks that must be done before getting Pluto configured and running. Those tasks are described in the following sections:

Getting the Pluto Enterprise Application ARchive (pluto-ear)

You will find attached to this page a file called pluto-ear-1.1.0-beta2-src.tar.bz2. This file contains the source code (which is only composed of XML files) for the Pluto Enterprise Application. This code and the packaged file are essential to achieve a successfully deployment of Pluto Portal into Sun Application Server.

Deploying pluto-portal and pluto-testsuite as separate web modules will fail because Sun Application Server doesn't allows crossing servlet context from one module to another one if they are not part of the same enterprise application.

Click in this link to download: pluto-ear

Unpack this file at the top folder of the Pluto source tree and modify the parent's pom.xml to include the new project module.

<project>
...
  <modules>
    ...
    <module>pluto-ear</module>
    ...
  </modules>
...
</project>

Installing required libraries

Step 1: Copy the following libraries to the domain's libraries folder (${com.sun.aas.instanceRoot}/lib). By default: SUNWappserver/domains/domain1/lib

Step 2: Copy the following to ${com.sun.aas.instanceRoot}/lib/ext

Configuring Application Scope PortletSession attributes

Create a file called sun-web.xml with the following contents:

<?xml version="1.0" encoding="UTF-8"?>

<sun-web-app>
  <session-config>
    <cookie-properties>
      <property name="cookiePath" value="/" />
    </cookie-properties>
  </session-config>
</sun-web-app>

Now copy this file the to the pluto-portal and pluto-testsuite projects inside its source tree. Its final location must be src/main/webapp/WEB-INF/sun-web.xml

Configuring users and groups

The easiest way to confiure users and groups is doing it from the Admin Console.

The following form you must fill it with the following values:

Packaging and deploying the Pluto Enterprise Application ARchive

Now it's time to build the Pluto distribution with the new pluto-ear inside of it:

mvn clean install

When this operations finish we obtain the file pluto-ear/target/pluto-ear-1.1.0-beta2.ear. This file is the one that must be deployed to the Application Server.

Now write the following URL in your web browser http://localhost:8080/pluto

You should see the Pluto's login page.

FAQ

Explanation: This is an issue related to the castor's marshaller during the packaging of the pluto-testsuite web module. This happens because when the web.xml is written to pluto-testsuite/target/pluto-testsuite/WEB-INF folder the new file misses the DOCTYPE declaration and, once deployed, GlassFish doesn't know which version of the spec is required for the pluto-testsuite web module. So GlassFish fallsback to the the J2EE 1.3 Specification. In this spec., expression language (EL) is not defined so you get a JasperException per portlet when test pages are run.

Solution: To solve this you have to copy the following DOCTYPE declaration to the target/pluto-testsuite/WEB-INF/web.xml file:

<!DOCTYPE web-app PUBLIC
        "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">

Then, you must pack the pluto-testsuite-1.1.0-beta2.war web module manually, copy it to your Maven2 local repository. Run mvn install from pluto-1.1.0-beta2-src/pluto-ear folder and deploy the enterprise application using the admin console.

Pluto/InstallPlutoGlassfish (last edited 2011-06-11 06:02:56 by RalphGoers)