1st Nov: Harmony passses 100% tests on Tomcat5.5.

Summary:

Tomcat version: 5.5

Platform\VM

RI

J9

DRLVM

Ubuntu6.06

100%

100%

100%

Windows xp2

100%

100%

100%

How to:

  1. Build Tomcat5.5
    1. Get build.xml from apache web site

    2. Run ant to download Tomcat source code and required jars.

    3. Remove ecj*.jar from $ANT_HOME/lib, it will conflict with the Tomcat when building

      i.Go to ${tomcat.source}/build, run "ant" to compile source code.

      2. Run tests; i.#1 Run tests with harmony, change the file ${tomcat.source}/build/build.xml, assign the specific vm for ant task <java>,and keep the fork=true,it will fork another process to run the java task:
        <target name="run-tester" description="Catalina Tests" depends="dist-tester">
          ....
          <parallel>
                  <java classname="LauncherBootstrap" fork="yes" jvm="${HAROMNY_JAVA_HOME}/jre/bin/java">
                  ....
              </java>
      
              <sequential>
                  <!-- Let tomcat starts before starting Tester -->
                  ....
                  <java classname="LauncherBootstrap" fork="yes" jvm="${HAROMNY_JAVA_HOME}/jre/bin/java">
                  ....
      

      i.#2 Increase the interval between the launch of Tomcat Server and the testcase by changing the value of property "tester.delay" in the ${tomcat.source}/build/build.xml, if necessary, since harmony launches slower than RI which may lead to the failure of the first several tests.
      i.#3 run "ant run-tester" to run tests.

Tomcat Reference: How to build Tomcat

Attention:

  • J9VM:
  • It will fail for "ENOMEM" exception caused by invoking fork() when execute the "Runtime.exec", i rebuild the classlib with replacing fork with vfork in execProgram() of procimpl.c.

31st July:

JSP examples now working with JRE r424571.


13th June:

Despite missing some classes Tomcat will actually run with Harmony, using the following command:

java -Djava.endorsed.dirs="C:\jakarta-tomcat-4.1.31\common\endorsed" -classpath "c:\j2sdk1.4.2_05\lib\tools.jar;C:\jakarta-tomcat-4.1.31\bin\bootstrap.jar" -Dcatalina.base="C:\jakarta-tomcat-4.1.31" -Dcatalina.home="C:\jakarta-tomcat-4.1.31" -Djava.io.tmpdir="C:\jakarta-tomcat-4.1.31\temp" org.apache.catalina.startup.Bootstrap start

This was on Windows with Harmony installed in "C:\harmony", an RI JRE in "c:\j2sdk1.4.2_05", JAVA_HOME set to "C:\harmony\deploy\jre" and Path containing "C:\harmony\deploy\jre\bin"

tools.jar is needed because Tomcat needs to use javac, which is missing from Harmony at present.

The Tomcat welcome page loads and all the servlet examples seem to work properly but the JSP examples do not.


Update:

List of classes still required as of 8th June 2006:

java/awt/MenuContainer
java/awt/Panel
java/awt/image/ImageObserver
javax/accessibility/Accessible

Using the Classlib snapshot build r38361. I downloaded Tomcat release version 5.5.15 with the 1.4 compatibility kit installed. After chasing through some bat files I figured out this command-line that looks like it should start the server.

As you can see, it fails because we don't have Beans.

On Windows XP:

C:\download\apache-tomcat-5.5.15\bin>"c:\harmony\enhanced\classlib\trunk\deploy\jre\bin\java.exe" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file="c:\download\apache-tomcat-5.5.15\conf\logging.properties" -Djava.endorsed.dirs="c:\download\apache-tomcat-5.5.15\common\endorsed" -classpath "c:\java\IBM JDK 1.4.2\lib\tools.jar;c:\download\apache-tomcat-5.5.15\bin\bootstrap.jar" -Dcatalina.base="c:\download\apache-tomcat-5.5.15" -Dcatalina.home="c:\download\apache-tomcat-5.5.15" -Djava.io.tmpdir="c:\download\apache-tomcat-5.5.15\temp" org.apache.catalina.startup.Bootstrap  start
Created MBeanServer
java.lang.NoClassDefFoundError: java.beans.PropertyChangeSupport
        at org.apache.catalina.core.StandardService.<init>(StandardService.java:98)
        at org.apache.catalina.startup.Embedded.<init>(Embedded.java:127)
        at org.apache.catalina.startup.Embedded.<init>(Embedded.java:114)
        at org.apache.catalina.startup.Catalina.<init>(Catalina.java:57)
        at java.lang.Class.newInstanceImpl(Native Method)
        at java.lang.Class.newInstance(Class.java:1259)
        at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:205)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)

