Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-4209

Geronimo does not start on SAP JVM

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.1.1
    • 2.1.2, 2.2
    • None
    • Security Level: public (Regular issues)
    • None
    • Windows XP 64
      SAP JVM 1.5.0_14

    • Patch Available

    Description

      I tried to get the Geronimo Application Server 2.1.1 running on a SAP JVM. But the startup fails.

      I found this error message in the log:

      Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 7
      at java.lang.String.substring(String.java:1799)
      at org.apache.geronimo.system.properties.JvmVendor.<clinit>(JvmVendor.java:50)
      ... 25 more

      At this line a subString(0, 7) is performed on the VM vendor name, but the full vendor name of a SAP JVM contains only 6 characters "SAP AG".

      I did a small fix which adds an additional length check:

      Index: src/main/java/org/apache/geronimo/system/properties/JvmVendor.java
      ===================================================================
      — src/main/java/org/apache/geronimo/system/properties/JvmVendor.java (Revision 677904)
      +++ src/main/java/org/apache/geronimo/system/properties/JvmVendor.java (Arbeitskopie)
      @@ -47,7 +47,10 @@
      boolean bApache = fullVendorName.substring(0, 6).equalsIgnoreCase("Apache"); // aka. Apache Harmony
      boolean bIBM = fullVendorName.substring(0, 3).equalsIgnoreCase("IBM"); // aka. IBM, but not IBM Hybrid
      boolean bSun = !bIBM && !bApache; // default all others to Sun

      • boolean bHP = fullVendorName.substring(0, 7).equalsIgnoreCase("Hewlett"); // aka. Hewlett-Packard Company
        +// boolean bHP = fullVendorName.substring(0, 7).equalsIgnoreCase("Hewlett"); // aka. Hewlett-Packard Company
        + boolean bHP = false;
        + if (fullVendorName.length() >= 7)
        + bHP = fullVendorName.substring(0, 7).equalsIgnoreCase("Hewlett"); // aka. Hewlett-Packard Company
        boolean bIBMHybrid = false;

      // Special code for IBM Hybrid SDK (Sun JVM with IBM extensions on Solaris and HP-UX)

      After applying this fix the app-server started fine.

      Best regards,

      Markus Ofterdinger

      Attachments

        1. sap_jvm.fix
          1 kB
          Markus Ofterdinger

        Activity

          People

            drwoods Donald Woods
            ofterdinger Markus Ofterdinger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified