Checkpoint commit for OPENDJ-1288 :
Migrate I18n and logging support to i18n framework and SLF4J
* Replace all DebugTracer usages by LocalizedLogger usage
** No more direct call to DebugTracer
** All debug logging made through #trace or #traceException methods
of LocalizedLogger
* Replace most java.util.Logger usages by LocalizedLogger usage
** java.util.logging classes still used in few places where logging
configuration is needed (handler or level setup)
| | |
| | | <include name="build-tools.jar" /> |
| | | </fileset> |
| | | <fileset dir="${lib.dir}/compile"> |
| | | <include name="i18n-core.jar" /> |
| | | <include name="*.jar" /> |
| | | </fileset> |
| | | <pathelement path="${classes.dir}"/> |
| | | </classpath> |
| | |
| | | <include name="**/org/opends/server/types/OpenDsException.java"/> |
| | | <classpath> |
| | | <fileset dir="${lib.dir}/compile"> |
| | | <include name="i18n-core.jar" /> |
| | | <include name="*.jar" /> |
| | | </fileset> |
| | | </classpath> |
| | | </javac> |
| | |
| | | <include name="build-tools.jar" /> |
| | | </fileset> |
| | | <fileset dir="${lib.dir}/compile"> |
| | | <include name="i18n-core.jar" /> |
| | | <include name="*.jar" /> |
| | | </fileset> |
| | | <pathelement path="${classes.dir}"/> |
| | | </classpath> |
| | |
| | | SNMP_DIR = ["src/snmp/src"] |
| | | DSML_DIR = ["src/dsml/org"] |
| | | |
| | | # Replacement for messages |
| | | # Modify 1052 files, for a total of 2366 replacements - leaves 10274 compilation errors mostly due to generated messages |
| | | MESSAGES = { |
| | | :dirs => DSML_DIR, |
| | | :extensions => ["java"], |
| | | :stopwords => ['org/opends/messages'], |
| | | :replacements => |
| | | [ |
| | | /import org.opends.messages.(\bMessage(Builder)?(Descriptor)?\b|\*)(\.Arg..?)?;/, |
| | | 'import org.forgerock.i18n.Localizable\1\4;', |
| | | |
| | | /\bMessage\b/, |
| | | 'LocalizableMessage', |
| | | |
| | | /\bMessageBuilder\b/, |
| | | 'LocalizableMessageBuilder', |
| | | |
| | | /\bMessageDescriptor\b/, |
| | | 'LocalizableMessageDescriptor', |
| | | |
| | | /LocalizableMessage.raw\((\n\s+)?Category.\w+,\s+(\n\s+)?Severity.\w+,\s?/, |
| | | 'LocalizableMessage.raw(', |
| | | |
| | | /msg.getDescriptor().equals\((\w)+\)/, |
| | | "msg.resourceName().equals(\\1.resourceName())\n && msg.ordinal().equals(\\1.ordinal())" |
| | | ] |
| | | } |
| | | |
| | | # Replacement for types |
| | | TYPES = { |
| | |
| | | # Modify 454 files, for a total of 2427 replacements - leaves 72 compilation errors |
| | | # TODO: add I18N loggers |
| | | LOGGERS = { |
| | | :dirs => JAVA_DIRS, |
| | | :dirs => SNMP_DIR, |
| | | :stopwords => ['src/server/org/opends/server/loggers', 'DebugLogPublisher'], |
| | | :extensions => ["java"], |
| | | :replacements => |
| | | [ |
| | | /import org.opends.server.loggers.debug.DebugTracer;/, |
| | | "import org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;", |
| | | "import org.forgerock.i18n.LocalizableMessage;\nimport org.forgerock.i18n.slf4j.LocalizedLogger;", |
| | | |
| | | /import java.util.logging.Logger;/, |
| | | "import org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;", |
| | | "import org.forgerock.i18n.LocalizableMessage;\nimport org.forgerock.i18n.slf4j.LocalizedLogger;", |
| | | |
| | | /import java.util.logging.Level;\n/, |
| | | /import java.util.logging.Level;/, |
| | | '', |
| | | |
| | | /import org.opends.server.types.DebugLogLevel;\n/, |
| | |
| | | #'', |
| | | |
| | | /DebugTracer TRACER = (DebugLogger.)?getTracer\(\)/, |
| | | "Logger debugLogger = LoggerFactory.getLogger({CLASSNAME}.class)", |
| | | "LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass()", |
| | | |
| | | /^\s*\/\*\*\n.*The tracer object for the debug logger.\n\s*\*\/$\n/, |
| | | '', |
| | |
| | | '', |
| | | |
| | | /if \(debugEnabled\(\)\)\s*{\s* TRACER.debugCaught\(DebugLogLevel.ERROR, (\b.*\b)\);\s*\n\s*}$/, |
| | | 'debugLogger.trace("Error", \1);', |
| | | 'logger.traceException(\1);', |
| | | |
| | | /TRACER\.debugCaught\(DebugLogLevel.ERROR, (\b.*\b)\);/, |
| | | 'debugLogger.trace("Error", \1);', |
| | | 'logger.traceException(\1);', |
| | | |
| | | /TRACER.debug[^(]+\(/, |
| | | 'debugLogger.trace(', |
| | | 'logger.trace(', |
| | | |
| | | /debugLogger.trace\(DebugLogLevel.\b\w+\b, ?/, |
| | | 'debugLogger.trace(', |
| | | /logger.trace\(DebugLogLevel.\b\w+\b, ?/, |
| | | 'logger.trace(', |
| | | |
| | | /debugLogger.trace\(e\)/, |
| | | 'debugLogger.trace("Error", e)', |
| | | /logger.trace\((e|de)\)/, |
| | | 'logger.traceException(\1)', |
| | | |
| | | /(DebugLogger\.|\b)debugEnabled\(\)/, |
| | | 'debugLogger.isTraceEnabled()', |
| | | 'logger.isTraceEnabled()', |
| | | |
| | | /(LOG|logger).log\((Level.)?WARNING, ?/, |
| | | '\1.warn(', |
| | | 'logger.warn(', |
| | | |
| | | /(LOG|logger).log\((Level.)?CONFIG, ?/, |
| | | '\1.info(', |
| | | 'logger.info(', |
| | | |
| | | /(LOG|logger).log\((Level.)?INFO, ?/, |
| | | '\1.debug(', |
| | | 'logger.debug(', |
| | | |
| | | /(LOG|logger).log\((Level.)?SEVERE, ?/, |
| | | '\1.error(', |
| | | 'logger.error(', |
| | | |
| | | /(LOG|logger).log\((Level.)?FINE, ?/, |
| | | '\1.trace(', |
| | | 'logger.trace(', |
| | | |
| | | /Logger.getLogger\((\n\s+)?(\b\w+\b).class.getName\(\)\);/, |
| | | 'LoggerFactory.getLogger(\2.class);', |
| | | /logger.(warn|info|error|debug)([^;]+);/, |
| | | 'logger.\1(LocalizableMessage.raw\2);', |
| | | |
| | | /(private static final|static private final) Logger LOG =[^;]+;/, |
| | | 'private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();', |
| | | ] |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | # List of replacements to run |
| | | REPLACEMENTS = [ MESSAGES ] |
| | | REPLACEMENTS = [ LOGGERS ] |
| | | #REPLACEMENTS = [ MESSAGES, TYPES, DN_TYPES, EXCEPTIONS, LOGGERS, I18N_LOGGERS ] |
| | | |
| | | |
| | |
| | | File.open(message_file).each { |line| |
| | | line = line.chomp |
| | | next if line.size==0 || line[0..0]=="#" || line[0..0]==" " || line[0..0]!=line[0..0].upcase || line[0..5]=="global" |
| | | first, *rest = line.split "_" |
| | | label = rest.join "_" |
| | | token = line.split("=") |
| | | first, *rest = token[0].split "_" |
| | | level_label = if %w(INFO DEBUG NOTICE).include?(first) then first else first.to_s + "_" + rest[0].to_s end |
| | | level = LOG_LEVELS[level_label] |
| | | puts "level #{level}, line #{line}" |
| | | label = first + rest.join("_") |
| | | label = label.gsub("MILD", "").gsub("SEVERE", "").gsub("FATAL", "") |
| | | puts "level #{level}, label #{label}" |
| | | } |
| | | end |
| | | |
| | | end |
| | | |
| | | # Launch all replacements defined in the REPLACEMENTS constant |
| | | #Replace.new.messages("src/messages/messages/admin.properties") |
| | | Replace.new.run |
| | | Replace.new.messages("src/messages/messages/admin.properties") |
| | | #Replace.new.run |
| | |
| | | import java.util.HashMap; |
| | | import java.util.SortedSet; |
| | | import java.util.TreeSet; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.CompositeName; |
| | | import javax.naming.InvalidNameException; |
| | |
| | | import javax.naming.ldap.LdapContext; |
| | | |
| | | import org.opends.admin.ads.util.ConnectionUtils; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.Constants; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.schema.SchemaConstants; |
| | |
| | | */ |
| | | public class ADSContext |
| | | { |
| | | private static final Logger LOG = |
| | | Logger.getLogger(ADSContext.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Enumeration containing the different server properties syntaxes |
| | |
| | | } |
| | | if (!found) |
| | | { |
| | | LOG.log(Level.WARNING, "Could not find public key for "+ |
| | | properties); |
| | | logger.warn(LocalizableMessage.raw("Could not find public key for "+ |
| | | properties)); |
| | | } |
| | | } |
| | | catch (NameNotFoundException x) |
| | | { |
| | | LOG.log(Level.WARNING, "Could not find public key for "+properties); |
| | | logger.warn(LocalizableMessage.raw("Could not find public key for "+properties)); |
| | | } |
| | | finally |
| | | { |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Error while closing LDAP connection after removing admin data", |
| | | ex); |
| | | ex)); |
| | | } |
| | | } |
| | | // Recreate the container entries: |
| | |
| | | } |
| | | catch (InvalidNameException x) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error parsing dn "+dn, x); |
| | | logger.error(LocalizableMessage.raw("Error parsing dn "+dn, x)); |
| | | throw new ADSContextException( |
| | | ADSContextException.ErrorType.ERROR_UNEXPECTED, x); |
| | | } |
| | |
| | | } |
| | | catch (InvalidNameException x) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error parsing rdn "+rdnName, x); |
| | | logger.error(LocalizableMessage.raw("Error parsing rdn "+rdnName, x)); |
| | | throw new ADSContextException( |
| | | ADSContextException.ErrorType.ERROR_UNEXPECTED, x); |
| | | } |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Unexpected error closing enumeration on ADS key pairs", ex); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Unexpected error closing enumeration on ADS key pairs", ex)); |
| | | } |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2007-2010 Sun Microsystems, Inc. |
| | | * Portion Copyright 2013 ForgeRock AS. |
| | | * Portion Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.admin.ads; |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.NameNotFoundException; |
| | | import javax.naming.NamingEnumeration; |
| | |
| | | |
| | | private static final String TRUSTSTORE_DN = "cn=ads-truststore"; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(ServerDescriptor.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Enumeration containing the different server properties that we can keep in |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error calculating host port: "+t+" in "+ |
| | | adsProperties, t); |
| | | logger.warn(LocalizableMessage.raw("Error calculating host port: "+t+" in "+ |
| | | adsProperties, t)); |
| | | } |
| | | break; |
| | | } |
| | | else |
| | | { |
| | | LOG.log(Level.WARNING, "Value for "+portProp+" is null in "+ |
| | | adsProperties); |
| | | logger.warn(LocalizableMessage.raw("Value for "+portProp+" is null in "+ |
| | | adsProperties)); |
| | | } |
| | | } |
| | | } |
| | |
| | | catch (NameNotFoundException nnfe) |
| | | { |
| | | // Ignore |
| | | LOG.log(Level.WARNING, "Error cleaning truststore: "+nnfe, nnfe); |
| | | logger.warn(LocalizableMessage.raw("Error cleaning truststore: "+nnfe, nnfe)); |
| | | } |
| | | } |
| | | |
| | |
| | | import java.util.LinkedHashSet; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.NameNotFoundException; |
| | | import javax.naming.NamingEnumeration; |
| | |
| | | import org.opends.admin.ads.util.ConnectionUtils; |
| | | import org.opends.admin.ads.util.PreferredConnection; |
| | | import org.opends.admin.ads.util.ServerLoader; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.util.Utils; |
| | | |
| | | /** |
| | |
| | | new LinkedHashSet<PreferredConnection>(); |
| | | private final TopologyCacheFilter filter = new TopologyCacheFilter(); |
| | | private final static int MULTITHREAD_TIMEOUT = 90 * 1000; |
| | | private static final Logger LOG = |
| | | Logger.getLogger(TopologyCache.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Constructor of the TopologyCache. |
| | |
| | | ServerDescriptor descriptor = loader.getServerDescriptor(); |
| | | for (ReplicaDescriptor replica : descriptor.getReplicas()) |
| | | { |
| | | LOG.log(Level.INFO, "Handling replica with dn: " |
| | | + replica.getSuffix().getDN()); |
| | | logger.debug(LocalizableMessage.raw("Handling replica with dn: " |
| | | + replica.getSuffix().getDN())); |
| | | |
| | | boolean suffixFound = false; |
| | | LdapName dn = new LdapName(replica.getSuffix().getDN()); |
| | |
| | | } |
| | | catch (InterruptedException ie) |
| | | { |
| | | LOG.log(Level.INFO, ie + " caught and ignored", ie); |
| | | logger.debug(LocalizableMessage.raw(ie + " caught and ignored", ie)); |
| | | } |
| | | if (t.isAlive()) |
| | | { |
| | |
| | | } |
| | | Date endDate = new Date(); |
| | | long workingTime = endDate.getTime() - startDate.getTime(); |
| | | LOG.log(Level.INFO, "Loading ended at " + workingTime + " ms"); |
| | | logger.debug(LocalizableMessage.raw("Loading ended at " + workingTime + " ms")); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Unexpected error reading replica ID: " + t, |
| | | t); |
| | | logger.warn(LocalizableMessage.raw("Unexpected error reading replica ID: " + t, |
| | | t)); |
| | | } |
| | | |
| | | for (ReplicaDescriptor replica : candidateReplicas) |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Unexpected error reading age of oldest change: " + t, t); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Unexpected error reading age of oldest change: " + t, t)); |
| | | } |
| | | } |
| | | s = ConnectionUtils.getFirstValue(sr, "missing-changes"); |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Unexpected error reading missing changes: " + t, t); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Unexpected error reading missing changes: " + t, t)); |
| | | } |
| | | } |
| | | updatedReplicas.add(replica); |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Unexpected error closing enumeration on monitor entries" + t, t); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Unexpected error closing enumeration on monitor entries" + t, t)); |
| | | } |
| | | } |
| | | if (ctx != null) |
| | |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2009 Parametric Technology Corporation (PTC) |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.admin.ads.util; |
| | |
| | | import java.security.PrivateKey; |
| | | import java.security.UnrecoverableKeyException; |
| | | import java.security.cert.X509Certificate; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.net.ssl.KeyManager; |
| | | import javax.net.ssl.KeyManagerFactory; |
| | |
| | | */ |
| | | public class ApplicationKeyManager implements X509KeyManager |
| | | { |
| | | static private final Logger LOG = |
| | | Logger.getLogger(ApplicationKeyManager.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The default keyManager. |
| | |
| | | { |
| | | // Nothing to do. Maybe we should avoid this and be strict, but we are |
| | | // in a best effor mode. |
| | | LOG.log(Level.WARNING, "Error with the algorithm", e); |
| | | logger.warn(LocalizableMessage.raw("Error with the algorithm", e)); |
| | | } |
| | | catch (KeyStoreException e) |
| | | { |
| | | // Nothing to do. Maybe we should avoid this and be strict, but we are |
| | | // in a best effor mode.. |
| | | LOG.log(Level.WARNING, "Error with the keystore", e); |
| | | logger.warn(LocalizableMessage.raw("Error with the keystore", e)); |
| | | } |
| | | catch (UnrecoverableKeyException e) |
| | | { |
| | | // Nothing to do. Maybe we should avoid this and be strict, but we are |
| | | // in a best effor mode. |
| | | LOG.log(Level.WARNING, "Error with the key", e); |
| | | logger.warn(LocalizableMessage.raw("Error with the key", e)); |
| | | } |
| | | catch (NoSuchProviderException e) |
| | | { |
| | | // Nothing to do. Maybe we should avoid this and be strict, but we are |
| | | // in a best effor mode. |
| | | LOG.log(Level.WARNING, "Error with the provider", e); |
| | | logger.warn(LocalizableMessage.raw("Error with the provider", e)); |
| | | } |
| | | } |
| | | } |
| | |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2009 Parametric Technology Corporation (PTC) |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.admin.ads.util; |
| | |
| | | import java.security.cert.CertificateException; |
| | | import java.security.cert.X509Certificate; |
| | | import java.util.ArrayList; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.ldap.LdapName; |
| | | import javax.naming.ldap.Rdn; |
| | |
| | | */ |
| | | HOST_NAME_MISMATCH |
| | | } |
| | | static private final Logger LOG = |
| | | Logger.getLogger(ApplicationTrustManager.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private X509TrustManager trustManager; |
| | | private String lastRefusedAuthType; |
| | |
| | | } |
| | | catch (NoSuchProviderException e) |
| | | { |
| | | LOG.log(Level.WARNING, "Error with the provider: "+provider, e); |
| | | logger.warn(LocalizableMessage.raw("Error with the provider: "+provider, e)); |
| | | } |
| | | catch (NoSuchAlgorithmException e) |
| | | { |
| | | LOG.log(Level.WARNING, "Error with the algorithm: "+algo, e); |
| | | logger.warn(LocalizableMessage.raw("Error with the algorithm: "+algo, e)); |
| | | } |
| | | catch (KeyStoreException e) |
| | | { |
| | | LOG.log(Level.WARNING, "Error with the keystore", e); |
| | | logger.warn(LocalizableMessage.raw("Error with the keystore", e)); |
| | | } |
| | | } |
| | | } |
| | |
| | | matches = hostMatch(value, host); |
| | | if (!matches) |
| | | { |
| | | LOG.log(Level.WARNING, "Subject DN RDN value is: "+value+ |
| | | " and does not match host value: "+host); |
| | | logger.warn(LocalizableMessage.raw("Subject DN RDN value is: "+value+ |
| | | " and does not match host value: "+host)); |
| | | // Try with the accepted hosts names |
| | | for (int i =0; i<acceptedHosts.size() && !matches; i++) |
| | | { |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error parsing subject dn: "+ |
| | | chain[0].getSubjectX500Principal(), t); |
| | | logger.warn(LocalizableMessage.raw("Error parsing subject dn: "+ |
| | | chain[0].getSubjectX500Principal(), t)); |
| | | } |
| | | |
| | | if (!matches) |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2013 ForgeRock AS |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.admin.ads.util; |
| | |
| | | import java.util.HashSet; |
| | | import java.util.Hashtable; |
| | | import java.util.Set; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.CommunicationException; |
| | | import javax.naming.Context; |
| | |
| | | private static final String STARTTLS_PROPERTY = |
| | | "org.opends.connectionutils.isstarttls"; |
| | | |
| | | static private final Logger LOG = |
| | | Logger.getLogger(ConnectionUtils.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Private constructor: this class cannot be instantiated. |
| | |
| | | catch (NamingException ne) |
| | | { |
| | | // This is really strange. Seems like a bug somewhere. |
| | | LOG.log(Level.WARNING, "Naming exception getting environment of "+ctx, |
| | | ne); |
| | | logger.warn(LocalizableMessage.raw("Naming exception getting environment of "+ctx, |
| | | ne)); |
| | | } |
| | | return s; |
| | | } |
| | |
| | | catch (Throwable t) |
| | | { |
| | | // This is really strange. Seems like a bug somewhere. |
| | | LOG.log(Level.WARNING, "Error getting host: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error getting host: "+t, t)); |
| | | } |
| | | return s; |
| | | } |
| | |
| | | catch (Throwable t) |
| | | { |
| | | // This is really strange. Seems like a bug somewhere. |
| | | LOG.log(Level.WARNING, "Error getting port: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error getting port: "+t, t)); |
| | | } |
| | | return port; |
| | | } |
| | |
| | | catch (NamingException ne) |
| | | { |
| | | // This is really strange. Seems like a bug somewhere. |
| | | LOG.log(Level.WARNING, "Naming exception getting environment of "+ctx, |
| | | ne); |
| | | logger.warn(LocalizableMessage.raw("Naming exception getting environment of "+ctx, |
| | | ne)); |
| | | } |
| | | return bindDN; |
| | | } |
| | |
| | | catch (NamingException ne) |
| | | { |
| | | // This is really strange. Seems like a bug somewhere. |
| | | LOG.log(Level.WARNING, "Naming exception getting environment of "+ctx, |
| | | ne); |
| | | logger.warn(LocalizableMessage.raw("Naming exception getting environment of "+ctx, |
| | | ne)); |
| | | } |
| | | return bindPwd; |
| | | } |
| | |
| | | catch (Throwable t) |
| | | { |
| | | // This is really strange. Seems like a bug somewhere. |
| | | LOG.log(Level.WARNING, "Error getting if is SSL "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error getting if is SSL "+t, t)); |
| | | } |
| | | return isSSL; |
| | | } |
| | |
| | | catch (NamingException ne) |
| | | { |
| | | // This is really strange. Seems like a bug somewhere. |
| | | LOG.log(Level.WARNING, "Naming exception getting environment of "+ctx, |
| | | ne); |
| | | logger.warn(LocalizableMessage.raw("Naming exception getting environment of "+ctx, |
| | | ne)); |
| | | } |
| | | return isStartTLS; |
| | | } |
| | |
| | | } |
| | | catch(Exception ex) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Unexpected error closing enumeration on cn=Config entry", ex); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Unexpected error closing enumeration on cn=Config entry", ex)); |
| | | } |
| | | } |
| | | connectedAsAdministrativeUser = true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.admin.ads.util; |
| | |
| | | import java.util.LinkedHashSet; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.AuthenticationException; |
| | | import javax.naming.NamingException; |
| | |
| | | private final LinkedHashSet<PreferredConnection> preferredLDAPURLs; |
| | | private TopologyCacheFilter filter; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(ServerLoader.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Constructor. |
| | |
| | | TopologyCacheException.Type.TIMEOUT, |
| | | new TimeLimitExceededException("Timeout reading server: "+ldapUrl), |
| | | trustManager, ldapUrl); |
| | | LOG.log(Level.WARNING, "Timeout reading server: "+ldapUrl); |
| | | logger.warn(LocalizableMessage.raw("Timeout reading server: "+ldapUrl)); |
| | | } |
| | | super.interrupt(); |
| | | } |
| | |
| | | } |
| | | catch (NoPermissionException npe) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Permissions error reading server: "+getLastLdapUrl(), npe); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Permissions error reading server: "+getLastLdapUrl(), npe)); |
| | | if (!isAdministratorDn()) |
| | | { |
| | | lastException = new TopologyCacheException( |
| | |
| | | } |
| | | catch (AuthenticationException ae) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Authentication exception: "+getLastLdapUrl(), ae); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Authentication exception: "+getLastLdapUrl(), ae)); |
| | | if (!isAdministratorDn()) |
| | | { |
| | | lastException = new TopologyCacheException( |
| | |
| | | } |
| | | catch (NamingException ne) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "NamingException error reading server: "+getLastLdapUrl(), ne); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "NamingException error reading server: "+getLastLdapUrl(), ne)); |
| | | if (ctx == null) |
| | | { |
| | | lastException = |
| | |
| | | { |
| | | if (!isInterrupted) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Generic error reading server: "+getLastLdapUrl(), t); |
| | | LOG.log(Level.WARNING, "server Properties: "+serverProperties); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Generic error reading server: "+getLastLdapUrl(), t)); |
| | | logger.warn(LocalizableMessage.raw("server Properties: "+serverProperties)); |
| | | lastException = |
| | | new TopologyCacheException(TopologyCacheException.Type.BUG, t); |
| | | } |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error parsing authentication DNs.", t); |
| | | logger.warn(LocalizableMessage.raw("Error parsing authentication DNs.", t)); |
| | | } |
| | | return isAdministratorDn; |
| | | } |
| | |
| | | |
| | | import java.io.File; |
| | | import java.io.PrintStream; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.swing.SwingUtilities; |
| | | |
| | | import org.opends.guitools.controlpanel.util.ControlPanelLog; |
| | | import org.opends.messages.AdminToolMessages; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.ui.UIFactory; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.types.InitializationException; |
| | |
| | | /** Suffix for log files. */ |
| | | static public final String LOG_FILE_SUFFIX = ".log"; |
| | | |
| | | static private final Logger LOG = |
| | | Logger.getLogger(ControlPanelLauncher.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Main method invoked by the control-panel script. |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error setting look and feel: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error setting look and feel: "+t, t)); |
| | | } |
| | | |
| | | ControlPanelSplashScreen.main(args); |
| | |
| | | { |
| | | if (ControlPanelLog.isInitialized()) |
| | | { |
| | | LOG.log(Level.WARNING, "Error launching GUI: "+t); |
| | | logger.warn(LocalizableMessage.raw("Error launching GUI: "+t)); |
| | | StringBuilder buf = new StringBuilder(); |
| | | while (t != null) |
| | | { |
| | |
| | | buf.append("Root cause:\n"); |
| | | } |
| | | } |
| | | LOG.log(Level.WARNING, buf.toString()); |
| | | logger.warn(LocalizableMessage.raw(buf.toString())); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | private static ControlPanel controlPanel; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(ControlPanelLauncher.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The main method for this class. |
| | |
| | | { |
| | | if (ControlPanelLog.isInitialized()) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error launching GUI: "+t, t); |
| | | logger.error(LocalizableMessage.raw("Error launching GUI: "+t, t)); |
| | | } |
| | | InternalError error = |
| | | new InternalError("Failed to invoke initialize method"); |
| | |
| | | { |
| | | try |
| | | { |
| | | LOG.log(Level.INFO, "going to call createAndDisplayGUI."); |
| | | logger.debug(LocalizableMessage.raw("going to call createAndDisplayGUI.")); |
| | | controlPanel.createAndDisplayGUI(); |
| | | LOG.log(Level.INFO, "called createAndDisplayGUI."); |
| | | logger.debug(LocalizableMessage.raw("called createAndDisplayGUI.")); |
| | | } catch (Throwable t) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error displaying GUI: "+t, t); |
| | | logger.error(LocalizableMessage.raw("Error displaying GUI: "+t, t)); |
| | | InternalError error = |
| | | new InternalError("Failed to invoke display method"); |
| | | error.initCause(t); |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error calling SwingUtilities.invokeAndWait: "+t, |
| | | t); |
| | | logger.error(LocalizableMessage.raw("Error calling SwingUtilities.invokeAndWait: "+t, |
| | | t)); |
| | | InternalError error = |
| | | new InternalError( |
| | | "Failed to invoke SwingUtilities.invokeAndWait method"); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.browser; |
| | |
| | | import java.util.Set; |
| | | import java.util.SortedSet; |
| | | import java.util.TreeSet; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.NameNotFoundException; |
| | | import javax.naming.NamingException; |
| | |
| | | |
| | | private String filter; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(BrowserController.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Constructor of the BrowserController. |
| | |
| | | } |
| | | catch(Throwable t) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error calling refreshTaskDidProgress: "+t, t); |
| | | logger.error(LocalizableMessage.raw("Error calling refreshTaskDidProgress: "+t, t)); |
| | | } |
| | | } |
| | | }; |
| | |
| | | if (node.getError() != null) { |
| | | if (node.getError().getException() != null) |
| | | { |
| | | LOG.log(Level.SEVERE, "node has error: "+node.getError().getException(), |
| | | node.getError().getException()); |
| | | logger.error(LocalizableMessage.raw("node has error: "+node.getError().getException(), |
| | | node.getError().getException())); |
| | | } |
| | | modifiers |= IconPool.MODIFIER_ERROR; |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | |
| | | import java.util.LinkedHashSet; |
| | | import java.util.Set; |
| | | import java.util.SortedSet; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.NamingException; |
| | | import javax.naming.ldap.InitialLdapContext; |
| | |
| | | private LinkedHashSet<IndexModifiedListener> indexListeners = |
| | | new LinkedHashSet<IndexModifiedListener>(); |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(ControlPanelInfo.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private static ControlPanelInfo instance; |
| | | |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error retrieving UI key store: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error retrieving UI key store: "+t, t)); |
| | | instance.setTrustManager(new ApplicationTrustManager(null)); |
| | | } |
| | | } |
| | |
| | | import java.util.LinkedHashSet; |
| | | import java.util.SortedSet; |
| | | import java.util.TreeSet; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.NamingException; |
| | | import javax.naming.ldap.InitialLdapContext; |
| | |
| | | import org.opends.guitools.controlpanel.ui.nodes.BasicNode; |
| | | import org.opends.guitools.controlpanel.ui.renderer.CustomListCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.quicksetup.UserDataCertificateException; |
| | | import org.opends.quicksetup.ui.CertificateDialog; |
| | |
| | | "organizationalUnit" |
| | | }; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(AbstractBrowseEntriesPanel.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Default constructor. |
| | |
| | | { |
| | | // The suffix node exists but is not a suffix node. |
| | | // Simply log a message. |
| | | LOG.log(Level.WARNING, "Suffix: "+dn+ |
| | | " added as a non suffix node. Exception: "+iae, iae); |
| | | logger.warn(LocalizableMessage.raw("Suffix: "+dn+ |
| | | " added as a non suffix node. Exception: "+iae, iae)); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | // The suffix node exists but is not a suffix node. |
| | | // Simply log a message. |
| | | LOG.log(Level.WARNING, "Suffix: "+dn+ |
| | | " added as a non suffix node. Exception: "+iae, iae); |
| | | logger.warn(LocalizableMessage.raw("Suffix: "+dn+ |
| | | " added as a non suffix node. Exception: "+iae, iae)); |
| | | } |
| | | } |
| | | } |
| | |
| | | ApplicationTrustManager.Cause cause = |
| | | getInfo().getTrustManager().getLastRefusedCause(); |
| | | |
| | | LOG.log(Level.INFO, "Certificate exception cause: "+cause); |
| | | logger.debug(LocalizableMessage.raw("Certificate exception cause: "+cause)); |
| | | UserDataCertificateException.Type excType = null; |
| | | if (cause == ApplicationTrustManager.Cause.NOT_TRUSTED) |
| | | { |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Error parsing ldap url of ldap url.", t); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Error parsing ldap url of ldap url.", t)); |
| | | h = INFO_NOT_AVAILABLE_LABEL.get().toString(); |
| | | p = -1; |
| | | } |
| | |
| | | |
| | | if ((chain != null) && (authType != null) && (host != null)) |
| | | { |
| | | LOG.log(Level.INFO, "Accepting certificate presented by host "+host); |
| | | logger.debug(LocalizableMessage.raw("Accepting certificate presented by host "+host)); |
| | | getInfo().getTrustManager().acceptCertificate(chain, authType, host); |
| | | createdUserDataCtx = createUserDataDirContext(bindDN, bindPassword); |
| | | } |
| | |
| | | { |
| | | if (chain == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The chain is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The chain is null for the UserDataCertificateException")); |
| | | } |
| | | if (authType == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The auth type is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The auth type is null for the UserDataCertificateException")); |
| | | } |
| | | if (host == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The host is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The host is null for the UserDataCertificateException")); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error accepting certificate: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error accepting certificate: "+t, t)); |
| | | } |
| | | } |
| | | } |
| | |
| | | import java.util.GregorianCalendar; |
| | | import java.util.LinkedHashSet; |
| | | import java.util.Set; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.swing.Box; |
| | | import javax.swing.JButton; |
| | |
| | | import org.opends.guitools.controlpanel.ui.renderer.BackupTableCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.BackupInfo; |
| | | import org.opends.server.types.OpenDsException; |
| | |
| | | |
| | | private BackupTableCellRenderer renderer; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(BackupListPanel.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Default constructor. |
| | |
| | | if (!children[i].getName().equals("tasks") && |
| | | (firstThrowable != null)) |
| | | { |
| | | LOG.log(Level.WARNING, "Error searching backup: "+t2, t2); |
| | | logger.warn(LocalizableMessage.raw("Error searching backup: "+t2, t2)); |
| | | } |
| | | } |
| | | } |
| | |
| | | import java.util.LinkedHashSet; |
| | | import java.util.Set; |
| | | import java.util.TreeSet; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.swing.ButtonGroup; |
| | | import javax.swing.DefaultComboBoxModel; |
| | |
| | | import org.opends.guitools.controlpanel.ui.components.ScheduleSummaryPanel; |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.tools.BackUpDB; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.BackupInfo; |
| | |
| | | |
| | | private ScheduleSummaryPanel schedulePanel; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(BackupPanel.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Default constructor. |
| | |
| | | { |
| | | if (!children[i].getName().equals("tasks")) |
| | | { |
| | | LOG.log(Level.WARNING, "Error searching backup: "+t2, t2); |
| | | logger.warn(LocalizableMessage.raw("Error searching backup: "+t2, t2)); |
| | | } |
| | | } |
| | | } |
| | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.swing.Box; |
| | | import javax.swing.ButtonGroup; |
| | |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.Schema; |
| | | |
| | | /** |
| | |
| | | private final static int MAX_IMAGE_HEIGHT = 300; |
| | | private final static int MAX_BASE64_TO_DISPLAY = 3 * 1024; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(BinaryAttributeEditorPanel.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Default constructor. |
| | |
| | | packParentDialog(); |
| | | if (t != null) |
| | | { |
| | | LOG.log(Level.WARNING, "Error reading binary contents: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error reading binary contents: "+t, t)); |
| | | } |
| | | } |
| | | }; |
| | |
| | | |
| | | import java.awt.Component; |
| | | import java.awt.GridBagConstraints; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.swing.Box; |
| | | import javax.swing.JLabel; |
| | |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.types.Schema; |
| | | |
| | | /** |
| | |
| | | private JLabel lImage = Utilities.createDefaultLabel(); |
| | | private byte[] lastBytes; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(BinaryValuePanel.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Default constructor. |
| | |
| | | packParentDialog(); |
| | | if (t != null) |
| | | { |
| | | LOG.log(Level.WARNING, "Error reading binary contents: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error reading binary contents: "+t, t)); |
| | | } |
| | | } |
| | | }; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.util.LinkedHashSet; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.NamingEnumeration; |
| | | import javax.naming.NamingException; |
| | |
| | | import org.opends.guitools.controlpanel.task.OnlineUpdateException; |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.Installation; |
| | | import org.opends.quicksetup.UserData; |
| | | import org.opends.quicksetup.UserDataCertificateException; |
| | |
| | | |
| | | private boolean callOKWhenVisible; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(LocalOrRemotePanel.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Default constructor. |
| | |
| | | |
| | | if (throwable != null) |
| | | { |
| | | LOG.log(Level.INFO, "Error connecting: " + throwable, throwable); |
| | | logger.debug(LocalizableMessage.raw("Error connecting: " + throwable, throwable)); |
| | | |
| | | if (isVersionException(throwable)) |
| | | { |
| | |
| | | ApplicationTrustManager.Cause cause = |
| | | getInfo().getTrustManager().getLastRefusedCause(); |
| | | |
| | | LOG.log(Level.INFO, "Certificate exception cause: "+cause); |
| | | logger.debug(LocalizableMessage.raw("Certificate exception cause: "+cause)); |
| | | UserDataCertificateException.Type excType = null; |
| | | if (cause == ApplicationTrustManager.Cause.NOT_TRUSTED) |
| | | { |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Error parsing ldap url of ldap url.", t); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Error parsing ldap url of ldap url.", t)); |
| | | h = INFO_NOT_AVAILABLE_LABEL.get().toString(); |
| | | p = -1; |
| | | } |
| | |
| | | } |
| | | else if (throwable instanceof ConfigReadException) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Error reading configuration: "+throwable, throwable); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Error reading configuration: "+throwable, throwable)); |
| | | errors.add(((ConfigReadException)throwable).getMessageObject()); |
| | | } |
| | | else |
| | | { |
| | | // This is a bug |
| | | LOG.log(Level.SEVERE, |
| | | "Unexpected error: "+throwable, throwable); |
| | | logger.error(LocalizableMessage.raw( |
| | | "Unexpected error: "+throwable, throwable)); |
| | | errors.add(Utils.getThrowableMsg(INFO_BUG_MSG.get(), throwable)); |
| | | } |
| | | } |
| | |
| | | |
| | | if ((chain != null) && (authType != null) && (host != null)) |
| | | { |
| | | LOG.log(Level.INFO, "Accepting certificate presented by host "+host); |
| | | logger.debug(LocalizableMessage.raw("Accepting certificate presented by host "+host)); |
| | | getInfo().getTrustManager().acceptCertificate(chain, authType, host); |
| | | /* Simulate a click on the OK by calling in the okClicked method. */ |
| | | SwingUtilities.invokeLater(new Runnable() |
| | |
| | | { |
| | | if (chain == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The chain is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The chain is null for the UserDataCertificateException")); |
| | | } |
| | | if (authType == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The auth type is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The auth type is null for the UserDataCertificateException")); |
| | | } |
| | | if (host == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The host is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The host is null for the UserDataCertificateException")); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error accepting certificate: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error accepting certificate: "+t, t)); |
| | | } |
| | | } |
| | | } |
| | |
| | | import java.security.cert.X509Certificate; |
| | | import java.util.Iterator; |
| | | import java.util.LinkedHashSet; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.NamingException; |
| | | import javax.naming.ldap.InitialLdapContext; |
| | |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.UserDataCertificateException; |
| | | import org.opends.quicksetup.ui.CertificateDialog; |
| | | import org.opends.quicksetup.util.UIKeyStore; |
| | |
| | | private JLabel dnLabel; |
| | | private String usedUrl; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(LoginPanel.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Default constructor. |
| | |
| | | boolean handleCertificateException = false; |
| | | if (throwable != null) |
| | | { |
| | | LOG.log(Level.INFO, "Error connecting: " + throwable, throwable); |
| | | logger.debug(LocalizableMessage.raw("Error connecting: " + throwable, throwable)); |
| | | |
| | | if (Utils.isCertificateException(throwable)) |
| | | { |
| | | ApplicationTrustManager.Cause cause = |
| | | getInfo().getTrustManager().getLastRefusedCause(); |
| | | |
| | | LOG.log(Level.INFO, "Certificate exception cause: "+cause); |
| | | logger.debug(LocalizableMessage.raw("Certificate exception cause: "+cause)); |
| | | UserDataCertificateException.Type excType = null; |
| | | if (cause == ApplicationTrustManager.Cause.NOT_TRUSTED) |
| | | { |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Error parsing ldap url of ldap url.", t); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Error parsing ldap url of ldap url.", t)); |
| | | h = INFO_NOT_AVAILABLE_LABEL.get().toString(); |
| | | p = -1; |
| | | } |
| | |
| | | |
| | | if ((chain != null) && (authType != null) && (host != null)) |
| | | { |
| | | LOG.log(Level.INFO, "Accepting certificate presented by host "+host); |
| | | logger.debug(LocalizableMessage.raw("Accepting certificate presented by host "+host)); |
| | | getInfo().getTrustManager().acceptCertificate(chain, authType, host); |
| | | /* Simulate a click on the OK by calling in the okClicked method. */ |
| | | SwingUtilities.invokeLater(new Runnable() |
| | |
| | | { |
| | | if (chain == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The chain is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The chain is null for the UserDataCertificateException")); |
| | | } |
| | | if (authType == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The auth type is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The auth type is null for the UserDataCertificateException")); |
| | | } |
| | | if (host == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The host is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The host is null for the UserDataCertificateException")); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error accepting certificate: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error accepting certificate: "+t, t)); |
| | | } |
| | | } |
| | | } |
| | |
| | | import java.util.Map; |
| | | import java.util.Random; |
| | | import java.util.Set; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.swing.Box; |
| | | import javax.swing.JButton; |
| | |
| | | import org.opends.guitools.controlpanel.ui.renderer.TaskCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.ConfigFromFile; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.tools.tasks.TaskEntry; |
| | |
| | | private JTextArea logs; |
| | | private JLabel noLogsLabel; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(ManageTasksPanel.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Default constructor. |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error getting entry '"+csr.getDN()+"': "+t, t); |
| | | logger.error(LocalizableMessage.raw("Error getting entry '"+csr.getDN()+"': "+t, t)); |
| | | } |
| | | } |
| | | return list; |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error getting entry '"+csr.getDN()+"': "+t, t); |
| | | logger.error(LocalizableMessage.raw("Error getting entry '"+csr.getDN()+"': "+t, t)); |
| | | } |
| | | } |
| | | return list; |
| | |
| | | import java.util.Set; |
| | | import java.util.SortedSet; |
| | | import java.util.TreeSet; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.NamingEnumeration; |
| | | import javax.naming.directory.SearchControls; |
| | |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.LowerCaseComparator; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessageDescriptor; |
| | | import org.opends.quicksetup.ui.CustomHTMLEditorKit; |
| | |
| | | private static final String MAIN_PANEL = "mainPanel"; |
| | | private static final String MESSAGE_PANEL = "messagePanel"; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(StatusGenericPanel.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The error pane. |
| | |
| | | |
| | | if (t != null) |
| | | { |
| | | LOG.log(Level.WARNING, "Error occurred running task: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error occurred running task: "+t, t)); |
| | | if ((task.getReturnCode() != null) && |
| | | (errorDetailCode != null)) |
| | | { |
| | |
| | | catch (Throwable t) |
| | | { |
| | | entry = null; |
| | | LOG.log(Level.WARNING, "Unexpected error: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Unexpected error: "+t, t)); |
| | | } |
| | | */ |
| | | LDAPEntryChangedEvent ev = new LDAPEntryChangedEvent(this, entry); |
| | |
| | | import java.awt.event.ActionListener; |
| | | import java.awt.event.KeyEvent; |
| | | import java.text.ParseException; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.swing.Box; |
| | | import javax.swing.Icon; |
| | |
| | | import org.opends.guitools.controlpanel.datamodel.BinaryValue; |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * A simple panel used in the LDAP entry viewers to display a binary value. |
| | |
| | | |
| | | private final static int THUMBNAIL_HEIGHT = 50; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(BinaryCellPanel.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Default constructor. |
| | |
| | | } |
| | | catch (ParseException pe) |
| | | { |
| | | LOG.log(Level.WARNING, "Error decoding base 64 value: "+pe, pe); |
| | | logger.warn(LocalizableMessage.raw("Error decoding base 64 value: "+pe, pe)); |
| | | Utilities.setWarningLabel(label, ERR_LOADING_IMAGE.get()); |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.util; |
| | |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.PrintStream; |
| | | import java.util.ArrayList; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import org.opends.guitools.controlpanel.event.PrintStreamListener; |
| | | |
| | |
| | | { |
| | | private ArrayList<PrintStreamListener> listeners = |
| | | new ArrayList<PrintStreamListener>(); |
| | | private static final Logger LOG = |
| | | Logger.getLogger(ApplicationPrintStream.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private boolean notifyListeners = true; |
| | | |
| | |
| | | public void println(String msg) |
| | | { |
| | | notifyListenersNewLine(msg); |
| | | LOG.log(Level.INFO, msg); |
| | | logger.debug(LocalizableMessage.raw(msg)); |
| | | } |
| | | |
| | | /** |
| | |
| | | import java.util.SortedSet; |
| | | import java.util.TimeZone; |
| | | import java.util.TreeSet; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.NamingEnumeration; |
| | | import javax.naming.NamingException; |
| | |
| | | { |
| | | private static final String DATABASE_ENVIRONMENT_SUFFIX = |
| | | " Database Environment"; |
| | | private static final Logger LOG = |
| | | Logger.getLogger(ConfigFromDirContext.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private CustomSearchResult rootMonitor; |
| | | private CustomSearchResult jvmMemoryUsage; |
| | |
| | | } |
| | | for (OpenDsException oe : ex) |
| | | { |
| | | LOG.log(Level.WARNING, "Error reading configuration: "+oe, oe); |
| | | logger.warn(LocalizableMessage.raw("Error reading configuration: "+oe, oe)); |
| | | } |
| | | administrativeUsers = Collections.unmodifiableSet(as); |
| | | listeners = Collections.unmodifiableSet(ls); |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error reading monitoring: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error reading monitoring: "+t, t)); |
| | | OnlineUpdateException oupe = new OnlineUpdateException( |
| | | ERR_READING_CONFIG_LDAP.get(t.toString()), t); |
| | | ex.add(oupe); |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error reading task information: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error reading task information: "+t, t)); |
| | | OnlineUpdateException oupe = new OnlineUpdateException( |
| | | ERR_READING_CONFIG_LDAP.get(t.toString()), t); |
| | | ex.add(oupe); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2011 Sun Microsystems, Inc. |
| | | * Portions copyright 2013 ForgeRock, AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.util; |
| | |
| | | import java.util.Set; |
| | | import java.util.SortedSet; |
| | | import java.util.TreeSet; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import org.opends.guitools.controlpanel.datamodel.AbstractIndexDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.BackendDescriptor; |
| | |
| | | */ |
| | | public class ConfigFromFile extends ConfigReader |
| | | { |
| | | private static final Logger LOG = |
| | | Logger.getLogger(ConfigFromFile.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Creates a new instance of this config file handler. No initialization |
| | |
| | | } |
| | | catch (final Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error reading configuration: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error reading configuration: "+t, t)); |
| | | OfflineUpdateException oue = new OfflineUpdateException( |
| | | ERR_READING_CONFIG_LDAP.get(t.getMessage().toString()), t); |
| | | ex.add(oue); |
| | |
| | | |
| | | for (OpenDsException oe : ex) |
| | | { |
| | | LOG.log(Level.WARNING, "Error reading configuration: "+oe, oe); |
| | | logger.warn(LocalizableMessage.raw("Error reading configuration: "+oe, oe)); |
| | | } |
| | | exceptions = Collections.unmodifiableList(ex); |
| | | administrativeUsers = Collections.unmodifiableSet(as); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.util; |
| | |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import org.opends.guitools.controlpanel.datamodel.BackendDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.ConnectionHandlerDescriptor; |
| | |
| | | */ |
| | | public abstract class ConfigReader |
| | | { |
| | | private static final Logger LOG = |
| | | Logger.getLogger(ConfigReader.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | /** |
| | | * The class used to read the configuration from a file. |
| | | */ |
| | |
| | | environmentSettingException = new OfflineUpdateException( |
| | | ERR_CTRL_PANEL_SETTING_ENVIRONMENT.get(t.getMessage().toString()), t); |
| | | } |
| | | LOG.log(Level.INFO, "Environment initialized."); |
| | | logger.debug(LocalizableMessage.raw("Environment initialized.")); |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.guitools.controlpanel.util; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.logging.FileHandler; |
| | | import java.util.logging.SimpleFormatter; |
| | | import java.util.logging.Logger; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.SimpleFormatter; |
| | | |
| | | import java.util.Date; |
| | | import java.text.DateFormat; |
| | | |
| | |
| | | logger.addHandler(fileHandler); |
| | | } |
| | | Logger logger = Logger.getLogger(packages[0]); |
| | | logger.log(Level.INFO, getInitialLogRecord()); |
| | | logger.info(getInitialLogRecord()); |
| | | } |
| | | } |
| | | |
| | |
| | | logger.setUseParentHandlers(false); // disable logging to console |
| | | } |
| | | logger.addHandler(fileHandler); |
| | | logger.log(Level.INFO, getInitialLogRecord()); |
| | | logger.info(getInitialLogRecord()); |
| | | } |
| | | |
| | | /** |
| | |
| | | import java.util.LinkedHashSet; |
| | | import java.util.Set; |
| | | import java.util.Collections; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import java.io.BufferedReader; |
| | | import java.io.File; |
| | | import java.io.FileReader; |
| | |
| | | */ |
| | | public class UninstallCliHelper extends ConsoleApplication { |
| | | |
| | | static private final Logger LOG = |
| | | Logger.getLogger(UninstallCliHelper.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private UninstallerArgumentParser parser; |
| | | |
| | |
| | | outsideDbs = config.getOutsideDbs(); |
| | | } catch (IOException ioe) { |
| | | outsideDbs = Collections.emptySet(); |
| | | LOG.log(Level.INFO, "error determining outside databases", ioe); |
| | | logger.debug(LocalizableMessage.raw("error determining outside databases", ioe)); |
| | | } |
| | | |
| | | try { |
| | | outsideLogs = config.getOutsideLogs(); |
| | | } catch (IOException ioe) { |
| | | outsideLogs = Collections.emptySet(); |
| | | LOG.log(Level.INFO, "error determining outside logs", ioe); |
| | | logger.debug(LocalizableMessage.raw("error determining outside logs", ioe)); |
| | | } |
| | | |
| | | boolean somethingSpecifiedToDelete = |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.SEVERE, "Could not create UninstallData: "+t, t); |
| | | logger.error(LocalizableMessage.raw("Could not create UninstallData: "+t, t)); |
| | | userData.setReplicationServer( |
| | | referencedHostName+":8989"); |
| | | } |
| | |
| | | |
| | | if (adminConnectorUrl == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Error retrieving a valid LDAP URL in conf file."); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Error retrieving a valid LDAP URL in conf file.")); |
| | | if (!parser.isInteractive()) |
| | | { |
| | | LocalizableMessage msg = ERR_COULD_NOT_FIND_VALID_LDAPURL.get(); |
| | |
| | | |
| | | if (isCanceled && !userData.isForceOnError()) |
| | | { |
| | | LOG.log(Level.INFO, "User cancelled uninstall."); |
| | | logger.debug(LocalizableMessage.raw("User cancelled uninstall.")); |
| | | userData = null; |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Exception: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Exception: "+t, t)); |
| | | if (t instanceof UserDataException) |
| | | { |
| | | throw (UserDataException)t; |
| | |
| | | throw new IllegalStateException("Unexpected error: "+t, t); |
| | | } |
| | | } |
| | | LOG.log(Level.INFO, "Successfully created user data"); |
| | | logger.debug(LocalizableMessage.raw("Successfully created user data")); |
| | | return userData; |
| | | } |
| | | |
| | |
| | | } |
| | | catch (CLIException ce) |
| | | { |
| | | LOG.log(Level.WARNING, "Error reading input: "+ce, ce); |
| | | logger.warn(LocalizableMessage.raw("Error reading input: "+ce, ce)); |
| | | throw new UserDataException(null, ce.getMessageObject(), ce); |
| | | } |
| | | |
| | |
| | | ((i == 7) && (outsideLogs.size() == 0)); |
| | | if (!ignore) |
| | | { |
| | | answers[i] = askConfirmation(msgs[i], true, LOG); |
| | | answers[i] = askConfirmation(msgs[i], true, logger); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error processing task: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error processing task: "+t, t)); |
| | | throw new UserDataException(Step.CONFIRM_UNINSTALL, |
| | | Utils.getThrowableMsg(INFO_BUG_MSG.get(), t)); |
| | | } |
| | | LOG.log(Level.INFO, "interactive: "+interactive); |
| | | LOG.log(Level.INFO, "forceOnError: "+forceOnError); |
| | | LOG.log(Level.INFO, "conf.isADS(): "+conf.isADS()); |
| | | LOG.log(Level.INFO, "conf.isReplicationServer(): "+ |
| | | conf.isReplicationServer()); |
| | | LOG.log(Level.INFO, "conf.isServerRunning(): "+conf.isServerRunning()); |
| | | logger.debug(LocalizableMessage.raw("interactive: "+interactive)); |
| | | logger.debug(LocalizableMessage.raw("forceOnError: "+forceOnError)); |
| | | logger.debug(LocalizableMessage.raw("conf.isADS(): "+conf.isADS())); |
| | | logger.debug(LocalizableMessage.raw("conf.isReplicationServer(): "+ |
| | | conf.isReplicationServer())); |
| | | logger.debug(LocalizableMessage.raw("conf.isServerRunning(): "+conf.isServerRunning())); |
| | | if (conf.isADS() && conf.isReplicationServer()) |
| | | { |
| | | if (conf.isServerRunning()) |
| | |
| | | boolean errorWithRemote = |
| | | !updateUserUninstallDataWithRemoteServers(userData); |
| | | cancelled = errorWithRemote && !parser.isForceOnError(); |
| | | LOG.log(Level.INFO, "Non interactive mode. errorWithRemote: "+ |
| | | errorWithRemote); |
| | | logger.debug(LocalizableMessage.raw("Non interactive mode. errorWithRemote: "+ |
| | | errorWithRemote)); |
| | | } |
| | | } |
| | | else |
| | |
| | | /* During all the confirmations, the server might be stopped. */ |
| | | userData.setStopServer( |
| | | Installation.getLocal().getStatus().isServerRunning()); |
| | | LOG.log(Level.INFO, "Must stop the server after confirmations? "+ |
| | | userData.getStopServer()); |
| | | logger.debug(LocalizableMessage.raw("Must stop the server after confirmations? "+ |
| | | userData.getStopServer())); |
| | | } |
| | | } |
| | | else |
| | |
| | | /* During all the confirmations, the server might be stopped. */ |
| | | userData.setStopServer( |
| | | Installation.getLocal().getStatus().isServerRunning()); |
| | | LOG.log(Level.INFO, "Must stop the server after confirmations? "+ |
| | | userData.getStopServer()); |
| | | logger.debug(LocalizableMessage.raw("Must stop the server after confirmations? "+ |
| | | userData.getStopServer())); |
| | | } |
| | | } |
| | | catch (CLIException ce) |
| | |
| | | } |
| | | } |
| | | } |
| | | LOG.log(Level.INFO, "cancelled: "+cancelled); |
| | | logger.debug(LocalizableMessage.raw("cancelled: "+cancelled)); |
| | | return cancelled; |
| | | } |
| | | |
| | |
| | | */ |
| | | private boolean confirmToStopServer() throws CLIException |
| | | { |
| | | return askConfirmation(INFO_CLI_UNINSTALL_CONFIRM_STOP.get(), true, LOG); |
| | | return askConfirmation(INFO_CLI_UNINSTALL_CONFIRM_STOP.get(), true, logger); |
| | | } |
| | | |
| | | /** |
| | |
| | | private boolean confirmDeleteFiles() throws CLIException |
| | | { |
| | | return askConfirmation(INFO_CLI_UNINSTALL_CONFIRM_DELETE_FILES.get(), true, |
| | | LOG); |
| | | logger); |
| | | } |
| | | |
| | | /** |
| | |
| | | private boolean confirmToUpdateRemote() throws CLIException |
| | | { |
| | | return askConfirmation(INFO_CLI_UNINSTALL_CONFIRM_UPDATE_REMOTE.get(), true, |
| | | LOG); |
| | | logger); |
| | | } |
| | | |
| | | /** |
| | |
| | | private boolean confirmToUpdateRemoteAndStart() throws CLIException |
| | | { |
| | | return askConfirmation( |
| | | INFO_CLI_UNINSTALL_CONFIRM_UPDATE_REMOTE_AND_START.get(), true, LOG); |
| | | INFO_CLI_UNINSTALL_CONFIRM_UPDATE_REMOTE_AND_START.get(), true, logger); |
| | | } |
| | | |
| | | /** |
| | |
| | | private boolean promptToProvideAuthenticationAgain() throws CLIException |
| | | { |
| | | return askConfirmation( |
| | | INFO_UNINSTALL_CONFIRM_PROVIDE_AUTHENTICATION_AGAIN.get(), true, LOG); |
| | | INFO_UNINSTALL_CONFIRM_PROVIDE_AUTHENTICATION_AGAIN.get(), true, logger); |
| | | } |
| | | |
| | | /** |
| | |
| | | String adminConnectorUrl = info.getAdminConnectorURL(); |
| | | if (adminConnectorUrl == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Error retrieving a valid Administration Connector URL in conf file."); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Error retrieving a valid Administration Connector URL in conf file.")); |
| | | LocalizableMessage msg = ERR_COULD_NOT_FIND_VALID_LDAPURL.get(); |
| | | throw new ApplicationException(ReturnCode.APPLICATION_ERROR, msg, |
| | | null); |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error parsing url: "+adminConnectorUrl); |
| | | logger.error(LocalizableMessage.raw("Error parsing url: "+adminConnectorUrl)); |
| | | } |
| | | LDAPManagementContextFactory factory = |
| | | new LDAPManagementContextFactory(alwaysSSL); |
| | |
| | | |
| | | if (adminConnectorUrl == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Error retrieving a valid Administration Connector URL in conf file."); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Error retrieving a valid Administration Connector URL in conf file.")); |
| | | LocalizableMessage msg = ERR_COULD_NOT_FIND_VALID_LDAPURL.get(); |
| | | throw new ApplicationException(ReturnCode.APPLICATION_ERROR, msg, |
| | | null); |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.INFO, "Error closing connection: "+t, t); |
| | | logger.debug(LocalizableMessage.raw("Error closing connection: "+t, t)); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.SEVERE, "Could not create UninstallData: "+t, t); |
| | | logger.error(LocalizableMessage.raw("Could not create UninstallData: "+t, t)); |
| | | } |
| | | } |
| | | userData.setUpdateRemoteReplication(accepted); |
| | |
| | | } |
| | | catch (CLIException ce) |
| | | { |
| | | LOG.log(Level.WARNING, "Error reading input: "+ce, ce); |
| | | logger.warn(LocalizableMessage.raw("Error reading input: %s", ce), ce); |
| | | } |
| | | return s; |
| | | } |
| | | |
| | | private boolean startServer(boolean supressOutput) |
| | | { |
| | | LOG.log(Level.INFO, "startServer, supressOutput: "+supressOutput); |
| | | logger.debug(LocalizableMessage.raw("startServer, supressOutput: "+supressOutput)); |
| | | boolean serverStarted = false; |
| | | Application application = new Application() |
| | | { |
| | |
| | | printlnProgress(); |
| | | } |
| | | serverStarted = Installation.getLocal().getStatus().isServerRunning(); |
| | | LOG.log(Level.INFO, "server started successfully. serverStarted: "+ |
| | | serverStarted); |
| | | logger.debug(LocalizableMessage.raw("server started successfully. serverStarted: "+ |
| | | serverStarted)); |
| | | } |
| | | catch (ApplicationException ae) |
| | | { |
| | | LOG.log(Level.WARNING, "ApplicationException: "+ae, ae); |
| | | logger.warn(LocalizableMessage.raw("ApplicationException: "+ae, ae)); |
| | | if (!supressOutput) |
| | | { |
| | | printErrorMessage(ae.getMessageObject()); |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.SEVERE, "Unexpected error: "+t, t); |
| | | logger.error(LocalizableMessage.raw("Unexpected error: "+t, t)); |
| | | throw new IllegalStateException("Unexpected error: "+t, t); |
| | | } |
| | | return serverStarted; |
| | |
| | | |
| | | LocalizableMessage exceptionMsg = null; |
| | | |
| | | LOG.log(Level.INFO, "Updating user data with remote servers."); |
| | | logger.debug(LocalizableMessage.raw("Updating user data with remote servers.")); |
| | | |
| | | InitialLdapContext ctx = null; |
| | | try |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error parsing url: "+adminConnectorUrl); |
| | | logger.error(LocalizableMessage.raw("Error parsing url: "+adminConnectorUrl)); |
| | | } |
| | | ctx = createAdministrativeContext(host, port, useSSL, useStartTLS, dn, |
| | | pwd, getConnectTimeout(), |
| | |
| | | forceTrustManagerInitialization(); |
| | | updateTrustManager(userData, ci); |
| | | } |
| | | LOG.log(Level.INFO, "Reloading topology"); |
| | | logger.debug(LocalizableMessage.raw("Reloading topology")); |
| | | TopologyCache cache = new TopologyCache(adsContext, |
| | | userData.getTrustManager(), getConnectTimeout()); |
| | | cache.getFilter().setSearchMonitoringInformation(false); |
| | |
| | | } |
| | | catch (NamingException ne) |
| | | { |
| | | LOG.log(Level.WARNING, "Error connecting to server: "+ne, ne); |
| | | logger.warn(LocalizableMessage.raw("Error connecting to server: "+ne, ne)); |
| | | if (Utils.isCertificateException(ne)) |
| | | { |
| | | String details = ne.getMessage() != null ? |
| | |
| | | } |
| | | } catch (TopologyCacheException te) |
| | | { |
| | | LOG.log(Level.WARNING, "Error connecting to server: "+te, te); |
| | | logger.warn(LocalizableMessage.raw("Error connecting to server: "+te, te)); |
| | | exceptionMsg = Utils.getMessage(te); |
| | | |
| | | } catch (ApplicationException ae) |
| | |
| | | |
| | | } catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error connecting to server: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error connecting to server: "+t, t)); |
| | | exceptionMsg = Utils.getThrowableMsg(INFO_BUG_MSG.get(), t); |
| | | } |
| | | finally |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.INFO, "Error closing connection: "+t, t); |
| | | logger.debug(LocalizableMessage.raw("Error closing connection: "+t, t)); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | accepted = askConfirmation( |
| | | ERR_UNINSTALL_NOT_UPDATE_REMOTE_PROMPT.get(), |
| | | false, LOG); |
| | | false, logger); |
| | | } |
| | | catch (CLIException ce) |
| | | { |
| | |
| | | } |
| | | } |
| | | userData.setUpdateRemoteReplication(accepted); |
| | | LOG.log(Level.INFO, "accepted: "+accepted); |
| | | logger.debug(LocalizableMessage.raw("accepted: "+accepted)); |
| | | return accepted; |
| | | } |
| | | |
| | |
| | | boolean reloadTopologyCache = false; |
| | | boolean interactive = parser.isInteractive(); |
| | | |
| | | LOG.log(Level.INFO, "Handle topology cache."); |
| | | logger.debug(LocalizableMessage.raw("Handle topology cache.")); |
| | | |
| | | Set<TopologyCacheException> exceptions = |
| | | new HashSet<TopologyCacheException>(); |
| | |
| | | /* Check the exceptions and see if we throw them or not. */ |
| | | for (TopologyCacheException e : exceptions) |
| | | { |
| | | LOG.log(Level.INFO, "Analyzing exception: "+e, e); |
| | | logger.debug(LocalizableMessage.raw("Analyzing exception: "+e, e)); |
| | | if (stopProcessing) |
| | | { |
| | | break; |
| | |
| | | { |
| | | println(); |
| | | if (ci.promptForCertificateConfirmation(e.getCause(), |
| | | e.getTrustManager(), e.getLdapUrl(), true, LOG)) |
| | | e.getTrustManager(), e.getLdapUrl(), true, logger)) |
| | | { |
| | | stopProcessing = true; |
| | | reloadTopologyCache = true; |
| | |
| | | returnValue = askConfirmation( |
| | | ERR_UNINSTALL_READING_REGISTERED_SERVERS_CONFIRM_UPDATE_REMOTE.get( |
| | | Utils.getMessageFromCollection(exceptionMsgs, |
| | | Constants.LINE_SEPARATOR).toString()), true, LOG); |
| | | Constants.LINE_SEPARATOR).toString()), true, logger); |
| | | } |
| | | catch (CLIException ce) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | LOG.log(Level.INFO, "exceptionMsgs: "+exceptionMsgs); |
| | | logger.debug(LocalizableMessage.raw("exceptionMsgs: "+exceptionMsgs)); |
| | | if (exceptionMsgs.size() > 0) |
| | | { |
| | | if (parser.isForceOnError()) |
| | |
| | | returnValue = true; |
| | | } |
| | | } |
| | | LOG.log(Level.INFO, "Return value: "+returnValue); |
| | | logger.debug(LocalizableMessage.raw("Return value: "+returnValue)); |
| | | return returnValue; |
| | | } |
| | | |
| | |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | LOG.log(Level.WARNING, "Error initializing trust store: "+ae, ae); |
| | | logger.warn(LocalizableMessage.raw("Error initializing trust store: "+ae, ae)); |
| | | } |
| | | forceNonInteractive = false; |
| | | } |
| | |
| | | private void printErrorMessage(LocalizableMessage msg) |
| | | { |
| | | super.println(msg); |
| | | LOG.log(Level.WARNING, msg.toString()); |
| | | logger.warn(LocalizableMessage.raw(msg.toString())); |
| | | } |
| | | |
| | | /** |
| | |
| | | import java.net.URI; |
| | | import java.security.cert.X509Certificate; |
| | | import java.util.*; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import java.awt.event.WindowEvent; |
| | | |
| | | import javax.naming.Context; |
| | |
| | | |
| | | private UninstallCliHelper cliHelper = new UninstallCliHelper(); |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(Uninstaller.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private LoginDialog loginDialog; |
| | | private ProgressDialog startProgressDlg; |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error enabling admin framework class loader: "+t, |
| | | t); |
| | | logger.warn(LocalizableMessage.raw("Error enabling admin framework class loader: "+t, |
| | | t)); |
| | | } |
| | | |
| | | // Switch off class name validation in client. |
| | |
| | | // Switch off attribute type name validation in client. |
| | | AttributeTypePropertyDefinition.setCheckSchema(false); |
| | | |
| | | LOG.log(Level.INFO, "Uninstaller is created."); |
| | | logger.debug(LocalizableMessage.raw("Uninstaller is created.")); |
| | | } |
| | | /** |
| | | * {@inheritDoc} |
| | |
| | | catch (UserDataException uude) { |
| | | throw uude; |
| | | } catch (Throwable t) { |
| | | LOG.log(Level.WARNING, "Error processing task: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error processing task: "+t, t)); |
| | | throw new UserDataException(Step.CONFIRM_UNINSTALL, |
| | | getThrowableMsg(INFO_BUG_MSG.get(), t)); |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | LOG.log(Level.WARNING, "Error processing task: "+throwable, |
| | | throwable); |
| | | logger.warn(LocalizableMessage.raw("Error processing task: "+throwable, |
| | | throwable)); |
| | | qs.displayError(LocalizableMessage.raw(throwable.toString()), |
| | | INFO_ERROR_TITLE.get()); |
| | | } |
| | |
| | | */ |
| | | public void run() { |
| | | runStarted = true; |
| | | LOG.log(Level.INFO, "run of the Uninstaller started"); |
| | | logger.debug(LocalizableMessage.raw("run of the Uninstaller started")); |
| | | |
| | | initMaps(); |
| | | PrintStream origErr = System.err; |
| | |
| | | |
| | | boolean displaySeparator = false; |
| | | |
| | | LOG.log(Level.INFO, "Update remote replication? "+ |
| | | getUninstallUserData().getUpdateRemoteReplication()); |
| | | logger.debug(LocalizableMessage.raw("Update remote replication? "+ |
| | | getUninstallUserData().getUpdateRemoteReplication())); |
| | | if (getUninstallUserData().getUpdateRemoteReplication()) |
| | | { |
| | | status = UninstallProgressStep.UNCONFIGURING_REPLICATION; |
| | |
| | | displaySeparator = true; |
| | | } |
| | | |
| | | LOG.log(Level.INFO, "Stop server? "+getUserData().getStopServer()); |
| | | logger.debug(LocalizableMessage.raw("Stop server? "+getUserData().getStopServer())); |
| | | if (getUserData().getStopServer()) { |
| | | status = UninstallProgressStep.STOPPING_SERVER; |
| | | if (displaySeparator && isVerbose()) { |
| | |
| | | } |
| | | displaySeparator = true; |
| | | } |
| | | LOG.log(Level.INFO, "Is Windows Service Enabled? "+ |
| | | isWindowsServiceEnabled()); |
| | | logger.debug(LocalizableMessage.raw("Is Windows Service Enabled? "+ |
| | | isWindowsServiceEnabled())); |
| | | if (isWindowsServiceEnabled()) { |
| | | status = UninstallProgressStep.DISABLING_WINDOWS_SERVICE; |
| | | if (displaySeparator && isVerbose()) { |
| | |
| | | } |
| | | |
| | | } catch (ApplicationException ex) { |
| | | LOG.log(Level.SEVERE, "Error: "+ex, ex); |
| | | logger.error(LocalizableMessage.raw("Error: "+ex, ex)); |
| | | ue = ex; |
| | | status = UninstallProgressStep.FINISHED_WITH_ERROR; |
| | | LocalizableMessage msg = getFormattedError(ex, true); |
| | | notifyListeners(msg); |
| | | } |
| | | catch (Throwable t) { |
| | | LOG.log(Level.SEVERE, "Error: "+t, t); |
| | | logger.error(LocalizableMessage.raw("Error: "+t, t)); |
| | | ue = new ApplicationException( |
| | | ReturnCode.BUG, |
| | | getThrowableMsg(INFO_BUG_MSG.get(), t), t); |
| | |
| | | !equalsOrDescendant(file, parent); |
| | | } |
| | | |
| | | LOG.log(Level.INFO, "accept for :"+file+" is: "+accept); |
| | | logger.debug(LocalizableMessage.raw("accept for :"+file+" is: "+accept)); |
| | | return accept; |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (NamingException ne) |
| | | { |
| | | LOG.log(Level.WARNING, "Could not find local server: "+ne, ne); |
| | | logger.warn(LocalizableMessage.raw("Could not find local server: "+ne, ne)); |
| | | getUninstallUserData().setLocalServerUrl("ldap://localhost:389"); |
| | | } |
| | | getUninstallUserData().setReplicationServer( |
| | |
| | | { |
| | | public TopologyCache processBackgroundTask() throws Throwable |
| | | { |
| | | LOG.log(Level.INFO, "Loading Topology Cache in askForAuthentication"); |
| | | logger.debug(LocalizableMessage.raw("Loading Topology Cache in askForAuthentication")); |
| | | ADSContext adsContext = new ADSContext(ctx); |
| | | TopologyCache cache = new TopologyCache(adsContext, |
| | | getTrustManager(), getConnectTimeout()); |
| | |
| | | qs.getDialog().workerFinished(); |
| | | if (throwable != null) |
| | | { |
| | | LOG.log(Level.WARNING, "Throwable: "+throwable, throwable); |
| | | logger.warn(LocalizableMessage.raw("Throwable: "+throwable, throwable)); |
| | | if (throwable instanceof TopologyCacheException) |
| | | { |
| | | qs.displayError( |
| | |
| | | getThrowableMsg(INFO_BUG_MSG.get(), throwable), |
| | | INFO_ERROR_TITLE.get()); |
| | | } |
| | | LOG.log(Level.INFO, "Error was displayed"); |
| | | logger.debug(LocalizableMessage.raw("Error was displayed")); |
| | | } |
| | | else |
| | | { |
| | |
| | | */ |
| | | private void handleTopologyCache(QuickSetup qs, TopologyCache cache) |
| | | { |
| | | LOG.log(Level.INFO, "Handling TopologyCache"); |
| | | logger.debug(LocalizableMessage.raw("Handling TopologyCache")); |
| | | boolean stopProcessing = false; |
| | | Set<TopologyCacheException> exceptions = |
| | | new HashSet<TopologyCacheException>(); |
| | |
| | | /* Check the exceptions and see if we throw them or not. */ |
| | | for (TopologyCacheException e : exceptions) |
| | | { |
| | | LOG.log(Level.INFO, "Analyzing exception: "+e, e); |
| | | logger.debug(LocalizableMessage.raw("Analyzing exception: "+e, e)); |
| | | if (stopProcessing) |
| | | { |
| | | break; |
| | |
| | | { |
| | | cause = e.getTrustManager().getLastRefusedCause(); |
| | | } |
| | | LOG.log(Level.INFO, "Certificate exception cause: "+cause); |
| | | logger.debug(LocalizableMessage.raw("Certificate exception cause: "+cause)); |
| | | if (cause == ApplicationTrustManager.Cause.NOT_TRUSTED) |
| | | { |
| | | excType = UserDataCertificateException.Type.NOT_TRUSTED; |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Error parsing ldap url of TopologyCacheException.", t); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Error parsing ldap url of TopologyCacheException.", t)); |
| | | h = INFO_NOT_AVAILABLE_LABEL.get().toString(); |
| | | p = -1; |
| | | } |
| | |
| | | |
| | | if ((chain != null) && (authType != null) && (host != null)) |
| | | { |
| | | LOG.log(Level.INFO, "Accepting certificate presented by host "+host); |
| | | logger.debug(LocalizableMessage.raw("Accepting certificate presented by host "+host)); |
| | | getTrustManager().acceptCertificate(chain, authType, host); |
| | | BackgroundTask<TopologyCache> worker = |
| | | new BackgroundTask<TopologyCache>() |
| | | { |
| | | public TopologyCache processBackgroundTask() throws Throwable |
| | | { |
| | | LOG.log(Level.INFO, "Reloading topology"); |
| | | logger.debug(LocalizableMessage.raw("Reloading topology")); |
| | | cache.getFilter().setSearchMonitoringInformation(false); |
| | | cache.reloadTopology(); |
| | | return cache; |
| | |
| | | { |
| | | if (chain == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The chain is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The chain is null for the UserDataCertificateException")); |
| | | } |
| | | if (authType == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The auth type is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The auth type is null for the UserDataCertificateException")); |
| | | } |
| | | if (host == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The host is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The host is null for the UserDataCertificateException")); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error accepting certificate: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error accepting certificate: "+t, t)); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | if (serverADSProperties == null) |
| | | { |
| | | LOG.log(Level.WARNING, "The server ADS properties for the server to "+ |
| | | "uninstall could not be found."); |
| | | logger.warn(LocalizableMessage.raw("The server ADS properties for the server to "+ |
| | | "uninstall could not be found.")); |
| | | } |
| | | |
| | | for (ServerDescriptor server : servers) |
| | |
| | | |
| | | if (!hasReferences) |
| | | { |
| | | LOG.log(Level.INFO, "No references in: "+ server.getHostPort(true)); |
| | | logger.debug(LocalizableMessage.raw("No references in: "+ server.getHostPort(true))); |
| | | } |
| | | if (hasReferences) |
| | | { |
| | | LOG.log(Level.INFO, "Updating references in: "+ server.getHostPort(true)); |
| | | logger.debug(LocalizableMessage.raw("Updating references in: "+ server.getHostPort(true))); |
| | | notifyListeners(getFormattedWithPoints( |
| | | INFO_PROGRESS_REMOVING_REFERENCES.get(server.getHostPort(true)))); |
| | | InitialLdapContext ctx = null; |
| | |
| | | catch (ApplicationException ae) |
| | | { |
| | | errorOnRemoteOccurred = true; |
| | | LOG.log(Level.INFO, "Error updating replication references in: "+ |
| | | server.getHostPort(true), ae); |
| | | logger.debug(LocalizableMessage.raw("Error updating replication references in: "+ |
| | | server.getHostPort(true), ae)); |
| | | |
| | | if (!getUninstallUserData().isForceOnError()) |
| | | { |
| | |
| | | } |
| | | if (replServer != null) |
| | | { |
| | | LOG.log(Level.INFO, "Updating references in replication server on "+ |
| | | serverDisplay+"."); |
| | | logger.debug(LocalizableMessage.raw("Updating references in replication server on "+ |
| | | serverDisplay+".")); |
| | | replServers.remove(replServer); |
| | | if (replServers.size() > 0) |
| | | { |
| | |
| | | } |
| | | if (replServer != null) |
| | | { |
| | | LOG.log(Level.INFO, "Updating references in domain " + |
| | | domain.getBaseDN()+" on " + serverDisplay + "."); |
| | | logger.debug(LocalizableMessage.raw("Updating references in domain " + |
| | | domain.getBaseDN()+" on " + serverDisplay + ".")); |
| | | replServers.remove(replServer); |
| | | if (replServers.size() > 0) |
| | | { |
| | |
| | | catch (ManagedObjectNotFoundException monfe) |
| | | { |
| | | // It does not exist. |
| | | LOG.log(Level.INFO, "No synchronization found on "+ serverDisplay+".", |
| | | monfe); |
| | | logger.debug(LocalizableMessage.raw("No synchronization found on "+ serverDisplay+".", |
| | | monfe)); |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Error removing references in replication server on "+ |
| | | serverDisplay+": "+t, t); |
| | | serverDisplay+": "+t, t)); |
| | | LocalizableMessage errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get( |
| | | serverDisplay, t.toString()); |
| | | throw new ApplicationException( |
| | |
| | | { |
| | | if (adsContext.hasAdminData() && (serverADSProperties != null)) |
| | | { |
| | | LOG.log(Level.INFO, "Unregistering server on ADS of server "+ |
| | | logger.debug(LocalizableMessage.raw("Unregistering server on ADS of server "+ |
| | | ConnectionUtils.getHostPort(ctx)+". Properties: "+ |
| | | serverADSProperties); |
| | | serverADSProperties)); |
| | | adsContext.unregisterServer(serverADSProperties); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Failing checking the port: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Failing checking the port: "+t, t)); |
| | | } |
| | | } |
| | | else |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Failing checking host names: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Failing checking host names: "+t, t)); |
| | | } |
| | | isServerToUninstall = hostNameEquals; |
| | | } |
| | |
| | | import java.util.HashMap; |
| | | import java.util.HashSet; |
| | | import java.util.Set; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | import java.io.IOException; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import java.io.IOException; |
| | | |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class ConfirmUninstallPanel extends QuickSetupStepPanel |
| | | { |
| | | private static final Logger LOG = |
| | | Logger.getLogger(ConfirmUninstallPanel.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private static final long serialVersionUID = 81730510134697056L; |
| | | |
| | |
| | | try { |
| | | outsideDbs = config.getOutsideDbs(); |
| | | } catch (IOException ioe) { |
| | | LOG.log(Level.INFO, "Unable to determin outside databases", ioe); |
| | | logger.debug(LocalizableMessage.raw("Unable to determin outside databases", ioe)); |
| | | } |
| | | |
| | | try { |
| | | outsideLogs = config.getOutsideLogs(); |
| | | } catch (IOException ioe) { |
| | | LOG.log(Level.INFO, "Unable to determin outside logs", ioe); |
| | | logger.debug(LocalizableMessage.raw("Unable to determin outside logs", ioe)); |
| | | } |
| | | |
| | | |
| | |
| | | import java.net.URI; |
| | | import java.security.cert.X509Certificate; |
| | | import java.util.ArrayList; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.NamingException; |
| | | import javax.naming.ldap.InitialLdapContext; |
| | |
| | | import org.opends.quicksetup.util.UIKeyStore; |
| | | import org.opends.quicksetup.util.Utils; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | |
| | | |
| | | private String usedUrl; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(LoginDialog.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Constructor of the LoginDialog. |
| | |
| | | { |
| | | if (throwable != null) |
| | | { |
| | | LOG.log(Level.INFO, "Error connecting: " + throwable, throwable); |
| | | logger.debug(LocalizableMessage.raw("Error connecting: " + throwable, throwable)); |
| | | if (Utils.isCertificateException(throwable)) |
| | | { |
| | | ApplicationTrustManager.Cause cause = |
| | | trustManager.getLastRefusedCause(); |
| | | |
| | | LOG.log(Level.INFO, "Certificate exception cause: "+cause); |
| | | logger.debug(LocalizableMessage.raw("Certificate exception cause: "+cause)); |
| | | UserDataCertificateException.Type excType = null; |
| | | if (cause == ApplicationTrustManager.Cause.NOT_TRUSTED) |
| | | { |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Error parsing ldap url of ldap url.", t); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Error parsing ldap url of ldap url.", t)); |
| | | h = INFO_NOT_AVAILABLE_LABEL.get().toString(); |
| | | p = -1; |
| | | } |
| | |
| | | else |
| | | { |
| | | // This is a bug |
| | | LOG.log(Level.SEVERE, "Unexpected throwable: "+throwable, |
| | | throwable); |
| | | logger.error(LocalizableMessage.raw("Unexpected throwable: "+throwable, |
| | | throwable)); |
| | | displayError( |
| | | Utils.getThrowableMsg(INFO_BUG_MSG.get(), throwable), |
| | | INFO_ERROR_TITLE.get()); |
| | |
| | | |
| | | if ((chain != null) && (authType != null) && (host != null)) |
| | | { |
| | | LOG.log(Level.INFO, "Accepting certificate presented by host "+host); |
| | | logger.debug(LocalizableMessage.raw("Accepting certificate presented by host "+host)); |
| | | getTrustManager().acceptCertificate(chain, authType, host); |
| | | /* Simulate a click on the OK by calling in the okClicked method. */ |
| | | SwingUtilities.invokeLater(new Runnable() |
| | |
| | | { |
| | | if (chain == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The chain is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The chain is null for the UserDataCertificateException")); |
| | | } |
| | | if (authType == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The auth type is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The auth type is null for the UserDataCertificateException")); |
| | | } |
| | | if (host == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The host is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The host is null for the UserDataCertificateException")); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error accepting certificate: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error accepting certificate: "+t, t)); |
| | | } |
| | | } |
| | | } |
| | |
| | | import java.io.File; |
| | | import java.util.LinkedHashSet; |
| | | import java.util.Map; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.NamingException; |
| | | import javax.naming.ldap.InitialLdapContext; |
| | |
| | | */ |
| | | public abstract class Application implements ProgressNotifier, Runnable { |
| | | |
| | | static private final Logger LOG = |
| | | Logger.getLogger(Application.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** Represents current install state. */ |
| | | protected CurrentInstallStatus installStatus; |
| | |
| | | appClass = Class.forName(appClassName); |
| | | app = (GuiApplication) appClass.newInstance(); |
| | | } catch (ClassNotFoundException e) { |
| | | LOG.log(Level.INFO, "error creating quicksetup application", e); |
| | | logger.debug(LocalizableMessage.raw("error creating quicksetup application", e)); |
| | | String msg = "Application class " + appClass + " not found"; |
| | | throw new RuntimeException(msg, e); |
| | | } catch (IllegalAccessException e) { |
| | | LOG.log(Level.INFO, "error creating quicksetup application", e); |
| | | logger.debug(LocalizableMessage.raw("error creating quicksetup application", e)); |
| | | String msg = "Could not access class " + appClass; |
| | | throw new RuntimeException(msg, e); |
| | | } catch (InstantiationException e) { |
| | | LOG.log(Level.INFO, "error creating quicksetup application", e); |
| | | logger.debug(LocalizableMessage.raw("error creating quicksetup application", e)); |
| | | String msg = "Error instantiating class " + appClass; |
| | | throw new RuntimeException(msg, e); |
| | | } catch (ClassCastException e) { |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error retrieving UI key store: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error retrieving UI key store: "+t, t)); |
| | | trustManager = new ApplicationTrustManager(null); |
| | | } |
| | | } |
| | |
| | | |
| | | notifyListeners(mb.toMessage()); |
| | | applicationPrintStreamReceived(msg); |
| | | LOG.log(Level.INFO, msg); |
| | | logger.debug(LocalizableMessage.raw(msg)); |
| | | isFirstLine = false; |
| | | } |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | |
| | | import java.util.List; |
| | | import java.util.ArrayList; |
| | | import java.util.Map; |
| | | import java.util.logging.Logger; |
| | | import java.util.logging.Level; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import java.util.regex.Pattern; |
| | | import java.util.regex.Matcher; |
| | | import java.io.InputStream; |
| | |
| | | */ |
| | | public class BuildInformation implements Comparable<BuildInformation> { |
| | | |
| | | static private final Logger LOG = |
| | | Logger.getLogger(BuildInformation.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Reads build information for a particular installation by reading the |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error writing to process: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error writing to process: "+t, t)); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.opends.server.util.cli.MenuResult; |
| | | |
| | | import java.util.List; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | /** |
| | | * Supports user interactions for a command line driven application. |
| | | */ |
| | | public class CliUserInteraction extends ConsoleApplication |
| | | implements UserInteraction { |
| | | static private final Logger LOG = |
| | | Logger.getLogger(CliUserInteraction.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private final boolean isInteractive; |
| | | private final boolean isForceOnError; |
| | |
| | | catch (CLIException ce) |
| | | { |
| | | respInt = defInt; |
| | | LOG.log(Level.WARNING, "Error reading input: "+ce, ce); |
| | | logger.warn(LocalizableMessage.raw("Error reading input: "+ce, ce)); |
| | | } |
| | | if (fineDetails != null && respInt == options.length + 1) { |
| | | println(); |
| | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import org.opends.quicksetup.util.Utils; |
| | | |
| | |
| | | |
| | | public class CurrentInstallStatus |
| | | { |
| | | static private final Logger LOG = |
| | | Logger.getLogger(CurrentInstallStatus.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private boolean isInstalled; |
| | | |
| | |
| | | port = Installation.getLocal().getCurrentConfiguration(). |
| | | getPort(); |
| | | } catch (IOException ioe) { |
| | | LOG.log(Level.INFO, "Failed to get port", ioe); |
| | | logger.debug(LocalizableMessage.raw("Failed to get port", ioe)); |
| | | } |
| | | return port; |
| | | } |
| | |
| | | import java.util.concurrent.Callable; |
| | | import java.util.concurrent.ExecutionException; |
| | | import java.util.concurrent.FutureTask; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.util.SetupUtils; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | static private final Logger LOG = Logger.getLogger(Installation.class |
| | | .getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private File rootDirectory; |
| | | |
| | |
| | | try |
| | | { |
| | | BuildInformation bi = getBuildInformation(); |
| | | LOG.log(Level.INFO, "build info for " + rootDirectory.getName() + ": " |
| | | + bi); |
| | | logger.debug(LocalizableMessage.raw("build info for " + rootDirectory.getName() + ": " |
| | | + bi)); |
| | | } |
| | | catch (ApplicationException e) |
| | | { |
| | | LOG.log(Level.INFO, "error determining build information", e); |
| | | logger.debug(LocalizableMessage.raw("error determining build information", e)); |
| | | } |
| | | } |
| | | } |
| | |
| | | try |
| | | { |
| | | BuildInformation bi = getBuildInformation(); |
| | | LOG.log(Level.INFO, "build info for " + instanceDirectory.getName() |
| | | + ": " + bi); |
| | | logger.debug(LocalizableMessage.raw("build info for " + instanceDirectory.getName() |
| | | + ": " + bi)); |
| | | } |
| | | catch (ApplicationException e) |
| | | { |
| | | LOG.log(Level.INFO, "error determining build information", e); |
| | | logger.debug(LocalizableMessage.raw("error determining build information", e)); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (InterruptedException e) |
| | | { |
| | | LOG.log(Level.INFO, "interrupted trying to get build information", e); |
| | | logger.debug(LocalizableMessage.raw("interrupted trying to get build information", e)); |
| | | } |
| | | catch (ExecutionException e) |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LOG.log(Level.SEVERE, "error getting build information for " |
| | | + "current instance", e); |
| | | logger.error(LocalizableMessage.raw("error getting build information for " |
| | | + "current instance", e)); |
| | | } |
| | | } |
| | | return instanceInformation; |
| | |
| | | |
| | | import java.io.PrintStream; |
| | | import java.io.File; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | /** |
| | | * Responsible for providing initial evaluation of command line arguments |
| | |
| | | */ |
| | | public abstract class Launcher { |
| | | |
| | | static private final Logger LOG = Logger.getLogger(Launcher.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** Arguments with which this launcher was invoked. */ |
| | | protected String[] args; |
| | |
| | | { |
| | | if (QuickSetupLog.isInitialized()) |
| | | { |
| | | LOG.log(Level.WARNING, "Error launching GUI: "+t); |
| | | logger.warn(LocalizableMessage.raw("Error launching GUI: "+t)); |
| | | StringBuilder buf = new StringBuilder(); |
| | | while (t != null) |
| | | { |
| | |
| | | buf.append("Root cause:\n"); |
| | | } |
| | | } |
| | | LOG.log(Level.WARNING, buf.toString()); |
| | | logger.warn(LocalizableMessage.raw(buf.toString())); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | package org.opends.quicksetup; |
| | | |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import org.opends.quicksetup.util.ProgressMessageFormatter; |
| | | import org.opends.quicksetup.util.PlainTextProgressMessageFormatter; |
| | |
| | | import org.opends.quicksetup.event.ProgressUpdateEvent; |
| | | import org.opends.server.util.StaticUtils; |
| | | import org.opends.server.util.cli.CLIException; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * Class used by Launcher to start a CLI application. |
| | |
| | | |
| | | private UserData userData; |
| | | |
| | | static private final Logger LOG = |
| | | Logger.getLogger(QuickSetupCli.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Creates a QuickSetupCli instance. |
| | |
| | | }); |
| | | } |
| | | Thread appThread = new Thread(cliApp, "CLI Application"); |
| | | LOG.log(Level.INFO, "Launching application"); |
| | | logger.debug(LocalizableMessage.raw("Launching application")); |
| | | appThread.start(); |
| | | while (!Thread.State.TERMINATED.equals(appThread.getState())) { |
| | | try { |
| | |
| | | } |
| | | } |
| | | returnValue = cliApp.getReturnCode(); |
| | | LOG.log(Level.INFO, "Application returnValue: "+returnValue); |
| | | logger.debug(LocalizableMessage.raw("Application returnValue: "+returnValue)); |
| | | if (returnValue == null) { |
| | | ApplicationException ue = cliApp.getRunError(); |
| | | if (ue != null) |
| | | { |
| | | LOG.log(Level.INFO, "Application run error: "+ue, ue); |
| | | logger.debug(LocalizableMessage.raw("Application run error: "+ue, ue)); |
| | | returnValue = ue.getType(); |
| | | } |
| | | else |
| | |
| | | } |
| | | catch (UserDataException uude) |
| | | { |
| | | LOG.log(Level.SEVERE, "UserDataException: "+uude, uude); |
| | | logger.error(LocalizableMessage.raw("UserDataException: "+uude, uude)); |
| | | System.err.println(); |
| | | System.err.println(StaticUtils.wrapText(uude.getLocalizedMessage(), |
| | | Utils.getCommandLineMaxLineWidth())); |
| | |
| | | } |
| | | catch (ApplicationException ae) |
| | | { |
| | | LOG.log(Level.SEVERE, "ApplicationException: "+ae, ae); |
| | | logger.error(LocalizableMessage.raw("ApplicationException: "+ae, ae)); |
| | | System.err.println(); |
| | | System.err.println(ae.getLocalizedMessage()); |
| | | System.err.println(); |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.SEVERE, "Unexpected error: "+t, t); |
| | | logger.error(LocalizableMessage.raw("Unexpected error: "+t, t)); |
| | | returnValue = ReturnCode.UNKNOWN; |
| | | } |
| | | LOG.log(Level.INFO, "returnValue: "+returnValue.getReturnCode()); |
| | | logger.debug(LocalizableMessage.raw("returnValue: "+returnValue.getReturnCode())); |
| | | return returnValue; |
| | | } |
| | | |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup; |
| | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.logging.FileHandler; |
| | | import java.util.logging.SimpleFormatter; |
| | | import java.util.logging.Logger; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.SimpleFormatter; |
| | | |
| | | import java.util.Date; |
| | | import java.text.DateFormat; |
| | | |
| | |
| | | logger.addHandler(fileHandler); |
| | | disableConsoleLogging(); |
| | | logger = Logger.getLogger("org.opends.quicksetup"); |
| | | logger.log(Level.INFO, getInitialLogRecord()); |
| | | logger.info(getInitialLogRecord()); |
| | | } |
| | | } |
| | | |
| | |
| | | import java.io.IOException; |
| | | import java.net.URI; |
| | | import java.util.*; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.*; |
| | | import javax.naming.directory.*; |
| | |
| | | import org.opends.admin.ads.util.ApplicationTrustManager; |
| | | import org.opends.admin.ads.util.ConnectionUtils; |
| | | import org.opends.admin.ads.util.PreferredConnection; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.quicksetup.*; |
| | | import org.opends.quicksetup.event.ButtonActionListener; |
| | |
| | | // Constants used to do checks |
| | | private static final int MIN_DIRECTORY_MANAGER_PWD = 1; |
| | | |
| | | private static final Logger LOG = Logger.getLogger(Installer.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The minimum integer value that can be used for a port. |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error getting connect timeout: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error getting connect timeout: "+t, t)); |
| | | } |
| | | } |
| | | break; |
| | |
| | | try { |
| | | new InstallerHelper().disableWindowsService(); |
| | | } catch (ApplicationException ae) { |
| | | LOG.log(Level.INFO, "Error disabling Windows service", ae); |
| | | logger.debug(LocalizableMessage.raw("Error disabling Windows service", ae)); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | nextPassword = "-w".equals(s); |
| | | } |
| | | LOG.log(Level.INFO, "configure DS cmd: "+cmd); |
| | | logger.debug(LocalizableMessage.raw("configure DS cmd: "+cmd)); |
| | | final InstallerHelper helper = new InstallerHelper(); |
| | | setNotifyListeners(false); |
| | | InvokeThread thread = new InvokeThread() |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error configuring certificate: "+t, t); |
| | | logger.error(LocalizableMessage.raw("Error configuring certificate: "+t, t)); |
| | | throw new ApplicationException( |
| | | ReturnCode.CONFIGURATION_ERROR, |
| | | getThrowableMsg(INFO_ERROR_CONFIGURING_CERTIFICATE.get(), |
| | |
| | | { |
| | | replicationPort = Constants.DEFAULT_REPLICATION_PORT; |
| | | enableSecureReplication = false; |
| | | LOG.log(Level.WARNING, "Could not find replication port for: "+ |
| | | getHostPort(server)); |
| | | logger.warn(LocalizableMessage.raw("Could not find replication port for: "+ |
| | | getHostPort(server))); |
| | | } |
| | | } |
| | | Set<String> dns = new HashSet<String>(); |
| | |
| | | } |
| | | else |
| | | { |
| | | LOG.log(Level.WARNING, "Could not find replication server for: "+ |
| | | dn); |
| | | logger.warn(LocalizableMessage.raw("Could not find replication server for: "+ |
| | | dn)); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (IOException ioe) |
| | | { |
| | | LOG.log(Level.WARNING, "Error writing host name file: "+ioe, ioe); |
| | | logger.warn(LocalizableMessage.raw("Error writing host name file: "+ioe, ioe)); |
| | | } |
| | | finally |
| | | { |
| | |
| | | InstallerHelper helper = new InstallerHelper(); |
| | | helper.writeSetOpenDSJavaHome(getUserData(), getInstallationPath()); |
| | | } catch (Exception e) { |
| | | LOG.log(Level.WARNING, "Error writing OpenDJ Java Home file: "+e, e); |
| | | logger.warn(LocalizableMessage.raw("Error writing OpenDJ Java Home file: "+e, e)); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | try |
| | | { |
| | | LOG.log(Level.INFO, "Calling initializeSuffix with base DN: "+dn); |
| | | LOG.log(Level.INFO, "Try number: "+(6 - nTries)); |
| | | LOG.log(Level.INFO, "replicationId of source replica: "+ |
| | | replicationId); |
| | | logger.debug(LocalizableMessage.raw("Calling initializeSuffix with base DN: "+dn)); |
| | | logger.debug(LocalizableMessage.raw("Try number: "+(6 - nTries))); |
| | | logger.debug(LocalizableMessage.raw("replicationId of source replica: "+ |
| | | replicationId)); |
| | | initializeSuffix(ctx, replicationId, dn, !isADS && !isSchema, |
| | | hostPort); |
| | | initDone = true; |
| | | } |
| | | catch (PeerNotFoundException pnfe) |
| | | { |
| | | LOG.log(Level.INFO, "Peer could not be found"); |
| | | logger.debug(LocalizableMessage.raw("Peer could not be found")); |
| | | if (nTries == 1) |
| | | { |
| | | throw new ApplicationException( |
| | |
| | | if (0 == adsContext.registerOrUpdateServer(server.getAdsProperties())) { |
| | | if (isRemoteServer) registeredNewServerOnRemote = true; |
| | | } else { |
| | | LOG.log(Level.WARNING, "Server was already registered. Updating " + |
| | | "server registration."); |
| | | logger.warn(LocalizableMessage.raw("Server was already registered. Updating " + |
| | | "server registration.")); |
| | | } |
| | | if (isRemoteServer) |
| | | { |
| | |
| | | { |
| | | cause = e.getTrustManager().getLastRefusedCause(); |
| | | } |
| | | LOG.log(Level.INFO, "Certificate exception cause: "+cause); |
| | | logger.debug(LocalizableMessage.raw("Certificate exception cause: "+cause)); |
| | | if (cause == ApplicationTrustManager.Cause.NOT_TRUSTED) |
| | | { |
| | | excType = UserDataCertificateException.Type.NOT_TRUSTED; |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "Error parsing ldap url of TopologyCacheException.", t); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "Error parsing ldap url of TopologyCacheException.", t)); |
| | | h = INFO_NOT_AVAILABLE_LABEL.get().toString(); |
| | | p = -1; |
| | | } |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.INFO, "Error connecting to remote server.", t); |
| | | logger.debug(LocalizableMessage.raw("Error connecting to remote server.", t)); |
| | | if (isCertificateException(t)) |
| | | { |
| | | UserDataCertificateException.Type excType; |
| | | ApplicationTrustManager.Cause cause = |
| | | trustManager.getLastRefusedCause(); |
| | | LOG.log(Level.INFO, "Certificate exception cause: "+cause); |
| | | logger.debug(LocalizableMessage.raw("Certificate exception cause: "+cause)); |
| | | if (cause == ApplicationTrustManager.Cause.NOT_TRUSTED) |
| | | { |
| | | excType = UserDataCertificateException.Type.NOT_TRUSTED; |
| | |
| | | { |
| | | DirContext dirCtx = ctx.createSubcontext(dn, attrs); |
| | | taskCreated = true; |
| | | LOG.log(Level.INFO, "created task entry: "+attrs); |
| | | logger.debug(LocalizableMessage.raw("created task entry: "+attrs)); |
| | | dirCtx.close(); |
| | | } |
| | | catch (NameAlreadyBoundException x) |
| | | { |
| | | LOG.log(Level.WARNING, "A task with dn: "+dn+" already existed."); |
| | | logger.warn(LocalizableMessage.raw("A task with dn: "+dn+" already existed.")); |
| | | } |
| | | catch (NamingException ne) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error creating task "+attrs, ne); |
| | | logger.error(LocalizableMessage.raw("Error creating task "+attrs, ne)); |
| | | throw new ApplicationException( |
| | | ReturnCode.APPLICATION_ERROR, |
| | | getThrowableMsg(INFO_ERROR_LAUNCHING_INITIALIZATION.get( |
| | |
| | | if (((currentTime - minRefreshPeriod) > lastTimeMsgLogged)) |
| | | { |
| | | lastTimeMsgLogged = currentTime; |
| | | LOG.log(Level.INFO, "Progress msg: "+msg); |
| | | logger.debug(LocalizableMessage.raw("Progress msg: "+msg)); |
| | | } |
| | | if (displayProgress) |
| | | { |
| | |
| | | { |
| | | if (!logMsg.equals(lastLogMsg)) |
| | | { |
| | | LOG.log(Level.INFO, logMsg); |
| | | logger.debug(LocalizableMessage.raw(logMsg)); |
| | | lastLogMsg = logMsg; |
| | | } |
| | | } |
| | |
| | | { |
| | | isOver = true; |
| | | LocalizableMessage errorMsg; |
| | | LOG.log(Level.INFO, "Last task entry: "+sr); |
| | | logger.debug(LocalizableMessage.raw("Last task entry: "+sr)); |
| | | if (displayProgress && (msg != null) && !msg.equals(lastDisplayedMsg)) |
| | | { |
| | | notifyListeners(getFormattedProgress(msg)); |
| | |
| | | sourceServerDisplay); |
| | | } |
| | | |
| | | LOG.log(Level.WARNING, "Processed errorMsg: "+errorMsg); |
| | | logger.warn(LocalizableMessage.raw("Processed errorMsg: "+errorMsg)); |
| | | if (helper.isCompletedWithErrors(state)) |
| | | { |
| | | if (displayProgress) |
| | |
| | | if ((lastLogMsg == null) || |
| | | helper.isPeersNotFoundError(lastLogMsg)) |
| | | { |
| | | LOG.log(Level.WARNING, "Throwing peer not found error. "+ |
| | | "Last Log Msg: "+lastLogMsg); |
| | | logger.warn(LocalizableMessage.raw("Throwing peer not found error. "+ |
| | | "Last Log Msg: "+lastLogMsg)); |
| | | // Assume that this is a peer not found error. |
| | | throw new PeerNotFoundException(errorMsg); |
| | | } |
| | | else |
| | | { |
| | | LOG.log(Level.SEVERE, "Throwing ApplicationException."); |
| | | logger.error(LocalizableMessage.raw("Throwing ApplicationException.")); |
| | | throw ae; |
| | | } |
| | | } |
| | | else if (displayProgress) |
| | | { |
| | | LOG.log(Level.INFO, "Initialization completed successfully."); |
| | | logger.debug(LocalizableMessage.raw("Initialization completed successfully.")); |
| | | notifyListeners(getFormattedProgress( |
| | | INFO_SUFFIX_INITIALIZED_SUCCESSFULLY.get())); |
| | | notifyListeners(getLineBreak()); |
| | |
| | | catch (NameNotFoundException x) |
| | | { |
| | | isOver = true; |
| | | LOG.log(Level.INFO, "Initialization entry not found."); |
| | | logger.debug(LocalizableMessage.raw("Initialization entry not found.")); |
| | | if (displayProgress) |
| | | { |
| | | notifyListeners(getFormattedProgress( |
| | |
| | | { |
| | | DirContext dirCtx = ctx.createSubcontext(dn, attrs); |
| | | taskCreated = true; |
| | | LOG.log(Level.INFO, "created task entry: "+attrs); |
| | | logger.debug(LocalizableMessage.raw("created task entry: "+attrs)); |
| | | dirCtx.close(); |
| | | } |
| | | catch (NameAlreadyBoundException x) |
| | |
| | | } |
| | | catch (NamingException ne) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error creating task "+attrs, ne); |
| | | logger.error(LocalizableMessage.raw("Error creating task "+attrs, ne)); |
| | | throw new ApplicationException( |
| | | ReturnCode.APPLICATION_ERROR, |
| | | getThrowableMsg(INFO_ERROR_LAUNCHING_INITIALIZATION.get( |
| | |
| | | { |
| | | if (!logMsg.equals(lastLogMsg)) |
| | | { |
| | | LOG.log(Level.INFO, logMsg); |
| | | logger.debug(LocalizableMessage.raw(logMsg)); |
| | | lastLogMsg = logMsg; |
| | | } |
| | | } |
| | |
| | | |
| | | if (helper.isCompletedWithErrors(state)) |
| | | { |
| | | LOG.log(Level.WARNING, "Completed with error: "+errorMsg); |
| | | logger.warn(LocalizableMessage.raw("Completed with error: "+errorMsg)); |
| | | notifyListeners(getFormattedWarning(errorMsg)); |
| | | } |
| | | else if (!helper.isSuccessful(state) || |
| | | helper.isStoppedByError(state)) |
| | | { |
| | | LOG.log(Level.WARNING, "Error: "+errorMsg); |
| | | logger.warn(LocalizableMessage.raw("Error: "+errorMsg)); |
| | | throw new ApplicationException( |
| | | ReturnCode.APPLICATION_ERROR, errorMsg, |
| | | null); |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error cancelling thread: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error cancelling thread: "+t, t)); |
| | | } |
| | | } |
| | | else if (thread.getException() != null) |
| | |
| | | } |
| | | catch (ApplicationException e) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error: "+e, e); |
| | | logger.error(LocalizableMessage.raw("Error: "+e, e)); |
| | | throw e; |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error: "+t, t); |
| | | logger.error(LocalizableMessage.raw("Error: "+t, t)); |
| | | throw new ApplicationException(ReturnCode.BUG, |
| | | Utils.getThrowableMsg(INFO_BUG_MSG.get(), t), t); |
| | | } |
| | |
| | | import java.io.IOException; |
| | | import java.io.InputStreamReader; |
| | | import java.util.*; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.ldap.InitialLdapContext; |
| | | |
| | |
| | | import org.opends.messages.CoreMessages; |
| | | import org.opends.messages.JebMessages; |
| | | import org.opends.messages.ReplicationMessages; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import org.opends.server.tools.ConfigureDS; |
| | |
| | | * are not necessarily loaded when we create this class. |
| | | */ |
| | | public class InstallerHelper { |
| | | private static final Logger LOG = Logger.getLogger( |
| | | InstallerHelper.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private static final int MAX_ID_VALUE = Short.MAX_VALUE; |
| | | |
| | |
| | | |
| | | String[] allArgs = new String[argList.size()]; |
| | | argList.toArray(allArgs); |
| | | LOG.log(Level.INFO, "import-ldif arg list: "+argList); |
| | | logger.debug(LocalizableMessage.raw("import-ldif arg list: "+argList)); |
| | | ProcessBuilder pb = new ProcessBuilder(allArgs); |
| | | Map<String, String> env = pb.environment(); |
| | | env.remove(SetupUtils.OPENDJ_JAVA_HOME); |
| | |
| | | @Override |
| | | public void processLine(String line) |
| | | { |
| | | LOG.log(Level.WARNING, "import-ldif error log: "+line); |
| | | logger.warn(LocalizableMessage.raw("import-ldif error log: "+line)); |
| | | application.notifyListeners(LocalizableMessage.raw(line)); |
| | | application.notifyListeners(application.getLineBreak()); |
| | | } |
| | |
| | | @Override |
| | | public void processLine(String line) |
| | | { |
| | | LOG.log(Level.INFO, "import-ldif out log: "+line); |
| | | logger.debug(LocalizableMessage.raw("import-ldif out log: "+line)); |
| | | application.notifyListeners(LocalizableMessage.raw(line)); |
| | | application.notifyListeners(application.getLineBreak()); |
| | | } |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error closing error stream: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error closing error stream: "+t, t)); |
| | | } |
| | | try |
| | | { |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error closing output stream: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error closing output stream: "+t, t)); |
| | | } |
| | | } |
| | | } |
| | |
| | | returnValue != |
| | | JavaPropertiesTool.ErrorReturnCode.SUCCESSFUL_NOP.getReturnCode()) |
| | | { |
| | | LOG.log(Level.WARNING, "Error creating java home scripts, error code: "+ |
| | | returnValue); |
| | | logger.warn(LocalizableMessage.raw("Error creating java home scripts, error code: "+ |
| | | returnValue)); |
| | | throw new IOException( |
| | | ERR_ERROR_CREATING_JAVA_HOME_SCRIPTS.get(returnValue).toString()); |
| | | } |
| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import java.security.KeyStoreException; |
| | | |
| | | import org.opends.quicksetup.ApplicationException; |
| | |
| | | |
| | | private ApplicationException runError; |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(OfflineInstaller.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Actually performs the install in this thread. The thread is blocked. |
| | |
| | | |
| | | } catch (ApplicationException ex) |
| | | { |
| | | LOG.log(Level.SEVERE, "Caught exception: "+ex, ex); |
| | | logger.error(LocalizableMessage.raw("Caught exception: "+ex, ex)); |
| | | if (ReturnCode.CANCELED.equals(ex.getType())) { |
| | | uninstall(); |
| | | setCurrentProgressStep(InstallProgressStep.FINISHED_CANCELED); |
| | |
| | | notifyListeners(getFormattedDoneWithLineBreak()); |
| | | } |
| | | } catch (Throwable t) { |
| | | LOG.log(Level.INFO, "error stopping server", t); |
| | | logger.debug(LocalizableMessage.raw("error stopping server", t)); |
| | | } |
| | | } |
| | | notifyListeners(getLineBreak()); |
| | |
| | | setCurrentProgressStep(InstallProgressStep.FINISHED_WITH_ERROR); |
| | | LocalizableMessage html = getFormattedError(ex, true); |
| | | notifyListeners(html); |
| | | LOG.log(Level.SEVERE, "Error installing.", ex); |
| | | logger.error(LocalizableMessage.raw("Error installing.", ex)); |
| | | notifyListeners(getLineBreak()); |
| | | notifyListenersOfLogAfterError(); |
| | | } |
| | |
| | | notifyListeners(getFormattedDoneWithLineBreak()); |
| | | } |
| | | } catch (Throwable t2) { |
| | | LOG.log(Level.INFO, "error stopping server", t2); |
| | | logger.debug(LocalizableMessage.raw("error stopping server", t2)); |
| | | } |
| | | } |
| | | notifyListeners(getLineBreak()); |
| | |
| | | Utils.getThrowableMsg(INFO_BUG_MSG.get(), t), t); |
| | | LocalizableMessage msg = getFormattedError(ex, true); |
| | | notifyListeners(msg); |
| | | LOG.log(Level.SEVERE, "Error installing.", t); |
| | | logger.error(LocalizableMessage.raw("Error installing.", t)); |
| | | notifyListeners(getLineBreak()); |
| | | notifyListenersOfLogAfterError(); |
| | | runError = ex; |
| | |
| | | notifyListeners(getFormattedDoneWithLineBreak()); |
| | | } |
| | | } catch (ApplicationException e) { |
| | | LOG.log(Level.INFO, "error stopping server", e); |
| | | logger.debug(LocalizableMessage.raw("error stopping server", e)); |
| | | } |
| | | } |
| | | |
| | |
| | | fm.rename(newConfig, installation.getCurrentConfigurationFile()); |
| | | |
| | | } catch (ApplicationException ae) { |
| | | LOG.log(Level.INFO, "failed to restore base configuration", ae); |
| | | logger.debug(LocalizableMessage.raw("failed to restore base configuration", ae)); |
| | | } |
| | | |
| | | // Cleanup SSL if necessary |
| | |
| | | try { |
| | | cm.removeCertificate(SELF_SIGNED_CERT_ALIAS); |
| | | } catch (KeyStoreException e) { |
| | | LOG.log(Level.INFO, "Error deleting self signed certification", e); |
| | | logger.debug(LocalizableMessage.raw("Error deleting self signed certification", e)); |
| | | } |
| | | } |
| | | |
| | |
| | | try { |
| | | fm.delete(keystore); |
| | | } catch (ApplicationException e) { |
| | | LOG.log(Level.INFO, "Failed to delete keystore", e); |
| | | logger.debug(LocalizableMessage.raw("Failed to delete keystore", e)); |
| | | } |
| | | } |
| | | |
| | |
| | | try { |
| | | fm.delete(keystorePin); |
| | | } catch (ApplicationException e) { |
| | | LOG.log(Level.INFO, "Failed to delete keystore.pin", e); |
| | | logger.debug(LocalizableMessage.raw("Failed to delete keystore.pin", e)); |
| | | } |
| | | } |
| | | |
| | |
| | | try { |
| | | fm.delete(truststore); |
| | | } catch (ApplicationException e) { |
| | | LOG.log(Level.INFO, "Failed to delete truststore", e); |
| | | logger.debug(LocalizableMessage.raw("Failed to delete truststore", e)); |
| | | } |
| | | } |
| | | } |
| | |
| | | try { |
| | | fm.deleteChildren(installation.getDatabasesDirectory()); |
| | | } catch (ApplicationException e) { |
| | | LOG.log(Level.INFO, "Error deleting databases", e); |
| | | logger.debug(LocalizableMessage.raw("Error deleting databases", e)); |
| | | } |
| | | |
| | | if (!isVerbose()) |
| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import org.opends.quicksetup.ApplicationException; |
| | | import org.opends.quicksetup.LicenseFile; |
| | |
| | | import org.opends.quicksetup.util.FileManager; |
| | | import org.opends.server.util.SetupUtils; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | /** |
| | |
| | | private final Map<ProgressStep, LocalizableMessage> hmSummary = |
| | | new HashMap<ProgressStep, LocalizableMessage>(); |
| | | |
| | | private static final Logger LOG = |
| | | Logger.getLogger(WebStartInstaller.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * WebStartInstaller constructor. |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.INFO, "Error closing zip input stream: "+t, t); |
| | | logger.debug(LocalizableMessage.raw("Error closing zip input stream: "+t, t)); |
| | | } |
| | | |
| | | checkAbort(); |
| | |
| | | notifyListeners(getFormattedDoneWithLineBreak()); |
| | | } |
| | | } catch (Throwable t) { |
| | | LOG.log(Level.INFO, "error stopping server", t); |
| | | logger.debug(LocalizableMessage.raw("error stopping server", t)); |
| | | } |
| | | } |
| | | notifyListeners(getLineBreak()); |
| | |
| | | setCurrentProgressStep(InstallProgressStep.FINISHED_WITH_ERROR); |
| | | LocalizableMessage html = getFormattedError(ex, true); |
| | | notifyListeners(html); |
| | | LOG.log(Level.SEVERE, "Error installing.", ex); |
| | | logger.error(LocalizableMessage.raw("Error installing.", ex)); |
| | | notifyListeners(getLineBreak()); |
| | | notifyListenersOfLogAfterError(); |
| | | } |
| | |
| | | try { |
| | | new ServerController(installation).stopServer(true); |
| | | } catch (Throwable t2) { |
| | | LOG.log(Level.INFO, "error stopping server", t2); |
| | | logger.debug(LocalizableMessage.raw("error stopping server", t2)); |
| | | } |
| | | } |
| | | notifyListeners(getLineBreak()); |
| | |
| | | Utils.getThrowableMsg(INFO_BUG_MSG.get(), t), t); |
| | | LocalizableMessage msg = getFormattedError(ex, true); |
| | | notifyListeners(msg); |
| | | LOG.log(Level.SEVERE, "Error installing.", t); |
| | | logger.error(LocalizableMessage.raw("Error installing.", t)); |
| | | notifyListeners(getLineBreak()); |
| | | notifyListenersOfLogAfterError(); |
| | | } |
| | |
| | | try { |
| | | new ServerController(installation).stopServer(true); |
| | | } catch (ApplicationException e) { |
| | | LOG.log(Level.INFO, "error stopping server", e); |
| | | logger.debug(LocalizableMessage.raw("error stopping server", e)); |
| | | } |
| | | } |
| | | |
| | |
| | | fm.deleteRecursively(installation.getRootDirectory(), null, |
| | | FileManager.DeletionPolicy.DELETE_ON_EXIT_IF_UNSUCCESSFUL); |
| | | } catch (ApplicationException e) { |
| | | LOG.log(Level.INFO, "error deleting files", e); |
| | | logger.debug(LocalizableMessage.raw("error deleting files", e)); |
| | | } |
| | | } |
| | | else |
| | |
| | | fm.deleteRecursively(serverRoot, null, |
| | | FileManager.DeletionPolicy.DELETE_ON_EXIT_IF_UNSUCCESSFUL); |
| | | } catch (ApplicationException e) { |
| | | LOG.log(Level.INFO, "error deleting files", e); |
| | | logger.debug(LocalizableMessage.raw("error deleting files", e)); |
| | | } |
| | | } |
| | | } |
| | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.ldap.LdapName; |
| | | import javax.naming.ldap.Rdn; |
| | |
| | | import org.opends.quicksetup.UserDataCertificateException; |
| | | import org.opends.quicksetup.event.MinimumSizeComponentListener; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | |
| | | private String explanationWithHideDetails; |
| | | private String explanationWithShowDetails; |
| | | |
| | | private static final Logger LOG = Logger.getLogger( |
| | | CertificateDialog.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Constructor of the certificate dialog. |
| | |
| | | msg = LocalizableMessage.raw(sb); |
| | | } |
| | | catch (NoSuchAlgorithmException nsae) { |
| | | LOG.log(Level.WARNING, "SHA1 algorithm not supported: "+nsae, nsae); |
| | | logger.warn(LocalizableMessage.raw("SHA1 algorithm not supported: "+nsae, nsae)); |
| | | } |
| | | catch (CertificateEncodingException cee) { |
| | | LOG.log(Level.WARNING, "Certificate encoding exception: "+cee, cee); |
| | | logger.warn(LocalizableMessage.raw("Certificate encoding exception: "+cee, cee)); |
| | | } |
| | | return msg; |
| | | } |
| | |
| | | msg = LocalizableMessage.raw(sb); |
| | | } |
| | | catch (NoSuchAlgorithmException nsae) { |
| | | LOG.log(Level.WARNING, "MD5 algorithm not supported: "+nsae, nsae); |
| | | logger.warn(LocalizableMessage.raw("MD5 algorithm not supported: "+nsae, nsae)); |
| | | } |
| | | catch (CertificateEncodingException cee) { |
| | | LOG.log(Level.WARNING, "Certificate encoding exception: "+cee, cee); |
| | | logger.warn(LocalizableMessage.raw("Certificate encoding exception: "+cee, cee)); |
| | | } |
| | | return msg; |
| | | } |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error parsing subject dn: "+ |
| | | cert.getSubjectX500Principal(), t); |
| | | logger.warn(LocalizableMessage.raw("Error parsing subject dn: "+ |
| | | cert.getSubjectX500Principal(), t)); |
| | | } |
| | | return name; |
| | | } |
| | |
| | | import java.security.cert.X509Certificate; |
| | | import java.util.LinkedHashSet; |
| | | import java.util.Set; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | /** |
| | | * This class represents an application with a wizard GUI that can be run in the |
| | |
| | | */ |
| | | public abstract class GuiApplication extends Application { |
| | | |
| | | static private final Logger LOG = |
| | | Logger.getLogger(GuiApplication.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** The currently displayed wizard step. */ |
| | | private WizardStep displayedStep; |
| | |
| | | |
| | | if ((chain != null) && (authType != null) && (host != null)) |
| | | { |
| | | LOG.log(Level.INFO, "Accepting certificate presented by host "+host); |
| | | logger.debug(LocalizableMessage.raw("Accepting certificate presented by host "+host)); |
| | | getTrustManager().acceptCertificate(chain, authType, host); |
| | | } |
| | | else |
| | | { |
| | | if (chain == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The chain is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The chain is null for the UserDataCertificateException")); |
| | | } |
| | | if (authType == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The auth type is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The auth type is null for the UserDataCertificateException")); |
| | | } |
| | | if (host == null) |
| | | { |
| | | LOG.log(Level.WARNING, |
| | | "The host is null for the UserDataCertificateException"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "The host is null for the UserDataCertificateException")); |
| | | } |
| | | } |
| | | if (acceptPermanently) |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error accepting certificate: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error accepting certificate: "+t, t)); |
| | | } |
| | | } |
| | | } |
| | |
| | | import java.awt.Cursor; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.logging.Logger; |
| | | import java.util.logging.Level; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import java.util.logging.Handler; |
| | | import java.util.Map; |
| | | |
| | |
| | | public class QuickSetup implements ButtonActionListener, ProgressUpdateListener |
| | | { |
| | | |
| | | static private final Logger LOG = |
| | | Logger.getLogger(QuickSetup.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private GuiApplication application; |
| | | |
| | |
| | | */ |
| | | public void quit() |
| | | { |
| | | LOG.log(Level.INFO, "quitting application"); |
| | | logger.debug(LocalizableMessage.raw("quitting application")); |
| | | flushLogs(); |
| | | System.exit(0); |
| | | } |
| | | |
| | | private void flushLogs() { |
| | | Handler[] handlers = LOG.getHandlers(); |
| | | java.util.logging.Logger julLogger = java.util.logging.Logger.getLogger(logger.getName()); |
| | | Handler[] handlers = julLogger.getHandlers(); |
| | | if (handlers != null) { |
| | | for (Handler h : handlers) { |
| | | h.flush(); |
| | |
| | | { |
| | | if (!(throwable instanceof UserDataException)) |
| | | { |
| | | LOG.log(Level.WARNING, "Unhandled exception.", throwable); |
| | | logger.warn(LocalizableMessage.raw("Unhandled exception.", throwable)); |
| | | } |
| | | else |
| | | { |
| | |
| | | import java.awt.event.WindowAdapter; |
| | | import java.awt.event.WindowEvent; |
| | | import java.util.HashSet; |
| | | import java.util.logging.Logger; |
| | | import java.util.logging.Level; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | |
| | | import javax.swing.JButton; |
| | | import javax.swing.JFrame; |
| | |
| | | import org.opends.quicksetup.event.ButtonEvent; |
| | | import org.opends.quicksetup.event.MinimumSizeComponentListener; |
| | | import org.opends.quicksetup.ProgressDescriptor; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | /** |
| | | * This class represents the dialog used by quicksetup applications. |
| | | * |
| | |
| | | */ |
| | | public class QuickSetupDialog |
| | | { |
| | | static private final Logger LOG = |
| | | Logger.getLogger(QuickSetupDialog.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private JFrame frame; |
| | | |
| | |
| | | if (button != null) { |
| | | button.requestFocusInWindow(); |
| | | } else { |
| | | LOG.log(Level.INFO, "Focus requested for unknown button '" + |
| | | buttonName + "'"); |
| | | logger.debug(LocalizableMessage.raw("Focus requested for unknown button '" + |
| | | buttonName + "'")); |
| | | } |
| | | } |
| | | |
| | |
| | | import java.awt.event.FocusEvent; |
| | | import java.awt.event.FocusListener; |
| | | import java.util.HashMap; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | |
| | | |
| | | private static String parentPackagePath; |
| | | |
| | | private static final Logger LOG = Logger.getLogger(UIFactory.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Specifies the horizontal insets between buttons. |
| | |
| | | catch (Throwable t) |
| | | { |
| | | // This might occur when we do not get the display |
| | | LOG.log(Level.WARNING, "Error updating UIManager: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error updating UIManager: "+t, t)); |
| | | } |
| | | initializeLookAndFeel(); |
| | | initialized = true; |
| | |
| | | |
| | | |
| | | import java.io.*; |
| | | import java.util.logging.Logger; |
| | | import java.util.logging.Level; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | |
| | | /** |
| | | * Utility class for use by applications containing methods for managing |
| | |
| | | |
| | | } |
| | | |
| | | static private final Logger LOG = |
| | | Logger.getLogger(FileManager.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private Application application = null; |
| | | |
| | |
| | | application.notifyListeners(application.getFormattedWarning( |
| | | INFO_FILE_DOES_NOT_EXIST.get(String.valueOf(file)))); |
| | | } |
| | | LOG.log(Level.INFO, "file '" + file.toString() + "' does not exist"); |
| | | logger.debug(LocalizableMessage.raw("file '" + file.toString() + "' does not exist")); |
| | | } |
| | | } |
| | | |
| | |
| | | objectFile.getAbsolutePath(), |
| | | destination.getAbsolutePath()))); |
| | | } |
| | | LOG.log(Level.INFO, "copying file '" + |
| | | logger.debug(LocalizableMessage.raw("copying file '" + |
| | | objectFile.getAbsolutePath() + "' to '" + |
| | | destination.getAbsolutePath() + "'"); |
| | | destination.getAbsolutePath() + "'")); |
| | | FileInputStream fis = null; |
| | | FileOutputStream fos = null; |
| | | try { |
| | |
| | | errMsg, null); |
| | | } |
| | | } else { |
| | | LOG.log(Level.INFO, "Ignoring file '" + |
| | | logger.debug(LocalizableMessage.raw("Ignoring file '" + |
| | | objectFile.getAbsolutePath() + "' since '" + |
| | | destination.getAbsolutePath() + "' already exists"); |
| | | destination.getAbsolutePath() + "' already exists")); |
| | | if ((application != null) && application.isVerbose()) { |
| | | application.notifyListeners( |
| | | INFO_INFO_IGNORING_FILE.get( |
| | |
| | | file.getAbsolutePath()))); |
| | | } |
| | | } |
| | | LOG.log(Level.INFO, "deleting " + |
| | | logger.debug(LocalizableMessage.raw("deleting " + |
| | | (isFile ? " file " : " directory ") + |
| | | file.getAbsolutePath()); |
| | | file.getAbsolutePath())); |
| | | |
| | | boolean delete = false; |
| | | /* |
| | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import java.net.URLEncoder; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | |
| | | import org.opends.quicksetup.ui.UIFactory; |
| | | import org.opends.quicksetup.Constants; |
| | | |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class HtmlProgressMessageFormatter implements ProgressMessageFormatter |
| | | { |
| | | static private final Logger LOG = |
| | | Logger.getLogger(HtmlProgressMessageFormatter.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private LocalizableMessage doneHtml; |
| | | private LocalizableMessage errorHtml; |
| | |
| | | int index = lastTextStr.indexOf(urlText); |
| | | if (index == -1) |
| | | { |
| | | LOG.log(Level.FINE, "lastText: " + lastText + |
| | | logger.trace("lastText: " + lastText + |
| | | "does not contain: " + urlText); |
| | | } else |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.util; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | /** |
| | | * This class is used to read an input stream and process ouput. |
| | | */ |
| | | abstract public class OutputReader { |
| | | |
| | | static private Logger LOG = Logger.getLogger(OutputReader.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Called whenever new input is read from the reader. |
| | |
| | | processLine(line); |
| | | } |
| | | } catch (Throwable t) { |
| | | LOG.log(Level.INFO, "error reading output", t); |
| | | logger.debug(LocalizableMessage.raw("error reading output"), t); |
| | | } |
| | | } |
| | | }); |
| | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Map; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import java.io.BufferedReader; |
| | | import java.io.InputStreamReader; |
| | | import java.io.IOException; |
| | |
| | | */ |
| | | public class ServerController { |
| | | |
| | | static private final Logger LOG = |
| | | Logger.getLogger(ServerController.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private Application application; |
| | | |
| | |
| | | mb.append(application.getLineBreak()); |
| | | application.notifyListeners(mb.toMessage()); |
| | | } |
| | | LOG.log(Level.INFO, "stopping server"); |
| | | logger.debug(LocalizableMessage.raw("stopping server")); |
| | | |
| | | ArrayList<String> argList = new ArrayList<String>(); |
| | | argList.add(Utils.getScriptPath( |
| | |
| | | env.remove(SetupUtils.OPENDJ_JAVA_ARGS); |
| | | env.remove("CLASSPATH"); |
| | | |
| | | LOG.log(Level.INFO, "Before calling stop-ds. Is server running? "+ |
| | | installation.getStatus().isServerRunning()); |
| | | logger.debug(LocalizableMessage.raw("Before calling stop-ds. Is server running? "+ |
| | | installation.getStatus().isServerRunning())); |
| | | |
| | | int stopTries = 3; |
| | | while (stopTries > 0) |
| | | { |
| | | stopTries --; |
| | | LOG.log(Level.INFO, "Launching stop command, stopTries left: "+ |
| | | stopTries); |
| | | logger.debug(LocalizableMessage.raw("Launching stop command, stopTries left: "+ |
| | | stopTries)); |
| | | |
| | | try |
| | | { |
| | | LOG.log(Level.INFO, "Launching stop command, argList: "+argList); |
| | | logger.debug(LocalizableMessage.raw("Launching stop command, argList: "+argList)); |
| | | Process process = pb.start(); |
| | | |
| | | BufferedReader err = |
| | |
| | | boolean stopped = false; |
| | | |
| | | for (int i = 0; i < nTries && !stopped; i++) { |
| | | LOG.log(Level.FINE, "waiting for server to stop"); |
| | | logger.trace("waiting for server to stop"); |
| | | try { |
| | | Thread.sleep(5000); |
| | | } |
| | |
| | | // do nothing |
| | | } |
| | | stopped = !installation.getStatus().isServerRunning(); |
| | | LOG.log(Level.INFO, |
| | | "After calling stop-ds. Is server running? "+!stopped); |
| | | logger.debug(LocalizableMessage.raw( |
| | | "After calling stop-ds. Is server running? "+!stopped)); |
| | | |
| | | if (!stopped) { |
| | | if (application != null) { |
| | |
| | | mb.append(application.getLineBreak()); |
| | | application.notifyListeners(mb.toMessage()); |
| | | } |
| | | LOG.log(Level.INFO, "server already stopped"); |
| | | logger.debug(LocalizableMessage.raw("server already stopped")); |
| | | break; |
| | | } else if (returnValue != 0) { |
| | | if (stopTries <= 0) |
| | |
| | | application.notifyListeners(application.getFormattedLog( |
| | | INFO_PROGRESS_SERVER_STOPPED.get())); |
| | | } |
| | | LOG.log(Level.INFO, "server stopped"); |
| | | logger.debug(LocalizableMessage.raw("server stopped")); |
| | | break; |
| | | } |
| | | |
| | |
| | | mb.append(application.getLineBreak()); |
| | | application.notifyListeners(mb.toMessage()); |
| | | } |
| | | LOG.log(Level.INFO, "starting server"); |
| | | logger.debug(LocalizableMessage.raw("starting server")); |
| | | |
| | | ArrayList<String> argList = new ArrayList<String>(); |
| | | argList.add(Utils.getScriptPath( |
| | |
| | | |
| | | int returnValue = process.waitFor(); |
| | | |
| | | LOG.log(Level.INFO, "start-ds return value: "+returnValue); |
| | | logger.debug(LocalizableMessage.raw("start-ds return value: "+returnValue)); |
| | | |
| | | if (returnValue != 0) |
| | | { |
| | |
| | | } |
| | | if (outputReader.isFinished()) |
| | | { |
| | | LOG.log(Level.INFO, "Output reader finished."); |
| | | logger.debug(LocalizableMessage.raw("Output reader finished.")); |
| | | } |
| | | if (errReader.isFinished()) |
| | | { |
| | | LOG.log(Level.INFO, "Error reader finished."); |
| | | logger.debug(LocalizableMessage.raw("Error reader finished.")); |
| | | } |
| | | if (!outputReader.startedIdFound() && !errReader.startedIdFound()) |
| | | { |
| | | LOG.log(Level.WARNING, "Started ID could not be found"); |
| | | logger.warn(LocalizableMessage.raw("Started ID could not be found")); |
| | | } |
| | | |
| | | // Check if something wrong occurred reading the starting of the server |
| | |
| | | } |
| | | catch (NamingException ne) |
| | | { |
| | | LOG.log(Level.WARNING, "Could not connect to server: "+ne, ne); |
| | | logger.warn(LocalizableMessage.raw("Could not connect to server: "+ne, ne)); |
| | | } |
| | | finally |
| | | { |
| | |
| | | application.notifyListeners(buf.toMessage()); |
| | | isFirstLine = false; |
| | | } |
| | | LOG.log(Level.INFO, "server: " + line); |
| | | logger.debug(LocalizableMessage.raw("server: " + line)); |
| | | line = reader.readLine(); |
| | | } |
| | | } catch (Throwable t) { |
| | |
| | | LocalizableMessage errorMsg = getThrowableMsg(errorTag, t); |
| | | application.notifyListeners(errorMsg); |
| | | } |
| | | LOG.log(Level.INFO, "error reading server messages",t); |
| | | logger.debug(LocalizableMessage.raw("error reading server messages",t)); |
| | | } |
| | | } |
| | | }); |
| | |
| | | application.notifyListeners(buf.toMessage()); |
| | | isFirstLine = false; |
| | | } |
| | | LOG.log(Level.INFO, "server: " + line); |
| | | logger.debug(LocalizableMessage.raw("server: " + line)); |
| | | if (line.toLowerCase().contains("=" + startedId)) |
| | | { |
| | | isFinished = true; |
| | |
| | | } |
| | | } catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error reading output: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error reading output: "+t, t)); |
| | | ex = new ApplicationException( |
| | | ReturnCode.START_ERROR, |
| | | getThrowableMsg(errorTag, t), t); |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.quicksetup.util; |
| | |
| | | import java.security.cert.CertificateException; |
| | | import java.security.cert.X509Certificate; |
| | | import java.util.Enumeration; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | /** |
| | | * Class used to get the KeyStore that the graphical utilities use. |
| | |
| | | { |
| | | private static KeyStore keyStore = null; |
| | | |
| | | private static final Logger LOG = Logger.getLogger( |
| | | UIKeyStore.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * This should never be called. |
| | |
| | | File f = new File(keyStorePath); |
| | | if (!f.exists()) |
| | | { |
| | | LOG.log(Level.INFO, "Path "+keyStorePath+ " does not exist"); |
| | | logger.debug(LocalizableMessage.raw("Path "+keyStorePath+ " does not exist")); |
| | | keyStorePath = null; |
| | | } |
| | | else if (f.isDirectory()) |
| | | { |
| | | LOG.log(Level.SEVERE, "Path "+keyStorePath+ " is a directory"); |
| | | logger.error(LocalizableMessage.raw("Path "+keyStorePath+ " is a directory")); |
| | | keyStorePath = null; |
| | | } |
| | | else if (!f.canRead()) |
| | | { |
| | | LOG.log(Level.SEVERE, "Path "+keyStorePath+ " is not readable"); |
| | | logger.error(LocalizableMessage.raw("Path "+keyStorePath+ " is not readable")); |
| | | keyStorePath = null; |
| | | } |
| | | else if (!f.canWrite()) |
| | | { |
| | | LOG.log(Level.SEVERE, "Path "+keyStorePath+ " is not writable"); |
| | | logger.error(LocalizableMessage.raw("Path "+keyStorePath+ " is not writable")); |
| | | keyStorePath = null; |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error reading key store on "+keyStorePath, t); |
| | | logger.error(LocalizableMessage.raw("Error reading key store on "+keyStorePath, t)); |
| | | keyStore.load(null, null); |
| | | } |
| | | fos.close(); |
| | |
| | | throws IOException,KeyStoreException, CertificateException, |
| | | NoSuchAlgorithmException |
| | | { |
| | | LOG.log(Level.INFO, "Accepting certificate chain."); |
| | | logger.debug(LocalizableMessage.raw("Accepting certificate chain.")); |
| | | KeyStore k = getInstance(); |
| | | for (X509Certificate aChain : chain) { |
| | | if (!containsCertificate(aChain, k)) { |
| | |
| | | File f = new File(adminTrustStorePath); |
| | | if (!f.exists()) |
| | | { |
| | | LOG.log(Level.INFO, "Path "+adminTrustStorePath+ " does not exist"); |
| | | logger.debug(LocalizableMessage.raw("Path "+adminTrustStorePath+ " does not exist")); |
| | | adminTrustStorePath = null; |
| | | } |
| | | else if (f.isDirectory()) |
| | | { |
| | | LOG.log(Level.SEVERE, "Path "+adminTrustStorePath+ " is a directory"); |
| | | logger.error(LocalizableMessage.raw("Path "+adminTrustStorePath+ " is a directory")); |
| | | adminTrustStorePath = null; |
| | | } |
| | | else if (!f.canRead()) |
| | | { |
| | | LOG.log(Level.SEVERE, "Path "+adminTrustStorePath+ " is not readable"); |
| | | logger.error(LocalizableMessage.raw("Path "+adminTrustStorePath+ " is not readable")); |
| | | adminTrustStorePath = null; |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error reading admin key store on "+ |
| | | adminTrustStorePath, t); |
| | | logger.error(LocalizableMessage.raw("Error reading admin key store on "+ |
| | | adminTrustStorePath, t)); |
| | | } |
| | | finally |
| | | { |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.SEVERE, "Error closing admin key store on "+ |
| | | adminTrustStorePath, t); |
| | | logger.error(LocalizableMessage.raw("Error closing admin key store on "+ |
| | | adminTrustStorePath, t)); |
| | | } |
| | | } |
| | | } |
| | |
| | | import java.net.InetAddress; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.naming.AuthenticationException; |
| | | import javax.naming.CommunicationException; |
| | |
| | | import org.opends.admin.ads.SuffixDescriptor; |
| | | import org.opends.admin.ads.TopologyCacheException; |
| | | import org.opends.admin.ads.util.ConnectionUtils; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessageDescriptor; |
| | | import org.opends.quicksetup.*; |
| | |
| | | */ |
| | | public class Utils |
| | | { |
| | | private static final Logger LOG = |
| | | Logger.getLogger(Utils.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private static final int BUFFER_SIZE = 1024; |
| | | |
| | |
| | | String installPath) |
| | | { |
| | | boolean supported = false; |
| | | LOG.log(Level.INFO, "Checking if options "+option+ |
| | | " are supported with java home: "+javaHome); |
| | | logger.debug(LocalizableMessage.raw("Checking if options "+option+ |
| | | " are supported with java home: "+javaHome)); |
| | | try |
| | | { |
| | | List<String> args = new ArrayList<String>(); |
| | |
| | | env.put("DO_NOT_PAUSE", "true"); |
| | | } |
| | | final Process process = pb.start(); |
| | | LOG.log(Level.INFO, "launching "+args+ " with env: "+env); |
| | | logger.debug(LocalizableMessage.raw("launching "+args+ " with env: "+env)); |
| | | InputStream is = process.getInputStream(); |
| | | BufferedReader reader = new BufferedReader(new InputStreamReader(is)); |
| | | String line; |
| | | boolean errorDetected = false; |
| | | while (null != (line = reader.readLine())) { |
| | | LOG.log(Level.INFO, "The output: "+line); |
| | | logger.debug(LocalizableMessage.raw("The output: "+line)); |
| | | if (line.contains("ERROR: The detected Java version")) |
| | | { |
| | | if (Utils.isWindows()) |
| | |
| | | } |
| | | process.waitFor(); |
| | | int returnCode = process.exitValue(); |
| | | LOG.log(Level.INFO, "returnCode: "+returnCode); |
| | | logger.debug(LocalizableMessage.raw("returnCode: "+returnCode)); |
| | | supported = returnCode == 0 && !errorDetected; |
| | | LOG.log(Level.INFO, "supported: "+supported); |
| | | logger.debug(LocalizableMessage.raw("supported: "+supported)); |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error testing option "+option+" on "+javaHome, t); |
| | | logger.warn(LocalizableMessage.raw("Error testing option "+option+" on "+javaHome, t)); |
| | | } |
| | | return supported; |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | LOG.log(Level.WARNING, "Unexpected error: "+te, te); |
| | | logger.warn(LocalizableMessage.raw("Unexpected error: "+te, te)); |
| | | // This is unexpected. |
| | | if (te.getCause() != null) |
| | | { |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Error retrieving server current time: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Error retrieving server current time: "+t, t)); |
| | | } |
| | | return time; |
| | | } |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | LOG.log(Level.WARNING, "Failing checking host names: "+t, t); |
| | | logger.warn(LocalizableMessage.raw("Failing checking host names: "+t, t)); |
| | | } |
| | | } |
| | | else |
| | |
| | | * |
| | | */ |
| | | class EmptyPrintStream extends PrintStream { |
| | | private static final Logger LOG = |
| | | Logger.getLogger(EmptyPrintStream.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Default constructor. |
| | |
| | | @Override |
| | | public void println(String msg) |
| | | { |
| | | LOG.log(Level.INFO, "EmptyStream msg: "+msg); |
| | | logger.debug(LocalizableMessage.raw("EmptyStream msg: "+msg)); |
| | | } |
| | | } |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.Map; |
| | | import java.util.HashMap; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | /** |
| | | * Class for extracting the contents of a zip file and managing |
| | |
| | | */ |
| | | public class ZipExtractor { |
| | | |
| | | static private final Logger LOG = |
| | | Logger.getLogger(ZipExtractor.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** Path separator for zip file entry names on Windows and *nix. */ |
| | | static private final char ZIP_ENTRY_NAME_SEP = '/'; |
| | |
| | | if (sepPos != -1) { |
| | | name = name.substring(sepPos + 1); |
| | | } else { |
| | | LOG.log(Level.WARNING, |
| | | "zip entry name does not contain a path separator"); |
| | | logger.warn(LocalizableMessage.raw( |
| | | "zip entry name does not contain a path separator")); |
| | | } |
| | | } |
| | | if (name != null && name.length() > 0) { |
| | |
| | | application.notifyListenersRatioChange(ratioBeforeCompleted); |
| | | } |
| | | } |
| | | LOG.log(Level.INFO, "extracting " + Utils.getPath(destination)); |
| | | logger.debug(LocalizableMessage.raw("extracting " + Utils.getPath(destination))); |
| | | if (Utils.insureParentsExist(destination)) |
| | | { |
| | | if (entry.isDirectory()) |
| | |
| | | import java.io.IOException; |
| | | import java.net.MalformedURLException; |
| | | import java.net.URL; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.jnlp.DownloadService; |
| | | import javax.jnlp.DownloadServiceListener; |
| | |
| | | * ProgressStep.DOWNLOADING step. |
| | | */ |
| | | public class WebStartDownloader implements DownloadServiceListener { |
| | | static private final Logger LOG = |
| | | Logger.getLogger(WebStartDownloader.class.getName()); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private ApplicationException ex; |
| | | |
| | |
| | | (DownloadService) ServiceManager.lookup(Utils.JNLP_SERVICE_NAME); |
| | | } catch (UnavailableServiceException e) |
| | | { |
| | | LOG.log(Level.SEVERE, "Could not find service: "+ |
| | | Utils.JNLP_SERVICE_NAME, e); |
| | | logger.error(LocalizableMessage.raw("Could not find service: "+ |
| | | Utils.JNLP_SERVICE_NAME, e)); |
| | | String setupFile; |
| | | if (Utils.isWindows()) |
| | | { |
| | |
| | | package org.opends.server.admin; |
| | | |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.messages.AdminMessages.*; |
| | | import java.io.File; |
| | | import java.io.FileWriter; |
| | |
| | | import org.opends.server.admin.std.server.TrustManagerProviderCfg; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.FilePermission; |
| | | |
| | |
| | | |
| | | // Friendly name of the administration connector |
| | | private static final String FRIENDLY_NAME = "Administration Connector"; |
| | | |
| | | // The tracer object for the debug logger. |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private LDAPConnectionHandler adminConnectionHandler; |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | LocalizableMessage message = ERR_ADMIN_CERTIFICATE_GENERATION.get(e.getMessage()); |
| | | logError(message); |
| | | throw new InitializationException(message); |
| | |
| | | |
| | | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.forgerock.util.Reject.*; |
| | | |
| | | import java.util.Collection; |
| | |
| | | import org.opends.server.admin.std.meta.RootCfgDefn; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | |
| | | } |
| | | } catch (ConfigException e) { |
| | | // The condition could not be evaluated. |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_REFINT_UNABLE_TO_EVALUATE_TARGET_CONDITION.get(mo |
| | | .getManagedObjectDefinition().getUserFriendlyName(), String |
| | |
| | | return instances; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | import static org.opends.messages.ExtensionMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.opends.server.util.ServerConstants.EOL; |
| | | |
| | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.meta.RootCfgDefn; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.forgerock.util.Reject; |
| | | |
| | |
| | | * class loader as it can change at run-time. |
| | | */ |
| | | public final class ClassLoaderProvider { |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Private URLClassLoader implementation. This is only required so |
| | |
| | | try { |
| | | loader.addJarFile(extension); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_ADMIN_CANNOT_OPEN_JAR_FILE. |
| | | get(extension.getName(), extension.getParent(), |
| | |
| | | // Add and initialize the extensions. |
| | | addExtension(extensionsPath.listFiles(filter)); |
| | | } catch (InitializationException e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw e; |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_ADMIN_EXTENSIONS_CANNOT_LIST_FILES.get( |
| | | String.valueOf(extensionsPath), stackTraceToSingleLineString(e)); |
| | |
| | | try { |
| | | loadDefinitionClasses(is); |
| | | } catch (InitializationException e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CLASS_LOADER_CANNOT_LOAD_CORE.get(CORE_MANIFEST, |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | try { |
| | | is = jarFile.getInputStream(entry); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_ADMIN_CANNOT_READ_EXTENSION_MANIFEST.get( |
| | | EXTENSION_MANIFEST, jarFile.getName(), |
| | |
| | | try { |
| | | loadDefinitionClasses(is); |
| | | } catch (InitializationException e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CLASS_LOADER_CANNOT_LOAD_EXTENSION.get(jarFile |
| | | .getName(), EXTENSION_MANIFEST, stackTraceToSingleLineString(e)); |
| | |
| | | continue; |
| | | } |
| | | |
| | | TRACER.debugMessage(DebugLogLevel.INFO, "Loading class " + className); |
| | | logger.trace("Loading class " + className); |
| | | |
| | | // Load the class and get an instance of it if it is a definition. |
| | | Class<?> theClass; |
| | |
| | | // Load the extension jar file. |
| | | jarFile = new JarFile(jar); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_ADMIN_CANNOT_OPEN_JAR_FILE.get( |
| | | jar.getName(), jar.getParent(), stackTraceToSingleLineString(e)); |
| | |
| | | package org.opends.server.admin.client.cli; |
| | | |
| | | import static org.opends.server.admin.client.cli.DsFrameworkCliReturnCode.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.getTracer; |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | import java.security.cert.CertificateException; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashSet; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.net.ssl.KeyManager; |
| | | |
| | |
| | | import org.opends.server.admin.std.server.TrustManagerProviderCfg; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.util.PasswordReader; |
| | | import org.opends.server.util.SelectableCertificateKeyManager; |
| | | import org.opends.server.util.args.Argument; |
| | |
| | | private ApplicationTrustManager trustManager; |
| | | |
| | | private boolean configurationInitialized = false; |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * End Of Line. |
| | | */ |
| | | public static String EOL = System.getProperty("line.separator"); |
| | | |
| | | /** |
| | | * The Logger. |
| | | */ |
| | | static private final Logger LOG = |
| | | Logger.getLogger(SecureConnectionCliArgs.class.getName()); |
| | | |
| | | // Defines if the CLI always use the SSL connection type. |
| | | private boolean alwaysSSL = false; |
| | |
| | | bindPasswordValue = new String(pwChars); |
| | | } catch(Exception ex) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | try |
| | | { |
| | | err.write(wrapText(ex.getMessage(), MAX_LINE_WIDTH).getBytes()); |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | try |
| | | { |
| | | err.write(wrapText(ex.getMessage(), MAX_LINE_WIDTH).getBytes()); |
| | |
| | | // Nothing to do: if this occurs we will systematically refuse the |
| | | // certificates. Maybe we should avoid this and be strict, but we |
| | | // are in a best effort mode. |
| | | LOG.log(Level.WARNING, "Error with the truststore", e); |
| | | logger.warn(LocalizableMessage.raw("Error with the truststore"), e); |
| | | } |
| | | catch (NoSuchAlgorithmException e) |
| | | { |
| | | // Nothing to do: if this occurs we will systematically refuse the |
| | | // certificates. Maybe we should avoid this and be strict, but we |
| | | // are in a best effort mode. |
| | | LOG.log(Level.WARNING, "Error with the truststore", e); |
| | | logger.warn(LocalizableMessage.raw("Error with the truststore"), e); |
| | | } |
| | | catch (CertificateException e) |
| | | { |
| | | // Nothing to do: if this occurs we will systematically refuse the |
| | | // certificates. Maybe we should avoid this and be strict, but we |
| | | // are in a best effort mode. |
| | | LOG.log(Level.WARNING, "Error with the truststore", e); |
| | | logger.warn(LocalizableMessage.raw("Error with the truststore"), e); |
| | | } |
| | | catch (IOException e) |
| | | { |
| | | // Nothing to do: if this occurs we will systematically refuse the |
| | | // certificates. Maybe we should avoid this and be strict, but we |
| | | // are in a best effort mode. |
| | | LOG.log(Level.WARNING, "Error with the truststore", e); |
| | | logger.warn(LocalizableMessage.raw("Error with the truststore"), e); |
| | | } |
| | | finally |
| | | { |
| | |
| | | // the |
| | | // certificates. Maybe we should avoid this and be strict, but |
| | | // we are in a best effort mode. |
| | | LOG.log(Level.WARNING, "Error with the keystore", e); |
| | | logger.warn(LocalizableMessage.raw("Error with the keystore"), e); |
| | | } |
| | | catch (NoSuchAlgorithmException e) |
| | | { |
| | |
| | | // certificates. Maybe we should avoid this and be strict, but |
| | | // we are |
| | | // in a best effort mode. |
| | | LOG.log(Level.WARNING, "Error with the keystore", e); |
| | | logger.warn(LocalizableMessage.raw("Error with the keystore"), e); |
| | | } |
| | | catch (CertificateException e) |
| | | { |
| | |
| | | // certificates. Maybe we should avoid this and be strict, but |
| | | // we are |
| | | // in a best effort mode. |
| | | LOG.log(Level.WARNING, "Error with the keystore", e); |
| | | logger.warn(LocalizableMessage.raw("Error with the keystore"), e); |
| | | } |
| | | catch (IOException e) |
| | | { |
| | |
| | | // certificates. Maybe we should avoid this and be strict, but |
| | | // we are |
| | | // in a best effort mode. |
| | | LOG.log(Level.WARNING, "Error with the keystore", e); |
| | | logger.warn(LocalizableMessage.raw("Error with the keystore"), e); |
| | | } |
| | | finally |
| | | { |
| | |
| | | |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.server.admin.client.cli.DsFrameworkCliReturnCode.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.tools.ToolConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | import org.opends.admin.ads.util.ApplicationTrustManager; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.util.PasswordReader; |
| | | import org.opends.server.util.args.Argument; |
| | | import org.opends.server.util.args.ArgumentException; |
| | |
| | | * look for properties file. |
| | | */ |
| | | protected BooleanArgument noPropertiesFileArg; |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * End Of Line. |
| | |
| | | bindPasswordValue = new String(pwChars); |
| | | } catch(Exception ex) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | try |
| | | { |
| | | err.write(wrapText(ex.getMessage(), MAX_LINE_WIDTH).getBytes()); |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | try |
| | | { |
| | | err.write(wrapText(ex.getMessage(), MAX_LINE_WIDTH).getBytes()); |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | |
| | |
| | | import org.opends.server.api.ConfigAddListener; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | |
| | |
| | | */ |
| | | final class ConfigAddListenerAdaptor<S extends Configuration> extends |
| | | AbstractConfigListenerAdaptor implements ConfigAddListener { |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // Cached managed object between accept/apply callbacks. |
| | | private ServerManagedObject<? extends S> cachedManagedObject; |
| | |
| | | try { |
| | | handler.performPostAdd(cachedManagedObject); |
| | | } catch (ConfigException e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.HashSet; |
| | | import java.util.LinkedList; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // Cached managed object between accept/apply call-backs. |
| | | private ServerManagedObject<? extends S> cachedManagedObject; |
| | |
| | | try { |
| | | handler.performPostModify(cachedManagedObject); |
| | | } catch (ConfigException e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } catch (ConfigException e) { |
| | | // The dependent entry could not be retrieved. |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = AdminMessages.ERR_ADMIN_CANNOT_GET_MANAGED_OBJECT.get( |
| | | String.valueOf(dn), StaticUtils.getExceptionMessage(e)); |
| | |
| | | |
| | | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | |
| | |
| | | import org.opends.server.api.ConfigDeleteListener; |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | |
| | |
| | | */ |
| | | final class ConfigDeleteListenerAdaptor<S extends Configuration> extends |
| | | AbstractConfigListenerAdaptor implements ConfigDeleteListener { |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // Cached managed object between accept/apply callbacks. |
| | | private ServerManagedObject<? extends S> cachedManagedObject; |
| | |
| | | try { |
| | | handler.performPostDelete(cachedManagedObject); |
| | | } catch (ConfigException e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import org.opends.server.api.ConfigAddListener; |
| | | import org.opends.server.api.ConfigDeleteListener; |
| | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | |
| | |
| | | * "delayed" add or delete listener. |
| | | */ |
| | | final class DelayedConfigAddListener implements ConfigAddListener { |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The name of the parent entry. |
| | | private final DN parent; |
| | |
| | | myEntry.deregisterAddListener(this); |
| | | } |
| | | } catch (ConfigException e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // Ignore this error as it implies that this listener has |
| | | // already been deregistered. |
| | |
| | | |
| | | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.util.Collections; |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | public final class ServerManagedObject<S extends Configuration> implements |
| | | PropertyProvider { |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The configuration entry associated with this server managed |
| | | // object (null if root). |
| | |
| | | try { |
| | | handler.performPostAdd(this); |
| | | } catch (ConfigException e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } catch (ConfigException e) { |
| | | // Ignore the exception since this implies deregistration. |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } catch (ConfigException e) { |
| | | // Ignore the exception since this implies deregistration. |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } catch (ConfigException e) { |
| | | // Ignore the exception since this implies deregistration. |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } catch (ConfigException e) { |
| | | // Ignore the exception since this implies deregistration. |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | try { |
| | | configEntry = DirectoryServer.getConfigEntry(dn); |
| | | } catch (ConfigException e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_ADMIN_CANNOT_GET_LISTENER_BASE.get( |
| | | String.valueOf(dn), stackTraceToSingleLineString(e)); |
| | |
| | | |
| | | import static org.opends.messages.AdminMessages.*; |
| | | import static org.opends.server.admin.PropertyException.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | |
| | |
| | | new ServerManagedObject<RootCfg>( |
| | | ManagedObjectPath.emptyPath(), RootCfgDefn.getInstance(), Collections |
| | | .<PropertyDefinition<?>, SortedSet<?>> emptyMap(), null); |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | try { |
| | | configEntry = DirectoryServer.getConfigEntry(dn); |
| | | } catch (ConfigException e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_ADMIN_CANNOT_GET_MANAGED_OBJECT.get( |
| | | String.valueOf(dn), stackTraceToSingleLineString(e)); |
| | |
| | | */ |
| | | public abstract class AuthenticationPolicy |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLocalizedLogger(AuthenticationPolicy.class); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Returns the authentication policy for the user provided user. The following |
| | |
| | | String.valueOf(subentryDN)); |
| | | if (useDefaultOnError) |
| | | { |
| | | //logger.error(message); |
| | | logger.error(message); |
| | | return DirectoryServer.getDefaultPasswordPolicy(); |
| | | } |
| | | else |
| | |
| | | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.OP_ATTR_ACCOUNT_DISABLED; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.getTracer; |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | | import static org.opends.server.util.StaticUtils.toLowerCase; |
| | | |
| | |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.schema.GeneralizedTimeSyntax; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | |
| | | */ |
| | | public abstract class AuthenticationPolicyState |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | if (valueString.equals("true") || valueString.equals("yes") |
| | | || valueString.equals("on") || valueString.equals("1")) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Attribute %s resolves to true for user entry " |
| | | logger.trace("Attribute %s resolves to true for user entry " |
| | | + "%s", attributeType.getNameOrOID(), |
| | | entry.getName().toString()); |
| | | } |
| | |
| | | if (valueString.equals("false") || valueString.equals("no") |
| | | || valueString.equals("off") || valueString.equals("0")) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Attribute %s resolves to false for user " |
| | | logger.trace("Attribute %s resolves to false for user " |
| | | + "entry %s", attributeType.getNameOrOID(), entry.getName() |
| | | .toString()); |
| | | } |
| | |
| | | return ConditionResult.FALSE; |
| | | } |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Unable to resolve value %s for attribute %s " |
| | | logger.trace("Unable to resolve value %s for attribute %s " |
| | | + "in user entry %s as a Boolean.", valueString, |
| | | attributeType.getNameOrOID(), entry.getName().toString()); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning %s because attribute %s does not exist " |
| | | logger.trace("Returning %s because attribute %s does not exist " |
| | | + "in user entry %s", ConditionResult.UNDEFINED.toString(), |
| | | attributeType.getNameOrOID(), entry.getName().toString()); |
| | | } |
| | |
| | | } |
| | | catch (final Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugWarning("Unable to decode value %s for attribute %s " |
| | | logger.trace("Unable to decode value %s for attribute %s " |
| | | + "in user entry %s: %s", v.getValue().toString(), |
| | | attributeType.getNameOrOID(), entry.getName().toString(), |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | |
| | | if (timeValue == -1) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning -1 because attribute %s does not " |
| | | logger.trace("Returning -1 because attribute %s does not " |
| | | + "exist in user entry %s", attributeType.getNameOrOID(), entry |
| | | .getName().toString()); |
| | | } |
| | |
| | | } |
| | | catch (final Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | isDisabled = ConditionResult.TRUE; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("User %s is considered administratively " |
| | | logger.trace("User %s is considered administratively " |
| | | + "disabled because an error occurred while " |
| | | + "attempting to make the determination: %s.", userEntry.getName() |
| | | .toString(), stackTraceToSingleLineString(e)); |
| | |
| | | if (isDisabled == ConditionResult.UNDEFINED) |
| | | { |
| | | isDisabled = ConditionResult.FALSE; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("User %s is not administratively disabled since " |
| | | logger.trace("User %s is not administratively disabled since " |
| | | + "the attribute \"%s\" is not present in the entry.", userEntry |
| | | .getName().toString(), OP_ATTR_ACCOUNT_DISABLED); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("User %s %s administratively disabled.", userEntry |
| | | logger.trace("User %s %s administratively disabled.", userEntry |
| | | .getName().toString(), ((isDisabled == ConditionResult.TRUE) ? " is" |
| | | : " is not")); |
| | | } |
| | |
| | | import org.opends.server.core.PluginConfigManager; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.core.networkgroups.NetworkGroup; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.Entry; |
| | |
| | | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | /** |
| | |
| | | mayInvoke=true) |
| | | public abstract class ClientConnection |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The set of authentication information for this client connection. |
| | |
| | | networkGroup = NetworkGroup.getDefaultNetworkGroup(); |
| | | networkGroup.addConnection(this); |
| | | mustEvaluateNetworkGroup = true; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | LocalizableMessage message = |
| | | INFO_CHANGE_NETWORK_GROUP.get( |
| | | getConnectionID(), |
| | | "null", |
| | | networkGroup.getID()); |
| | | TRACER.debugMessage(DebugLogLevel.INFO, message.toString()); |
| | | logger.trace(message.toString()); |
| | | } |
| | | |
| | | } |
| | |
| | | if (operation == null) |
| | | { |
| | | result = privileges.contains(privilege); |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | DN authDN = authenticationInfo.getAuthenticationDN(); |
| | | |
| | |
| | | .get(getConnectionID(), -1L, |
| | | String.valueOf(authDN), |
| | | privilege.getName(), result); |
| | | TRACER.debugMessage(DebugLogLevel.INFO, message.toString()); |
| | | logger.trace(message.toString()); |
| | | } |
| | | } |
| | | else |
| | |
| | | !authenticationInfo.isAuthenticated())) { |
| | | result = privileges.contains(privilege) || |
| | | DirectoryServer.isDisabled(privilege); |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | DN authDN = authenticationInfo.getAuthenticationDN(); |
| | | |
| | |
| | | operation.getOperationID(), |
| | | String.valueOf(authDN), |
| | | privilege.getName(), result); |
| | | TRACER.debugMessage(DebugLogLevel.INFO, message.toString()); |
| | | logger.trace(message.toString()); |
| | | } |
| | | } |
| | | else |
| | |
| | | { |
| | | HashSet<Privilege> privSet = this.privileges; |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | for (Privilege p : privileges) |
| | | { |
| | |
| | | getConnectionID(), -1L, |
| | | String.valueOf(authDN), |
| | | buffer.toString(), result); |
| | | TRACER.debugMessage(DebugLogLevel.INFO, |
| | | logger.trace( |
| | | message.toString()); |
| | | } |
| | | else |
| | |
| | | operation.getOperationID(), |
| | | String.valueOf(authDN), |
| | | buffer.toString(), result); |
| | | TRACER.debugMessage(DebugLogLevel.INFO, message.toString()); |
| | | logger.trace(message.toString()); |
| | | } |
| | | |
| | | return result; |
| | |
| | | public final void setNetworkGroup (NetworkGroup networkGroup) |
| | | { |
| | | if (this.networkGroup != networkGroup) { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | LocalizableMessage message = |
| | | INFO_CHANGE_NETWORK_GROUP.get( |
| | | getConnectionID(), |
| | | this.networkGroup.getID(), |
| | | networkGroup.getID()); |
| | | TRACER.debugMessage(DebugLogLevel.INFO, message.toString()); |
| | | logger.trace(message.toString()); |
| | | } |
| | | |
| | | // If there is a change, first remove this connection |
| | |
| | | import java.util.Map; |
| | | import java.util.TreeMap; |
| | | |
| | | import com.sleepycat.je.Database; |
| | | import com.sleepycat.je.DatabaseEntry; |
| | | import com.sleepycat.je.OperationStatus; |
| | | import com.sleepycat.je.Transaction; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.server.DebugLogPublisherCfg; |
| | | import org.opends.server.loggers.debug.TraceSettings; |
| | |
| | | String msg, |
| | | Throwable ex, StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Log an JE database access in a method. |
| | | * @param settings The current trace settings in effect. |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param status The status of the JE operation. |
| | | * @param database The database handle. |
| | | * @param txn The transaction handle (may be |
| | | * {@code null}). |
| | | * @param key The key to dump. |
| | | * @param data The data to dump. |
| | | * @param stackTrace The stack trace at the time the access |
| | | * occurred or null if its not available. |
| | | */ |
| | | public abstract void traceJEAccess(TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | OperationStatus status, |
| | | Database database, |
| | | Transaction txn, |
| | | DatabaseEntry key, |
| | | DatabaseEntry data, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | |
| | | |
| | | /** |
| | | * Log a protocol element in a method. |
| | | * @param settings The current trace settings in effect. |
| | | * @param signature The method signature. |
| | | * @param sourceLocation The location of the method in the source. |
| | | * @param decodedForm The string representation of the protocol |
| | | * element. |
| | | * @param stackTrace The stack trace at the time the protocol |
| | | * element is logged or null if its not |
| | | * available. |
| | | */ |
| | | public abstract void traceProtocolElement(TraceSettings settings, |
| | | String signature, |
| | | String sourceLocation, |
| | | String decodedForm, |
| | | StackTraceElement[] stackTrace); |
| | | |
| | | } |
| | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.backends.task.Task; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The directory thread group that all directory threads will be a |
| | |
| | | // shutdown. |
| | | return; |
| | | } |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_UNCAUGHT_THREAD_EXCEPTION.get( |
| | | t.getName(), stackTraceToSingleLineString(e)); |
| | |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.SearchFilter; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.admin.std.server.EntryCacheCfg; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.monitors.EntryCacheMonitorProvider; |
| | | import org.opends.server.types.Attribute; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | |
| | | |
| | |
| | | public abstract class EntryCache |
| | | <T extends EntryCacheCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The set of filters that define the entries that should be |
| | | // excluded from the cache. |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // This shouldn't happen, but if it does then we can't be |
| | | // sure whether the entry should be excluded, so we will |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // This shouldn't happen, but if it does, then |
| | | // just ignore it. |
| | |
| | | import org.opends.server.admin.std.server.VirtualAttributeCfg; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | /** |
| | | * This class defines the set of methods and structures that must be |
| | |
| | | public abstract class VirtualAttributeProvider |
| | | <T extends VirtualAttributeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Initializes this virtual attribute based on the information in |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // The substring couldn't be normalized. We have to return |
| | | // "undefined". |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // The substring couldn't be normalized. We have to return |
| | | // "undefined". |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // The substring couldn't be normalized. We have to return |
| | | // "undefined". |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // The value couldn't be normalized. If we can't find a |
| | | // definite match, then we should return "undefined". |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // We couldn't normalize the provided value. We should return |
| | | // "undefined". |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // We couldn't normalize one of the attribute values. If we |
| | | // can't find a definite match, then we should return |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // We couldn't normalize the provided value. We should return |
| | | // "undefined". |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // We couldn't normalize one of the attribute values. If we |
| | | // can't find a definite match, then we should return |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // We couldn't normalize the provided value. We should return |
| | | // "undefined". |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // We couldn't normalize one of the attribute values. If we |
| | | // can't find a definite match, then we should return |
| | |
| | | import static org.opends.server.authorization.dseecompat.EnumEvalReason.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.controls.GetEffectiveRightsRequestControl; |
| | | import org.opends.server.core.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.internal.InternalSearchOperation; |
| | | import org.opends.server.protocols.ldap.LDAPControl; |
| | |
| | | * the search reference access check. |
| | | */ |
| | | private static AttributeType refAttrType; |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | static |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // FIXME -- Is there anything that we need to do here? |
| | | continue; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | LocalizableMessage message = INFO_ACI_HANDLER_FAIL_PROCESS_GLOBAL_ACI.get( |
| | | String.valueOf(configuration.dn())); |
| | | throw new InitializationException(message, e); |
| | |
| | | import org.opends.server.protocols.internal.InternalSearchOperation; |
| | | import org.opends.server.protocols.ldap.LDAPControl; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import static org.opends.messages.AccessControlMessages.*; |
| | | import org.opends.server.core.DirectoryServer; |
| | |
| | | public class AciListenerManager implements |
| | | BackendInitializationListener, AlertGenerator |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | continue; |
| | | } |
| | | InternalSearchOperation internalSearch = |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | continue; |
| | | } |
| | | if (!internalSearch.getSearchEntries().isEmpty()) |
| | |
| | | import static org.opends.messages.AccessControlMessages.*; |
| | | import static org.opends.server.authorization.dseecompat.Aci.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.net.InetAddress; |
| | |
| | | import java.util.regex.Pattern; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | /** |
| | | * This class implements the dns bind rule keyword. |
| | | */ |
| | | public class DNS implements KeywordBindRule { |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** List of patterns to match against. */ |
| | | private List<String> patterns = null; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_ACI_ERROR_CHECKING_CANONICAL_HOSTNAME. |
| | | get(hn, expr, getExceptionMessage(e)); |
| | |
| | | import static org.opends.server.util.StaticUtils.hexStringToByteArray; |
| | | import org.forgerock.util.Reject; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | */ |
| | | public class PatternDN |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * If the pattern did not include any Multiple-Whole-RDN wildcards, then |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_DN_ATTR_VALUE_DECODE_FAILURE.get( |
| | | dnString, String.valueOf(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_DN_ATTR_VALUE_DECODE_FAILURE.get( |
| | | dnString, String.valueOf(e)); |
| | |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.schema.BooleanSyntax; |
| | |
| | | |
| | | import static org.opends.messages.BackendMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | extends Backend |
| | | implements ConfigurationChangeListener<BackupBackendCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_BACKUP_CANNOT_DECODE_BACKUP_ROOT_DN.get(getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_BACKEND_CANNOT_REGISTER_BASEDN.get( |
| | | backupBaseDN.toString(), getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (ConfigException ce) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | logger.traceException(ce); |
| | | |
| | | LocalizableMessage message = ERR_BACKUP_INVALID_BACKUP_DIRECTORY.get( |
| | | String.valueOf(entryDN), ce.getMessage()); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_BACKUP_ERROR_GETTING_BACKUP_DIRECTORY.get(getExceptionMessage(e)); |
| | |
| | | backupDirectory = BackupDirectory.readBackupDirectoryDescriptor(v |
| | | .getValue().toString()); |
| | | } catch (ConfigException ce) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | logger.traceException(ce); |
| | | |
| | | LocalizableMessage message = ERR_BACKUP_INVALID_BACKUP_DIRECTORY.get(String |
| | | .valueOf(entryDN), ce.getMessageObject()); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, message); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_BACKUP_ERROR_GETTING_BACKUP_DIRECTORY |
| | | .get(getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | continue; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | continue; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | continue; |
| | | } |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.controls.SubtreeDeleteControl; |
| | | import org.opends.server.core.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.*; |
| | | import org.forgerock.util.Reject; |
| | | |
| | | import static org.opends.messages.BackendMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | extends Backend |
| | | implements ConfigurationChangeListener<LDIFBackendCfg>, AlertGenerator |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_BACKEND_CANNOT_REGISTER_BASEDN.get( |
| | | dn.toString(), getExceptionMessage(e)); |
| | |
| | | if (! ldifFile.exists()) |
| | | { |
| | | // This is fine. We will just start with an empty backend. |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("LDIF backend starting empty because LDIF file " + |
| | | logger.trace("LDIF backend starting empty because LDIF file " + |
| | | ldifFilePath + " does not exist"); |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage m = ERR_LDIF_BACKEND_ERROR_CREATING_FILE.get( |
| | | tempFile.getAbsolutePath(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | StaticUtils.close(writer); |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | try |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | try |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage m = ERR_LDIF_BACKEND_ERROR_RENAMING_FILE.get( |
| | | tempFile.getAbsolutePath(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (oldEntry == null) |
| | | { |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("Subtree rename encountered entry DN " + |
| | | logger.trace("Subtree rename encountered entry DN " + |
| | | entryDN + " for nonexistent entry."); |
| | | } |
| | | return; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage m = ERR_LDIF_BACKEND_CANNOT_CREATE_LDIF_WRITER.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.BackupConfig; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.ConditionResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | |
| | | import org.forgerock.util.Reject; |
| | | |
| | | import static org.opends.messages.BackendMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | public class MemoryBackend |
| | | extends Backend |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_BACKEND_CANNOT_REGISTER_BASEDN.get( |
| | | dn.toString(), getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | // This shouldn't happen, but we want the delete to continue anyway |
| | | // so just ignore it if it does for some reason. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_MEMORYBACKEND_CANNOT_CREATE_LDIF_WRITER.get(String.valueOf(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import static org.opends.messages.BackendMessages.*; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.getTracer; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.getExceptionMessage; |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.DynamicConstants; |
| | | import org.opends.server.util.LDIFWriter; |
| | |
| | | public class MonitorBackend extends Backend implements |
| | | ConfigurationChangeListener<MonitorBackendCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The set of user-defined attributes that will be included in the base |
| | | // monitor entry. |
| | |
| | | } |
| | | catch (final Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(ERR_CONFIG_BACKEND_ERROR_INTERACTING_WITH_BACKEND_ENTRY.get( |
| | | String.valueOf(configEntryDN), stackTraceToSingleLineString(e))); |
| | |
| | | } |
| | | catch (final Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | final LocalizableMessage message = ERR_MONITOR_CANNOT_DECODE_MONITOR_ROOT_DN |
| | | .get(getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (final Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | final LocalizableMessage message = ERR_ROOTDSE_UNABLE_TO_CREATE_LDIF_WRITER |
| | | .get(stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (final Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | try |
| | | { |
| | |
| | | } |
| | | catch (final Exception e2) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | logger.traceException(e2); |
| | | } |
| | | |
| | | final LocalizableMessage message = ERR_MONITOR_UNABLE_TO_EXPORT_BASE |
| | |
| | | } |
| | | catch (final Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | try |
| | | { |
| | |
| | | } |
| | | catch (final Exception e2) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | logger.traceException(e2); |
| | | } |
| | | |
| | | final LocalizableMessage message = ERR_MONITOR_UNABLE_TO_EXPORT_PROVIDER_ENTRY |
| | |
| | | } |
| | | catch (final Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (final Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (final Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | final LocalizableMessage message = ERR_BACKEND_CANNOT_REGISTER_BASEDN.get( |
| | | baseMonitorDN.toString(), getExceptionMessage(e)); |
| | |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.BackupConfig; |
| | | import org.opends.server.types.BackupDirectory; |
| | | import org.opends.server.types.ConditionResult; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | |
| | | import org.forgerock.util.Reject; |
| | | |
| | | import static org.opends.messages.BackendMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | */ |
| | | public class NullBackend extends Backend |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_BACKEND_CANNOT_REGISTER_BASEDN.get( |
| | | dn.toString(), getExceptionMessage(e)); |
| | |
| | | try { |
| | | DirectoryServer.registerObjectClass(nulOC, false); |
| | | } catch (DirectoryException de) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | throw new InitializationException(de.getMessageObject()); |
| | | } |
| | | objectClasses.put(nulOC, nulOCName); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | try { |
| | | ldifWriter = new LDIFWriter(exportConfig); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = LocalizableMessage.raw(e.getMessage()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | |
| | | try { |
| | | ldifWriter.close(); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.core.WorkflowTopologyNode; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.LDIFWriter; |
| | | import org.forgerock.util.Reject; |
| | |
| | | import static org.opends.messages.ConfigMessages. |
| | | ERR_CONFIG_BACKEND_ERROR_INTERACTING_WITH_BACKEND_ENTRY; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | extends Backend |
| | | implements ConfigurationChangeListener<RootDSEBackendCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_ROOTDSE_SUBORDINATE_BASE_EXCEPTION.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | throw de; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_ROOTDSE_UNEXPECTED_SEARCH_FAILURE. |
| | | get(searchOperation.getConnectionID(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_ROOTDSE_UNABLE_TO_CREATE_LDIF_WRITER.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_ROOTDSE_UNABLE_TO_EXPORT_DSE.get(stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_ROOTDSE_SUBORDINATE_BASE_EXCEPTION.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_ROOTDSE_SUBORDINATE_BASE_EXCEPTION.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (ConfigException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(ERR_CONFIG_BACKEND_ERROR_INTERACTING_WITH_BACKEND_ENTRY.get( |
| | | String.valueOf(configEntryDN), |
| | |
| | | import org.opends.server.core.SchemaConfigManager; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.schema.AttributeTypeSyntax; |
| | | import org.opends.server.schema.DITContentRuleSyntax; |
| | | import org.opends.server.schema.DITStructureRuleSyntax; |
| | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.messages.SchemaMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | extends Backend |
| | | implements ConfigurationChangeListener<SchemaBackendCfg>, AlertGenerator |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | /** |
| | |
| | | try { |
| | | DirectoryServer.registerBaseDN(baseDN, this, true); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_BACKEND_CANNOT_REGISTER_BASEDN.get( |
| | | baseDN.toString(), getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_ERROR_DETERMINING_SCHEMA_CHANGES.get( |
| | | getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_ATTRTYPE.get( |
| | | v.getValue().toString(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_OBJECTCLASS. |
| | | get(v.getValue().toString(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_NAME_FORM.get( |
| | | v.getValue().toString(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_DCR.get( |
| | | v.getValue().toString(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_DSR.get( |
| | | v.getValue().toString(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_MR_USE.get( |
| | | v.getValue().toString(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_SCHEMA_MODIFY_CANNOT_DECODE_LDAP_SYNTAX.get( |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_ATTRTYPE.get( |
| | | v.getValue().toString(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_OBJECTCLASS. |
| | | get(v.getValue().toString(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_NAME_FORM.get( |
| | | v.getValue().toString(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_DCR.get( |
| | | v.getValue().toString(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_DSR.get( |
| | | v.getValue().toString(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_MR_USE.get( |
| | | v.getValue().toString(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_SCHEMA_MODIFY_CANNOT_DECODE_LDAP_SYNTAX.get( |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | throw de; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_SCHEMA_MODIFY_CANNOT_WRITE_NEW_SCHEMA.get(getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_ATTRTYPE.get( |
| | | v.getValue().toString(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_OBJECTCLASS.get( |
| | | v.getValue().toString(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_NAME_FORM.get( |
| | | v.getValue().toString(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_DSR.get( |
| | | v.getValue().toString(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | boolean allCleaned = true; |
| | | for (File f : origFileList) |
| | |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | logger.traceException(e2); |
| | | |
| | | allCleaned = false; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | for (File f : installedFileList) |
| | | { |
| | |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | logger.traceException(e2); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | logger.traceException(e2); |
| | | |
| | | allRestored = false; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_UNABLE_TO_CREATE_LDIF_WRITER.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_SCHEMA_UNABLE_TO_EXPORT_BASE.get(stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | attrTypeSyntax = new AttributeTypeSyntax(); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | ocSyntax = new ObjectClassSyntax(); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_BACKUP_CANNOT_GET_MAC.get( |
| | | macKeyID, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_BACKUP_CANNOT_GET_DIGEST.get( |
| | | digestAlgorithm, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_BACKUP_CANNOT_CREATE_ARCHIVE_FILE. |
| | | get(String.valueOf(filename), backupDirectory.getPath(), |
| | |
| | | } |
| | | catch (CryptoManagerException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_BACKUP_CANNOT_GET_CIPHER.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | try |
| | | { |
| | |
| | | catch (Exception e) |
| | | { |
| | | // Can't locate or list Instance schema directory |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | message = ERR_SCHEMA_BACKUP_CANNOT_LIST_SCHEMA_FILES.get( |
| | | schemaInstanceDirPath, stackTraceToSingleLineString(e)); |
| | |
| | | inputStream.close(); |
| | | } catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | try |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | message = ERR_SCHEMA_BACKUP_CANNOT_CLOSE_ZIP_STREAM.get( |
| | | filename, backupDirectory.getPath(), stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | message = ERR_SCHEMA_BACKUP_CANNOT_UPDATE_BACKUP_DESCRIPTOR.get( |
| | | backupDirectory.getDescriptorPath(), stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (ConfigException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessageObject()); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_BACKUP_CANNOT_UPDATE_BACKUP_DESCRIPTOR.get( |
| | | backupDirectory.getDescriptorPath(), stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | |
| | | messages.add(ERR_SCHEMA_CANNOT_DETERMINE_BASE_DN.get( |
| | |
| | | } |
| | | catch (ConfigException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(ERR_CONFIG_BACKEND_ERROR_INTERACTING_WITH_BACKEND_ENTRY.get( |
| | | String.valueOf(configEntryDN), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(ERR_SCHEMA_CANNOT_DEREGISTER_BASE_DN.get( |
| | | String.valueOf(dn), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(ERR_SCHEMA_CANNOT_REGISTER_BASE_DN.get( |
| | | String.valueOf(dn), |
| | |
| | | |
| | | import static org.opends.messages.BackendMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.util.CertificateManager; |
| | |
| | | extends Backend |
| | | implements ConfigurationChangeListener<TrustStoreBackendCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (KeyStoreException kse) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, kse); |
| | | } |
| | | logger.traceException(kse); |
| | | |
| | | LocalizableMessage message = ERR_TRUSTSTORE_INVALID_TYPE. |
| | | get(String.valueOf(trustStoreType), String.valueOf(configEntryDN), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_BACKEND_CANNOT_REGISTER_BASEDN.get( |
| | | String.valueOf(baseDN), String.valueOf(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (KeyStoreException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | return numEntries; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.VERBOSE, e); |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | LocalizableMessage message = ERR_TRUSTSTORE_CANNOT_RETRIEVE_CERT.get( |
| | |
| | | } |
| | | catch (KeyStoreException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | if (aliases == null) |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.VERBOSE, e); |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | continue; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | unacceptableReasons.add(ERR_TRUSTSTORE_CANNOT_DETERMINE_FILE.get( |
| | | String.valueOf(cfgEntryDN), |
| | |
| | | } |
| | | catch (KeyStoreException kse) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, kse); |
| | | } |
| | | logger.traceException(kse); |
| | | |
| | | LocalizableMessage message = ERR_TRUSTSTORE_INVALID_TYPE.get( |
| | | String.valueOf(storeType), |
| | |
| | | } |
| | | catch (KeyStoreException kse) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, kse); |
| | | } |
| | | logger.traceException(kse); |
| | | |
| | | messages.add(ERR_TRUSTSTORE_INVALID_TYPE.get( |
| | | String.valueOf(newTrustStoreType), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_TRUSTSTORE_CANNOT_LOAD.get( |
| | | trustStoreFile, getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_TRUSTSTORE_CANNOT_CREATE_FACTORY.get( |
| | | trustStoreFile, getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_TRUSTSTORE_CANNOT_LOAD.get( |
| | | trustStoreFile, getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_TRUSTSTORE_CANNOT_CREATE_FACTORY.get( |
| | | trustStoreFile, getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_TRUSTSTORE_CANNOT_LOAD.get( |
| | | trustStoreFile, getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_TRUSTSTORE_ERROR_READING_KEY.get( |
| | | alias, trustStoreFile, getExceptionMessage(e)); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import java.util.*; |
| | | |
| | | import org.opends.server.types.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class ApproximateIndexer extends Indexer |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The comparator for index keys generated by this class. |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | import org.opends.server.monitors.DatabaseEnvironmentMonitor; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.admin.std.server.LocalDBIndexCfg; |
| | |
| | | public class AttributeIndex |
| | | implements ConfigurationChangeListener<LocalDBIndexCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | return new EntryIDSet(); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | return new EntryIDSet(); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | return new EntryIDSet(); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | return new EntryIDSet(); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | return new EntryIDSet(); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | return new EntryIDSet(); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | return IndexQuery.createNullIndexQuery().evaluate(null); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | return IndexQuery.createNullIndexQuery().evaluate(null); |
| | | } |
| | | } |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.*; |
| | | import org.opends.server.extensions.DiskSpaceMonitor; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.RuntimeInformation; |
| | | import org.forgerock.util.Reject; |
| | |
| | | import static org.opends.messages.BackendMessages.*; |
| | | import static org.opends.messages.JebMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | implements ConfigurationChangeListener<LocalDBBackendCfg>, AlertGenerator, |
| | | DiskSpaceMonitorHandler |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | catch (InterruptedException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | return cis.getChecksum().getValue(); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } finally { |
| | | if (fis != null) { |
| | | try { |
| | | fis.close(); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch(DatabaseException databaseException) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, databaseException); |
| | | } |
| | | logger.traceException(databaseException); |
| | | LocalizableMessage message = |
| | | WARN_JEB_GET_ENTRY_COUNT_FAILED.get(databaseException.getMessage()); |
| | | throw new InitializationException( |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_BACKEND_CANNOT_REGISTER_BASEDN.get( |
| | | String.valueOf(dn), String.valueOf(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | LocalizableMessage message = ERR_JEB_DATABASE_EXCEPTION.get(e.getMessage()); |
| | | logError(message); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | return false; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw createDirectoryException(e); |
| | | } |
| | | finally |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw createDirectoryException(e); |
| | | } |
| | | finally |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw createDirectoryException(e); |
| | | } |
| | | finally |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw createDirectoryException(e); |
| | | } |
| | | finally |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw createDirectoryException(e); |
| | | } |
| | | finally |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw createDirectoryException(e); |
| | | } |
| | | finally |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw createDirectoryException(e); |
| | | } |
| | | finally |
| | |
| | | } |
| | | catch (IOException ioe) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | } |
| | | logger.traceException(ioe); |
| | | LocalizableMessage message = ERR_JEB_EXPORT_IO_ERROR.get(ioe.getMessage()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message); |
| | | } |
| | | catch (DatabaseException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | throw createDirectoryException(de); |
| | | } |
| | | catch (IdentifiedException e) |
| | |
| | | { |
| | | throw (DirectoryException) e; |
| | | } |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessageObject()); |
| | | } |
| | |
| | | } |
| | | catch (ExecutionException execEx) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, execEx); |
| | | } |
| | | logger.traceException(execEx); |
| | | if (execEx.getCause() instanceof DirectoryException) |
| | | { |
| | | throw ((DirectoryException) execEx.getCause()); |
| | |
| | | } |
| | | catch (InterruptedException intEx) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, intEx); |
| | | } |
| | | logger.traceException(intEx); |
| | | LocalizableMessage message = ERR_INTERRUPTED_ERROR.get(intEx.getMessage()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message); |
| | | } |
| | | catch (JebException je) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, je); |
| | | } |
| | | logger.traceException(je); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | je.getMessageObject()); |
| | | } |
| | | catch (InitializationException ie) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | logger.traceException(ie); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | ie.getMessageObject()); |
| | | } |
| | | catch (ConfigException ce) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | logger.traceException(ce); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | ce.getMessageObject()); |
| | | } |
| | |
| | | } |
| | | |
| | | // Sync the environment to disk. |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | LocalizableMessage message = NOTE_JEB_IMPORT_CLOSING_DATABASE.get(); |
| | | TRACER.debugInfo(message.toString()); |
| | | logger.trace(message.toString()); |
| | | } |
| | | } |
| | | catch (DatabaseException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw createDirectoryException(e); |
| | | } |
| | | catch (JebException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessageObject()); |
| | | } |
| | |
| | | } |
| | | catch (ExecutionException execEx) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, execEx); |
| | | } |
| | | logger.traceException(execEx); |
| | | LocalizableMessage message = ERR_EXECUTION_ERROR.get(execEx.getMessage()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message); |
| | | } |
| | | catch (InterruptedException intEx) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, intEx); |
| | | } |
| | | logger.traceException(intEx); |
| | | LocalizableMessage message = ERR_INTERRUPTED_ERROR.get(intEx.getMessage()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message); |
| | | } |
| | | catch (ConfigException ce) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | logger.traceException(ce); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | ce.getMessageObject()); |
| | | } |
| | | catch (JebException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessageObject()); |
| | | } |
| | | catch (InitializationException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw new InitializationException(e.getMessageObject()); |
| | | } |
| | | finally |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | |
| | |
| | | return rc; |
| | | } |
| | | catch (DatabaseException e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | LocalizableMessage message = ERR_JEB_OPEN_ENV_FAIL.get(e.getMessage()); |
| | | throw new InitializationException(message, e); |
| | | } |
| | |
| | | |
| | | import org.opends.server.types.*; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.JebMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | */ |
| | | public class BackupManager |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The common prefix for archive files. |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_JEB_BACKUP_CANNOT_GET_MAC.get( |
| | | macKeyID, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_JEB_BACKUP_CANNOT_GET_DIGEST.get( |
| | | digestAlgorithm, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_JEB_BACKUP_CANNOT_CREATE_ARCHIVE_FILE. |
| | | get(String.valueOf(archiveFilename), backupDir.getPath(), |
| | |
| | | } |
| | | catch (CryptoManagerException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_JEB_BACKUP_CANNOT_GET_CIPHER.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | message = ERR_JEB_BACKUP_CANNOT_LIST_LOG_FILES.get( |
| | | backendDir.getAbsolutePath(), stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (IOException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | message = ERR_JEB_BACKUP_CANNOT_WRITE_ARCHIVE_FILE.get( |
| | | ZIPENTRY_EMPTY_PLACEHOLDER, stackTraceToSingleLineString(e)); |
| | | throw new DirectoryException( |
| | |
| | | } |
| | | catch (IOException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | message = ERR_JEB_BACKUP_CANNOT_WRITE_ARCHIVE_FILE.get( |
| | | zipEntryName, stackTraceToSingleLineString(e)); |
| | | throw new DirectoryException( |
| | |
| | | } |
| | | catch (FileNotFoundException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // A log file has been deleted by the cleaner since we started. |
| | | deletedFiles = true; |
| | | } |
| | | catch (IOException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | message = ERR_JEB_BACKUP_CANNOT_WRITE_ARCHIVE_FILE.get( |
| | | logFile.getName(), stackTraceToSingleLineString(e)); |
| | | throw new DirectoryException( |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | message = ERR_JEB_BACKUP_CANNOT_LIST_LOG_FILES.get( |
| | | backendDir.getAbsolutePath(), stackTraceToSingleLineString(e)); |
| | |
| | | // to close the zipStream is clumsy. Needs cleanup and best practice. |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | try |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | message = ERR_JEB_BACKUP_CANNOT_CLOSE_ZIP_STREAM. |
| | | get(archiveFilename, backupDir.getPath(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | message = ERR_JEB_BACKUP_CANNOT_UPDATE_BACKUP_DESCRIPTOR.get( |
| | | backupDir.getDescriptorPath(), stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (IOException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | LocalizableMessage message = ERR_JEB_BACKUP_CANNOT_RESTORE.get( |
| | | backupInfo.getBackupID(), stackTraceToSingleLineString(e)); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | |
| | | } |
| | | catch (IOException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | LocalizableMessage message = ERR_JEB_BACKUP_CANNOT_RESTORE.get( |
| | | dependent.getBackupID(), stackTraceToSingleLineString(e)); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | |
| | | } |
| | | catch (IOException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | LocalizableMessage message = ERR_JEB_BACKUP_CANNOT_RESTORE.get( |
| | | backupInfo.getBackupID(), stackTraceToSingleLineString(e)); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | |
| | | } |
| | | catch (ConfigException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessageObject()); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_JEB_BACKUP_CANNOT_UPDATE_BACKUP_DESCRIPTOR.get( |
| | | backupDir.getDescriptorPath(), stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_JEB_BACKUP_CANNOT_GET_MAC.get( |
| | | macKeyID, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_JEB_BACKUP_CANNOT_GET_DIGEST.get( |
| | | digestAlgorithm, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (CryptoManagerException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_JEB_BACKUP_CANNOT_GET_CIPHER.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (CryptoManagerException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_JEB_BACKUP_CANNOT_GET_CIPHER.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | import java.util.logging.Logger; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.admin.BooleanPropertyDefinition; |
| | | import org.opends.server.admin.DurationPropertyDefinition; |
| | | import org.opends.server.admin.PropertyDefinition; |
| | |
| | | import org.opends.server.admin.std.server.LocalDBBackendCfg; |
| | | import org.opends.server.config.ConfigConstants; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | import com.sleepycat.je.Durability; |
| | | import com.sleepycat.je.EnvironmentConfig; |
| | | import com.sleepycat.je.dbi.MemoryBudget; |
| | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.messages.JebMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | /** |
| | | * This class maps JE properties to configuration attributes. |
| | | */ |
| | | public class ConfigurableEnvironment |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The name of the attribute which configures the database cache size as a |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | return ""; |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | // Add this property to unique set. |
| | | uniqueJEProperties.add(jePropertyName); |
| | | } catch(IllegalArgumentException e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | LocalizableMessage message = |
| | | ERR_CONFIG_JE_PROPERTY_INVALID.get( |
| | | jeEntry, e.getMessage()); |
| | |
| | | import com.sleepycat.je.*; |
| | | |
| | | import org.opends.server.types.DN; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import java.util.Comparator; |
| | | |
| | |
| | | */ |
| | | public class DN2ID extends DatabaseContainer |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The key comparator used for the DN database. |
| | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | |
| | | import java.util.*; |
| | | |
| | | import static org.opends.server.util.ServerConstants.ATTR_REFERRAL_URL; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.messages.JebMessages. |
| | | NOTE_JEB_REFERRAL_RESULT_MESSAGE; |
| | | /** |
| | |
| | | */ |
| | | public class DN2URI extends DatabaseContainer |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The key comparator used for the DN database. |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | return ConditionResult.UNDEFINED; |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | // Return the non-LDAP URI as is. |
| | | } |
| | | |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | catch (UnsupportedEncodingException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | // Return the non-LDAP URI as is. |
| | | } |
| | | |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | catch (UnsupportedEncodingException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | return true; |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import com.sleepycat.je.*; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.util.ServerConstants; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | /** |
| | | * This class is a wrapper around the JE database object and provides basic |
| | |
| | | */ |
| | | public abstract class DatabaseContainer |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The database entryContainer. |
| | |
| | | try |
| | | { |
| | | database = env.openDatabase(txn, name, dbConfig); |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugVerbose("JE database %s opened. txnid=%d", |
| | | logger.trace("JE database %s opened. txnid=%d", |
| | | database.getDatabaseName(), |
| | | txn.getId()); |
| | | } |
| | |
| | | else |
| | | { |
| | | database = env.openDatabase(null, name, dbConfig); |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugVerbose("JE database %s opened. txnid=none", |
| | | logger.trace("JE database %s opened. txnid=none", |
| | | database.getDatabaseName()); |
| | | } |
| | | } |
| | |
| | | database.close(); |
| | | database = null; |
| | | |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Closed database %s", name); |
| | | logger.trace("Closed database %s", name); |
| | | } |
| | | } |
| | | |
| | |
| | | throws DatabaseException |
| | | { |
| | | OperationStatus status = database.put(txn, key, data); |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugJEAccess(DebugLogLevel.VERBOSE, status, database, |
| | | txn, key, data); |
| | | logger.trace(messageToLog(status, database, txn, key, data)); |
| | | } |
| | | return status; |
| | | } |
| | |
| | | throws DatabaseException |
| | | { |
| | | OperationStatus status = database.get(txn, key, data, lockMode); |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugJEAccess(DebugLogLevel.VERBOSE, status, database, txn, key, |
| | | data); |
| | | logger.trace(messageToLog(status, database, txn, key, data)); |
| | | } |
| | | return status; |
| | | } |
| | |
| | | throws DatabaseException |
| | | { |
| | | OperationStatus status = database.putNoOverwrite(txn, key, data); |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugJEAccess(DebugLogLevel.VERBOSE, status, database, txn, key, |
| | | data); |
| | | logger.trace(messageToLog(status, database, txn, key, data)); |
| | | } |
| | | return status; |
| | | } |
| | |
| | | throws DatabaseException |
| | | { |
| | | OperationStatus status = database.delete(txn, key); |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugJEAccess(DebugLogLevel.VERBOSE, status, database, txn, |
| | | key, null); |
| | | logger.trace(messageToLog(status, database, txn, key, null)); |
| | | } |
| | | return status; |
| | | } |
| | |
| | | public long getRecordCount() throws DatabaseException |
| | | { |
| | | long count = database.count(); |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugJEAccess(DebugLogLevel.VERBOSE, OperationStatus.SUCCESS, |
| | | database, null, null, null); |
| | | logger.trace(messageToLog(OperationStatus.SUCCESS, database, null, null, null)); |
| | | } |
| | | return count; |
| | | } |
| | |
| | | { |
| | | this.name = name; |
| | | } |
| | | |
| | | /** Returns the message to log given the provided information. */ |
| | | private String messageToLog(OperationStatus status, Database database, |
| | | Transaction txn, DatabaseEntry key, DatabaseEntry data) |
| | | { |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(" ("); |
| | | builder.append(status.toString()); |
| | | builder.append(")"); |
| | | builder.append(" db="); |
| | | try |
| | | { |
| | | builder.append(database.getDatabaseName()); |
| | | } |
| | | catch (DatabaseException de) |
| | | { |
| | | builder.append(de.toString()); |
| | | } |
| | | if (txn != null) |
| | | { |
| | | builder.append(" txnid="); |
| | | try |
| | | { |
| | | builder.append(txn.getId()); |
| | | } |
| | | catch (DatabaseException de) |
| | | { |
| | | builder.append(de.toString()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | builder.append(" txnid=none"); |
| | | } |
| | | |
| | | builder.append(ServerConstants.EOL); |
| | | if (key != null) |
| | | { |
| | | builder.append("key:"); |
| | | builder.append(ServerConstants.EOL); |
| | | StaticUtils.byteArrayToHexPlusAscii(builder, key.getData(), 4); |
| | | } |
| | | |
| | | // If the operation was successful we log the same common information |
| | | // plus the data |
| | | if (status == OperationStatus.SUCCESS && data != null) |
| | | { |
| | | builder.append("data(len="); |
| | | builder.append(data.getSize()); |
| | | builder.append("):"); |
| | | builder.append(ServerConstants.EOL); |
| | | StaticUtils.byteArrayToHexPlusAscii(builder, data.getData(), 4); |
| | | } |
| | | return builder.toString(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import java.util.Comparator; |
| | | |
| | |
| | | public class DbPreloadComparator |
| | | implements Comparator<DatabaseContainer> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | /** |
| | |
| | | import java.util.concurrent.atomic.AtomicLong; |
| | | import org.opends.server.api.DirectoryThread; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import org.opends.server.types.Entry; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.messages.ExtensionMessages.*; |
| | | |
| | |
| | | */ |
| | | class EntryCachePreloader |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * BackendImpl object. |
| | |
| | | jeb.getBackendID(), processedEntries.get()); |
| | | logError(message); |
| | | } catch (InterruptedException ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | // Interrupt the collector. |
| | | collector.interrupt(); |
| | | // Interrupt all preload threads. |
| | |
| | | DirectoryServer.getEntryCache().putEntry(entry, jeb, entryID); |
| | | processedEntries.getAndIncrement(); |
| | | } catch (Exception ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | LocalizableMessage message = ERR_CACHE_PRELOAD_ENTRY_FAILED.get( |
| | | entry.getName().toNormalizedString(), |
| | | (ex.getCause() != null ? ex.getCause().getMessage() : |
| | |
| | | try { |
| | | cursor.close(); |
| | | } catch (DatabaseException de) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | } |
| | | status = OperationStatus.SUCCESS; |
| | | cursor = null; |
| | |
| | | } catch (InterruptedException e) { |
| | | return; |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } finally { |
| | |
| | | try { |
| | | cursor.close(); |
| | | } catch (DatabaseException de) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | import static org.opends.messages.JebMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import com.sleepycat.je.*; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.controls.*; |
| | | import org.opends.server.core.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.ldap.LDAPResultCode; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | |
| | | public class EntryContainer |
| | | implements ConfigurationChangeListener<LocalDBBackendCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | catch (DatabaseException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | close(); |
| | | throw de; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | String str = pageRequest.getCookie().toHexString(); |
| | | LocalizableMessage msg = ERR_JEB_INVALID_PAGED_RESULTS_COOKIE.get(str); |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | if (pageRequest != null) |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | String str = pageRequest.getCookie().toHexString(); |
| | | LocalizableMessage msg = ERR_JEB_INVALID_PAGED_RESULTS_COOKIE.get(str); |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | continue; |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | return false; |
| | |
| | | // and added back into the attribute indexes. |
| | | newApexID = rootContainer.getNextEntryID(); |
| | | |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Move of target entry requires renumbering" + |
| | | logger.trace("Move of target entry requires renumbering" + |
| | | "all entries in the subtree. " + |
| | | "Old DN: %s " + |
| | | "New DN: %s " + |
| | |
| | | { |
| | | newID = rootContainer.getNextEntryID(); |
| | | |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Move of subordinate entry requires " + |
| | | logger.trace("Move of subordinate entry requires " + |
| | | "renumbering. " + |
| | | "Old DN: %s " + |
| | | "New DN: %s " + |
| | |
| | | Transaction parentTxn = null; |
| | | TransactionConfig txnConfig = null; |
| | | Transaction txn = env.beginTransaction(parentTxn, txnConfig); |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugVerbose("beginTransaction", "begin txnid=" + txn.getId()); |
| | | logger.trace("beginTransaction", "begin txnid=" + txn.getId()); |
| | | } |
| | | return txn; |
| | | } |
| | |
| | | if (txn != null) |
| | | { |
| | | txn.commit(); |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugVerbose("commit txnid=%d", txn.getId()); |
| | | logger.trace("commit txnid=%d", txn.getId()); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (txn != null) |
| | | { |
| | | txn.abort(); |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugVerbose("abort txnid=%d", txn.getId()); |
| | | logger.trace("abort txnid=%d", txn.getId()); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch(Exception de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | // This is mainly used during the unit tests, so it's not essential. |
| | | try |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | database.open(); |
| | | } |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugVerbose("Cleared the database %s", database.getName()); |
| | | logger.trace("Cleared the database %s", database.getName()); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | // The base entry must exist for a successful result. |
| | |
| | | package org.opends.server.backends.jeb; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.JebMessages.*; |
| | | |
| | | import java.io.File; |
| | |
| | | */ |
| | | public class EnvManager |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | LocalizableMessage message = ERR_JEB_CREATE_FAIL.get(e.getMessage()); |
| | | throw new JebException(message, e); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | LocalizableMessage message = ERR_JEB_REMOVE_FAIL.get(e.getMessage()); |
| | | throw new JebException(message, e); |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | |
| | | */ |
| | | public class EqualityIndexer extends Indexer |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.JebMessages.*; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class ExportJob |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("Malformed id2entry ID %s.%n", |
| | | logger.trace("Malformed id2entry ID %s.%n", |
| | | StaticUtils.bytesToHex(key.getData())); |
| | | } |
| | | skippedCount++; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("Malformed id2entry record for ID %d:%n%s%n", |
| | | logger.trace("Malformed id2entry record for ID %d:%n%s%n", |
| | | entryID.longValue(), |
| | | StaticUtils.bytesToHex(data.getData())); |
| | | } |
| | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import static org.opends.server.core.DirectoryServer.getMaxInternalBufferSize; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import static org.opends.messages.JebMessages.*; |
| | | |
| | |
| | | */ |
| | | public class ID2Entry extends DatabaseContainer |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Parameters for compression and encryption. |
| | |
| | | catch(IOException ioe) |
| | | { |
| | | // TODO: This should never happen with byte buffer. |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | logger.traceException(ioe); |
| | | } |
| | | } |
| | | } |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012-2013 ForgeRock AS |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | |
| | | import com.sleepycat.je.*; |
| | |
| | | */ |
| | | public class Index extends DatabaseContainer |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The indexer object to construct index keys from LDAP attribute values. |
| | |
| | | } |
| | | entryLimitExceededCount++; |
| | | |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | StringBuilder builder = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(builder, key.getData(), 4); |
| | | TRACER.debugInfo("Index entry exceeded in index %s. " + |
| | | logger.trace("Index entry exceeded in index %s. " + |
| | | "Limit: %d. ID list size: %d.\nKey:%s", |
| | | name, indexEntryLimit, entryIDList.size(), |
| | | builder.toString()); |
| | |
| | | |
| | | if(status != OperationStatus.SUCCESS) |
| | | { |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | StringBuilder builder = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(builder, key.getData(), 4); |
| | | TRACER.debugError( |
| | | logger.trace( |
| | | "The expected key does not exist in the index %s.\nKey:%s ", |
| | | name, builder.toString()); |
| | | } |
| | |
| | | { |
| | | if(deletedIDs != null && !rebuildRunning && trusted) |
| | | { |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | StringBuilder builder = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(builder, key.getData(), 4); |
| | | TRACER.debugError( |
| | | logger.trace( |
| | | "The expected key does not exist in the index %s.\nKey:%s ", |
| | | name, builder.toString()); |
| | | } |
| | |
| | | } |
| | | entryLimitExceededCount++; |
| | | |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | StringBuilder builder = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(builder, key.getData(), 4); |
| | | TRACER.debugInfo("Index entry exceeded in index %s. " + |
| | | logger.trace("Index entry exceeded in index %s. " + |
| | | "Limit: %d. ID list size: %d.\nKey:%s", |
| | | name, indexEntryLimit, idCountDelta + addedIDs.size(), |
| | | builder.toString()); |
| | |
| | | { |
| | | if(deletedIDs != null && !rebuildRunning && trusted) |
| | | { |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | StringBuilder builder = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(builder, key.getData(), 4); |
| | | TRACER.debugError( |
| | | logger.trace( |
| | | "The expected key does not exist in the index %s.\nKey:%s", |
| | | name, builder.toString()); |
| | | } |
| | |
| | | // will probably not be rebuilt. |
| | | if(trusted && !rebuildRunning) |
| | | { |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | StringBuilder builder = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(builder, key.getData(), 4); |
| | | TRACER.debugError( |
| | | logger.trace( |
| | | "The expected key does not exist in the index %s.\nKey:%s", |
| | | name, builder.toString()); |
| | | } |
| | |
| | | // probably already removed. |
| | | if (!entryIDList.remove(entryID) && !rebuildRunning && trusted) |
| | | { |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | StringBuilder builder = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(builder, key.getData(), 4); |
| | | TRACER.debugError("The expected entry ID does not exist in " + |
| | | logger.trace("The expected entry ID does not exist in " + |
| | | "the entry ID list for index %s.\nKey:%s", |
| | | name, builder.toString()); |
| | | } |
| | |
| | | // will probably not be rebuilt. |
| | | if(trusted && !rebuildRunning) |
| | | { |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | StringBuilder builder = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(builder, key.getData(), 4); |
| | | TRACER.debugError( |
| | | logger.trace( |
| | | "The expected key does not exist in the index %s.\nKey:%s", |
| | | name, builder.toString()); |
| | | } |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | return new EntryIDSet(); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | return new EntryIDSet(); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | import static org.opends.messages.JebMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.getTracer; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.Collection; |
| | | import java.util.LinkedList; |
| | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.CompressedSchema; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.asn1.ASN1; |
| | | import org.opends.server.protocols.asn1.ASN1Exception; |
| | | import org.opends.server.protocols.asn1.ASN1Reader; |
| | | import org.opends.server.protocols.asn1.ASN1Writer; |
| | | import org.forgerock.opendj.ldap.ByteStringBuilder; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | |
| | | * definitions. |
| | | */ |
| | | private static final String DB_NAME_OC = "compressed_object_classes"; |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The compressed attribute description schema database. |
| | | private Database adDatabase; |
| | |
| | | } |
| | | catch (final ASN1Exception ae) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | logger.traceException(ae); |
| | | |
| | | final LocalizableMessage m = ERR_JEB_COMPSCHEMA_CANNOT_DECODE_OC_TOKEN.get(ae |
| | | .getMessage()); |
| | |
| | | } |
| | | catch (final ASN1Exception ae) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | logger.traceException(ae); |
| | | |
| | | final LocalizableMessage m = ERR_JEB_COMPSCHEMA_CANNOT_DECODE_AD_TOKEN.get(ae |
| | | .getMessage()); |
| | |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.RDN; |
| | | import org.forgerock.opendj.ldap.ByteStringBuilder; |
| | |
| | | */ |
| | | public class JebFormat |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | /** |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.types.Attribute; |
| | |
| | | */ |
| | | public class OrderingIndexer extends Indexer |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import java.util.*; |
| | | import java.io.File; |
| | | import org.opends.server.monitors.DatabaseEnvironmentMonitor; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.FilePermission; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.config.ConfigException; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.InitializationException; |
| | | import static org.opends.messages.JebMessages.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | public class RootContainer |
| | | implements ConfigurationChangeListener<LocalDBBackendCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | /** |
| | |
| | | env = new Environment(backendDirectory, |
| | | envConfig); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("JE (%s) environment opened with the following " + |
| | | logger.trace("JE (%s) environment opened with the following " + |
| | | "config: %n%s", JEVersion.CURRENT_VERSION.toString(), |
| | | env.getConfig().toString()); |
| | | |
| | |
| | | // after garbage collection and decrease as new objects are created. |
| | | long heapFreeSize = Runtime.getRuntime().freeMemory(); |
| | | |
| | | TRACER.debugInfo("Current size of heap: %d bytes", heapSize); |
| | | TRACER.debugInfo("Max size of heap: %d bytes", heapMaxSize); |
| | | TRACER.debugInfo("Free memory in heap: %d bytes", heapFreeSize); |
| | | logger.trace("Current size of heap: %d bytes", heapSize); |
| | | logger.trace("Max size of heap: %d bytes", heapMaxSize); |
| | | logger.trace("Free memory in heap: %d bytes", heapFreeSize); |
| | | } |
| | | |
| | | compressedSchema = new JECompressedSchema(env); |
| | |
| | | preloadConfig.setMaxMillisecs(timeRemaining); |
| | | PreloadStats preloadStats = db.preload(preloadConfig); |
| | | |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("file=" + db.getName() + |
| | | logger.trace("file=" + db.getName() + |
| | | " LNs=" + preloadStats.getNLNsLoaded()); |
| | | } |
| | | |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_JEB_CACHE_PRELOAD.get(backend.getBackendID(), |
| | |
| | | adminActionRequired = true; |
| | | messages.add(INFO_CONFIG_JE_PROPERTY_REQUIRES_RESTART.get( |
| | | jePropertyName)); |
| | | if(debugEnabled()) { |
| | | TRACER.debugInfo("The change to the following property " + |
| | | if(logger.isTraceEnabled()) { |
| | | logger.trace("The change to the following property " + |
| | | "will take effect when the component is restarted: " + |
| | | jePropertyName); |
| | | } |
| | |
| | | messages.add(NOTE_JEB_CONFIG_ATTR_REQUIRES_RESTART |
| | | .get(param.getName())); |
| | | } |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("The change to the following property will " + |
| | | logger.trace("The change to the following property will " + |
| | | "take effect when the backend is restarted: " + |
| | | param.getName()); |
| | | } |
| | |
| | | // properties that are mutable at runtime. |
| | | env.setMutableConfig(newEnvConfig); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo(env.getConfig().toString()); |
| | | logger.trace(env.getConfig().toString()); |
| | | } |
| | | } |
| | | |
| | |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import java.util.*; |
| | | import org.opends.server.api.SubstringMatchingRule; |
| | |
| | | */ |
| | | public class SubstringIndexer extends Indexer |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import com.sleepycat.je.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.ByteStringBuilder; |
| | |
| | | ERR_JEB_CONFIG_VLV_INDEX_BAD_FILTER; |
| | | |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.util.StaticUtils; |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | |
| | | public class VLVIndex extends DatabaseContainer |
| | | implements ConfigurationChangeListener<LocalDBVLVIndexCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The comparator for vlvIndex keys. |
| | |
| | | if(status != OperationStatus.SUCCESS) |
| | | { |
| | | // There are no records in the database |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugVerbose("No sort values set exist in VLV vlvIndex %s. " + |
| | | logger.trace("No sort values set exist in VLV vlvIndex %s. " + |
| | | "Creating unbound set.", config.getName()); |
| | | } |
| | | sortValuesSet = new SortValuesSet(this); |
| | | } |
| | | else |
| | | { |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | StringBuilder searchKeyHex = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(searchKeyHex, key.getData(), 4); |
| | | StringBuilder foundKeyHex = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(foundKeyHex, key.getData(), 4); |
| | | TRACER.debugVerbose("Retrieved a sort values set in VLV vlvIndex " + |
| | | logger.trace("Retrieved a sort values set in VLV vlvIndex " + |
| | | "%s\nSearch Key:%s\nFound Key:%s\n", |
| | | config.getName(), |
| | | searchKeyHex, |
| | |
| | | if(status != OperationStatus.SUCCESS) |
| | | { |
| | | // There are no records in the database |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugVerbose("No sort values set exist in VLV vlvIndex %s. " + |
| | | logger.trace("No sort values set exist in VLV vlvIndex %s. " + |
| | | "Creating unbound set.", config.getName()); |
| | | } |
| | | sortValuesSet = new SortValuesSet(this); |
| | |
| | | } |
| | | else |
| | | { |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | StringBuilder searchKeyHex = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(searchKeyHex, key.getData(), 4); |
| | | StringBuilder foundKeyHex = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(foundKeyHex, key.getData(), 4); |
| | | TRACER.debugVerbose("Retrieved a sort values set in VLV vlvIndex " + |
| | | logger.trace("Retrieved a sort values set in VLV vlvIndex " + |
| | | "%s\nSearch Key:%s\nFound Key:%s\n", |
| | | config.getName(), |
| | | searchKeyHex, |
| | |
| | | data.setData(after); |
| | | put(txn, key, data); |
| | | |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("SortValuesSet with key %s has reached" + |
| | | logger.trace("SortValuesSet with key %s has reached" + |
| | | " the entry size of %d. Spliting into two sets with " + |
| | | " keys %s and %s.", splitSortValuesSet.getKeySortValues(), |
| | | newSize, sortValuesSet.getKeySortValues(), |
| | |
| | | |
| | | if(status == OperationStatus.SUCCESS) |
| | | { |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | StringBuilder searchKeyHex = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(searchKeyHex, key.getData(), 4); |
| | | StringBuilder foundKeyHex = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(foundKeyHex, key.getData(), 4); |
| | | TRACER.debugVerbose("Retrieved a sort values set in VLV vlvIndex " + |
| | | logger.trace("Retrieved a sort values set in VLV vlvIndex " + |
| | | "%s\nSearch Key:%s\nFound Key:%s\n", |
| | | config.getName(), |
| | | searchKeyHex, |
| | |
| | | if(status != OperationStatus.SUCCESS) |
| | | { |
| | | // There are no records in the database |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugVerbose("No sort values set exist in VLV vlvIndex %s. " + |
| | | logger.trace("No sort values set exist in VLV vlvIndex %s. " + |
| | | "Creating unbound set.", config.getName()); |
| | | } |
| | | sortValuesSet = new SortValuesSet(this); |
| | |
| | | } |
| | | else |
| | | { |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | StringBuilder searchKeyHex = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(searchKeyHex, key.getData(), 4); |
| | | StringBuilder foundKeyHex = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(foundKeyHex, key.getData(), 4); |
| | | TRACER.debugVerbose("Retrieved a sort values set in VLV vlvIndex " + |
| | | logger.trace("Retrieved a sort values set in VLV vlvIndex " + |
| | | "%s\nSearch Key:%s\nFound Key:%s\n", |
| | | config.getName(), |
| | | searchKeyHex, |
| | |
| | | data.setData(after); |
| | | put(txn, key, data); |
| | | |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("SortValuesSet with key %s has reached" + |
| | | logger.trace("SortValuesSet with key %s has reached" + |
| | | " the entry size of %d. Spliting into two sets with " + |
| | | " keys %s and %s.", splitSortValuesSet.getKeySortValues(), |
| | | newSize, sortValuesSet.getKeySortValues(), |
| | |
| | | status = cursor.getFirst(key, data,lockMode); |
| | | while(status == OperationStatus.SUCCESS) |
| | | { |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | StringBuilder searchKeyHex = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(searchKeyHex, key.getData(), |
| | |
| | | StringBuilder foundKeyHex = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(foundKeyHex, key.getData(), |
| | | 4); |
| | | TRACER.debugVerbose("Retrieved a sort values set in VLV " + |
| | | logger.trace("Retrieved a sort values set in VLV " + |
| | | "vlvIndex %s\nSearch Key:%s\nFound Key:%s\n", |
| | | config.getName(), |
| | | searchKeyHex, |
| | |
| | | status = cursor.getSearchKeyRange(key, data, lockMode); |
| | | if(status == OperationStatus.SUCCESS) |
| | | { |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | StringBuilder searchKeyHex = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(searchKeyHex, key.getData(), |
| | |
| | | StringBuilder foundKeyHex = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(foundKeyHex, key.getData(), |
| | | 4); |
| | | TRACER.debugVerbose("Retrieved a sort values set in VLV " + |
| | | logger.trace("Retrieved a sort values set in VLV " + |
| | | "vlvIndex %s\nSearch Key:%s\nFound Key:%s\n", |
| | | config.getName(), |
| | | searchKeyHex, |
| | |
| | | status = cursor.getFirst(key, data, lockMode); |
| | | while(status == OperationStatus.SUCCESS) |
| | | { |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | StringBuilder searchKeyHex = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(searchKeyHex, key.getData(), 4); |
| | | StringBuilder foundKeyHex = new StringBuilder(); |
| | | StaticUtils.byteArrayToHexPlusAscii(foundKeyHex, key.getData(), 4); |
| | | TRACER.debugVerbose("Retrieved a sort values set in VLV vlvIndex " + |
| | | logger.trace("Retrieved a sort values set in VLV vlvIndex " + |
| | | "%s\nSearch Key:%s\nFound Key:%s\n", |
| | | config.getName(), |
| | | searchKeyHex, |
| | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | |
| | | */ |
| | | public class VerifyJob |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | /** |
| | |
| | | catch (Exception e) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("Malformed id2entry ID %s.%n", |
| | | logger.trace("Malformed id2entry ID %s.%n", |
| | | StaticUtils.bytesToHex(key.getData())); |
| | | } |
| | | continue; |
| | |
| | | catch (Exception e) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("Malformed id2entry record for ID %d:%n%s%n", |
| | | logger.trace("Malformed id2entry record for ID %d:%n%s%n", |
| | | entryID.longValue(), |
| | | StaticUtils.bytesToHex(data.getData())); |
| | | } |
| | |
| | | if (keyCount != storedEntryCount) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("The stored entry count in id2entry (%d) does " + |
| | | logger.trace("The stored entry count in id2entry (%d) does " + |
| | | "not agree with the actual number of entry " + |
| | | "records found (%d).%n", storedEntryCount, keyCount); |
| | | } |
| | |
| | | catch (Exception e) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("File dn2id has malformed ID for DN <%s>:%n%s%n", |
| | | logger.trace("File dn2id has malformed ID for DN <%s>:%n%s%n", |
| | | new String(key.getData()), |
| | | StaticUtils.bytesToHex(data.getData())); |
| | | } |
| | |
| | | catch (Exception e) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | continue; |
| | | } |
| | | |
| | | if (entry == null) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("File dn2id has DN <%s> referencing unknown " + |
| | | logger.trace("File dn2id has DN <%s> referencing unknown " + |
| | | "ID %d%n", new String(key.getData()), entryID.longValue()); |
| | | } |
| | | } |
| | |
| | | key.getData())) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("File dn2id has DN <%s> referencing entry " + |
| | | logger.trace("File dn2id has DN <%s> referencing entry " + |
| | | "with wrong DN <%s>%n", new String(key.getData()), |
| | | entry.getName().toNormalizedString()); |
| | | } |
| | |
| | | catch (Exception e) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("File id2children has malformed ID %s%n", |
| | | logger.trace("File id2children has malformed ID %s%n", |
| | | StaticUtils.bytesToHex(key.getData())); |
| | | } |
| | | continue; |
| | |
| | | catch (Exception e) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("File id2children has malformed ID list " + |
| | | logger.trace("File id2children has malformed ID list " + |
| | | "for ID %s:%n%s%n", entryID, |
| | | StaticUtils.bytesToHex(data.getData())); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | errorCount++; |
| | | continue; |
| | | } |
| | |
| | | if (entry == null) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("File id2children has unknown ID %d%n", |
| | | logger.trace("File id2children has unknown ID %d%n", |
| | | entryID.longValue()); |
| | | } |
| | | continue; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | errorCount++; |
| | | continue; |
| | | } |
| | |
| | | if (childEntry == null) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("File id2children has ID %d referencing " + |
| | | logger.trace("File id2children has ID %d referencing " + |
| | | "unknown ID %d%n", entryID.longValue(), id.longValue()); |
| | | } |
| | | continue; |
| | |
| | | entry.getName().size() + 1) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("File id2children has ID %d with DN <%s> " + |
| | | logger.trace("File id2children has ID %d with DN <%s> " + |
| | | "referencing ID %d with non-child DN <%s>%n", |
| | | entryID.longValue(), entry.getName().toString(), |
| | | id.longValue(), childEntry.getName().toString()); |
| | |
| | | catch (Exception e) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("File id2subtree has malformed ID %s%n", |
| | | logger.trace("File id2subtree has malformed ID %s%n", |
| | | StaticUtils.bytesToHex(key.getData())); |
| | | } |
| | | continue; |
| | |
| | | catch (Exception e) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("File id2subtree has malformed ID list " + |
| | | logger.trace("File id2subtree has malformed ID list " + |
| | | "for ID %s:%n%s%n", entryID, |
| | | StaticUtils.bytesToHex(data.getData())); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | errorCount++; |
| | | continue; |
| | | } |
| | |
| | | if (entry == null) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("File id2subtree has unknown ID %d%n", |
| | | logger.trace("File id2subtree has unknown ID %d%n", |
| | | entryID.longValue()); |
| | | } |
| | | continue; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | errorCount++; |
| | | continue; |
| | | } |
| | |
| | | if (subordEntry == null) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("File id2subtree has ID %d referencing " + |
| | | logger.trace("File id2subtree has ID %d referencing " + |
| | | "unknown ID %d%n", entryID.longValue(), id.longValue()); |
| | | } |
| | | continue; |
| | |
| | | if (!subordEntry.getName().isDescendantOf(entry.getName())) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("File id2subtree has ID %d with DN <%s> " + |
| | | logger.trace("File id2subtree has ID %d with DN <%s> " + |
| | | "referencing ID %d with non-subordinate " + |
| | | "DN <%s>%n", |
| | | entryID.longValue(), entry.getName().toString(), |
| | |
| | | if(lastValues != null && lastValues.compareTo(values) >= 1) |
| | | { |
| | | // Make sure the values is larger then the previous one. |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Values %s and %s are incorrectly ordered", |
| | | logger.trace("Values %s and %s are incorrectly ordered", |
| | | lastValues, values, keyDump(vlvIndex, |
| | | sortValuesSet.getKeySortValues())); |
| | | } |
| | |
| | | values.getValues()); |
| | | if(!Arrays.equals(key.getData(), encodedKey)) |
| | | { |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Incorrect key for SortValuesSet in VLV " + |
| | | logger.trace("Incorrect key for SortValuesSet in VLV " + |
| | | "index %s. Last values bytes %s, Key bytes %s", |
| | | vlvIndex.getName(), encodedKey, key); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | errorCount++; |
| | | continue; |
| | | } |
| | |
| | | if (entry == null) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Reference to unknown ID %d%n%s", |
| | | logger.trace("Reference to unknown ID %d%n%s", |
| | | id.longValue(), |
| | | keyDump(vlvIndex, |
| | | sortValuesSet.getKeySortValues())); |
| | |
| | | if(entryValues.compareTo(values) != 0) |
| | | { |
| | | errorCount++; |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Reference to entry ID %d " + |
| | | logger.trace("Reference to entry ID %d " + |
| | | "which does not match the values%n%s", |
| | | id.longValue(), |
| | | keyDump(vlvIndex, |
| | |
| | | catch (Exception e) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("Malformed ID list: %s%n%s", |
| | | logger.trace("Malformed ID list: %s%n%s", |
| | | StaticUtils.bytesToHex(data.getData()), |
| | | keyDump(index, key.getData())); |
| | | } |
| | |
| | | { |
| | | if (prevID != null && id.equals(prevID)) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Duplicate reference to ID %d%n%s", |
| | | logger.trace("Duplicate reference to ID %d%n%s", |
| | | id.longValue(), keyDump(index, key.getData())); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | errorCount++; |
| | | continue; |
| | | } |
| | |
| | | if (entry == null) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Reference to unknown ID %d%n%s", |
| | | logger.trace("Reference to unknown ID %d%n%s", |
| | | id.longValue(), keyDump(index, key.getData())); |
| | | } |
| | | continue; |
| | |
| | | if (!foundMatchingKey.get()) |
| | | { |
| | | errorCount++; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Reference to entry " |
| | | logger.trace("Reference to entry " |
| | | + "<%s> which does not match the value%n%s", |
| | | entry.getName(), |
| | | keyDump(index, value)); |
| | |
| | | EntryID id = dn2id.get(null, dn, LockMode.DEFAULT); |
| | | if (id == null) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("File dn2id is missing key %s.%n", |
| | | logger.trace("File dn2id is missing key %s.%n", |
| | | dn.toNormalizedString()); |
| | | } |
| | | errorCount++; |
| | | } |
| | | else if (!id.equals(entryID)) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("File dn2id has ID %d instead of %d for key %s.%n", |
| | | logger.trace("File dn2id has ID %d instead of %d for key %s.%n", |
| | | id.longValue(), |
| | | entryID.longValue(), |
| | | dn.toNormalizedString()); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("File dn2id has error reading key %s: %s.%n", |
| | | logger.trace("File dn2id has error reading key %s: %s.%n", |
| | | dn.toNormalizedString(), |
| | | e.getMessage()); |
| | | } |
| | |
| | | EntryID id = dn2id.get(null, parentDN, LockMode.DEFAULT); |
| | | if (id == null) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("File dn2id is missing key %s.%n", |
| | | logger.trace("File dn2id is missing key %s.%n", |
| | | parentDN.toNormalizedString()); |
| | | } |
| | | errorCount++; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("File dn2id has error reading key %s: %s.%n", |
| | | logger.trace("File dn2id has error reading key %s: %s.%n", |
| | | parentDN.toNormalizedString(), |
| | | e.getMessage()); |
| | | } |
| | |
| | | parentID = dn2id.get(null, parentDN, LockMode.DEFAULT); |
| | | if (parentID == null) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("File dn2id is missing key %s.%n", |
| | | logger.trace("File dn2id is missing key %s.%n", |
| | | parentDN.toNormalizedString()); |
| | | } |
| | | errorCount++; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("File dn2id has error reading key %s: %s.", |
| | | logger.trace("File dn2id has error reading key %s: %s.", |
| | | parentDN.toNormalizedString(), |
| | | e.getMessage()); |
| | | } |
| | |
| | | cr = id2c.containsID(null, parentID.getDatabaseEntry(), entryID); |
| | | if (cr == ConditionResult.FALSE) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("File id2children is missing ID %d " + |
| | | logger.trace("File id2children is missing ID %d " + |
| | | "for key %d.%n", |
| | | entryID.longValue(), parentID.longValue()); |
| | | } |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("File id2children has error reading key %d: %s.", |
| | | logger.trace("File id2children has error reading key %d: %s.", |
| | | parentID.longValue(), e.getMessage()); |
| | | } |
| | | errorCount++; |
| | |
| | | id = dn2id.get(null, dn, LockMode.DEFAULT); |
| | | if (id == null) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("File dn2id is missing key %s.%n", |
| | | logger.trace("File dn2id is missing key %s.%n", |
| | | dn.toNormalizedString()); |
| | | } |
| | | errorCount++; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("File dn2id has error reading key %s: %s.%n", |
| | | logger.trace("File dn2id has error reading key %s: %s.%n", |
| | | dn.toNormalizedString(), |
| | | e.getMessage()); |
| | | } |
| | |
| | | cr = id2s.containsID(null, id.getDatabaseEntry(), entryID); |
| | | if (cr == ConditionResult.FALSE) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("File id2subtree is missing ID %d " + |
| | | logger.trace("File id2subtree is missing ID %d " + |
| | | "for key %d.%n", |
| | | entryID.longValue(), id.longValue()); |
| | | } |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("File id2subtree has error reading key %d: %s.%n", |
| | | logger.trace("File id2subtree has error reading key %d: %s.%n", |
| | | id.longValue(), e.getMessage()); |
| | | } |
| | | errorCount++; |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("Error normalizing values of attribute %s in " + |
| | | logger.trace("Error normalizing values of attribute %s in " + |
| | | "entry <%s>: %s.%n", |
| | | attrIndex.getAttributeType().toString(), |
| | | entry.getName().toString(), |
| | |
| | | if(!vlvIndex.containsValues(null, entryID.longValue(), |
| | | vlvIndex.getSortValues(entry))) |
| | | { |
| | | if(debugEnabled()) |
| | | if(logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Missing entry %s in VLV index %s", |
| | | logger.trace("Missing entry %s in VLV index %s", |
| | | entry.getName().toString(), |
| | | vlvIndex.getName()); |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("Error checking entry %s against filter or " + |
| | | logger.trace("Error checking entry %s against filter or " + |
| | | "base DN for VLV index %s: %s", |
| | | entry.getName().toString(), |
| | | vlvIndex.getName(), |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("Error reading VLV index %s for entry %s: %s", |
| | | logger.trace("Error reading VLV index %s for entry %s: %s", |
| | | vlvIndex.getName(), |
| | | entry.getName().toString(), |
| | | StaticUtils.getBacktrace(e)); |
| | |
| | | } |
| | | catch (JebException e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("Error reading VLV index %s for entry %s: %s", |
| | | logger.trace("Error reading VLV index %s for entry %s: %s", |
| | | vlvIndex.getName(), |
| | | entry.getName().toString(), |
| | | StaticUtils.getBacktrace(e)); |
| | |
| | | cr = presenceIndex.containsID(txn, presenceKey, entryID); |
| | | if (cr == ConditionResult.FALSE) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Missing ID %d%n%s", |
| | | logger.trace("Missing ID %d%n%s", |
| | | entryID.longValue(), |
| | | keyDump(presenceIndex, presenceKey.getData())); |
| | | } |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("Error reading database: %s%n%s", |
| | | logger.trace("Error reading database: %s%n%s", |
| | | e.getMessage(), |
| | | keyDump(presenceIndex, presenceKey.getData())); |
| | | } |
| | |
| | | cr = equalityIndex.containsID(txn, key, entryID); |
| | | if (cr == ConditionResult.FALSE) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Missing ID %d%n%s", |
| | | logger.trace("Missing ID %d%n%s", |
| | | entryID.longValue(), |
| | | keyDump(equalityIndex, normalizedBytes)); |
| | | } |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("Error reading database: %s%n%s", |
| | | logger.trace("Error reading database: %s%n%s", |
| | | e.getMessage(), |
| | | keyDump(equalityIndex, normalizedBytes)); |
| | | } |
| | |
| | | cr = substringIndex.containsID(txn, key, entryID); |
| | | if (cr == ConditionResult.FALSE) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Missing ID %d%n%s", |
| | | logger.trace("Missing ID %d%n%s", |
| | | entryID.longValue(), |
| | | keyDump(substringIndex, key.getData())); |
| | | } |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("Error reading database: %s%n%s", |
| | | logger.trace("Error reading database: %s%n%s", |
| | | e.getMessage(), |
| | | keyDump(substringIndex, key.getData())); |
| | | } |
| | |
| | | cr = orderingIndex.containsID(txn, key, entryID); |
| | | if (cr == ConditionResult.FALSE) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Missing ID %d%n%s", |
| | | logger.trace("Missing ID %d%n%s", |
| | | entryID.longValue(), |
| | | keyDump(orderingIndex, normalizedBytes)); |
| | | } |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("Error reading database: %s%n%s", |
| | | logger.trace("Error reading database: %s%n%s", |
| | | e.getMessage(), |
| | | keyDump(orderingIndex, normalizedBytes)); |
| | | } |
| | |
| | | cr = approximateIndex.containsID(txn, key, entryID); |
| | | if (cr == ConditionResult.FALSE) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Missing ID %d%n%s", |
| | | logger.trace("Missing ID %d%n%s", |
| | | entryID.longValue(), |
| | | keyDump(orderingIndex, normalizedBytes)); |
| | | } |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugError("Error reading database: %s%n%s", |
| | | logger.trace("Error reading database: %s%n%s", |
| | | e.getMessage(), |
| | | keyDump(approximateIndex, normalizedBytes)); |
| | | } |
| | |
| | | } |
| | | catch (DatabaseException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | import static org.opends.messages.JebMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.getTracer; |
| | | import static org.opends.server.util.DynamicConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.extensions.DiskSpaceMonitor; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.util.LDIFReader; |
| | |
| | | */ |
| | | public final class Importer implements DiskSpaceMonitorHandler |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | private static final int TIMER_INTERVAL = 10000; |
| | | private static final int KB = 1024; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | LocalizableMessage message = ERR_JEB_IMPORT_LDIF_REBUILD_INDEX_TASK_ERR.get( |
| | | stackTraceToSingleLineString(e)); |
| | | logError(message); |
| | |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.Attributes; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.RDN; |
| | | |
| | | import static org.opends.messages.BackendMessages.*; |
| | |
| | | */ |
| | | public class RecurringTask |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_RECURRINGTASK_CANNOT_LOAD_CLASS. |
| | | get(String.valueOf(taskClassName), ATTR_TASK_CLASS, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_RECURRINGTASK_CANNOT_INSTANTIATE_CLASS_AS_TASK.get( |
| | | String.valueOf(taskClassName), Task.class.getName()); |
| | |
| | | } |
| | | catch (InitializationException ie) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | logger.traceException(ie); |
| | | |
| | | LocalizableMessage message = ERR_RECURRINGTASK_CANNOT_INITIALIZE_INTERNAL.get( |
| | | String.valueOf(taskClassName), ie.getMessage()); |
| | |
| | | try { |
| | | nextTaskDate = getNextIteration(calendar); |
| | | } catch (IllegalArgumentException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | ERR_RECURRINGTASK_INVALID_TOKENS_COMBO.get( |
| | |
| | | nextTask.initializeTask(); |
| | | } catch (Exception e) { |
| | | // Should not happen, debug log it otherwise. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | return nextTask; |
| | |
| | | |
| | | import static org.opends.messages.BackendMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | import org.opends.messages.Severity; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.EMailMessage; |
| | | import org.opends.server.util.StaticUtils; |
| | |
| | | public abstract class Task |
| | | implements Comparable<Task> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_TASK_CANNOT_PARSE_SCHEDULED_START_TIME.get(timeString, taskDN); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_TASK_CANNOT_PARSE_ACTUAL_START_TIME.get(timeString, taskDN); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_TASK_CANNOT_PARSE_COMPLETION_TIME.get(timeString, taskDN); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | taskState = TaskState.STOPPED_BY_ERROR; |
| | | |
| | |
| | | import org.opends.server.config.ConfigEntry; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.*; |
| | | import org.forgerock.util.Reject; |
| | |
| | | import static org.opends.messages.BackendMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | extends Backend |
| | | implements ConfigurationChangeListener<TaskBackendCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // This should never happen. |
| | | LocalizableMessage message = ERR_TASKBE_CANNOT_DECODE_RECURRING_TASK_BASE_DN.get( |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // This should never happen. |
| | | LocalizableMessage message = ERR_TASKBE_CANNOT_DECODE_SCHEDULED_TASK_BASE_DN.get( |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_BACKEND_CANNOT_REGISTER_BASEDN.get( |
| | | taskRootDN.toString(), getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | try |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | try |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_TASKS_CANNOT_EXPORT_TO_FILE.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | finally |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | try |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_TASKS_BACKUP_CANNOT_GET_MAC.get( |
| | | macKeyID, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_TASKS_BACKUP_CANNOT_GET_DIGEST.get( |
| | | digestAlgorithm, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_TASKS_BACKUP_CANNOT_CREATE_ARCHIVE_FILE. |
| | | get(String.valueOf(filename), backupDirectory.getPath(), |
| | |
| | | } |
| | | catch (CryptoManagerException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_TASKS_BACKUP_CANNOT_GET_CIPHER.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | zipStream.closeEntry(); |
| | | inputStream.close(); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | try { |
| | | inputStream.close(); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | message = ERR_TASKS_BACKUP_CANNOT_CLOSE_ZIP_STREAM.get( |
| | | filename, backupDirectory.getPath(), stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | message = ERR_TASKS_BACKUP_CANNOT_UPDATE_BACKUP_DESCRIPTOR.get( |
| | | backupDirectory.getDescriptorPath(), stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (ConfigException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessageObject()); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_BACKUP_CANNOT_UPDATE_BACKUP_DESCRIPTOR.get( |
| | | backupDirectory.getDescriptorPath(), stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | unacceptableReasons.add(ERR_TASKBE_ERROR_GETTING_BACKING_FILE.get( |
| | | getExceptionMessage(e))); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(ERR_TASKBE_ERROR_GETTING_BACKING_FILE.get( |
| | | getExceptionMessage(e))); |
| | |
| | | import static org.opends.messages.BackendMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | import org.opends.server.api.DirectoryThread; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.LDIFException; |
| | | import org.opends.server.util.LDIFReader; |
| | |
| | | extends DirectoryThread |
| | | implements AlertGenerator |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | String taskID = completedTask.getTaskID(); |
| | |
| | | // log error and continue. |
| | | if (de.getResultCode() != ResultCode.ENTRY_ALREADY_EXISTS) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_TASKSCHED_ERROR_SCHEDULING_RECURRING_ITERATION. |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | try |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | pendingTasks.clear(); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (LDIFException le) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | logger.traceException(le); |
| | | |
| | | if (le.canContinueReading()) |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | LocalizableMessage message = ERR_TASKSCHED_CANNOT_PARSE_ENTRY_FATAL.get( |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_TASKSCHED_CANNOT_SCHEDULE_TASK_FROM_ENTRY. |
| | | get(String.valueOf(entryDN), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_TASKSCHED_CANNOT_SCHEDULE_RECURRING_TASK_FROM_ENTRY. |
| | |
| | | } |
| | | catch (IOException ioe) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | } |
| | | logger.traceException(ioe); |
| | | |
| | | LocalizableMessage message = ERR_TASKSCHED_ERROR_READING_TASK_BACKING_FILE.get( |
| | | String.valueOf(backingFilePath), stackTraceToSingleLineString(ioe)); |
| | |
| | | } |
| | | catch (IOException ioe) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | } |
| | | logger.traceException(ioe); |
| | | |
| | | LocalizableMessage message = ERR_TASKSCHED_CANNOT_CREATE_BACKING_FILE.get( |
| | | backingFile, stackTraceToSingleLineString(ioe)); |
| | |
| | | } |
| | | catch (LDIFException le) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | logger.traceException(le); |
| | | |
| | | |
| | | LocalizableMessage message = ERR_TASKSCHED_CANNOT_CREATE_BACKING_FILE.get( |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_TASKSCHED_CANNOT_RENAME_CURRENT_BACKING_FILE. |
| | | get(String.valueOf(backingFilePath), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_TASKSCHED_CANNOT_RENAME_NEW_BACKING_FILE. |
| | | get(String.valueOf(tmpFilePath), String.valueOf(backingFilePath), |
| | |
| | | } |
| | | catch (IOException ioe) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ioe); |
| | | } |
| | | logger.traceException(ioe); |
| | | |
| | | LocalizableMessage message = ERR_TASKSCHED_CANNOT_WRITE_BACKING_FILE.get( |
| | | tmpFilePath, stackTraceToSingleLineString(ioe)); |
| | |
| | | } |
| | | catch (LDIFException le) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | logger.traceException(le); |
| | | |
| | | |
| | | LocalizableMessage message = ERR_TASKSCHED_CANNOT_WRITE_BACKING_FILE.get( |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_TASKSCHED_CANNOT_WRITE_BACKING_FILE.get( |
| | | tmpFilePath, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_TASKSCHED_CANNOT_LOAD_CLASS. |
| | | get(String.valueOf(taskClassName), ATTR_TASK_CLASS, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_TASKSCHED_CANNOT_INSTANTIATE_CLASS_AS_TASK.get( |
| | | String.valueOf(taskClassName), Task.class.getName()); |
| | |
| | | } |
| | | catch (InitializationException ie) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | logger.traceException(ie); |
| | | |
| | | LocalizableMessage message = ERR_TASKSCHED_CANNOT_INITIALIZE_INTERNAL.get( |
| | | String.valueOf(taskClassName), ie.getMessage()); |
| | |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.DirectoryThread; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import static org.opends.messages.BackendMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class TaskThread extends DirectoryThread |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (InterruptedException ie) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | logger.traceException(ie); |
| | | } |
| | | |
| | | continue; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | Task task = getAssociatedTask(); |
| | | |
| | |
| | | import org.opends.server.api.ConfigChangeListener; |
| | | import org.opends.server.api.ConfigDeleteListener; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | /** |
| | |
| | | mayInvoke=true) |
| | | public final class ConfigEntry |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_ENTRY_CANNOT_REMOVE_CHILD. |
| | | get(String.valueOf(childDN), String.valueOf(entry.getName()), |
| | |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | /** |
| | |
| | | public final class DNConfigAttribute |
| | | extends ConfigAttribute |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | rejectReason.append(ERR_CONFIG_ATTR_DN_CANNOT_PARSE.get( |
| | | value.getValue().toString(), getName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_DN_CANNOT_PARSE.get( |
| | | valueString, getName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_DN_CANNOT_PARSE.get( |
| | | v.getValue().toString(), getName(), String.valueOf(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_DN_CANNOT_PARSE.get( |
| | | v.getValue().toString(), getName(), String.valueOf(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_DN_CANNOT_PARSE.get( |
| | | (String) value, getName(), String.valueOf(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_DN_CANNOT_PARSE.get( |
| | | valueStr, getName(), String.valueOf(e)); |
| | |
| | | } |
| | | catch (ConfigException ce) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | logger.traceException(ce); |
| | | |
| | | throw ce; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INVALID_DN_VALUE.get( |
| | | getName(), String.valueOf(value), String.valueOf(e)); |
| | |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | /** |
| | |
| | | public final class IntegerConfigAttribute |
| | | extends ConfigAttribute |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | rejectReason.append(ERR_CONFIG_ATTR_INVALID_INT_VALUE.get( |
| | | getName(), stringValue, String.valueOf(e))); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INT_COULD_NOT_PARSE.get( |
| | | valueString, getName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INT_COULD_NOT_PARSE.get( |
| | | String.valueOf(value), getName(), String.valueOf(e)); |
| | |
| | | } |
| | | catch (ConfigException ce) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | logger.traceException(ce); |
| | | |
| | | throw ce; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INT_COULD_NOT_PARSE.get( |
| | | componentType + "[" + length + "]", getName(), String.valueOf(e)); |
| | |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | /** |
| | |
| | | public final class IntegerWithUnitConfigAttribute |
| | | extends ConfigAttribute |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_COULD_NOT_PARSE_INT_COMPONENT.get( |
| | | String.valueOf(value), getName(), String.valueOf(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | rejectReason.append(ERR_CONFIG_ATTR_INT_COULD_NOT_PARSE.get( |
| | | lowerValue, getName(), String.valueOf(e))); |
| | |
| | | import org.opends.server.api.InvokableComponent; |
| | | import org.opends.server.api.MonitorProvider; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.internal.InternalSearchOperation; |
| | | import org.opends.server.protocols.jmx.Credential; |
| | |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | public final class JMXMBean |
| | | implements DynamicMBean, DirectoryServerMBean |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | |
| | | nameStr = MBEAN_BASE_DOMAIN + ":" + "Name=rootDSE" + typeStr; |
| | | } catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_JMX_CANNOT_REGISTER_MBEAN.get( |
| | | configEntryDN.toString(), String.valueOf(e)); |
| | |
| | | } |
| | | } catch(Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | mBeanServer.registerMBean(this, objectName); |
| | | |
| | | } catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | e.printStackTrace(); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_JMX_CANNOT_REGISTER_MBEAN.get( |
| | |
| | | } |
| | | catch (LDAPException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_JMX_CANNOT_GET_ATTRIBUTE. |
| | | get(String.valueOf(attributeName), String.valueOf(configEntryDN), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_JMX_ATTR_NO_ATTR.get( |
| | | String.valueOf(configEntryDN), attributeName); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | // It's possible that this is a monitor attribute rather than a |
| | |
| | | } |
| | | catch (MBeanException me) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, me); |
| | | } |
| | | logger.traceException(me); |
| | | |
| | | throw me; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | throw new MBeanException(e); |
| | | } |
| | |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | /** |
| | |
| | | public final class MultiChoiceConfigAttribute |
| | | extends ConfigAttribute |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (ConfigException ce) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | logger.traceException(ce); |
| | | |
| | | throw ce; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INVALID_STRING_VALUE.get( |
| | | getName(), String.valueOf(value), String.valueOf(e)); |
| | |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | /** |
| | |
| | | public final class StringConfigAttribute |
| | | extends ConfigAttribute |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (ConfigException ce) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | logger.traceException(ce); |
| | | |
| | | throw ce; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_ATTR_INVALID_STRING_VALUE.get( |
| | | getName(), String.valueOf(value), String.valueOf(e)); |
| | |
| | | UNIVERSAL_OCTET_STRING_TYPE; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_ACCTUSABLERES_DECODE_ERROR.get(getExceptionMessage(e)); |
| | |
| | | */ |
| | | public static final ControlDecoder<AccountUsableResponseControl> DECODER = |
| | | new Decoder(); |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | UNIVERSAL_INTEGER_TYPE; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_ECN_CANNOT_DECODE_VALUE.get(getExceptionMessage(e)); |
| | |
| | | */ |
| | | public static final ControlDecoder<EntryChangeNotificationControl> DECODER = |
| | | new Decoder(); |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | package org.opends.server.controls; |
| | | import static org.opends.messages.ProtocolMessages.ERR_ECLN_CANNOT_DECODE_VALUE; |
| | | import static org.opends.messages.ProtocolMessages.ERR_ECLN_NO_CONTROL_VALUE; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.getTracer; |
| | | import static org.opends.server.protocols.asn1.ASN1Constants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.getExceptionMessage; |
| | |
| | | import java.io.IOException; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.asn1.ASN1; |
| | | import org.opends.server.protocols.asn1.ASN1Reader; |
| | | import org.opends.server.protocols.asn1.ASN1Writer; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | |
| | | public class EntryChangelogNotificationControl |
| | | extends Control |
| | | { |
| | | // The tracer object for the debug logger. |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The cookie value - payload of this control. |
| | | private String cookie; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_ECLN_CANNOT_DECODE_VALUE.get(getExceptionMessage(e)); |
| | |
| | | import static org.opends.server.util.ServerConstants.OID_GET_EFFECTIVE_RIGHTS; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import java.util.List; |
| | | import java.util.LinkedList; |
| | |
| | | } |
| | | reader.readEndSequence(); |
| | | } catch (ASN1Exception e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | INFO_GETEFFECTIVERIGHTS_DECODE_ERROR.get(e.getMessage()); |
| | |
| | | */ |
| | | public static final ControlDecoder<GetEffectiveRightsRequestControl> DECODER = |
| | | new Decoder(); |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | //The DN representing the authzId. May be null. |
| | | private DN authzDN=null; |
| | |
| | | |
| | | import static org.opends.server.plugins.LDAPADListPlugin.*; |
| | | import static org.opends.server.protocols.asn1.ASN1Constants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | |
| | | } |
| | | catch (Exception ae) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | logger.traceException(ae); |
| | | |
| | | LocalizableMessage message = ERR_POSTREADREQ_CANNOT_DECODE_VALUE.get(ae |
| | | .getMessage()); |
| | |
| | | */ |
| | | public static final ControlDecoder<LDAPPostReadRequestControl> DECODER = |
| | | new Decoder(); |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The set of raw attributes to return in the entry. |
| | | private Set<String> rawAttributes; |
| | |
| | | import org.opends.server.protocols.ldap.*; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | |
| | | } |
| | | catch (LDAPException le) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | logger.traceException(le); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_POSTREADRESP_CANNOT_DECODE_VALUE.get(le.getMessage()); |
| | |
| | | */ |
| | | public static final ControlDecoder<LDAPPostReadResponseControl> DECODER = |
| | | new Decoder(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | import static org.opends.server.protocols.asn1.ASN1Constants.*; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | |
| | | } |
| | | catch (Exception ae) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | logger.traceException(ae); |
| | | |
| | | LocalizableMessage message = ERR_PREREADREQ_CANNOT_DECODE_VALUE.get(ae |
| | | .getMessage()); |
| | |
| | | */ |
| | | public static final ControlDecoder<LDAPPreReadRequestControl> DECODER = |
| | | new Decoder(); |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The set of raw attributes to return in the entry. |
| | | private Set<String> rawAttributes; |
| | |
| | | import org.opends.server.protocols.ldap.LDAPReader; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | |
| | | } |
| | | catch (LDAPException le) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | logger.traceException(le); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_PREREADRESP_CANNOT_DECODE_VALUE.get(le.getMessage()); |
| | |
| | | */ |
| | | public static final ControlDecoder<LDAPPreReadResponseControl> DECODER = |
| | | new Decoder(); |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | UNIVERSAL_OCTET_STRING_TYPE; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_MATCHEDVALUES_CANNOT_DECODE_VALUE_AS_SEQUENCE.get( |
| | | getExceptionMessage(e)); |
| | |
| | | */ |
| | | public static final ControlDecoder<MatchedValuesControl> DECODER = |
| | | new Decoder(); |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | import org.opends.server.protocols.ldap.LDAPResultCode; |
| | | import org.forgerock.util.Reject; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | |
| | | */ |
| | | public class MatchedValuesFilter |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_MVFILTER_CANNOT_DECODE_AVA.get(getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_MVFILTER_CANNOT_DECODE_SUBSTRINGS.get(getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_MVFILTER_CANNOT_DECODE_PRESENT_TYPE.get( |
| | | getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_MVFILTER_CANNOT_DECODE_EXTENSIBLE_MATCH.get( |
| | | getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | normalizedSubAny = null; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | return false; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | return false; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | return false; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | return false; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | return false; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | return false; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | return false; |
| | | } |
| | |
| | | package org.opends.server.controls; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.OID_PAGED_RESULTS_CONTROL; |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_LDAP_PAGED_RESULTS_DECODE_SEQUENCE.get(String.valueOf(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_LDAP_PAGED_RESULTS_DECODE_SIZE.get(String.valueOf(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_LDAP_PAGED_RESULTS_DECODE_COOKIE.get(String.valueOf(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_LDAP_PAGED_RESULTS_DECODE_SEQUENCE.get(String.valueOf(e)); |
| | |
| | | */ |
| | | public static final ControlDecoder<PagedResultsControl> DECODER = |
| | | new Decoder(); |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | import org.opends.server.protocols.asn1.ASN1Writer; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PWEXPIRING_CANNOT_DECODE_SECONDS_UNTIL_EXPIRATION. |
| | | get(getExceptionMessage(e)); |
| | |
| | | */ |
| | | public static final ControlDecoder<PasswordExpiringControl> DECODER = |
| | | new Decoder(); |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | import org.opends.server.protocols.asn1.*; |
| | | import static org.opends.server.protocols.asn1.ASN1Constants. |
| | | UNIVERSAL_OCTET_STRING_TYPE; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_PWPOLICYRES_DECODE_ERROR.get(getExceptionMessage(e)); |
| | |
| | | */ |
| | | public static final ControlDecoder<PasswordPolicyResponseControl> DECODER = |
| | | new Decoder(); |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | import org.opends.server.protocols.asn1.*; |
| | | import static org.opends.server.protocols.asn1.ASN1Constants. |
| | | UNIVERSAL_OCTET_STRING_TYPE; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_PSEARCH_CANNOT_DECODE_VALUE.get(getExceptionMessage(e)); |
| | |
| | | */ |
| | | public static final ControlDecoder<PersistentSearchControl> DECODER = |
| | | new Decoder(); |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | import org.opends.server.api.AuthenticationPolicyState; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.PasswordPolicyState; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.asn1.ASN1; |
| | | import org.opends.server.protocols.asn1.ASN1Reader; |
| | | import org.opends.server.protocols.asn1.ASN1Writer; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.protocols.asn1.ASN1Constants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_PROXYAUTH1_CANNOT_DECODE_VALUE.get(getExceptionMessage(e)); |
| | |
| | | */ |
| | | public static final ControlDecoder<ProxiedAuthV1Control> DECODER = |
| | | new Decoder(); |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | import org.opends.server.api.IdentityMapper; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.PasswordPolicyState; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.asn1.ASN1; |
| | | import org.opends.server.protocols.asn1.ASN1Reader; |
| | | import org.opends.server.protocols.asn1.ASN1Writer; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.forgerock.util.Reject.*; |
| | |
| | | if (!lowerAuthZIDStr.startsWith("dn:") && |
| | | !lowerAuthZIDStr.startsWith("u:")) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_PROXYAUTH2_INVALID_AUTHZID.get(lowerAuthZIDStr); |
| | |
| | | */ |
| | | public static final ControlDecoder<ProxiedAuthV2Control> DECODER = |
| | | new Decoder(); |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | import java.io.IOException; |
| | | |
| | | import org.opends.server.protocols.asn1.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | | import static org.opends.server.protocols.asn1.ASN1Constants. |
| | | UNIVERSAL_OCTET_STRING_TYPE; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_SUBENTRIES_CANNOT_DECODE_VALUE.get(getExceptionMessage(e)); |
| | |
| | | */ |
| | | public static final ControlDecoder<SubentriesControl> DECODER = |
| | | new Decoder(); |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The visibility from the control value. |
| | | private boolean visibility = false; |
| | |
| | | |
| | | |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | import org.opends.server.api.AccessControlHandler; |
| | | import org.opends.server.api.AlertGenerator; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | implements AlertGenerator , |
| | | ConfigurationChangeListener<AccessControlHandlerCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // Fully qualified class name. |
| | | private static final String CLASS_NAME = |
| | |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | LocalizableMessage message = ERR_CONFIG_AUTHZ_UNABLE_TO_INSTANTIATE_HANDLER. |
| | | get(handlerClassName, String.valueOf(config.dn().toString()), |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.api.plugin.PluginResult; |
| | | import org.opends.server.core.networkgroups.NetworkGroup; |
| | | import org.opends.server.loggers.debug.DebugLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.ldap.LDAPAttribute; |
| | | import org.opends.server.protocols.ldap.LDAPResultCode; |
| | | import org.opends.server.types.*; |
| | |
| | | extends AbstractOperation |
| | | implements PreParseAddOperation, AddOperation, PostResponseAddOperation |
| | | { |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = DebugLogger.getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** The set of response controls to send to the client. */ |
| | | private ArrayList<Control> responseControls; |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | setResultCode(de.getResultCode()); |
| | | appendErrorMessage(de.getMessageObject()); |
| | |
| | | } |
| | | catch(CanceledOperationException coe) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, coe); |
| | | } |
| | | logger.traceException(coe); |
| | | |
| | | setResultCode(ResultCode.CANCELED); |
| | | cancelResult = new CancelResult(ResultCode.CANCELED, null); |
| | |
| | | import org.opends.server.api.ChangeNotificationListener; |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.api.DITCacheMap; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.operation.PostResponseAddOperation; |
| | | import org.opends.server.types.operation.PostResponseDeleteOperation; |
| | |
| | | import org.opends.server.types.operation.PostResponseModifyDNOperation; |
| | | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | /** |
| | | * This class provides a data structure which maps an authenticated user DN to |
| | |
| | | public class AuthenticatedUsers |
| | | implements ChangeNotificationListener |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The mapping between authenticated user DNs and the associated client |
| | | // connection objects. |
| | |
| | | catch (Exception e) |
| | | { |
| | | // Shouldnt happen. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | if (authZDN == null) |
| | |
| | | catch (Exception e) |
| | | { |
| | | // Shouldnt happen. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | if ((newAuthNDN != null) && (authNDN != null) && |
| | |
| | | |
| | | import org.opends.server.types.*; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | ConfigurationAddListener<BackendCfg>, |
| | | ConfigurationDeleteListener<BackendCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_CONFIG_BACKEND_CANNOT_GET_CONFIG_BASE.get(getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_BACKEND_CANNOT_INSTANTIATE. |
| | | get(String.valueOf(className), String.valueOf(backendDN), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_BACKEND_CANNOT_ACQUIRE_SHARED_LOCK.get( |
| | | backendID, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_BACKEND_CANNOT_INITIALIZE. |
| | | get(String.valueOf(className), String.valueOf(backendDN), |
| | |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | logger.traceException(e2); |
| | | |
| | | message = WARN_CONFIG_BACKEND_CANNOT_RELEASE_SHARED_LOCK. |
| | | get(backendID, stackTraceToSingleLineString(e2)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_BACKEND_CANNOT_REGISTER_BACKEND.get( |
| | | backendID, getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | unacceptableReason.add(de.getMessageObject()); |
| | | return false; |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | unacceptableReason.add(de.getMessageObject()); |
| | | return false; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | |
| | | unacceptableReason.add(ERR_CONFIG_BACKEND_CANNOT_INSTANTIATE.get( |
| | |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | logger.traceException(e2); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_BACKEND_CANNOT_RELEASE_SHARED_LOCK. |
| | | get(backend.getBackendID(), stackTraceToSingleLineString(e2)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | |
| | | messages.add(ERR_CONFIG_BACKEND_UNABLE_TO_DETERMINE_ENABLED_STATE.get( |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | |
| | | messages.add(ERR_CONFIG_BACKEND_CANNOT_INSTANTIATE.get( |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_BACKEND_CANNOT_ACQUIRE_SHARED_LOCK.get( |
| | | backendID, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(ERR_CONFIG_BACKEND_CANNOT_INITIALIZE.get( |
| | | String.valueOf(className), String.valueOf(backendDN), |
| | |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | logger.traceException(e2); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_BACKEND_CANNOT_RELEASE_SHARED_LOCK.get( |
| | | backendID, stackTraceToSingleLineString(e2)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_BACKEND_CANNOT_REGISTER_BACKEND.get( |
| | | backendID, getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | unacceptableReason.add(ERR_CONFIG_BACKEND_CANNOT_INSTANTIATE.get( |
| | | String.valueOf(className), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(ERR_CONFIG_BACKEND_CANNOT_INSTANTIATE.get( |
| | | String.valueOf(className), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_BACKEND_CANNOT_ACQUIRE_SHARED_LOCK.get( |
| | | backendID, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(ERR_CONFIG_BACKEND_CANNOT_INITIALIZE.get( |
| | | String.valueOf(className), |
| | |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | logger.traceException(e2); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_BACKEND_CANNOT_RELEASE_SHARED_LOCK.get( |
| | | backendID, stackTraceToSingleLineString(e2)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_BACKEND_CANNOT_REGISTER_BACKEND.get( |
| | | backendID, getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | for (BackendInitializationListener listener : |
| | |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | logger.traceException(e2); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_BACKEND_CANNOT_RELEASE_SHARED_LOCK.get( |
| | | backend.getBackendID(), stackTraceToSingleLineString(e2)); |
| | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.api.plugin.PluginResult; |
| | | import org.opends.server.core.networkgroups.NetworkGroup; |
| | | import org.opends.server.loggers.debug.DebugLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.types.operation.PreParseBindOperation; |
| | |
| | | extends AbstractOperation |
| | | implements BindOperation, PreParseBindOperation |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = DebugLogger.getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** The credentials used for SASL authentication. */ |
| | | private ByteString saslCredentials; |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | | setAuthFailureReason(de.getMessageObject()); |
| | |
| | | catch(CanceledOperationException coe) |
| | | { |
| | | // This shouldn't happen for bind operations. Just cancel anyways |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, coe); |
| | | } |
| | | logger.traceException(coe); |
| | | |
| | | setResultCode(ResultCode.CANCELED); |
| | | |
| | |
| | | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.api.plugin.PluginResult; |
| | | import org.opends.server.core.networkgroups.NetworkGroup; |
| | | import org.opends.server.loggers.debug.DebugLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.types.operation.PostResponseCompareOperation; |
| | |
| | | implements PreParseCompareOperation, CompareOperation, |
| | | PostResponseCompareOperation |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = DebugLogger.getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** The attribute type for this compare operation. */ |
| | | private AttributeType attributeType; |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | setResultCode(de.getResultCode()); |
| | | appendErrorMessage(de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | setResultCode(de.getResultCode()); |
| | | appendErrorMessage(de.getMessageObject()); |
| | |
| | | } |
| | | catch(CanceledOperationException coe) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, coe); |
| | | } |
| | | logger.traceException(coe); |
| | | |
| | | setResultCode(ResultCode.CANCELED); |
| | | cancelResult = new CancelResult(ResultCode.CANCELED, null); |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.messages.CoreMessages.*; |
| | | |
| | |
| | | import org.opends.server.protocols.ldap.LDAPConnectionHandler; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | |
| | | ConfigurationAddListener<ConnectionHandlerCfg>, |
| | | ConfigurationDeleteListener<ConnectionHandlerCfg>, |
| | | ConfigurationChangeListener<ConnectionHandlerCfg> { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | // The mapping between configuration entry DNs and their |
| | |
| | | // Register the connection handler with the Directory Server. |
| | | DirectoryServer.registerConnectionHandler(connectionHandler); |
| | | } catch (ConfigException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(e.getMessageObject()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | |
| | | messages.add(ERR_CONFIG_CONNHANDLER_CANNOT_INITIALIZE.get( |
| | |
| | | // Server. |
| | | DirectoryServer.registerConnectionHandler(connectionHandler); |
| | | } catch (ConfigException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(e.getMessageObject()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(ERR_CONFIG_CONNHANDLER_CANNOT_INITIALIZE.get( |
| | | String.valueOf(configuration |
| | |
| | | theClass = pd.loadClass(className, ConnectionHandler.class); |
| | | connectionHandler = theClass.newInstance(); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_CONNHANDLER_CANNOT_INITIALIZE. |
| | | get(String.valueOf(className), String.valueOf(config.dn()), |
| | |
| | | |
| | | method.invoke(connectionHandler, config); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_CONNHANDLER_CANNOT_INITIALIZE. |
| | | get(String.valueOf(className), String.valueOf(config.dn()), |
| | |
| | | connectionHandler = theClass.newInstance(); |
| | | } |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | unacceptableReasons.add( |
| | | ERR_CONFIG_CONNHANDLER_CANNOT_INITIALIZE.get( |
| | |
| | | return false; |
| | | } |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | unacceptableReasons.add(ERR_CONFIG_CONNHANDLER_CANNOT_INITIALIZE.get( |
| | | String.valueOf(className), String.valueOf(config.dn()), |
| | |
| | | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.getTracer; |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | | |
| | | import java.io.File; |
| | |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.api.CompressedSchema; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.asn1.ASN1; |
| | | import org.opends.server.protocols.asn1.ASN1Reader; |
| | | import org.opends.server.protocols.asn1.ASN1Writer; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.DirectoryException; |
| | | |
| | | |
| | |
| | | */ |
| | | public final class DefaultCompressedSchema extends CompressedSchema |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // Synchronizes calls to save. |
| | | private final Object saveLock = new Object(); |
| | |
| | | } |
| | | catch (final Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // FIXME -- Should we do something else here? |
| | | throw new RuntimeException(e); |
| | |
| | | } |
| | | catch (final Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (final Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | final LocalizableMessage message = ERR_COMPRESSEDSCHEMA_CANNOT_WRITE_UPDATED_DATA |
| | | .get(stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (final Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.api.plugin.PluginResult; |
| | | import org.opends.server.core.networkgroups.NetworkGroup; |
| | | import org.opends.server.loggers.debug.DebugLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.types.operation.PostResponseDeleteOperation; |
| | |
| | | DeleteOperation, |
| | | PostResponseDeleteOperation |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = DebugLogger.getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** The raw, unprocessed entry DN as included in the client request. */ |
| | | private ByteString rawEntryDN; |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | setResultCode(de.getResultCode()); |
| | | appendErrorMessage(de.getMessageObject()); |
| | |
| | | } |
| | | catch(CanceledOperationException coe) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, coe); |
| | | } |
| | | logger.traceException(coe); |
| | | |
| | | setResultCode(ResultCode.CANCELED); |
| | | cancelResult = new CancelResult(ResultCode.CANCELED, null); |
| | |
| | | import org.opends.server.extensions.JMXAlertHandler; |
| | | import org.opends.server.loggers.*; |
| | | import org.opends.server.loggers.debug.DebugLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.loggers.debug.TextDebugLogPublisher; |
| | | import org.opends.server.monitors.BackendMonitor; |
| | | import org.opends.server.monitors.ConnectionHandlerMonitor; |
| | |
| | | public final class DirectoryServer |
| | | implements AlertGenerator |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The singleton Directory Server instance. |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.WARNING, e); |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | directoryServer.mBeanServer = |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CANNOT_CREATE_MBEAN_SERVER.get(String.valueOf(e)); |
| | | throw new InitializationException(message, e); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_CANNOT_LOAD_CONFIG_HANDLER_CLASS.get( |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_CANNOT_INSTANTIATE_CONFIG_HANDLER.get( |
| | |
| | | } |
| | | catch (InitializationException ie) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | logger.traceException(ie); |
| | | |
| | | throw ie; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_CANNOT_INITIALIZE_CONFIG_HANDLER.get( |
| | |
| | | } |
| | | catch (InitializationException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | throw new InitializationException(e.getMessageObject()); |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CANNOT_ACQUIRE_EXCLUSIVE_SERVER_LOCK.get( |
| | | lockFile, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CANNOT_BOOTSTRAP_MATCHING_RULE. |
| | | get(currentFactory.getClass().getName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | logError(ERR_CANNOT_BOOTSTRAP_SYNTAX.get(syntax.getClass().getName(), |
| | | stackTraceToSingleLineString(e))); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | try |
| | |
| | | } |
| | | catch (InitializationException ie) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | logger.traceException(ie); |
| | | |
| | | throw ie; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_CANNOT_INITIALIZE_CONFIG_HANDLER.get( |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CANNOT_GET_ROOT_DSE_CONFIG_ENTRY.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | throw new InitializationException(de.getMessageObject()); |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | throw new InitializationException(de.getMessageObject()); |
| | | } |
| | |
| | | ServerManagementContext.getInstance().getRootConfiguration(); |
| | | rootDSECfg = root.getRootDSEBackend(); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | LocalizableMessage message = ERR_CANNOT_GET_ROOT_DSE_CONFIG_ENTRY.get( |
| | | stackTraceToSingleLineString(e)); |
| | | throw new InitializationException(message, e); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | catch (Exception e) |
| | | { |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | directoryServer.connectionHandlers.clear(); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | logger.traceException(e2); |
| | | |
| | | message = WARN_SHUTDOWN_CANNOT_RELEASE_SHARED_BACKEND_LOCK. |
| | | get(backend.getBackendID(), stackTraceToSingleLineString(e2)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | logError(message); |
| | | } |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | // Deregister all workflows. |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // This could theoretically happen if an alert needs to be sent before the |
| | | // configuration is initialized. In that case, just return an empty DN. |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CANNOT_ACQUIRE_EXCLUSIVE_SERVER_LOCK.get(lockFile, |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (InitializationException ie) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | logger.traceException(ie); |
| | | |
| | | LocalizableMessage message = ERR_DSCORE_CANNOT_BOOTSTRAP.get(ie.getMessage()); |
| | | System.err.println(message); |
| | |
| | | } |
| | | catch (InitializationException ie) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | logger.traceException(ie); |
| | | |
| | | LocalizableMessage message = ERR_DSCORE_CANNOT_START.get(ie.getMessage()); |
| | | shutDown(theDirectoryServer.getClass().getName(), message); |
| | | } |
| | | catch (ConfigException ce) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | logger.traceException(ce); |
| | | |
| | | LocalizableMessage message = ERR_DSCORE_CANNOT_START.get(ce.getMessage() + |
| | | (ce.getCause() != null ? " " + ce.getCause().getLocalizedMessage() : "")); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.core; |
| | | |
| | | |
| | | import org.opends.server.api.DirectoryThread; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.CoreMessages.*; |
| | | /** |
| | | * This class defines a shutdown hook that will be invoked automatically when |
| | |
| | | public class DirectoryServerShutdownHook |
| | | extends DirectoryThread |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The fully-qualified name of this class. |
| | |
| | | */ |
| | | public void run() |
| | | { |
| | | TRACER.debugInfo( |
| | | logger.trace( |
| | | "Directory Server shutdown hook has been invoked."); |
| | | |
| | | DirectoryServer.shutDown(CLASS_NAME, |
| | |
| | | import org.opends.server.admin.std.meta.EntryCacheCfgDefn; |
| | | import org.opends.server.api.EntryCache; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | |
| | | import org.opends.server.monitors.EntryCacheMonitorProvider; |
| | | import org.opends.server.types.DN; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.messages.ExtensionMessages.*; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | |
| | | ConfigurationAddListener <EntryCacheCfg>, |
| | | ConfigurationDeleteListener <EntryCacheCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // The default entry cache. |
| | | private DefaultEntryCache _defaultEntryCache = null; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_ENTRYCACHE_CANNOT_INSTALL_DEFAULT_CACHE.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | DN configEntryDN = DN.valueOf(ConfigConstants.DN_ENTRY_CACHE_BASE); |
| | | entryCacheBase = DirectoryServer.getConfigEntry(configEntryDN); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | logError(WARN_CONFIG_ENTRYCACHE_NO_CONFIG_ENTRY.get()); |
| | | return; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | if (!initialize) { |
| | | if (e instanceof InitializationException) { |
| | |
| | | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.api.ExtendedOperationHandler; |
| | | import org.opends.server.api.plugin.PluginResult; |
| | | import org.opends.server.loggers.debug.DebugLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.types.operation.PostOperationExtendedOperation; |
| | |
| | | PostOperationExtendedOperation, |
| | | PostResponseExtendedOperation |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = DebugLogger.getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** The value for the request associated with this extended operation. */ |
| | | private ByteString requestValue; |
| | |
| | | } |
| | | catch(CanceledOperationException coe) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, coe); |
| | | } |
| | | logger.traceException(coe); |
| | | |
| | | setResultCode(ResultCode.CANCELED); |
| | | cancelResult = new CancelResult(ResultCode.CANCELED, null); |
| | |
| | | import org.opends.server.admin.std.meta.ExtendedOperationHandlerCfgDefn; |
| | | import org.opends.server.api.ExtendedOperationHandler; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | |
| | | ConfigurationAddListener<ExtendedOperationHandlerCfg>, |
| | | ConfigurationDeleteListener<ExtendedOperationHandlerCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | handlers.put(dn, handler); |
| | | |
| | | } catch (ConfigException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(e.getMessageObject()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(ERR_CONFIG_EXTOP_INITIALIZATION_FAILED.get( |
| | | String.valueOf(configuration.getJavaClass()), |
| | |
| | | } |
| | | catch (ConfigException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(e.getMessageObject()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(ERR_CONFIG_EXTOP_INITIALIZATION_FAILED.get( |
| | | String.valueOf(configuration.getJavaClass()), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_EXTOP_INVALID_CLASS. |
| | | get(String.valueOf(className), String.valueOf(config.dn()), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | unacceptableReasons.add(ERR_CONFIG_EXTOP_INVALID_CLASS.get(className, |
| | | String.valueOf(config.dn()), |
| | |
| | | import org.opends.server.api.plugin.PluginResult.PostOperation; |
| | | import org.opends.server.api.plugin.PluginType; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.internal.InternalSearchOperation; |
| | | import org.opends.server.protocols.ldap.LDAPControl; |
| | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.protocols.internal.InternalClientConnection.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | ConfigurationDeleteListener<GroupImplementationCfg>, |
| | | BackendInitializationListener |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | continue; |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | continue; |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // FIXME -- Is there anything that we need to do here? |
| | | continue; |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | // Nothing specific to do, as it's already logged. |
| | | } |
| | | } |
| | |
| | | { |
| | | // Should not happen but if it does all we |
| | | // can do here is debug log it and continue. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | continue; |
| | | } |
| | | group.setGroupDN(groupDN); |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.opends.server.api.ConnectionHandler; |
| | | import org.opends.server.api.DirectoryThread; |
| | | import org.opends.server.api.ServerShutdownListener; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.DisconnectReason; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import static org.opends.messages.CoreMessages.*; |
| | | |
| | |
| | | /** |
| | | * The debug log tracer for this object. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | catch (InterruptedException e) |
| | | { |
| | | // Server shutdown monitor may interrupt slow threads. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | shutdownRequested = true; |
| | | break; |
| | | } |
| | |
| | | { |
| | | if (idleTime >= idleTimeLimit) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Terminating client connection " + |
| | | logger.trace("Terminating client connection " + |
| | | c.getConnectionID() + |
| | | " due to the idle time limit"); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_IDLETIME_DISCONNECT_ERROR.get( |
| | | c.getConnectionID(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_IDLETIME_UNEXPECTED_ERROR.get(stackTraceToSingleLineString(e)); |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.core; |
| | | |
| | |
| | | import java.util.Map; |
| | | |
| | | import org.opends.server.api.Backend; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | */ |
| | | public class LockFileManager |
| | | { |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** A map between the filenames and the lock files for exclusive locks. */ |
| | | private static Map<String, FileLock> exclusiveLocks = |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | failureReason.append( |
| | | ERR_FILELOCKER_LOCK_SHARED_FAILED_CREATE.get(lockFile, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | failureReason.append(ERR_FILELOCKER_LOCK_SHARED_FAILED_OPEN.get( |
| | | lockFile, getExceptionMessage(e))); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | failureReason.append( |
| | | ERR_FILELOCKER_LOCK_SHARED_FAILED_LOCK.get( |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | failureReason.append( |
| | | ERR_FILELOCKER_LOCK_EXCLUSIVE_FAILED_CREATE.get(lockFile, |
| | | getExceptionMessage(e))); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | failureReason.append(ERR_FILELOCKER_LOCK_EXCLUSIVE_FAILED_OPEN.get( |
| | | lockFile, getExceptionMessage(e))); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | failureReason.append( |
| | | ERR_FILELOCKER_LOCK_EXCLUSIVE_FAILED_LOCK.get(lockFile, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | failureReason.append( |
| | | ERR_FILELOCKER_UNLOCK_EXCLUSIVE_FAILED_RELEASE.get(lockFile, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // Even though we couldn't close the channel for some reason, this |
| | | // should still be OK because we released the lock above. |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | failureReason.append(ERR_FILELOCKER_UNLOCK_SHARED_FAILED_RELEASE |
| | | .get(lockFile, getExceptionMessage(e))); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // Even though we couldn't close the channel for some reason, this |
| | | // should still be OK because we released the lock above. |
| | |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.loggers.RetentionPolicy; |
| | | import org.opends.server.config.ConfigException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | ConfigurationDeleteListener<LogRetentionPolicyCfg>, |
| | | ConfigurationChangeListener<LogRetentionPolicyCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | /** |
| | |
| | | DirectoryServer.registerRetentionPolicy(config.dn(), RetentionPolicy); |
| | | } |
| | | catch (ConfigException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | messages.add(e.getMessageObject()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(ERR_CONFIG_RETENTION_POLICY_CANNOT_CREATE_POLICY.get( |
| | | String.valueOf(config.dn().toString()), |
| | |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.config.ConfigException; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | ConfigurationDeleteListener<LogRotationPolicyCfg>, |
| | | ConfigurationChangeListener<LogRotationPolicyCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | /** |
| | |
| | | DirectoryServer.registerRotationPolicy(config.dn(), rotationPolicy); |
| | | } |
| | | catch (ConfigException e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | messages.add(e.getMessageObject()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | } catch (Exception e) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(ERR_CONFIG_ROTATION_POLICY_CANNOT_CREATE_POLICY.get( |
| | | String.valueOf(config.dn().toString()), |
| | |
| | | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.api.plugin.PluginResult; |
| | | import org.opends.server.core.networkgroups.NetworkGroup; |
| | | import org.opends.server.loggers.debug.DebugLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.types.operation.PostResponseModifyDNOperation; |
| | |
| | | PreParseModifyDNOperation, |
| | | PostResponseModifyDNOperation |
| | | { |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = DebugLogger.getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** Indicates whether to delete the old RDN value from the entry. */ |
| | | private boolean deleteOldRDN; |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | setResultCode(de.getResultCode()); |
| | | appendErrorMessage(de.getMessageObject()); |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | setResultCode(de.getResultCode()); |
| | | appendErrorMessage(de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | setResultCode(de.getResultCode()); |
| | | appendErrorMessage(de.getMessageObject()); |
| | |
| | | } |
| | | catch(CanceledOperationException coe) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, coe); |
| | | } |
| | | logger.traceException(coe); |
| | | |
| | | setResultCode(ResultCode.CANCELED); |
| | | cancelResult = new CancelResult(ResultCode.CANCELED, null); |
| | |
| | | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.api.plugin.PluginResult; |
| | | import org.opends.server.core.networkgroups.NetworkGroup; |
| | | import org.opends.server.loggers.debug.DebugLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.ldap.LDAPAttribute; |
| | | import org.opends.server.protocols.ldap.LDAPModification; |
| | | import org.opends.server.protocols.ldap.LDAPResultCode; |
| | |
| | | PreParseModifyOperation, |
| | | PostResponseModifyOperation |
| | | { |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = DebugLogger.getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** The raw, unprocessed entry DN as included by the client request. */ |
| | | private ByteString rawEntryDN; |
| | |
| | | entryDN = DN.decode(rawEntryDN); |
| | | } |
| | | catch (DirectoryException de) { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | setResultCode(de.getResultCode()); |
| | | appendErrorMessage(de.getMessageObject()); |
| | |
| | | } |
| | | catch (LDAPException le) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | logger.traceException(le); |
| | | setResultCode(ResultCode.valueOf(le.getResultCode())); |
| | | appendErrorMessage(le.getMessageObject()); |
| | | modifications = null; |
| | |
| | | } |
| | | catch(CanceledOperationException coe) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, coe); |
| | | } |
| | | logger.traceException(coe); |
| | | |
| | | setResultCode(ResultCode.CANCELED); |
| | | cancelResult = new CancelResult(ResultCode.CANCELED, null); |
| | |
| | | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.getTracer; |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | | |
| | | import java.lang.reflect.InvocationTargetException; |
| | |
| | | import org.opends.server.api.AuthenticationPolicyFactory; |
| | | import org.opends.server.api.SubentryChangeListener; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | |
| | | |
| | |
| | | ConfigurationAddListener<AuthenticationPolicyCfg>, |
| | | ConfigurationDeleteListener<AuthenticationPolicyCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Could not create password policy subentry " |
| | | logger.trace("Could not create password policy subentry " |
| | | + "DN %s: %s", entry.getName().toString(), |
| | | stackTraceToSingleLineString(e)); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Could not create password policy subentry " |
| | | logger.trace("Could not create password policy subentry " |
| | | + "DN %s: %s", newEntry.getName().toString(), |
| | | stackTraceToSingleLineString(e)); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Could not create password policy subentry " |
| | | logger.trace("Could not create password policy subentry " |
| | | + "DN %s: %s", newEntry.getName().toString(), |
| | | stackTraceToSingleLineString(e)); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_PWPOLICY_INVALID_POLICY_CONFIG.get( |
| | | String.valueOf(policyConfiguration.dn()), |
| | |
| | | } |
| | | } |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_PWPOLICY_INVALID_POLICY_CONFIG.get( |
| | | String.valueOf(policyConfiguration.dn()), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | unacceptableReasons.add(ERR_CONFIG_PWPOLICY_INVALID_POLICY_CONFIG.get( |
| | | String.valueOf(policyConfiguration.dn()), |
| | |
| | | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.getTracer; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.getExceptionMessage; |
| | |
| | | import org.opends.server.admin.std.server.PasswordPolicyCfg; |
| | | import org.opends.server.api.*; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.schema.GeneralizedTimeSyntax; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | |
| | | public final class PasswordPolicyFactory implements |
| | | AuthenticationPolicyFactory<PasswordPolicyCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | private static final class PasswordPolicyImpl extends PasswordPolicy |
| | | implements ConfigurationChangeListener<PasswordPolicyCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // Current configuration. |
| | | private PasswordPolicyCfg configuration; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PWPOLICY_CANNOT_DETERMINE_REQUIRE_CHANGE_BY_TIME |
| | | .get(String.valueOf(configEntryDN), getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PWPOLICY_INVALID_LAST_LOGIN_TIME_FORMAT.get( |
| | | String.valueOf(configEntryDN), String.valueOf(formatString)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_PWPOLICY_INVALID_PREVIOUS_LAST_LOGIN_TIME_FORMAT |
| | |
| | | } |
| | | catch (final ConfigException ce) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | logger.traceException(ce); |
| | | |
| | | unacceptableReasons.add(ce.getMessageObject()); |
| | | return false; |
| | | } |
| | | catch (final InitializationException ie) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | logger.traceException(ie); |
| | | |
| | | unacceptableReasons.add(ie.getMessageObject()); |
| | | return false; |
| | |
| | | import org.opends.server.admin.std.meta.PasswordPolicyCfgDefn; |
| | | import org.opends.server.api.*; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.ldap.LDAPAttribute; |
| | | import org.opends.server.schema.AuthPasswordSyntax; |
| | |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | */ |
| | | public final class PasswordPolicyState extends AuthenticationPolicyState |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | if (stringValue == null) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning null because attribute %s does not " + |
| | | logger.trace("Returning null because attribute %s does not " + |
| | | "exist in user entry %s", |
| | | attributeType.getNameOrOID(), userDNString); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning value %s for user %s", |
| | | logger.trace("Returning value %s for user %s", |
| | | stringValue, userDNString); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugWarning("Unable to decode value %s for attribute %s" + |
| | | logger.trace("Unable to decode value %s for attribute %s" + |
| | | "in user entry %s: %s", |
| | | v.getValue().toString(), attributeType.getNameOrOID(), |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | |
| | | |
| | | if (timeValues.isEmpty()) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning an empty list because attribute %s " + |
| | | logger.trace("Returning an empty list because attribute %s " + |
| | | "does not exist in user entry %s", |
| | | attributeType.getNameOrOID(), userDNString); |
| | | } |
| | |
| | | { |
| | | passwordChangedTime = 0; |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning( |
| | | logger.trace( |
| | | "Could not determine password changed time for " + "user %s.", |
| | | userDNString); |
| | | } |
| | |
| | | */ |
| | | public void setPasswordChangedTime(long passwordChangedTime) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Setting password changed time for user %s to " + |
| | | logger.trace("Setting password changed time for user %s to " + |
| | | "current time of %d", userDNString, currentTime); |
| | | } |
| | | |
| | |
| | | */ |
| | | public void clearPasswordChangedTime() |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Clearing password changed time for user %s", |
| | | logger.trace("Clearing password changed time for user %s", |
| | | userDNString); |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setDisabled(boolean isDisabled) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Updating user %s to set the disabled flag to %b", |
| | | logger.trace("Updating user %s to set the disabled flag to %b", |
| | | userDNString, isDisabled); |
| | | } |
| | | |
| | |
| | | { |
| | | if (isAccountExpired != ConditionResult.UNDEFINED) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning stored result of %b for user %s", |
| | | logger.trace("Returning stored result of %b for user %s", |
| | | (isAccountExpired == ConditionResult.TRUE), userDNString); |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | isAccountExpired = ConditionResult.TRUE; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("User %s is considered to have an expired " + |
| | | logger.trace("User %s is considered to have an expired " + |
| | | "account because an error occurred while attempting to make " + |
| | | "the determination: %s.", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | |
| | | { |
| | | // The user does have an expiration time, but it hasn't arrived yet. |
| | | isAccountExpired = ConditionResult.FALSE; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("The account for user %s is not expired because " + |
| | | logger.trace("The account for user %s is not expired because " + |
| | | "the expiration time has not yet arrived.", userDNString); |
| | | } |
| | | } |
| | |
| | | { |
| | | // The user does have an expiration time, and it is in the past. |
| | | isAccountExpired = ConditionResult.TRUE; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("The account for user %s is expired because the " + |
| | | logger.trace("The account for user %s is expired because the " + |
| | | "expiration time in that account has passed.", userDNString); |
| | | } |
| | | } |
| | |
| | | // The user doesn't have an expiration time in their entry, so it |
| | | // can't be expired. |
| | | isAccountExpired = ConditionResult.FALSE; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("The account for user %s is not expired because " + |
| | | logger.trace("The account for user %s is not expired because " + |
| | | "there is no expiration time in the user's entry.", |
| | | userDNString); |
| | | } |
| | |
| | | { |
| | | String timeStr = GeneralizedTimeSyntax.format(accountExpirationTime); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Setting account expiration time for user %s to %s", |
| | | logger.trace("Setting account expiration time for user %s to %s", |
| | | userDNString, timeStr); |
| | | } |
| | | |
| | |
| | | */ |
| | | public void clearAccountExpirationTime() |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Clearing account expiration time for user %s", |
| | | logger.trace("Clearing account expiration time for user %s", |
| | | userDNString); |
| | | } |
| | | |
| | |
| | | { |
| | | if (authFailureTimes != null) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning stored auth failure time list of %d " + |
| | | logger.trace("Returning stored auth failure time list of %d " + |
| | | "elements for user %s", |
| | | authFailureTimes.size(), userDNString); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("Error while processing auth failure times " + |
| | | logger.trace("Error while processing auth failure times " + |
| | | "for user %s: %s", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | |
| | | |
| | | if (authFailureTimes.isEmpty()) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning an empty auth failure time list for " + |
| | | logger.trace("Returning an empty auth failure time list for " + |
| | | "user %s because the attribute is absent from the entry.", |
| | | userDNString); |
| | | } |
| | |
| | | long l = iterator.next(); |
| | | if (l < expirationTime) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Removing expired auth failure time %d for " + |
| | | logger.trace("Removing expired auth failure time %d for " + |
| | | "user %s", l, userDNString); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning auth failure time list of %d elements " + |
| | | logger.trace("Returning auth failure time list of %d elements " + |
| | | "for user %s", authFailureTimes.size(), userDNString); |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Updating authentication failure times for user %s", |
| | | logger.trace("Updating authentication failure times for user %s", |
| | | userDNString); |
| | | } |
| | | |
| | |
| | | if ((lockoutCount > 0) && (lockoutCount <= authFailureTimes.size())) |
| | | { |
| | | setFailureLockedTime(highestFailureTime); |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Locking user account %s due to too many failures.", |
| | | logger.trace("Locking user account %s due to too many failures.", |
| | | userDNString); |
| | | } |
| | | } |
| | |
| | | if ((lockoutCount > 0) && (lockoutCount <= authFailureTimes.size())) |
| | | { |
| | | setFailureLockedTime(highestFailureTime); |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Locking user account %s due to too many failures.", |
| | | logger.trace("Locking user account %s due to too many failures.", |
| | | userDNString); |
| | | } |
| | | } |
| | |
| | | */ |
| | | private void clearAuthFailureTimes() |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Clearing authentication failure times for user %s", |
| | | logger.trace("Clearing authentication failure times for user %s", |
| | | userDNString); |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | failureLockedTime = currentTime; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("Returning current time for user %s because an " + |
| | | logger.trace("Returning current time for user %s because an " + |
| | | "error occurred: %s", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | |
| | | */ |
| | | private void clearFailureLockedTime() |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Clearing failure lockout time for user %s.", |
| | | logger.trace("Clearing failure lockout time for user %s.", |
| | | userDNString); |
| | | } |
| | | |
| | |
| | | final int maxFailures = passwordPolicy.getLockoutFailureCount(); |
| | | if (maxFailures <= 0) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false for user %s because lockout due " + |
| | | logger.trace("Returning false for user %s because lockout due " + |
| | | "to failures is not enabled.", userDNString); |
| | | } |
| | | |
| | |
| | | // failure times might have accumulated to trigger a lockout. |
| | | if (getAuthFailureTimes().size() < maxFailures) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false for user %s because there is " + |
| | | logger.trace("Returning false for user %s because there is " + |
| | | "no locked time.", userDNString); |
| | | } |
| | | |
| | |
| | | // The account isn't locked but should be, so do so now. |
| | | setFailureLockedTime(currentTime);// FIXME: set to max(failureTimes)? |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Locking user %s because there were enough " + |
| | | logger.trace("Locking user %s because there were enough " + |
| | | "existing failures even though there was no account locked time.", |
| | | userDNString); |
| | | } |
| | |
| | | { |
| | | secondsUntilUnlock = (int) ((unlockTime - currentTime) / 1000); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning true for user %s because there is a " + |
| | | logger.trace("Returning true for user %s because there is a " + |
| | | "locked time and the lockout duration has not been reached.", |
| | | userDNString); |
| | | } |
| | |
| | | // The lockout in the entry has expired... |
| | | clearFailureLockout(); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false for user %s " + |
| | | logger.trace("Returning false for user %s " + |
| | | "because the existing lockout has expired.", userDNString); |
| | | } |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning true for user %s " + |
| | | logger.trace("Returning true for user %s " + |
| | | "because there is a locked time and no lockout duration.", |
| | | userDNString); |
| | | } |
| | |
| | | { |
| | | if (lastLoginTime != Long.MIN_VALUE) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning stored last login time of %d for " + |
| | | logger.trace("Returning stored last login time of %d for " + |
| | | "user %s.", lastLoginTime, userDNString); |
| | | } |
| | | |
| | |
| | | if ((type == null) || (format == null)) |
| | | { |
| | | lastLoginTime = -1; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning -1 for user %s because no last login " + |
| | | logger.trace("Returning -1 for user %s because no last login " + |
| | | "time will be maintained.", userDNString); |
| | | } |
| | | |
| | |
| | | } |
| | | lastLoginTime = dateFormat.parse(valueString).getTime(); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning last login time of %d for user %s" + |
| | | logger.trace("Returning last login time of %d for user %s" + |
| | | "decoded using current last login time format.", |
| | | lastLoginTime, userDNString); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // This could mean that the last login time was encoded using a |
| | | // previous format. |
| | |
| | | } |
| | | lastLoginTime = dateFormat.parse(valueString).getTime(); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning last login time of %d for " + |
| | | logger.trace("Returning last login time of %d for " + |
| | | "user %s decoded using previous last login time format " + |
| | | "of %s.", lastLoginTime, userDNString, f); |
| | | } |
| | |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | | assert lastLoginTime == -1; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("Returning -1 for user %s because the " + |
| | | logger.trace("Returning -1 for user %s because the " + |
| | | "last login time value %s could not be parsed using any " + |
| | | "known format.", userDNString, valueString); |
| | | } |
| | |
| | | } |
| | | |
| | | assert lastLoginTime == -1; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning %d for user %s because no last " + |
| | | logger.trace("Returning %d for user %s because no last " + |
| | | "login time value exists.", lastLoginTime, userDNString); |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("Unable to set last login time for user %s " + |
| | | logger.trace("Unable to set last login time for user %s " + |
| | | "because an error occurred: %s", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | |
| | | String existingTimestamp = getValue(type); |
| | | if ((existingTimestamp != null) && timestamp.equals(existingTimestamp)) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Not updating last login time for user %s " + |
| | | logger.trace("Not updating last login time for user %s " + |
| | | "because the new value matches the existing value.", |
| | | userDNString); |
| | | } |
| | |
| | | Attribute a = Attributes.create(type, timestamp); |
| | | modifications.add(new Modification(ModificationType.REPLACE, a, true)); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Updated the last login time for user %s to %s", |
| | | logger.trace("Updated the last login time for user %s to %s", |
| | | userDNString, timestamp); |
| | | } |
| | | } |
| | |
| | | */ |
| | | public void clearLastLoginTime() |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Clearing last login time for user %s", userDNString); |
| | | logger.trace("Clearing last login time for user %s", userDNString); |
| | | } |
| | | |
| | | lastLoginTime = -1; |
| | |
| | | { |
| | | if (isIdleLocked != ConditionResult.UNDEFINED) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning stored result of %b for user %s", |
| | | logger.trace("Returning stored result of %b for user %s", |
| | | (isIdleLocked == ConditionResult.TRUE), userDNString); |
| | | } |
| | | |
| | |
| | | { |
| | | isIdleLocked = ConditionResult.FALSE; |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false for user %s because no idle " + |
| | | logger.trace("Returning false for user %s because no idle " + |
| | | "lockout interval is defined.", userDNString); |
| | | } |
| | | return false; |
| | |
| | | if (theLastLoginTime > lockTime || getPasswordChangedTime() > lockTime) |
| | | { |
| | | isIdleLocked = ConditionResult.FALSE; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | StringBuilder reason = new StringBuilder(); |
| | | if(theLastLoginTime > lockTime) |
| | |
| | | reason.append( |
| | | "the password changed time is in an acceptable window"); |
| | | } |
| | | TRACER.debugInfo("Returning false for user %s because %s.", |
| | | logger.trace("Returning false for user %s because %s.", |
| | | userDNString, reason.toString()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | isIdleLocked = ConditionResult.TRUE; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | String reason = (theLastLoginTime < 0) |
| | | ? "there is no last login time and the password " + |
| | | "changed time is not in an acceptable window" |
| | | : "neither last login time nor password " + |
| | | "changed time are in an acceptable window"; |
| | | TRACER.debugInfo("Returning true for user %s because %s.", |
| | | logger.trace("Returning true for user %s because %s.", |
| | | userDNString, reason); |
| | | } |
| | | } |
| | |
| | | { |
| | | if(mustChangePassword != ConditionResult.UNDEFINED) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning stored result of %b for user %s.", |
| | | logger.trace("Returning stored result of %b for user %s.", |
| | | (mustChangePassword == ConditionResult.TRUE), userDNString); |
| | | } |
| | | |
| | |
| | | || passwordPolicy.isForceChangeOnReset()))) |
| | | { |
| | | mustChangePassword = ConditionResult.FALSE; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false for user %s because neither " + |
| | | logger.trace("Returning false for user %s because neither " + |
| | | "force change on add nor force change on reset is enabled, " + |
| | | "or users are not allowed to self-modify passwords.", |
| | | userDNString); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugWarning("Returning true for user %s because an error " + |
| | | logger.trace("Returning true for user %s because an error " + |
| | | "occurred: %s", userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | | |
| | |
| | | if(mustChangePassword == ConditionResult.UNDEFINED) |
| | | { |
| | | mustChangePassword = ConditionResult.FALSE; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning %b for user since the attribute \"%s\"" + |
| | | logger.trace("Returning %b for user since the attribute \"%s\"" + |
| | | " is not present in the entry.", |
| | | false, userDNString, OP_ATTR_PWPOLICY_RESET_REQUIRED); |
| | | } |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning %b for user %s.", |
| | | logger.trace("Returning %b for user %s.", |
| | | (mustChangePassword == ConditionResult.TRUE), userDNString); |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setMustChangePassword(boolean mustChangePassword) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Updating user %s to set the reset flag to %b", |
| | | logger.trace("Updating user %s to set the reset flag to %b", |
| | | userDNString, mustChangePassword); |
| | | } |
| | | |
| | |
| | | // attribute. |
| | | if (passwordPolicy.getMaxPasswordResetAge() <= 0L) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false for user %s because there is no " + |
| | | logger.trace("Returning false for user %s because there is no " + |
| | | "maximum reset age.", userDNString); |
| | | } |
| | | |
| | |
| | | |
| | | if (! mustChangePassword()) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false for user %s because the user's " + |
| | | logger.trace("Returning false for user %s because the user's " + |
| | | "password has not been reset.", userDNString); |
| | | } |
| | | |
| | |
| | | (1000L * passwordPolicy.getMaxPasswordResetAge()); |
| | | boolean locked = (maxResetTime < currentTime); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning %b for user %s after comparing the " + |
| | | logger.trace("Returning %b for user %s after comparing the " + |
| | | "current and max reset times.", locked, userDNString); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning password expiration time of %d for user " + |
| | | logger.trace("Returning password expiration time of %d for user " + |
| | | "%s.", passwordExpirationTime, userDNString); |
| | | } |
| | | |
| | |
| | | if (minAge <= 0L) |
| | | { |
| | | // There is no minimum age, so the user isn't in it. |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false because there is no minimum age."); |
| | | logger.trace("Returning false because there is no minimum age."); |
| | | } |
| | | |
| | | return false; |
| | |
| | | else if ((getPasswordChangedTime() + (minAge*1000L)) < currentTime) |
| | | { |
| | | // It's been long enough since the user changed their password. |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false because the minimum age has " + |
| | | logger.trace("Returning false because the minimum age has " + |
| | | "expired."); |
| | | } |
| | | |
| | |
| | | else if (mustChangePassword()) |
| | | { |
| | | // The user is in a must-change mode, so the minimum age doesn't apply. |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false because the account is in a " + |
| | | logger.trace("Returning false because the account is in a " + |
| | | "must-change state."); |
| | | } |
| | | |
| | |
| | | else |
| | | { |
| | | // The user is within the minimum age. |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning true."); |
| | | logger.trace("Returning true."); |
| | | } |
| | | |
| | | return true; |
| | |
| | | { |
| | | if (requiredChangeTime != Long.MIN_VALUE) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning stored required change time of %d for " + |
| | | logger.trace("Returning stored required change time of %d for " + |
| | | "user %s", requiredChangeTime, userDNString); |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | requiredChangeTime = -1; |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("Returning %d for user %s because an error " + |
| | | logger.trace("Returning %d for user %s because an error " + |
| | | "occurred: %s", requiredChangeTime, userDNString, |
| | | stackTraceToSingleLineString(e)); |
| | | } |
| | |
| | | return requiredChangeTime; |
| | | } |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning required change time of %d for user %s", |
| | | logger.trace("Returning required change time of %d for user %s", |
| | | requiredChangeTime, userDNString); |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setRequiredChangeTime(long requiredChangeTime) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Updating required change time for user %s", |
| | | logger.trace("Updating required change time for user %s", |
| | | userDNString); |
| | | } |
| | | |
| | |
| | | */ |
| | | public void clearRequiredChangeTime() |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Clearing required change time for user %s", |
| | | logger.trace("Clearing required change time for user %s", |
| | | userDNString); |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("Unable to decode the warned time for user %s: " + |
| | | logger.trace("Unable to decode the warned time for user %s: " + |
| | | "%s", userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning a warned time of %d for user %s", |
| | | logger.trace("Returning a warned time of %d for user %s", |
| | | warnedTime, userDNString); |
| | | } |
| | | |
| | |
| | | long warnTime = getWarnedTime(); |
| | | if (warnTime == warnedTime) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Not updating warned time for user %s because " + |
| | | logger.trace("Not updating warned time for user %s because " + |
| | | "the warned time is the same as the specified time.", |
| | | userDNString); |
| | | } |
| | |
| | | |
| | | modifications.add(new Modification(ModificationType.REPLACE, a, true)); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Updated the warned time for user %s", userDNString); |
| | | logger.trace("Updated the warned time for user %s", userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | */ |
| | | public void clearWarnedTime() |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Clearing warned time for user %s", userDNString); |
| | | logger.trace("Clearing warned time for user %s", userDNString); |
| | | } |
| | | |
| | | if (getWarnedTime() < 0) |
| | |
| | | Attribute a = Attributes.empty(type); |
| | | modifications.add(new Modification(ModificationType.REPLACE, a, true)); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Cleared the warned time for user %s", userDNString); |
| | | logger.trace("Cleared the warned time for user %s", userDNString); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("Error while processing grace login times " + |
| | | logger.trace("Error while processing grace login times " + |
| | | "for user %s: %s", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning grace login times for user %s", |
| | | logger.trace("Returning grace login times for user %s", |
| | | userDNString); |
| | | } |
| | | |
| | |
| | | */ |
| | | public void updateGraceLoginTimes() |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Updating grace login times for user %s", |
| | | logger.trace("Updating grace login times for user %s", |
| | | userDNString); |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Updating grace login times for user %s", |
| | | logger.trace("Updating grace login times for user %s", |
| | | userDNString); |
| | | } |
| | | |
| | |
| | | */ |
| | | public void clearGraceLoginTimes() |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Clearing grace login times for user %s", |
| | | logger.trace("Clearing grace login times for user %s", |
| | | userDNString); |
| | | } |
| | | |
| | |
| | | : DirectoryServer.getPasswordStorageScheme(schemeName); |
| | | if (scheme == null) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("User entry %s contains a password with " + |
| | | logger.trace("User entry %s contains a password with " + |
| | | "scheme %s that is not defined in the server.", |
| | | userDNString, schemeName); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("Cannot get clear password value foruser %s: " + |
| | | logger.trace("Cannot get clear password value foruser %s: " + |
| | | "%s", userDNString, e); |
| | | } |
| | | } |
| | |
| | | userEntry.getAttribute(passwordPolicy.getPasswordAttribute()); |
| | | if ((attrList == null) || attrList.isEmpty()) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false because user %s does not have " + |
| | | logger.trace("Returning false because user %s does not have " + |
| | | "any values for password attribute %s", userDNString, |
| | | passwordPolicy.getPasswordAttribute().getNameOrOID()); |
| | | } |
| | |
| | | : DirectoryServer.getPasswordStorageScheme(schemeName); |
| | | if (scheme == null) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("User entry %s contains a password with " + |
| | | logger.trace("User entry %s contains a password with " + |
| | | "scheme %s that is not defined in the server.", |
| | | userDNString, schemeName); |
| | | } |
| | |
| | | ByteString.valueOf(pwComponents[1].toString())); |
| | | if (passwordMatches) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning true for user %s because the " + |
| | | logger.trace("Returning true for user %s because the " + |
| | | "provided password matches a value encoded with scheme %s", |
| | | userDNString, schemeName); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("An error occurred while attempting to " + |
| | | logger.trace("An error occurred while attempting to " + |
| | | "process a password value for user %s: %s", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | | } |
| | |
| | | } |
| | | |
| | | // If we've gotten here, then we couldn't find a match. |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false because the provided password does " + |
| | | logger.trace("Returning false because the provided password does " + |
| | | "not match any of the stored password values for user %s", |
| | | userDNString); |
| | | } |
| | |
| | | if (!validator.passwordIsAcceptable(newPassword, currentPasswords, |
| | | operation, userEntry, invalidReason)) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("The password provided for user %s failed " |
| | | logger.trace("The password provided for user %s failed " |
| | | + "validation: %s", userDNString, invalidReason.toString()); |
| | | } |
| | | return false; |
| | |
| | | { |
| | | if (passwordPolicy.getDefaultPasswordStorageSchemes().isEmpty()) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Doing nothing for user %s because no " + |
| | | logger.trace("Doing nothing for user %s because no " + |
| | | "deprecated storage schemes have been defined.", userDNString); |
| | | } |
| | | |
| | |
| | | List<Attribute> attrList = userEntry.getAttribute(type); |
| | | if ((attrList == null) || attrList.isEmpty()) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Doing nothing for entry %s because no password " + |
| | | logger.trace("Doing nothing for entry %s because no password " + |
| | | "values were found.", userDNString); |
| | | } |
| | | |
| | |
| | | : DirectoryServer.getPasswordStorageScheme(schemeName); |
| | | if (scheme == null) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("Skipping password value for user %s " + |
| | | logger.trace("Skipping password value for user %s " + |
| | | "because the associated storage scheme %s is not " + |
| | | "configured for use.", userDNString, schemeName); |
| | | } |
| | |
| | | else if (passwordPolicy |
| | | .isDeprecatedPasswordStorageScheme(schemeName)) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Marking password with scheme %s for " + |
| | | logger.trace("Marking password with scheme %s for " + |
| | | "removal from user entry %s.", schemeName, userDNString); |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugWarning("Skipping password value for user %s because " + |
| | | logger.trace("Skipping password value for user %s because " + |
| | | "an error occurred while attempting to decode it based on " + |
| | | "the user password syntax: %s", |
| | | userDNString, stackTraceToSingleLineString(e)); |
| | |
| | | |
| | | if (removedValues.isEmpty()) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("User entry %s does not have any password values " + |
| | | logger.trace("User entry %s does not have any password values " + |
| | | "encoded using deprecated schemes.", userDNString); |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("Unable to encode password for user %s using " + |
| | | logger.trace("Unable to encode password for user %s using " + |
| | | "default scheme %s: %s", |
| | | userDNString, s.getStorageSchemeName(), |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | |
| | | if (updatedValues.isEmpty()) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("Not updating user entry %s because removing " + |
| | | logger.trace("Not updating user entry %s because removing " + |
| | | "deprecated schemes would leave the user without a password.", |
| | | userDNString); |
| | | } |
| | |
| | | modifications.add(new Modification(ModificationType.ADD, a2, true)); |
| | | } |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Updating user entry %s to replace password values " + |
| | | logger.trace("Updating user entry %s to replace password values " + |
| | | "encoded with deprecated schemes with values encoded " + |
| | | "with the default schemes.", userDNString); |
| | | } |
| | |
| | | { |
| | | if (! maintainHistory()) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false because password history " + |
| | | logger.trace("Returning false because password history " + |
| | | "checking is disabled."); |
| | | } |
| | | |
| | |
| | | // passwords. If so, then we'll consider it to be in the history. |
| | | if (passwordMatches(password)) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning true because the provided password " + |
| | | logger.trace("Returning true because the provided password " + |
| | | "is currently in use."); |
| | | } |
| | | |
| | |
| | | { |
| | | if (historyValueMatches(password, v)) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning true because the password is in " + |
| | | logger.trace("Returning true because the password is in " + |
| | | "the history."); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | // If we've gotten here, then the password isn't in the history. |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false because the password isn't in the " + |
| | | logger.trace("Returning false because the password isn't in the " + |
| | | "history."); |
| | | } |
| | | |
| | |
| | | int hashPos = histStr.indexOf('#'); |
| | | if (hashPos <= 0) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Found value " + histStr + " in the " + |
| | | logger.trace("Found value " + histStr + " in the " + |
| | | "history with no timestamp. Marking it " + |
| | | "for removal."); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | TRACER.debugInfo("Could not decode the timestamp in " + |
| | | logger.trace("Could not decode the timestamp in " + |
| | | "history value " + histStr + " -- " + e + |
| | | ". Marking it for removal."); |
| | | } |
| | |
| | | int hashPos1 = histStr.indexOf('#'); |
| | | if (hashPos1 <= 0) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false because the password history " + |
| | | logger.trace("Returning false because the password history " + |
| | | "value didn't include any hash characters."); |
| | | } |
| | | |
| | |
| | | int hashPos2 = histStr.indexOf('#', hashPos1+1); |
| | | if (hashPos2 < 0) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false because the password history " + |
| | | logger.trace("Returning false because the password history " + |
| | | "value only had one hash character."); |
| | | } |
| | | |
| | |
| | | if (scheme.authPasswordMatches(password, authPWComponents[1].toString(), |
| | | authPWComponents[2].toString())) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning true because the auth password " + |
| | | logger.trace("Returning true because the auth password " + |
| | | "history value matched."); |
| | | } |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false because the auth password " + |
| | | logger.trace("Returning false because the auth password " + |
| | | "history value did not match."); |
| | | } |
| | | |
| | |
| | | if (scheme.passwordMatches(password, |
| | | ByteString.valueOf(userPWComponents[1]))) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning true because the user password " + |
| | | logger.trace("Returning true because the user password " + |
| | | "history value matched."); |
| | | } |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false because the user password " + |
| | | logger.trace("Returning false because the user password " + |
| | | "history value did not match."); |
| | | } |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false because the syntax OID " + |
| | | logger.trace("Returning false because the syntax OID " + |
| | | syntaxOID + " didn't match for either the auth " + |
| | | "or user password syntax."); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Returning false because of an exception: " + |
| | | logger.trace("Returning false because of an exception: " + |
| | | stackTraceToSingleLineString(e)); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (! maintainHistory()) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Not doing anything because password history " + |
| | | logger.trace("Not doing anything because password history " + |
| | | "maintenance is disabled."); |
| | | } |
| | | |
| | |
| | | iterator.remove(); |
| | | numToDelete--; |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Removing history value " + |
| | | logger.trace("Removing history value " + |
| | | v.getValue().toString() + " to preserve the history count."); |
| | | } |
| | | } |
| | |
| | | removeValues.add(v); |
| | | iterator.remove(); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Removing history value " + |
| | | logger.trace("Removing history value " + |
| | | v.getValue().toString() + |
| | | " to preserve the history duration."); |
| | | } |
| | |
| | | "#" + encodedPassword; |
| | | Attribute newHistAttr = Attributes.create(historyType, newHistStr); |
| | | |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Going to add history value " + newHistStr); |
| | | logger.trace("Going to add history value " + newHistStr); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | public void clearPasswordHistory() |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("Clearing password history for user %s", userDNString); |
| | | logger.trace("Clearing password history for user %s", userDNString); |
| | | } |
| | | |
| | | AttributeType type = DirectoryServer.getAttributeType( |
| | |
| | | PasswordGenerator<?> generator = passwordPolicy.getPasswordGenerator(); |
| | | if (generator == null) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugWarning("Unable to generate a new password for user " + |
| | | logger.trace("Unable to generate a new password for user " + |
| | | "%s because no password generator has been defined in the " + |
| | | "associated password policy.", userDNString); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | |
| | | |
| | | import org.opends.server.controls.EntryChangeNotificationControl; |
| | | import org.opends.server.controls.PersistentSearchChangeType; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | */ |
| | | void persistentSearchCancelled(PersistentSearch psearch); |
| | | } |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | // Make sure that the entry matches the target filter. |
| | | try |
| | | { |
| | | TRACER.debugInfo(this + " " + entry + " +filter=" |
| | | logger.trace(this + " " + entry + " +filter=" |
| | | + filter.matchesEntry(entry)); |
| | | |
| | | if (!filter.matchesEntry(entry)) |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | // FIXME -- Do we need to do anything here? |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | cancel(); |
| | | |
| | |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | logger.traceException(e2); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | // FIXME -- Do we need to do anything here? |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | cancel(); |
| | | |
| | |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | logger.traceException(e2); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | // FIXME -- Do we need to do anything here? |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | cancel(); |
| | | |
| | |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | logger.traceException(e2); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | // FIXME -- Do we need to do anything here? |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | cancel(); |
| | | |
| | |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e2); |
| | | } |
| | | logger.traceException(e2); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.api.plugin.*; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.types.operation.*; |
| | | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.messages.PluginMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | |
| | | ConfigurationDeleteListener<PluginCfg>, |
| | | ConfigurationChangeListener<PluginCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // Arrays for holding the plugins of each type. |
| | | private DirectoryServerPlugin[] startupPlugins; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_STARTUP_PLUGIN_EXCEPTION.get( |
| | | String.valueOf(p.getPluginEntryDN()), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_SHUTDOWN_PLUGIN_EXCEPTION. |
| | | get(String.valueOf(p.getPluginEntryDN()), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_CONNECT_PLUGIN_EXCEPTION. |
| | | get(String.valueOf(p.getPluginEntryDN()), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage msg = ERR_PLUGIN_POST_DISCONNECT_PLUGIN_EXCEPTION. |
| | | get(String.valueOf(p.getPluginEntryDN()), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_LDIF_IMPORT_PLUGIN_EXCEPTION. |
| | | get(String.valueOf(p.getPluginEntryDN()), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_LDIF_EXPORT_PLUGIN_EXCEPTION. |
| | | get(String.valueOf(p.getPluginEntryDN()), |
| | |
| | | private PluginResult.PreParse handlePreParseException( |
| | | Exception e, PreParseOperation operation, DirectoryServerPlugin plugin) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION.get(operation.getOperationType() |
| | |
| | | int i, DirectoryServerPlugin[] plugins, PreOperationOperation operation, |
| | | DirectoryServerPlugin plugin) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION.get(operation |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION. |
| | | get(abandonOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION. |
| | | get(addOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION. |
| | | get(bindOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION. |
| | | get(compareOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION. |
| | | get(deleteOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION. |
| | | get(extendedOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION. |
| | | get(modifyOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION. |
| | | get(modifyDNOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION. |
| | | get(searchOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION. |
| | | get(unbindOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION. |
| | | get(addOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION. |
| | | get(bindOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION. |
| | | get(compareOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION. |
| | | get(deleteOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION. |
| | | get(extendedOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION. |
| | | get(modifyOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION. |
| | | get(modifyDNOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION. |
| | | get(searchOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_SYNCHRONIZATION_PLUGIN_EXCEPTION. |
| | | get(addOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_SYNCHRONIZATION_PLUGIN_EXCEPTION. |
| | | get(deleteOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_SYNCHRONIZATION_PLUGIN_EXCEPTION. |
| | | get(modifyOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_POST_SYNCHRONIZATION_PLUGIN_EXCEPTION. |
| | | get(modifyDNOperation.getOperationType().getOperationName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_SEARCH_ENTRY_PLUGIN_EXCEPTION. |
| | | get(String.valueOf(p.getPluginEntryDN()), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_SEARCH_REFERENCE_PLUGIN_EXCEPTION. |
| | | get(String.valueOf(p.getPluginEntryDN()), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_PLUGIN_SUBORDINATE_MODIFY_DN_PLUGIN_EXCEPTION.get( |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_PLUGIN_SUBORDINATE_DELETE_PLUGIN_EXCEPTION.get( |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_INTERMEDIATE_RESPONSE_PLUGIN_EXCEPTION. |
| | | get(String.valueOf(p.getPluginEntryDN()), |
| | |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.schema.*; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.LDIFReader; |
| | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | |
| | | */ |
| | | public class SchemaConfigManager |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** The schema that has been parsed from the server configuration. */ |
| | | private Schema schema; |
| | |
| | | } |
| | | catch (InitializationException ie) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | logger.traceException(ie); |
| | | |
| | | throw ie; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_SCHEMA_CANNOT_LIST_FILES.get( |
| | | schemaInstanceDirPath, getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_OPEN_FILE.get( |
| | | schemaFile, schemaDirPath, getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_READ_LDIF_ENTRY.get( |
| | | schemaFile, schemaDirPath, getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_UNPARSEABLE_EXTRA_DATA_IN_FILE.get( |
| | | schemaFile, schemaDirPath, getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | ldapSyntax = new LDAPSyntaxDescriptionSyntax(); |
| | | ldapSyntax.initializeSyntax(null); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | attrTypeSyntax = new AttributeTypeSyntax(); |
| | | attrTypeSyntax.initializeSyntax(null); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | ocSyntax = new ObjectClassSyntax(); |
| | | ocSyntax.initializeSyntax(null); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | nfSyntax = new NameFormSyntax(); |
| | | nfSyntax.initializeSyntax(null); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | dcrSyntax = new DITContentRuleSyntax(); |
| | | dcrSyntax.initializeSyntax(null); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | dsrSyntax = new DITStructureRuleSyntax(); |
| | | dsrSyntax.initializeSyntax(null); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | mruSyntax = new MatchingRuleUseSyntax(); |
| | | mruSyntax.initializeSyntax(null); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_PARSE_LDAP_SYNTAX.get( |
| | | schemaFile, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_PARSE_LDAP_SYNTAX.get( |
| | | schemaFile, |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CONFLICTING_LDAP_SYNTAX.get( |
| | | schemaFile, de.getMessageObject()); |
| | |
| | | catch (Exception e) |
| | | { |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_PARSE_ATTR_TYPE.get( |
| | | schemaFile, de.getMessageObject()); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_PARSE_ATTR_TYPE.get( |
| | | schemaFile, v.getValue().toString() + ": " + |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CONFLICTING_ATTR_TYPE.get( |
| | | schemaFile, de.getMessageObject()); |
| | |
| | | catch (Exception e) |
| | | { |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_PARSE_OC.get( |
| | | schemaFile, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_PARSE_OC.get( |
| | | schemaFile, |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CONFLICTING_OC.get( |
| | | schemaFile, de.getMessageObject()); |
| | |
| | | catch (Exception e) |
| | | { |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_PARSE_NAME_FORM.get( |
| | | schemaFile, de.getMessageObject()); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_PARSE_NAME_FORM.get( |
| | | schemaFile, v.getValue().toString() + ": " + |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CONFLICTING_NAME_FORM.get( |
| | | schemaFile, de.getMessageObject()); |
| | |
| | | catch (Exception e) |
| | | { |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_PARSE_DCR.get( |
| | | schemaFile, de.getMessageObject()); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_PARSE_DCR.get( |
| | | schemaFile,v.getValue().toString() + ": " + |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CONFLICTING_DCR.get( |
| | | schemaFile, de.getMessageObject()); |
| | |
| | | catch (Exception e) |
| | | { |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_PARSE_DSR.get( |
| | | schemaFile, de.getMessageObject()); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_PARSE_DSR.get( |
| | | schemaFile, v.getValue().toString() + ": " + |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CONFLICTING_DSR.get( |
| | | schemaFile, de.getMessageObject()); |
| | |
| | | catch (Exception e) |
| | | { |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_PARSE_MRU.get( |
| | | schemaFile, de.getMessageObject()); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CANNOT_PARSE_MRU.get( |
| | | schemaFile, |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = WARN_CONFIG_SCHEMA_CONFLICTING_MRU.get( |
| | | schemaFile, de.getMessageObject()); |
| | |
| | | catch (Exception e) |
| | | { |
| | | // This should never happen. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.opends.server.controls.AccountUsableResponseControl; |
| | | import org.opends.server.controls.MatchedValuesControl; |
| | | import org.opends.server.core.networkgroups.NetworkGroup; |
| | | import org.opends.server.loggers.debug.DebugLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.ldap.LDAPFilter; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | |
| | | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | SearchReferenceSearchOperation, |
| | | SearchOperation |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = DebugLogger.getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Indicates whether a search result done response has been sent to the |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | setResultCode(de.getResultCode()); |
| | | appendErrorMessage(de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | setResultCode(de.getResultCode()); |
| | | appendErrorMessage(de.getMessageObject()); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | setResponseData(de); |
| | | return false; |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | setResponseData(de); |
| | | return false; |
| | |
| | | } |
| | | catch(CanceledOperationException coe) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, coe); |
| | | } |
| | | logger.traceException(coe); |
| | | |
| | | setResultCode(ResultCode.CANCELED); |
| | | cancelResult = new CancelResult(ResultCode.CANCELED, null); |
| | |
| | | // raised long before this method is invoked. |
| | | if (depth >= MAX_NESTED_FILTER_DEPTH) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugError("Exceeded maximum filter depth"); |
| | | logger.trace("Exceeded maximum filter depth"); |
| | | } |
| | | return false; |
| | | } |
| | |
| | | import org.opends.server.api.plugin.PluginResult.PreOperation; |
| | | import org.opends.server.api.plugin.PluginType; |
| | | import org.opends.server.controls.SubentriesControl; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.internal.InternalSearchOperation; |
| | | import org.opends.server.types.*; |
| | |
| | | LocalBackendSearchOperation; |
| | | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | |
| | | public class SubentryManager extends InternalDirectoryServerPlugin |
| | | implements BackendInitializationListener |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // A mapping between the DNs and applicable subentries. |
| | | private HashMap<DN,List<SubEntry>> dn2SubEntry; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | for (DN baseDN : backend.getBaseDNs()) |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // FIXME -- Is there anything that we need to do here? |
| | | continue; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // FIXME -- Is there anything that we need to do here? |
| | | continue; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // FIXME -- Handle this. |
| | | continue; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // FIXME -- Handle this. |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | // FIXME -- Handle this. |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | catch (Exception e) |
| | | { |
| | | // Shouldnt happen. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | // Notify change listeners. |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | return PluginResult.PreOperation.stopProcessing( |
| | | de.getResultCode(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | return PluginResult.PreOperation.stopProcessing( |
| | | de.getResultCode(), de.getMessageObject()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | return PluginResult.PreOperation.stopProcessing( |
| | | de.getResultCode(), de.getMessageObject()); |
| | |
| | | catch (Exception e) |
| | | { |
| | | // Shouldnt happen. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | for (SubentryChangeListener changeListener : |
| | | changeListeners) |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | return PluginResult.PreOperation.stopProcessing( |
| | | de.getResultCode(), de.getMessageObject()); |
| | |
| | | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | |
| | | import java.util.*; |
| | |
| | | import org.opends.server.api.PasswordGenerator; |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.api.PasswordValidator; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | |
| | | |
| | |
| | | */ |
| | | public final class SubentryPasswordPolicy extends PasswordPolicy |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // Password Policy Subentry draft attributes. |
| | | private static final String PWD_OC_POLICY = "pwdpolicy"; |
| | |
| | | { |
| | | // This should not happen -- The server doesn't |
| | | // have a pwdPolicy objectclass defined. |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER |
| | | .debugWarning("No %s objectclass is defined in the server schema.", |
| | | logger.trace("No %s objectclass is defined in the server schema.", |
| | | PWD_OC_POLICY); |
| | | } |
| | | for (String ocName : objectClasses.values()) |
| | |
| | | |
| | | |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | |
| | | import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | |
| | | ConfigurationAddListener<SynchronizationProviderCfg>, |
| | | ConfigurationDeleteListener<SynchronizationProviderCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (ConfigException e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | messages.add(e.getMessageObject()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(ERR_CONFIG_SYNCH_ERROR_INITIALIZING_PROVIDER.get( |
| | | String.valueOf(configuration.getJavaClass()), |
| | |
| | | } |
| | | catch (ConfigException e) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | messages.add(e.getMessageObject()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(ERR_CONFIG_SYNCH_ERROR_INITIALIZING_PROVIDER.get( |
| | | String.valueOf(configuration.getJavaClass()), |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions copyright 2013 ForgeRock AS |
| | | * Portions Copyright 2013-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.core; |
| | | |
| | |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.loggers.debug.DebugLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.types.operation.PostOperationUnbindOperation; |
| | | import org.opends.server.types.operation.PreParseUnbindOperation; |
| | |
| | | PreParseUnbindOperation, |
| | | PostOperationUnbindOperation |
| | | { |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = DebugLogger.getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Creates a new unbind operation with the provided information. |
| | |
| | | import org.opends.server.api.VirtualAttributeProvider; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | /** |
| | |
| | | ConfigurationAddListener<VirtualAttributeCfg>, |
| | | ConfigurationDeleteListener<VirtualAttributeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * A mapping between the DNs of the config entries and the associated virtual |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_VATTR_INVALID_SEARCH_FILTER.get( |
| | | filterString, |
| | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.forgerock.util.Reject.*; |
| | | |
| | |
| | | import org.opends.server.core.Workflow; |
| | | import org.opends.server.core.WorkflowImpl; |
| | | import org.opends.server.core.WorkflowTopologyNode; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.ldap.LDAPMessage; |
| | | import org.opends.server.types.AuthenticationType; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | |
| | | |
| | | // A lock to protect concurrent access to the registeredNetworkGroups. |
| | | private static Object registeredNetworkGroupsLock = new Object(); |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | unacceptableReasons |
| | | .add(ERR_CONFIG_NETWORK_GROUP_POLICY_CANNOT_INITIALIZE.get( |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_CONFIG_NETWORK_GROUP_POLICY_CANNOT_INITIALIZE.get(String |
| | |
| | | } |
| | | } |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_CONFIG_NETWORK_GROUP_POLICY_CANNOT_INITIALIZE.get(String |
| | |
| | | |
| | | |
| | | import static org.opends.messages.ConfigMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | |
| | | import org.opends.server.admin.std.server.RootCfg; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.ConfigChangeResult; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.util.StaticUtils; |
| | |
| | | ConfigurationDeleteListener<NetworkGroupCfg> |
| | | |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // A mapping between the DNs of the config entries and the associated |
| | | // network groups. |
| | |
| | | } |
| | | catch (InitializationException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(e.getMessageObject()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | } |
| | | catch (ConfigException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(e.getMessageObject()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | |
| | | } |
| | | catch (InitializationException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(e.getMessageObject()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | } |
| | | catch (ConfigException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | messages.add(e.getMessageObject()); |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import org.forgerock.util.Reject; |
| | | import org.opends.server.util.SelectableCertificateKeyManager; |
| | |
| | | public class CryptoManagerImpl |
| | | implements ConfigurationChangeListener<CryptoManagerCfg>, CryptoManager |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // Various schema element references. |
| | | private static AttributeType attrKeyID; |
| | |
| | | DN.valueOf("cn=Servers")); |
| | | } |
| | | catch (DirectoryException ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new InitializationException(ex.getMessageObject()); |
| | | } |
| | | |
| | |
| | | MessageDigest.getInstance(requestedDigestAlgorithm); |
| | | } |
| | | catch (Exception ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | unacceptableReasons.add( |
| | | ERR_CRYPTOMGR_CANNOT_GET_REQUESTED_DIGEST.get( |
| | | requestedDigestAlgorithm, getExceptionMessage(ex))); |
| | |
| | | requestedCipherTransformationKeyLengthBits); |
| | | } |
| | | catch (Exception ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | unacceptableReasons.add( |
| | | ERR_CRYPTOMGR_CANNOT_GET_REQUESTED_ENCRYPTION_CIPHER.get( |
| | | requestedCipherTransformation, getExceptionMessage(ex))); |
| | |
| | | requestedMACAlgorithmKeyLengthBits); |
| | | } |
| | | catch (Exception ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | unacceptableReasons.add( |
| | | ERR_CRYPTOMGR_CANNOT_GET_REQUESTED_MAC_ENGINE.get( |
| | | requestedMACAlgorithm, getExceptionMessage(ex))); |
| | |
| | | keyID, certificate, macKey); |
| | | } |
| | | catch (Exception ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | unacceptableReasons.add( |
| | | ERR_CRYPTOMGR_CANNOT_GET_PREFERRED_KEY_WRAPPING_CIPHER.get( |
| | | getExceptionMessage(ex))); |
| | |
| | | } |
| | | } |
| | | catch (DirectoryException ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_FAILED_TO_RETRIEVE_INSTANCE_CERTIFICATE.get( |
| | | entryDN.toString(), getExceptionMessage(ex)), ex); |
| | |
| | | md = MessageDigest.getInstance(mdAlgorithmName); |
| | | } |
| | | catch (NoSuchAlgorithmException ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_FAILED_TO_COMPUTE_INSTANCE_KEY_IDENTIFIER.get( |
| | | getExceptionMessage(ex)), ex); |
| | |
| | | } |
| | | } |
| | | } catch (DirectoryException ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_FAILED_TO_PUBLISH_INSTANCE_KEY_ENTRY.get( |
| | | getExceptionMessage(ex)), ex); |
| | |
| | | } |
| | | } |
| | | catch (DirectoryException ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_FAILED_TO_RETRIEVE_ADS_TRUSTSTORE_CERTS.get( |
| | | instanceKeysDN.toString(), |
| | |
| | | wrappedKeyElement = StaticUtils.bytesToHexNoSpace(wrappedKey); |
| | | } |
| | | catch (GeneralSecurityException ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_FAILED_TO_ENCODE_SYMMETRIC_KEY_ATTRIBUTE.get( |
| | | getExceptionMessage(ex)), ex); |
| | |
| | | = StaticUtils.hexStringToByteArray(elements[3]); |
| | | } |
| | | catch (ParseException ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_DECODE_SYMMETRIC_KEY_ATTRIBUTE_SYNTAX.get( |
| | | symmetricKeyAttribute, fieldName, |
| | |
| | | } |
| | | catch (IdentifiedException ex) { |
| | | // ConfigException, DirectoryException |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_DECODE_SYMMETRIC_KEY_ATTRIBUTE_NO_PRIVATE.get( |
| | | getExceptionMessage(ex)), ex); |
| | |
| | | secretKey = (SecretKey)unwrapper.unwrap(wrappedKeyCipherTextElement, |
| | | wrappedKeyAlgorithmElement, Cipher.SECRET_KEY); |
| | | } catch(GeneralSecurityException ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_DECODE_SYMMETRIC_KEY_ATTRIBUTE_DECIPHER.get( |
| | | getExceptionMessage(ex)), ex); |
| | |
| | | } |
| | | catch (DirectoryException ex) |
| | | { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_IMPORT_KEY_ENTRY_FAILED_OTHER.get( |
| | | entry.getName().toString(), ex.getMessage()), ex); |
| | |
| | | } |
| | | catch (DirectoryException ex) |
| | | { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_IMPORT_KEY_ENTRY_FAILED_OTHER.get( |
| | | entry.getName().toString(), ex.getMessage()), ex); |
| | |
| | | fValue = UUID.fromString(keyEntryID); |
| | | } |
| | | catch (IllegalArgumentException ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_INVALID_KEY_IDENTIFIER_SYNTAX.get( |
| | | keyEntryID, getExceptionMessage(ex)), ex); |
| | |
| | | } |
| | | catch (GeneralSecurityException ex) { |
| | | // NoSuchAlgorithmException, NoSuchPaddingException |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_GET_CIPHER_INVALID_CIPHER_TRANSFORMATION.get( |
| | | keyEntry.getType(), getExceptionMessage(ex)), ex); |
| | |
| | | } |
| | | catch (GeneralSecurityException ex) { |
| | | // InvalidKeyException, InvalidAlgorithmParameterException |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_GET_CIPHER_CANNOT_INITIALIZE.get( |
| | | getExceptionMessage(ex)), ex); |
| | |
| | | mac = Mac.getInstance(keyEntry.getType()); |
| | | } |
| | | catch (NoSuchAlgorithmException ex){ |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_GET_MAC_ENGINE_INVALID_MAC_ALGORITHM.get( |
| | | keyEntry.getType(), getExceptionMessage(ex)), |
| | |
| | | mac.init(keyEntry.getSecretKey()); |
| | | } |
| | | catch (InvalidKeyException ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_GET_MAC_ENGINE_CANNOT_INITIALIZE.get( |
| | | getExceptionMessage(ex)), ex); |
| | |
| | | } |
| | | } |
| | | catch (IOException ex) { |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_GET_CIPHER_STREAM_PROLOGUE_WRITE_ERROR.get( |
| | | getExceptionMessage(ex)), ex); |
| | |
| | | } |
| | | catch (Exception ex) { |
| | | // IndexOutOfBoundsException, ArrayStoreException, ... |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_DECRYPT_FAILED_TO_READ_PROLOGUE_VERSION.get( |
| | | ex.getMessage()), ex); |
| | |
| | | } |
| | | catch (Exception ex) { |
| | | // IndexOutOfBoundsException, ArrayStoreException, ... |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_DECRYPT_FAILED_TO_READ_KEY_IDENTIFIER.get( |
| | | ex.getMessage()), ex); |
| | |
| | | } |
| | | catch (Exception ex) { |
| | | // IndexOutOfBoundsException, ArrayStoreException, ... |
| | | if (debugEnabled()) { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ex); |
| | | } |
| | | logger.traceException(ex); |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_DECRYPT_FAILED_TO_READ_IV.get(), ex); |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_CRYPTOMGR_SSL_CONTEXT_CANNOT_INITIALIZE.get( |
| | |
| | | import org.opends.server.api.Backend; |
| | | import org.opends.server.api.BackendInitializationListener; |
| | | import org.opends.server.api.ChangeNotificationListener; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.debug.DebugLogger.getTracer; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.types.operation.PostResponseAddOperation; |
| | |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.AddOperation; |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.admin.ads.ADSContext; |
| | | |
| | | import java.util.LinkedHashSet; |
| | |
| | | /** |
| | | * The debug log tracer for this object. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_TRUSTSTORESYNC_EXCEPTION.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ExtendedOperation; |
| | | import org.opends.server.loggers.debug.DebugLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.asn1.ASN1; |
| | | import org.opends.server.protocols.asn1.ASN1Exception; |
| | | import org.opends.server.protocols.asn1.ASN1Reader; |
| | |
| | | extends ExtendedOperationHandler< |
| | | GetSymmetricKeyExtendedOperationHandlerCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = DebugLogger.getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The BER type value for the symmetric key element of the operation value. |
| | |
| | | } |
| | | catch (ASN1Exception ae) |
| | | { |
| | | if (DebugLogger.debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | logger.traceException(ae); |
| | | } |
| | | |
| | | LocalizableMessage message = ERR_GET_SYMMETRIC_KEY_ASN1_DECODE_EXCEPTION.get( |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (DebugLogger.debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | operation.setResultCode(ResultCode.PROTOCOL_ERROR); |
| | |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | |
| | | |
| | | import static org.opends.messages.ExtensionMessages.*; |
| | | import static org.opends.server.extensions.ExtensionsConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | |
| | | public class AESPasswordStorageScheme |
| | | extends PasswordStorageScheme<AESPasswordStorageSchemeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage m = ERR_PWSCHEME_CANNOT_ENCRYPT.get(STORAGE_SCHEME_NAME_AES, |
| | | getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage m = ERR_PWSCHEME_CANNOT_ENCRYPT.get(STORAGE_SCHEME_NAME_AES, |
| | | getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | return false; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage m = ERR_PWSCHEME_CANNOT_DECRYPT.get(STORAGE_SCHEME_NAME_AES, |
| | | getExceptionMessage(e)); |
| | |
| | | import org.opends.server.admin.std.server.Base64PasswordStorageSchemeCfg; |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | |
| | | |
| | | import static org.opends.messages.ExtensionMessages.*; |
| | | import static org.opends.server.extensions.ExtensionsConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | |
| | | |
| | | |
| | |
| | | public class Base64PasswordStorageScheme |
| | | extends PasswordStorageScheme<Base64PasswordStorageSchemeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD.get( |
| | | storedPassword.toString(), String.valueOf(e)); |
| | |
| | | import org.opends.server.api.PasswordStorageScheme; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | |
| | | |
| | | import static org.opends.messages.ExtensionMessages.*; |
| | | import static org.opends.server.extensions.ExtensionsConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | |
| | | public class BlowfishPasswordStorageScheme |
| | | extends PasswordStorageScheme<BlowfishPasswordStorageSchemeCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage m = ERR_PWSCHEME_CANNOT_ENCRYPT.get(STORAGE_SCHEME_NAME_BLOWFISH, |
| | | getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage m = ERR_PWSCHEME_CANNOT_ENCRYPT.get(STORAGE_SCHEME_NAME_BLOWFISH, |
| | | getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | return false; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage m = ERR_PWSCHEME_CANNOT_DECRYPT.get(STORAGE_SCHEME_NAME_BLOWFISH, |
| | | getExceptionMessage(e)); |
| | |
| | | import org.opends.server.core.BindOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.PasswordPolicyState; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.messages.ExtensionMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | implements ConfigurationChangeListener< |
| | | CramMD5SASLMechanismHandlerCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | // An array filled with the inner pad byte. |
| | | private byte[] iPad; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_SASLCRAMMD5_CANNOT_GET_MESSAGE_DIGEST.get(getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (ParseException pe) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, pe); |
| | | } |
| | | logger.traceException(pe); |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | | |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | | |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | | |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | | |
| | |
| | | import org.opends.server.api.ExtendedOperationHandler; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.ExtendedOperation; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.asn1.ASN1; |
| | | import org.opends.server.protocols.asn1.ASN1Reader; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import static org.opends.messages.ExtensionMessages.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | public class CancelExtendedOperation |
| | | extends ExtendedOperationHandler<CancelExtendedOperationHandlerCfg> |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * Create an instance of this cancel extended operation. All initialization |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | operation.setResultCode(ResultCode.PROTOCOL_ERROR); |
| | | |
| | |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.schema.GeneralizedTimeSyntax; |
| | | import org.opends.server.tools.LDIFModify; |
| | | import org.opends.server.types.*; |
| | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.extensions.ExtensionsConstants.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | extends ConfigHandler |
| | | implements AlertGenerator |
| | | { |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | catch (InitializationException ie) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | logger.traceException(ie); |
| | | |
| | | throw ie; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_FILE_CANNOT_VERIFY_EXISTENCE.get( |
| | | f.getAbsolutePath(), String.valueOf(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_UNABLE_TO_APPLY_STARTUP_CHANGES.get( |
| | | changesFile.getAbsolutePath(), String.valueOf(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_FILE_CANNOT_OPEN_FOR_READ.get( |
| | | f.getAbsolutePath(), String.valueOf(e)); |
| | |
| | | } |
| | | catch (LDIFException le) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | logger.traceException(le); |
| | | |
| | | close(reader); |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | close(reader); |
| | | |
| | |
| | | } |
| | | catch (InitializationException ie) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | logger.traceException(ie); |
| | | |
| | | close(reader); |
| | | throw ie; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | close(reader); |
| | | |
| | |
| | | } |
| | | catch (LDIFException le) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, le); |
| | | } |
| | | logger.traceException(le); |
| | | |
| | | close(reader); |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | close(reader); |
| | | |
| | |
| | | catch (Exception e) |
| | | { |
| | | // This should not happen. |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | close(reader); |
| | | |
| | |
| | | } |
| | | catch (InitializationException ie) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ie); |
| | | } |
| | | logger.traceException(ie); |
| | | |
| | | throw ie; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_CONFIG_CANNOT_DETERMINE_SERVER_ROOT.get(ENV_VAR_INSTALL_ROOT); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_CANNOT_REGISTER_AS_PRIVATE_SUFFIX.get( |
| | | String.valueOf(configRootEntry.getDN()), getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (ConfigException ce) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | logger.traceException(ce); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_FILE_ADD_FAILED. |
| | | get(String.valueOf(entryDN), String.valueOf(parentDN), |
| | |
| | | } |
| | | catch (ConfigException ce) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ce); |
| | | } |
| | | logger.traceException(ce); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_FILE_DELETE_FAILED. |
| | | get(String.valueOf(entryDN), String.valueOf(parentEntry.getDN()), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_MANUAL_CHANGES_LOST.get( |
| | | configFile, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_FILE_WRITE_CANNOT_EXPORT_NEW_CONFIG.get( |
| | | String.valueOf(tempConfig), stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_FILE_WRITE_CANNOT_RENAME_NEW_CONFIG. |
| | | get(String.valueOf(tempConfig), String.valueOf(configFile), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_FILE_CANNOT_CREATE_ARCHIVE_DIR. |
| | | get(archiveDirectory.getAbsolutePath(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_FILE_CANNOT_WRITE_CONFIG_ARCHIVE.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_FILE_CANNOT_WRITE_CONFIG_ARCHIVE.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | logError(ERR_STARTOK_CANNOT_WRITE.get(configFile, tempFilePath, |
| | | getExceptionMessage(e))); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | logError(ERR_STARTOK_CANNOT_OPEN_FOR_WRITING.get(tempFilePath, |
| | | getExceptionMessage(e))); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | logError(ERR_STARTOK_CANNOT_OPEN_FOR_READING.get(configFile, |
| | | getExceptionMessage(e))); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | File startOKFile = new File(startOKFilePath); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | |
| | |
| | | tempFile.renameTo(startOKFile); |
| | | } catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | logError(ERR_STARTOK_CANNOT_RENAME.get(tempFilePath, startOKFilePath, |
| | | getExceptionMessage(e))); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_LDIF_WRITE_ERROR.get(String.valueOf(e)); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_FILE_CLOSE_ERROR.get(String.valueOf(e)); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_FILE_WRITE_ERROR.get( |
| | | configEntry.getDN().toString(), String.valueOf(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_BACKUP_CANNOT_GET_MAC.get( |
| | | macKeyID, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_BACKUP_CANNOT_GET_DIGEST.get( |
| | | digestAlgorithm, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_BACKUP_CANNOT_CREATE_ARCHIVE_FILE. |
| | | get(String.valueOf(filename), backupDirectory.getPath(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_BACKUP_CANNOT_GET_CIPHER.get( |
| | | stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | message = ERR_CONFIG_BACKUP_CANNOT_DETERMINE_CONFIG_FILE_LOCATION. |
| | | get(getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | StaticUtils.close(inputStream, zipStream); |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | StaticUtils.close(inputStream, zipStream); |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | message = ERR_CONFIG_BACKUP_CANNOT_CLOSE_ZIP_STREAM.get( |
| | | filename, backupDirectory.getPath(), getExceptionMessage(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | message = ERR_CONFIG_BACKUP_CANNOT_UPDATE_BACKUP_DESCRIPTOR.get( |
| | | backupDirectory.getDescriptorPath(), stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | } |
| | | } |
| opendj3-server-dev/src/server/org/opends/server/extensions/DefaultEntryCache.java
opendj3-server-dev/src/server/org/opends/server/extensions/DictionaryPasswordValidator.java
opendj3-server-dev/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/DiskSpaceMonitor.java
opendj3-server-dev/src/server/org/opends/server/extensions/DynamicGroup.java
opendj3-server-dev/src/server/org/opends/server/extensions/EntryDNVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/EntryUUIDVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/ExternalSASLMechanismHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/FIFOEntryCache.java
opendj3-server-dev/src/server/org/opends/server/extensions/FileBasedKeyManagerProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/FileBasedTrustManagerProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/FileSystemEntryCache.java
opendj3-server-dev/src/server/org/opends/server/extensions/FilteredStaticGroupMemberList.java
opendj3-server-dev/src/server/org/opends/server/extensions/FingerprintCertificateMapper.java
opendj3-server-dev/src/server/org/opends/server/extensions/GSSAPISASLMechanismHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/GetConnectionIDExtendedOperation.java
opendj3-server-dev/src/server/org/opends/server/extensions/HasSubordinatesVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/IsMemberOfVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/JMXAlertHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/LDAPPassThroughAuthenticationPolicyFactory.java
opendj3-server-dev/src/server/org/opends/server/extensions/MD5PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/MemberVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/NumSubordinatesVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/PBKDF2PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/PKCS11KeyManagerProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/ParallelWorkQueue.java
opendj3-server-dev/src/server/org/opends/server/extensions/ParallelWorkerThread.java
opendj3-server-dev/src/server/org/opends/server/extensions/PasswordExpirationTimeVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/PasswordModifyExtendedOperation.java
opendj3-server-dev/src/server/org/opends/server/extensions/PasswordPolicyStateExtendedOperation.java
opendj3-server-dev/src/server/org/opends/server/extensions/PasswordPolicySubentryVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/RC4PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/RandomPasswordGenerator.java
opendj3-server-dev/src/server/org/opends/server/extensions/SASLContext.java
opendj3-server-dev/src/server/org/opends/server/extensions/SHA1PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/SMTPAccountStatusNotificationHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/SMTPAlertHandler.java
opendj3-server-dev/src/server/org/opends/server/extensions/SaltedMD5PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/SaltedSHA1PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/SaltedSHA256PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/SaltedSHA384PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/SaltedSHA512PasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/SimpleStaticGroupMemberList.java
opendj3-server-dev/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java
opendj3-server-dev/src/server/org/opends/server/extensions/StaticGroup.java
opendj3-server-dev/src/server/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapper.java
opendj3-server-dev/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java
opendj3-server-dev/src/server/org/opends/server/extensions/SubjectEqualsDNCertificateMapper.java
opendj3-server-dev/src/server/org/opends/server/extensions/TLSByteChannel.java
opendj3-server-dev/src/server/org/opends/server/extensions/TraditionalWorkQueue.java
opendj3-server-dev/src/server/org/opends/server/extensions/TraditionalWorkerThread.java
opendj3-server-dev/src/server/org/opends/server/extensions/TripleDESPasswordStorageScheme.java
opendj3-server-dev/src/server/org/opends/server/extensions/VirtualStaticGroup.java
opendj3-server-dev/src/server/org/opends/server/extensions/WhoAmIExtendedOperation.java
opendj3-server-dev/src/server/org/opends/server/loggers/AbstractTextAccessLogPublisher.java
opendj3-server-dev/src/server/org/opends/server/loggers/FileNumberRetentionPolicy.java
opendj3-server-dev/src/server/org/opends/server/loggers/FreeDiskSpaceRetentionPolicy.java
opendj3-server-dev/src/server/org/opends/server/loggers/GZIPAction.java
opendj3-server-dev/src/server/org/opends/server/loggers/MultifileTextWriter.java
opendj3-server-dev/src/server/org/opends/server/loggers/RotationActionThread.java
opendj3-server-dev/src/server/org/opends/server/loggers/SizeBasedRetentionPolicy.java
opendj3-server-dev/src/server/org/opends/server/loggers/TimeStampNaming.java
opendj3-server-dev/src/server/org/opends/server/loggers/debug/DebugTracer.java
opendj3-server-dev/src/server/org/opends/server/loggers/debug/TextDebugLogPublisher.java
opendj3-server-dev/src/server/org/opends/server/loggers/debug/TraceSettings.java
opendj3-server-dev/src/server/org/opends/server/monitors/BackendMonitor.java
opendj3-server-dev/src/server/org/opends/server/monitors/DatabaseEnvironmentMonitor.java
opendj3-server-dev/src/server/org/opends/server/monitors/SystemInfoMonitorProvider.java
opendj3-server-dev/src/server/org/opends/server/monitors/VersionMonitorProvider.java
opendj3-server-dev/src/server/org/opends/server/plugins/AttributeCleanupPlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/LDAPADListPlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/LastModPlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/ReferentialIntegrityPlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/SambaPasswordPlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/UniqueAttributePlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/profiler/ProfileStack.java
opendj3-server-dev/src/server/org/opends/server/plugins/profiler/ProfileStackFrame.java
opendj3-server-dev/src/server/org/opends/server/plugins/profiler/ProfilerPlugin.java
opendj3-server-dev/src/server/org/opends/server/plugins/profiler/ProfilerThread.java
opendj3-server-dev/src/server/org/opends/server/protocols/LDIFConnectionHandler.java
opendj3-server-dev/src/server/org/opends/server/protocols/asn1/ASN1ByteSequenceReader.java
opendj3-server-dev/src/server/org/opends/server/protocols/asn1/ASN1InputStreamReader.java
opendj3-server-dev/src/server/org/opends/server/protocols/asn1/ASN1OutputStreamWriter.java
opendj3-server-dev/src/server/org/opends/server/protocols/http/CollectClientConnectionsFilter.java
opendj3-server-dev/src/server/org/opends/server/protocols/http/HTTPClientConnection.java
opendj3-server-dev/src/server/org/opends/server/protocols/http/HTTPConnectionHandler.java
opendj3-server-dev/src/server/org/opends/server/protocols/http/SdkConnectionAdapter.java
opendj3-server-dev/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
opendj3-server-dev/src/server/org/opends/server/protocols/jmx/DirectoryRMIClientSocketFactory.java
opendj3-server-dev/src/server/org/opends/server/protocols/jmx/DirectoryRMIServerSocketFactory.java
opendj3-server-dev/src/server/org/opends/server/protocols/jmx/JmxClientConnection.java
opendj3-server-dev/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java
opendj3-server-dev/src/server/org/opends/server/protocols/jmx/RmiConnector.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/AbandonRequestProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/AddRequestProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/AddResponseProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/BindRequestProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/BindResponseProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/CompareRequestProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/CompareResponseProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/DeleteRequestProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/DeleteResponseProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/ExtendedRequestProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/ExtendedResponseProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/IntermediateResponseProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/LDAPFilter.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/LDAPReader.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/LDAPRequestHandler.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/ModifyDNRequestProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/ModifyDNResponseProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/ModifyRequestProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/ModifyResponseProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/SearchRequestProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/SearchResultDoneProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/SearchResultReferenceProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/UnbindRequestProtocolOp.java
opendj3-server-dev/src/server/org/opends/server/replication/common/FirstChangeNumberVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/replication/common/LastChangeNumberVirtualAttributeProvider.java
opendj3-server-dev/src/server/org/opends/server/replication/common/LastCookieVirtualProvider.java
opendj3-server-dev/src/server/org/opends/server/replication/plugin/EntryHistorical.java
opendj3-server-dev/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
opendj3-server-dev/src/server/org/opends/server/replication/plugin/ReplayThread.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/ErrorMsg.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/HeartbeatThread.java
opendj3-server-dev/src/server/org/opends/server/replication/protocol/Session.java
opendj3-server-dev/src/server/org/opends/server/replication/server/DataServerHandler.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ECLServerHandler.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ECLServerWriter.java
opendj3-server-dev/src/server/org/opends/server/replication/server/LightweightServerHandler.java
opendj3-server-dev/src/server/org/opends/server/replication/server/MessageHandler.java
opendj3-server-dev/src/server/org/opends/server/replication/server/MonitoringPublisher.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationBackend.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationDomainMonitorData.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationServer.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationServerHandler.java
opendj3-server-dev/src/server/org/opends/server/replication/server/SafeDataExpectedAcksInfo.java
opendj3-server-dev/src/server/org/opends/server/replication/server/SafeReadExpectedAcksInfo.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ServerHandler.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ServerReader.java
opendj3-server-dev/src/server/org/opends/server/replication/server/ServerWriter.java
opendj3-server-dev/src/server/org/opends/server/replication/server/StatusAnalyzer.java
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexer.java
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/DraftCNDB.java
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/JEChangeNumberIndexDB.java
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/JEChangeNumberIndexDBCursor.java
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/JEUtils.java
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/ReplicationDbEnv.java
opendj3-server-dev/src/server/org/opends/server/replication/service/CTHeartbeatPublisherThread.java
opendj3-server-dev/src/server/org/opends/server/replication/service/HeartbeatMonitor.java
opendj3-server-dev/src/server/org/opends/server/replication/service/ReplicationBroker.java
opendj3-server-dev/src/server/org/opends/server/replication/service/ReplicationDomain.java
opendj3-server-dev/src/server/org/opends/server/schema/AciSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/AttributeTypeSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/AuthPasswordEqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/AuthPasswordExactEqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/CertificateExactMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/DITContentRuleSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/DITStructureRuleSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/DistinguishedNameEqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/DistinguishedNameSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/DoubleMetaphoneApproximateMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/GeneralizedTimeEqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/GeneralizedTimeOrderingMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/IntegerFirstComponentEqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/MatchingRuleSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/NameFormSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/ObjectClassSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/SubtreeSpecificationSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/UTCTimeSyntax.java
opendj3-server-dev/src/server/org/opends/server/schema/UniqueMemberEqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/schema/UserPasswordEqualityMatchingRule.java
opendj3-server-dev/src/server/org/opends/server/tasks/AddSchemaFileTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/ImportTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/InitializeTargetTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/InitializeTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/PurgeConflictsHistoricalTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/RebuildTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/RestoreTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/SetGenerationIdTask.java
opendj3-server-dev/src/server/org/opends/server/tasks/TaskUtils.java
opendj3-server-dev/src/server/org/opends/server/tools/ConsoleDebugLogPublisher.java
opendj3-server-dev/src/server/org/opends/server/tools/DBTest.java
opendj3-server-dev/src/server/org/opends/server/tools/EncodePassword.java
opendj3-server-dev/src/server/org/opends/server/tools/InstallDS.java
opendj3-server-dev/src/server/org/opends/server/tools/InstallDSArgumentParser.java
opendj3-server-dev/src/server/org/opends/server/tools/LDAPCompare.java
opendj3-server-dev/src/server/org/opends/server/tools/LDAPConnection.java
opendj3-server-dev/src/server/org/opends/server/tools/LDAPDelete.java
opendj3-server-dev/src/server/org/opends/server/tools/LDAPModify.java
opendj3-server-dev/src/server/org/opends/server/tools/LDAPReader.java
opendj3-server-dev/src/server/org/opends/server/tools/LDAPSearch.java
opendj3-server-dev/src/server/org/opends/server/tools/LDAPWriter.java
opendj3-server-dev/src/server/org/opends/server/tools/SSLConnectionFactory.java
opendj3-server-dev/src/server/org/opends/server/tools/dsconfig/DSConfig.java
opendj3-server-dev/src/server/org/opends/server/tools/dsreplication/LocalPurgeHistorical.java
opendj3-server-dev/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java
opendj3-server-dev/src/server/org/opends/server/tools/status/StatusCli.java
opendj3-server-dev/src/server/org/opends/server/tools/upgrade/FileManager.java
opendj3-server-dev/src/server/org/opends/server/tools/upgrade/Upgrade.java
opendj3-server-dev/src/server/org/opends/server/tools/upgrade/UpgradeCli.java
opendj3-server-dev/src/server/org/opends/server/tools/upgrade/UpgradeLog.java
opendj3-server-dev/src/server/org/opends/server/tools/upgrade/UpgradeTasks.java
opendj3-server-dev/src/server/org/opends/server/tools/upgrade/UpgradeUtils.java
opendj3-server-dev/src/server/org/opends/server/types/AbstractOperation.java
opendj3-server-dev/src/server/org/opends/server/types/AttributeBuilder.java
opendj3-server-dev/src/server/org/opends/server/types/AttributeType.java
opendj3-server-dev/src/server/org/opends/server/types/AttributeValues.java
opendj3-server-dev/src/server/org/opends/server/types/BackupDirectory.java
opendj3-server-dev/src/server/org/opends/server/types/BackupInfo.java
opendj3-server-dev/src/server/org/opends/server/types/ByteString.java
opendj3-server-dev/src/server/org/opends/server/types/ByteStringBuilder.java
opendj3-server-dev/src/server/org/opends/server/types/DITContentRule.java
opendj3-server-dev/src/server/org/opends/server/types/DITStructureRule.java
opendj3-server-dev/src/server/org/opends/server/types/DN.java
opendj3-server-dev/src/server/org/opends/server/types/Entry.java
opendj3-server-dev/src/server/org/opends/server/types/FilePermission.java
opendj3-server-dev/src/server/org/opends/server/types/HostPort.java
opendj3-server-dev/src/server/org/opends/server/types/InvokableMethod.java
opendj3-server-dev/src/server/org/opends/server/types/LDAPURL.java
opendj3-server-dev/src/server/org/opends/server/types/LDIFExportConfig.java
opendj3-server-dev/src/server/org/opends/server/types/LDIFImportConfig.java
opendj3-server-dev/src/server/org/opends/server/types/LockManager.java
opendj3-server-dev/src/server/org/opends/server/types/MatchingRuleUse.java
opendj3-server-dev/src/server/org/opends/server/types/NameForm.java
opendj3-server-dev/src/server/org/opends/server/types/ObjectClass.java
opendj3-server-dev/src/server/org/opends/server/types/RDN.java
opendj3-server-dev/src/server/org/opends/server/types/RawAttribute.java
opendj3-server-dev/src/server/org/opends/server/types/RawFilter.java
opendj3-server-dev/src/server/org/opends/server/types/RawModification.java
opendj3-server-dev/src/server/org/opends/server/types/Schema.java
opendj3-server-dev/src/server/org/opends/server/types/SearchFilter.java
opendj3-server-dev/src/server/org/opends/server/types/SortKey.java
opendj3-server-dev/src/server/org/opends/server/types/VirtualAttributeRule.java
opendj3-server-dev/src/server/org/opends/server/util/EMailMessage.java
opendj3-server-dev/src/server/org/opends/server/util/LDIFReader.java
opendj3-server-dev/src/server/org/opends/server/util/MultiOutputStream.java
opendj3-server-dev/src/server/org/opends/server/util/StaticUtils.java
opendj3-server-dev/src/server/org/opends/server/util/TimeThread.java
opendj3-server-dev/src/server/org/opends/server/util/cli/ConsoleApplication.java
opendj3-server-dev/src/server/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/externalchangelog/ECLSearchOperation.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/externalchangelog/ECLWorkflowElement.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendAddOperation.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendBindOperation.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendCompareOperation.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendDeleteOperation.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyDNOperation.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendSearchOperation.java
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/GenerationIdTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/ProtocolWindowTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/ReSyncTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/SchemaReplicationTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/StressTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/UpdateOperationTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/AssuredReplicationPluginTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/FractionalReplicationTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/GroupIdHandshakeTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/HistoricalCsnOrderingTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/ReplicationServerFailoverTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/ReplicationServerLoadBalancingTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/StateMachineTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/TopologyViewTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/server/AssuredReplicationServerTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ExternalChangeLogTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/server/MonitorTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/server/changelog/je/JEReplicaDBTest.java
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/service/ComputeBestServerTest.java |