Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0
-
None
-
Security Level: public (Regular issues)
-
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...