Differences between revisions 11 and 12
Revision 11 as of 2011-06-11 01:47:55
Size: 5227
Editor: IrmenDeJong
Comment: Added some advice.
Revision 12 as of 2011-06-11 06:02:56
Size: 5191
Editor: RalphGoers
Comment:
Deletions are marked like this. Additions are marked like this.
Line 109: Line 109:
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. [[http://www.pbali.com|Bali Villas]] 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.

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)

  • Installing required libraries.
  • Configuring Application Scope PortletSession attributes

  • Configuring users and groups
  • Packaging and deploying the Pluto Enterprise Application ARchive

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

  • castor-1.0.jar
  • commons-logging-1.1.jar
  • portlet-api-1.0.jar
  • pluto-container-1.1.0-beta2.jar
  • pluto-descriptor-api-1.1.0-beta2.jar
  • pluto-descriptor-impl-1.1.0-beta2.jar
  • pluto-taglib-1.1.0-beta2.jar

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

  • xercesImpl-2.6.2.jar
  • xmlParserAPIs-2.6.2.jar

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.

  • Navigate on the menu to Configuration > Security > Realms > file.

  • Click on the button Manage Users...

  • Click on New...

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

  • User ID: pluto

  • Password: pluto

  • Confirm Password: pluto

  • Group List: pluto

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.

  • Navigate to Applications > Enterprise Applications

  • Click on Deploy...

  • Select the pluto-ear-1.1.0-beta2.jar file you just generated from your local hard drive and click on Next

  • Change Application Name to pluto-ear. Click on Finish.

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

You should see the Pluto's login page.

FAQ

  • I got a JasperException when I run the Pluto's test pages while admin and about pages run well.:

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)