From 9f19ae25fdb0e91bc484f4872c603ecfd73d9885 Mon Sep 17 00:00:00 2001
From: fguigues <fguigues@localhost>
Date: Wed, 25 Mar 2009 08:51:33 +0000
Subject: [PATCH] Fix 3295 SNMP: exception displayed at startup when security-agent-file property is set to a wrong value Fix 3899 Windows : GUIs do not load the appropriated resources
---
opendj-sdk/opends/src/snmp/src/org/opends/server/snmp/SNMPClassLoaderProvider.java | 9 ++++-----
opendj-sdk/opends/resource/bin/_script-util.bat | 2 +-
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/LicenseFile.java | 7 ++-----
opendj-sdk/opends/src/messages/messages/protocol.properties | 5 ++---
4 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/opendj-sdk/opends/resource/bin/_script-util.bat b/opendj-sdk/opends/resource/bin/_script-util.bat
index 190b557..0830b66 100644
--- a/opendj-sdk/opends/resource/bin/_script-util.bat
+++ b/opendj-sdk/opends/resource/bin/_script-util.bat
@@ -57,10 +57,10 @@
:setClassPath
if "%SET_CLASSPATH_DONE%" == "true" goto end
-FOR %%x in ("%INSTALL_ROOT%\resources\*.jar") DO call "%INSTALL_ROOT%\lib\setcp.bat" %%x
FOR %%x in ("%INSTALL_ROOT%\lib\*.jar") DO call "%INSTALL_ROOT%\lib\setcp.bat" %%x
if "%INSTALL_ROOT%" == "%INSTANCE_ROOT%"goto setClassPathDone
FOR %%x in ("%INSTANCE_ROOT%\lib\*.jar") DO call "%INSTANCE_ROOT%\lib\setcp.bat" %%x
+FOR %%x in ("%INSTALL_ROOT%\resources\*.jar") DO call "%INSTALL_ROOT%\lib\setcp.bat" %%x
set CLASSPATH=%INSTANCE_ROOT%\classes;%CLASSPATH%
:setClassPathDone
set SET_CLASSPATH_DONE=true
diff --git a/opendj-sdk/opends/src/messages/messages/protocol.properties b/opendj-sdk/opends/src/messages/messages/protocol.properties
index 7bd8b01..d625a28 100644
--- a/opendj-sdk/opends/src/messages/messages/protocol.properties
+++ b/opendj-sdk/opends/src/messages/messages/protocol.properties
@@ -1388,9 +1388,8 @@
Please go under http://opendmk.dev.java.net and set the \
ds-cfg-opendmk-jarfile configuration parameter to set the full path \
of the required jdmkrt.jar file. The SNMP connection Handler didn't started
-SEVERE_ERR_SNMP_CONNHANDLER_BAD_CONFIGURATION_1465=An unexpected \
- error occurred while trying to initialize the SNMP Connection Handler. \
- Please check the configuration attributes
+SEVERE_ERR_SNMP_CONNHANDLER_BAD_CONFIGURATION_1465=Cannot initialize the \
+ SNMP Connection Handler. Please check the configuration attributes
SEVERE_ERR_SNMP_CONNHANDLER_NO_VALID_TRAP_DESTINATIONS_1466=No valid trap \
destinations has been found. No trap will be sent
SEVERE_ERR_ASN1_READ_ERROR_1500=An error occured while accessing the \
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/LicenseFile.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/LicenseFile.java
index 67cd995..8aa955d 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/LicenseFile.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/LicenseFile.java
@@ -64,11 +64,8 @@
}
else
{
- // NOTE: make a whole reference to the package of DirectoryServer
- // instead of using an import clause. Using an import breaks the
- // Java Web Start installer.
- String installRootFromSystem =
- org.opends.server.core.DirectoryServer.getServerRoot();
+
+ String installRootFromSystem = System.getProperty("INSTALL_ROOT");
if (installRootFromSystem == null) {
installRootFromSystem = System.getenv("INSTALL_ROOT");
diff --git a/opendj-sdk/opends/src/snmp/src/org/opends/server/snmp/SNMPClassLoaderProvider.java b/opendj-sdk/opends/src/snmp/src/org/opends/server/snmp/SNMPClassLoaderProvider.java
index 8f90136..af6659b 100644
--- a/opendj-sdk/opends/src/snmp/src/org/opends/server/snmp/SNMPClassLoaderProvider.java
+++ b/opendj-sdk/opends/src/snmp/src/org/opends/server/snmp/SNMPClassLoaderProvider.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Copyright 2008 Sun Microsystems, Inc.
+ * Copyright 2008-2009 Sun Microsystems, Inc.
*/
package org.opends.server.snmp;
@@ -233,7 +233,9 @@
this.snmpAdaptor = this.getSnmpAdaptor(this.currentConfig);
if (this.snmpAdaptor == null) {
- throw new Exception();
+ Exception ex = new Exception(
+ ERR_SNMP_CONNHANDLER_BAD_CONFIGURATION.get().toString());
+ throw ex;
}
// Create the Usm MIB to allow user management
@@ -298,9 +300,6 @@
this.server.registerMBean(this.snmpAdaptor, snmpObjName);
} catch (Exception ex) {
- if (debugEnabled()) {
- TRACER.debugCaught(DebugLogLevel.ERROR, ex);
- }
throw new Exception(
ERR_SNMP_CONNHANDLER_BAD_CONFIGURATION.get().toString());
}
--
Gitblit v1.10.0