[
https://issues.apache.org/jira/browse/FC-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15563363#comment-15563363
]
Shawn McKinney commented on FC-192:
-----------------------------------
Changed the config bootstrap of configs to the following. This change keeps
exposure of config internal from other classes, i.e. mgr factories.
private boolean remoteConfigLoaded = false;
private static volatile Config sINSTANCE = null;
public static Config getInstance()
{
if(sINSTANCE == null)
{
synchronized (Config.class)
{
if(sINSTANCE == null)
{
sINSTANCE = new Config();
if( !sINSTANCE.isRemoteConfigLoaded() )
{
sINSTANCE.loadRemoteConfig();
}
}
}
}
return sINSTANCE;
}
/**
* Private constructor
*
*/
private Config()
{
// Load from properties file:
loadLocalConfig();
// load the system property overrides:
getExternalConfig();
}
> [ fortress-core ] problems with config system
> ---------------------------------------------
>
> Key: FC-192
> URL: https://issues.apache.org/jira/browse/FC-192
> Project: FORTRESS
> Issue Type: Bug
> Affects Versions: 1.0.1
> Reporter: Shawn McKinney
> Assignee: Shawn McKinney
> Fix For: 2.0.0-RC1
>
>
> Problem appeared recently with fortress-web. One of the config variables,
> user.objectClass, could not be found causing a problem with the fortress load
> utility's user create.
> The error from log is below. Notice the values of the user's object class
> has 'null' for 2nd value.
> After troubleshooting I discovered the problem occurred due to a recent
> change of UserDAO var decl in UserP to a non-static:
> // TODO: Fixme - This variable must remain static for now or the config
> bootstrap doesn't work right:
> private static UserDAO uDao;
> After returning the value to static as shown the problem went away.
> This is fragile and needs to be fixed so that making simple changes like this
> don't break the config system.
> Error:
> [startAnt] [FortressAdmin] DEBUG - 09 Oct 2016 15:59:27,297 - RegExUtil
> - safeText can't find safeText regular expression pattern. Check
> your Fortress cfg
> [startAnt] [FortressAdmin] DEBUG - 09 Oct 2016 15:59:27,298 - Config
> - getProperty name [user.root] value [ou=People,dc=example,dc=com]
> [startAnt] [FortressAdmin] ******* OBJECT CLASS=top
> [startAnt] [FortressAdmin] ******* OBJECT CLASS=null
> [startAnt] [FortressAdmin] ******* OBJECT CLASS=ftUserAttrs
> [startAnt] [FortressAdmin] ******* OBJECT CLASS=ftProperties
> [startAnt] [FortressAdmin] ******* OBJECT CLASS=ftMods
> [startAnt] [FortressAdmin] ******* OBJECT CLASS=extensibleObject
> [startAnt] [FortressAdmin] DEBUG - 09 Oct 2016 15:59:27,298 - Config
> - getProperty name [pwpolicy.root] value
> [ou=Policies,dc=example,dc=com]
> [startAnt] [FortressAdmin] ****************************
> pwpolicy.root=ou=Policies,dc=example,dc=com
> [startAnt] [FortressAdmin] WARN - 09 Oct 2016 15:59:27,299 -
> FortressAntTask - addUsers userId [test7] caught
> SecurityException={}
> [startAnt] [FortressAdmin]
> org.apache.directory.fortress.core.CreateException: create userId [test7]
> caught LDAPException=objectClass: value #1 invalid per syntax
> [startAnt] [FortressAdmin] at
> org.apache.directory.fortress.core.impl.UserDAO.create(UserDAO.java:569)
> [startAnt] [FortressAdmin] at org.apa
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)