[ 
https://issues.apache.org/jira/browse/FC-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15560822#comment-15560822
 ] 

Shawn McKinney commented on FC-192:
-----------------------------------

Moved code that sets user object class decl to local func and removed its 
corresponding member variables.  Now dao calls func instead of using member 
var.  

In UserDAO:

    private String[] getUserObjectClass()
    {
        String userObjectClass[] = new String[]
        {
                SchemaConstants.TOP_OC,
                Config.getInstance().getProperty( USER_OBJECT_CLASS ),
                USERS_AUX_OBJECT_CLASS_NAME,
                GlobalIds.PROPS_AUX_OBJECT_CLASS_NAME,
                GlobalIds.FT_MODIFIER_AUX_OBJECT_CLASS_NAME,
                USERS_EXTENSIBLE_OBJECT
        };
        return userObjectClass;
    }


> [ 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)

Reply via email to