C:\download\apache-tomcat-5.5.15\bin>

Here is the list of classes that I think we will need to run Tomcat:

java/applet/Applet
java/awt/MenuContainer
java/awt/Component
java/awt/Container
java/awt/Panel
java/awt/image/ImageObserver
java/beans/PropertyChangeSupport
java/beans/PropertyChangeEvent
java/beans/PropertyChangeListener
java/beans/PropertyChangeListenerProxy
java/beans/Introspector
java/beans/FeatureDescriptor
java/beans/EventSetDescriptor
java/beans/PropertyChangeSupport
java/beans/PropertyChangeEvent
java/beans/PropertyChangeListener
java/sql/Timestamp
java/sql/Driver
java/sql/DriverManager
java/sql/SQLPermission
java/sql/Timestamp
java/util/logging/Logger
java/util/logging/Handler
java/util/logging/Level
java/util/logging/LogManager
java/util/logging/LoggingPermission
java/util/logging/Formatter
java/util/logging/SimpleFormatter
java/util/logging/ErrorManager
java/util/logging/StreamHandler
java/util/logging/ConsoleHandler
java/util/logging/LogRecord
java/util/logging/Logger
java/util/logging/Handler
java/util/logging/Level
java/util/logging/LogManager
java/util/logging/LoggingPermission
java/util/logging/Formatter
java/util/logging/SimpleFormatter
java/util/logging/ErrorManager
java/util/logging/StreamHandler
java/util/logging/ConsoleHandler
javax/accessibility/Accessible
javax/naming/Context
javax/naming/RefAddr
javax/naming/StringRefAddr
javax/naming/NamingException
javax/naming/NameAlreadyBoundException
javax/naming/Reference
javax/naming/OperationNotSupportedException
javax/naming/NamingEnumeration
javax/naming/Name
javax/naming/NameNotFoundException
javax/naming/NotContextException
javax/naming/NameParser
javax/naming/CompositeName
javax/naming/LinkRef
javax/naming/Referenceable
javax/naming/InitialContext
javax/naming/NameClassPair
javax/naming/Binding
javax/naming/Context
javax/naming/RefAddr
javax/naming/StringRefAddr
javax/naming/NamingException
javax/naming/NameAlreadyBoundException
javax/naming/Reference
javax/naming/directory/DirContext
javax/naming/directory/Attributes
javax/naming/directory/Attribute
javax/naming/directory/BasicAttribute
javax/naming/spi/NamingManager
javax/naming/spi/ObjectFactory
javax/naming/spi/InitialContextFactory
javax/xml/parsers/SAXParserFactory
javax/xml/parsers/SAXParser
javax/xml/parsers/DocumentBuilderFactory
javax/xml/parsers/DocumentBuilder
javax/xml/parsers/ParserConfigurationException
javax/xml/parsers/SAXParserFactory
javax/xml/parsers/SAXParser
javax/xml/transform/Source
javax/xml/transform/Result
org/w3c/dom/Node
org/w3c/dom/Element
org/w3c/dom/NodeList
org/w3c/dom/Document
org/w3c/dom/DocumentType
org/w3c/dom/CharacterData
org/w3c/dom/Text
org/w3c/dom/NamedNodeMap
org/w3c/dom/Attr
org/w3c/dom/Comment
org/xml/sax/EntityResolver
org/xml/sax/DTDHandler
org/xml/sax/ContentHandler
org/xml/sax/ErrorHandler
org/xml/sax/SAXException
org/xml/sax/SAXParseException
org/xml/sax/Attributes
org/xml/sax/InputSource
org/xml/sax/Parser
org/xml/sax/XMLReader
org/xml/sax/AttributeList
org/xml/sax/Locator
org/xml/sax/EntityResolver
org/xml/sax/DTDHandler
org/xml/sax/ContentHandler
org/xml/sax/ErrorHandler
org/xml/sax/SAXException
org/xml/sax/SAXParseException
org/xml/sax/Attributes
org/xml/sax/InputSource
org/xml/sax/Parser
org/xml/sax/XMLReader
org/xml/sax/AttributeList
org/xml/sax/Locator
org/xml/sax/helpers/DefaultHandler
org/xml/sax/helpers/AttributesImpl
org/xml/sax/helpers/DefaultHandler
org/xml/sax/helpers/AttributesImpl
  • No labels