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

Improperly configured JRE_HOME or JAVA_HOME environment variables can cause server failure

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.2
    • Component/s: None
    • Security Level: public (Regular issues)
    • Labels:
      None

      Description

      If JAVA_HOME or JRE_HOME environment variables are not set properly, the Geronimo server may fail during startup. For example, on Mac OS X, if you export JRE_HOME=/usr. You get the following:

      Caused by: java.lang.NullPointerException
      at org.apache.geronimo.security.SubjectId.hashCode(SubjectId.java:79)
      at java.util.HashMap.hash(HashMap.java:264)
      at java.util.HashMap.put(HashMap.java:382)
      at java.util.Collections$SynchronizedMap.put(Collections.java:1983)
      at org.apache.geronimo.security.ContextManager.registerSubject(ContextManager.java:299)
      at org.apache.geronimo.security.ContextManager.<clinit>(ContextManager.java:71)
      ... 37 more

      The problem is that the java.ext.dirs property is being set to an improper value. This means the JRE is not able to load jar files from $JRE_HOME/lib/ext.

      At a minimum, our scripts should detect an invalid JRE_HOME or JAVA_HOME setting. Better yet, we could try to set it automatically... In addition, it looks like we don't need to explicitly configure the java.ext.dirs property any longer, anyway (we no longer package ext jars). Removing the setting of the property (e.g. -Djava.ext.dirs="$EXT_DIRS" ) from our scripts would also fix this specific problem...

        Activity

        Hide
        kevan Kevan Miller added a comment -

        Problem was fixed. Closing issue.

        Show
        kevan Kevan Miller added a comment - Problem was fixed. Closing issue.

          People

          • Assignee:
            kevan Kevan Miller
            Reporter:
            kevan Kevan Miller
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development