geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Ofterdinger (JIRA)" <j...@apache.org>
Subject [jira] Updated: (GERONIMO-4209) Geronimo does not start on SAP JVM
Date Fri, 18 Jul 2008 15:50:31 GMT

     [ https://issues.apache.org/jira/browse/GERONIMO-4209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Markus Ofterdinger updated GERONIMO-4209:
-----------------------------------------

    Attachment: sap_jvm.fix

Patch

> Geronimo does not start on SAP JVM
> ----------------------------------
>
>                 Key: GERONIMO-4209
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4209
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>    Affects Versions: 2.1.1
>         Environment: Windows XP 64
> SAP JVM 1.5.0_14
>            Reporter: Markus Ofterdinger
>            Priority: Trivial
>         Attachments: sap_jvm.fix
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message