uPortal : 2.6.0 Additonal Release Notes

Embed Size (px)

Citation preview

  • 8/14/2019 uPortal : 2.6.0 Additonal Release Notes

    1/5

    Document generated by Confluence on Jul 18, 2009 12:20 Page 1

    uPortal : 2.6.0 Additonal Release Notes

    This page last changed on Aug 21, 2007 byjayshao.

    This page serves as additional release notes about 2.6.0 GA. It is intended as a supplement to thereleaseNotes.html accompanying the release.

    Contents

    1. Netbeans Issues & Workaround2. initportal ANT Task requires Internet Connectivity

    1. Problems developing uPortal 2.6.0 GA on Netbeans usingANY OS (was Mac OS X)

    uPortal 2.6.0 requires Xalan 2.7.0. (This isn't actually a particularly strong requirement you couldretrofit it to use a different Xalan relatively easily, at the cost of no longer being on the default andpreferred Xalan.) Apparently it is difficult to get NetBeans to cope with Xalan 2.7.0.

    Netbeans 5.5(.1) comes with a bundled version of Tomcat (5.5.17). This is convenient as it offersdevelopers an easy out-of-the-box solution for developing web applications. However it is problematicwith uPortal 2.6.0 GA. Netbeans includes 2 additional jars in the common/endorsed directory in thebundled Tomcat (xml-apis.jar and xercesImpl.jar) that are not included with Tomcat as it is downloadedfrom Apache.

    Work-Around #1: Installing a Tomcat and registering it with Netbeans

    You can use Netbeans 5.5.1 with uPortal 2.6.0 on JDK 1.5 by following these steps:

    1. Download and unzip a 5.5.x version of Tomcat to a directory of your choice (say C:\tomcat\apache-tomcat-5.5.23)

    2. Edit the tomcat-users.xml file in the conf directory to add a manager role and a user for that role.For example, you can add the lines:

    3. In Netbeans, add the tomcat server.a. Open the Runtime view (Window | Runtime from the main menu or Ctrl+5).b. On the Servers node, right-click and select "Add Server...". This will start the "Add Server

    Instance" wizard.c. In the "Add Server Instance" dialog, choose Tomcat 5.5 from the "Server:" comboboxd. In the "Name:" field, enter a name for your Tomcat instance (e.g. uPortal 2.6.0GA in Tomcat

    5.5.23).

  • 8/14/2019 uPortal : 2.6.0 Additonal Release Notes

    2/5

    Document generated by Confluence on Jul 18, 2009 12:20 Page 2

    e. Click the "Next > " button.f. In the "Add Server Instance" dialog, enter the path to your Tomcat install in the "Catalina

    Home:" field.i. If you want to specify a separate directory for your Catalina Base directory, check the

    "Use Private Configuration Folder (Catalina Base)" checkbox.g. Enter the name of the manager you entered in your tomcat-users.xml file in the "Username:"

    and "Password:" fields.

    h. Click the "Finish" button.i. You will see your new server instance under the "Servers" node in the "Runtime" view.

  • 8/14/2019 uPortal : 2.6.0 Additonal Release Notes

    3/5

    Document generated by Confluence on Jul 18, 2009 12:20 Page 3

    4. Set up uPortal as a web project in Netbeans. See Gregg Sporar's 4-part series for configuringuPortal to take advantage of Netbeans' IDE features. There are some Tomcat items that don't applywith the current version of uPortal.

    5. Open the Files view (Window | Files from the main menu or Ctrl+2).6. Open the build.properties file.7. Set the server.home and server.base properties and save the file.8. Run the initportal target.9. Start the new Tomcat instance in Netbeans from the Runtime view.

    10. Expand the Tomcat instance node and then expand the "Web Applications" node. Right-click onuPortal and select "Open in Browser"

    From here, you can start using uPortal as usual.

    Work-Around #2: Modify Netbeans Bundled Tomcat Files.

    This option is a little riskier as the bundled Tomcat has been set up for maximum possible backward

    compatibility with previous JDKs. The changes described here should be made so that they can be rolledback easily if you run in to trouble with other development projects.

    1. Locate the setclasspath.sh file on Unix based systems or setclasspath.bat for Windows basedsystems in the $NETBEANS_HOME/enterprise3/apache-tomcat-5.5.17/bin directory.

    2. Edit this file as follows:a. For setclasspath.sh, find the following block:

    # enable the compatibility pack if starting on JDK 1.4

    if [ "$NB_TOMCAT_JDK" = "1.4" ]; then

    # Set the default -Djava.endorsed.dirs argument

    JAVA_ENDORSED_DIRS="$BASEDIR"/common/endorsed

    fi

    http://weblogs.java.net/blog/gsporar/archive/2006/02/uportal_develop_1.htmlhttp://weblogs.java.net/blog/gsporar/archive/2006/02/uportal_develop_1.html
  • 8/14/2019 uPortal : 2.6.0 Additonal Release Notes

    4/5

    Document generated by Confluence on Jul 18, 2009 12:20 Page 4

    and change it to

    # enable the compatibility pack if starting on JDK 1.4

    # if [ "$NB_TOMCAT_JDK" = "1.4" ]; then

    # Set the default -Djava.endorsed.dirs argument

    JAVA_ENDORSED_DIRS="$BASEDIR"/common/endorsed

    # fi

    b. For setclasspath.bat, find the following block:

    rem enable the compatibility pack if starting on JDK 1.4

    if not "%NB_TOMCAT_JDK%" == "1.4"goto noEndorsed

    rem Set the default -Djava.endorsed.dirs argument

    set JAVA_ENDORSED_DIRS=%BASEDIR%\common\endorsed

    and change it to

    rem enable the compatibility pack if starting on JDK 1.4

    rem if not "%NB_TOMCAT_JDK%" == "1.4"goto noEndorsed

    rem Set the default -Djava.endorsed.dirs argument

    set JAVA_ENDORSED_DIRS=%BASEDIR%\common\endorsed

    3. In the $NETBEANS_HOME/enterprise3/apache-tomcat-5.5.17/common/endorsed rename xml-apis.jar and xercesImpl.jar to something without a .jar extension.

    4. Restart Netbeans.5. Set up uPortal as a web project in Netbeans. See Gregg Sporar's 4-part series for configuring

    uPortal to take advantage of Netbeans' IDE features. There are some Tomcat items that don't applywith the current version of uPortal.

    6. Open the Files view (Window | Files from the main menu or Ctrl+2).7. Open the build.properties file.8. Set the server.home and server.base properties and save the file.9. Run the initportal target.

    10. Start the bundled Tomcat instance in Netbeans from the Runtime view.11. Expand the Tomcat instance node and then expand the "Web Applications" node. Right-click on

    uPortal and select "Open in Browser"

    From here, you can start using uPortal as usual.

    Netbeans Updates

    An issue was filed with the Netbeans development team regarding this. As it turns out, the extra jar filesare in the common/endorsed directory for backward compatibility with JDK 1.4 and below. When Netbeansis used with a JDK newer than 1.4, the endorsed directory is not being read, hence the error messagethat Xalan 2.7.0 can't be found. Netbeans 6.0 comes with an unmodified Tomcat 6 meaning that there isno undocumented or unexpected behavior like this to maintain any kind of backward compatibility. Youwill need to follow the work-around steps if you want to use Netbeans with uPortal.

    2. initportal ANT task requires Internet Connectivity

    from [email protected] :

    Cris J Holdorph wrote:

    mailto:[email protected]://www.netbeans.org/issues/show_bug.cgi?id=112921http://weblogs.java.net/blog/gsporar/archive/2006/02/uportal_develop_1.html
  • 8/14/2019 uPortal : 2.6.0 Additonal Release Notes

    5/5

    Document generated by Confluence on Jul 18, 2009 12:20 Page 5

    To sum up, I believe the issues with deployPortletApp (and drew givesthe latest version below) are with people trying to do "antinitportal" from machines without general internet connectivity.

    The current "ant initportal" will still not run without internetconnectivity. Just pull out your internet connection and try it.

    Drew Wills wrote:

    It turns out he wasn't able to deploy any portletApp that contains aweb.xml file with a declaration like the following:

    It looks as though the XML parser will always try to load the DTDfrom java.sun.com, even if validation is turned off. I suppose itmakes sense, since the DTD may contain entities (or defaultattributes?) used in the document.

    This means that the 'deployPortletApp' target requires an Internetconnection, or (alternately) someone must manually remove the DTDreferences or entire declarations (it works without them)from the web.xml files of any portletApps that will be deployed.

    For comparison, the previous deployer used the WebAppDtdResolverclass to intercept the XML parser's attempt to load a DTD and supplya local copy. The DTD to use was hard-coded (the 'systemId'parameter was not even referenced), such that all web.xml filesessentially referenced the servlet spec 2.3 DTD... which is of coursethe major problem the new deployer fixes.