Menu

ProfileBrowserIDE WAR

Help
2008-05-13
2013-04-30
  • Sean Connelly

    Sean Connelly - 2008-05-13

    I’ve been trying to get the ProfileBrowserIDE tomcat services working on a non QEMU installation.

    I installed ProfileBrowserIDE using the war file (found in the webapps folder).

    It appears to install ok but it doesn’t start up with Tomcat. If I try to start it manually I get the following error:

    FAIL - Application at context path /ProfileBrowserIDE could not be started

    Is there something else that I need to install with the war file?

    Thanks,
    Sean

     
    • Edwin Clubb

      Edwin Clubb - 2008-05-13

      Here's what I did to setup the ProfileBrowserIDE
      --------

      Profile Web IDE

      The PIP web tool provide capabilities that are not currently found in the Eclipse plugin.  Running this tool requires:

          * Tomcat 5.5
          * Sun Java JDK (SE) 1.5 (or 1.6)
          * Apache Derby

      Debian Install

         1. Add to /etc/apt/sources.list:
                * deb http://mirrors.kernel.org/debian/ unstable non-free
                * deb-src http://mirrors.kernel.org/debian/ unstable non-free
         2. With aptitude (or similar tool) install the following packages:
                * sun-java6-jdk
                * sun-java6-bin (should auto install)
                * sun-java6-jre (should auto install)
                * sun-java6-javadb (apache derby)
         3. Make sure that the Sun jvm is the currently active one with the update-alternatives utility"
                * update-alternatives --config  java
                * update-alternatives --config javac
         4. With aptitude, install the tomcat packages:
                * tomcat5.5
                * tomcat5.5-admin
                * tomcat5.5-webapps
         5. Copy /usr/lib/jvm/java-6-sun/db/lib/*.jar files to /usr/share/tomcat5.5/common/lib
         6. Edit /etc/init.d/tomcat5.5:

            <...>
            DEFAULT=/etc/default/$NAME
            DERBY_HOME=/usr/share/tomcat5.5/common/lib

            . /lib/lsb/init-functions
            . /etc/default/rcS

            # The following variables can be overwritten in $DEFAULT

            # Run Tomcat 5 as this user ID
            TOMCAT5_USER=tomcat55

            # The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
            # defined in $DEFAULT)
            JDK_DIRS="/usr/lib/jvm/java-6-sun /usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.4-sun
            /usr/lib/j2sdk1.4-blackdown /usr/lib/j2se/1.4 /usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.3-sun
            /usr/lib/j2sdk1.3-blackdown /usr/lib/j2sdk1.5-ibm /usr/lib/j2sdk1.4-ibm
            /usr/lib/jvm/java-gcj /usr/lib/kaffe"

            # Directory for per-instance configuration files and webapps
            CATALINA_BASE=/var/lib/tomcat5.5

            <...>

            # Set java.awt.headless=true if CATALINA_OPTS is not set so the
            # Xalan XSL transformer can work without X11 display on JDK 1.4+
            # It also looks like the default heap size of 64M is not enough for most cases
            # se the maximum heap size is set to 128M
            if [ -z "$CATALINA_OPTS" ]; then
                    CATALINA_OPTS="-Djava.awt.headless=true -Xmx256m -Xmx512m -XX:MaxPermSize=512m
            -Dderby.system.home=/usr/share/tomcat5.5/common/lib"
            fi

            <...>

         7. Edit /etc/default/tomcat5.5 (may not be necessary in all cases):
                * JAVA_HOME=/usr/lib/jvm/java-6-sun
                * JSP_COMPILER=modern
                * TOMCAT5_SECURITY=no  (try this if tomcat won't run with Sun JVM)
         8. Edit /usr/share/tomcat5.5/conf/tomcat-users.xml to define tomcat managers.
         9. Edit /etc/tomcat5.5/policy.d files.  These settings may only be required if the tomcat security manager is being used:
                * 03catalina.policy:

                  // These permissions apply to JULI
                  grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
                          //permission java.util.PropertyPermission "java.util.logging.config.clas
                  s", "read";
                          //permission java.util.PropertyPermission "java.util.logging.config.file
                  ", "read";
                          //permission java.lang.RuntimePermission "shutdownHooks";
                          //permission java.io.FilePermission "${catalina.base}${file.separator}co
                  nf${file.separator}logging.properties", "read";
                          //permission java.util.PropertyPermission "catalina.base", "read";
                          //permission java.util.logging.LoggingPermission "control";
                          //permission java.io.FilePermission "${catalina.base}${file.separator}lo
                  gs", "read, write";
                          //permission java.io.FilePermission "${catalina.base}${file.separator}lo
                  gs${file.separator}*", "read, write";
                          //permission java.lang.RuntimePermission "getClassLoader";
                          permission java.security.AllPermission;
                          // To enable per context logging configuration, permit read access to th
                  e appropriate file.
                          // Be sure that the logging configuration is secure before enabling such
                   access
                          // eg for the examples web application:
                          // permission java.io.FilePermission "${catalina.base}${file.separator}w
                  ebapps${file.separator}examples${file.separator}WEB-INF${file.separator}classes$
                  {file.separator}logging.properties", "read";
                  };

                * 04webapps.policy:

                  grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
                      //permission java.io.FilePermission "/usr/share/tomcat5.5-webapps/jsp-exampl
                  es/WEB-INF/classes/logging.properties", "read";
                      //permission java.io.FilePermission "/usr/share/tomcat5.5-webapps/servlets-e
                  xamples/WEB-INF/classes/logging.properties", "read";
                      permission java.security.AllPermission;
                  };

                  grant codeBase "file:/var/lib/tomcat5.5/webapps/ProfileBrowserIDE/-{
                      permission java.security.AllPermission;
                  };

        10. The ProfileBrowserIDE.war file on the qemu VM can be pulled with an scp/sftp client.  Copy ProfileBrowserIDE.war file to /var/lib/tomcat5.5/webapps -- tomcat will automatically unpack and install the archive.
        11. The profile IDE users are defined in a derby database in the /usr/share/tomcat5.5/common/lib/profile_ide_db directory.  Tar this directory from the qeum VM and install it to the same location on the destination machine.

       
    • Sean Connelly

      Sean Connelly - 2008-05-15

      Thanks for the detailed response Edwin!

      Which version of Linux did you set this up on?

      I'm currently having problems getting tomcat to start up with java6 on Debian Etch. Tomcat starts up ok with java5 but I’m yet to get the ProfileBrowserIDE to work in this configuration.

      Sean.

       
      • Edwin Clubb

        Edwin Clubb - 2008-05-15

        Sean,

        I'm also running Debian Etch.  One package I forgot to include in the list is sun-java6-fonts.  Also, in /etc/default/tomcat5.5, I have "JAVA_HOME=/usr/lib/jvm/java-6-sun", "JSP_COMPILER=modern" and  "TOMCAT5_SECURITY=no".  I haven't figured out how to configure the security manager yet.

        Ed

         

Log in to post a comment.