configureSecurityStore.py – java.lang.NullPointerException

Oracle Identity Management 11gR2 PS3 ( 11.1.2.3.0 ) 
As Oracle Identity Management 11gR2 PS3 ( 11.1.2.3.0 )  – only supports Database type security store , Configuring a security store is a mandatory step after create a new Domain based on Oracle Access managemetn or Identity Management components .
 
In my case I created a fresh domain with " Oracle Access Management And Mobile Security Suite " 
Then After the domain creation was successful , I have to configure the database security store as per document :
 
https://docs.oracle.com/cd/E52734_01/core/INOAM/db_securitystore.htm#INOAM98391
 
Command executed : 
/oracle/app/product/fmw_oam/oam/common/tools/configureSecurityStore.py
/oracle/app/product/fmw_oam/oam/common/bin/wlst.sh /oracle/app/product/fmw_oam/oam/common/tools/configureSecurityStore.py -d /oracle/app/admin/user_projects/domains/oam_domain -c IAM -m create -p Oracle123
 
Here , 
IAM_HOME/oracle/app/product/fmw_oam/oam
-d = DOMAIN_DIR = /oracle/app/admin/user_projects/domains/oam_domain 
-c = Config Type = IAM if it is used for creating new DB store 
-m = create = As this is  the first time I am creating a DB store for this domain .
-p = OPSS Schema Password = Oracle123 ( in my case )
 
After executing the above command I received below error :
Info: Data source is: opss-DBDS
Info: DB JDBC driver: oracle.jdbc.OracleDriver
Info: DB JDBC URL: jdbc:oracle:thin:@iamtestdb.demo.com:1521/TESTDB.gfoundries.com
Connected:oracle.jdbc.driver.T4CConnection@461c16ea
Disconnect:oracle.jdbc.driver.T4CConnection@461c16ea
[oracle.security.jps.internal.config.db.DbCredStoreServiceConfigurator]  checkServiceSetup - done
Jul 15, 2015 12:47:24 AM oracle.security.jps.internal.config.ldap.LdapCredStoreServiceConfigurator schemaCompatibleHandler
INFO: Credential store schema upgrade not required. Store Schema version 11.1.1.9.0 is compatible to the seed schema version 11.1.1.9.0
[oracle.security.jps.internal.config.db.DbCredStoreServiceConfigurator]  checkServiceSchema - Store schema has been seeded completely
[oracle.security.jps.internal.config.db.DbCredStoreServiceConfigurator]  updateServiceConfiguration - done
[oracle.security.jps.internal.config.db.DbCredStoreServiceConfigurator]  seedSchemaAndCreateDIT - done
Exception in thread "main" java.lang.ExceptionInInitializerError
        at oracle.ldap.util.guid.GUIDGenerator.nextGuidInBytes(GUIDGenerator.java:118)
        at oracle.ldap.util.Guid.<init>(Guid.java:101)
        at oracle.ldap.util.Guid.newInstance(Guid.java:93)
        at oracle.security.jps.internal.policystore.xml.XmlPolicyStoreUtil.createNewGranteeDN(XmlPolicyStoreUtil.java:2420)
        at oracle.security.jps.internal.policystore.xml.StaxPolicyStoreParser.processGranteeEntity(StaxPolicyStoreParser.java:5810)
        at oracle.security.jps.internal.policystore.xml.StaxPolicyStoreParser.processGrantEntity(StaxPolicyStoreParser.java:5594)
        at oracle.security.jps.internal.policystore.xml.StaxPolicyStoreParser.processJaznPolicyToEntity(StaxPolicyStoreParser.java:5539)
        at oracle.security.jps.internal.policystore.xml.StaxPolicyStoreParser.processAdminPolicy(StaxPolicyStoreParser.java:1939)
        at oracle.security.jps.internal.policystore.xml.StaxPolicyStoreParser.processSystemPolicy(StaxPolicyStoreParser.java:765)
        at oracle.security.jps.internal.policystore.xml.StaxPolicyStoreParser.processPolicyStore(StaxPolicyStoreParser.java:683)
        at oracle.security.jps.internal.core.datastore.xml.XmlDataStoreParser.getDataStoreEntryStax(XmlDataStoreParser.java:126)
        at oracle.security.jps.internal.core.datastore.xml.XmlDataStoreParser.getDataStoreEntry(XmlDataStoreParser.java:186)
        at oracle.security.jps.internal.core.datastore.xml.XmlDataStoreParser.getDataStoreEntry(XmlDataStoreParser.java:193)
        at oracle.security.jps.internal.core.datastore.xml.XmlDataStore.loadXmlDataStore(XmlDataStore.java:412)
        at oracle.security.jps.internal.core.datastore.xml.XmlDataStore.<init>(XmlDataStore.java:277)
        at oracle.security.jps.internal.core.datastore.xml.XmlDataStore.getInstance(XmlDataStore.java:210)
        at oracle.security.jps.internal.policystore.xml.XmlPolicyStore.buildFromFile(XmlPolicyStore.java:560)
        at oracle.security.jps.internal.policystore.xml.XmlPolicyStore.startStore(XmlPolicyStore.java:1341)
        at oracle.security.jps.internal.policystore.xml.XmlPolicyStore.<init>(XmlPolicyStore.java:347)
        at oracle.security.jps.internal.policystore.xml.XmlPolicyStoreProvider.getInstance(XmlPolicyStoreProvider.java:107)
        at oracle.security.jps.internal.policystore.xml.XmlPolicyStoreProvider.getInstance(XmlPolicyStoreProvider.java:81)
        at oracle.security.jps.internal.core.runtime.ContextFactoryImpl.findServiceInstance(ContextFactoryImpl.java:139)
        at oracle.security.jps.internal.core.runtime.ContextFactoryImpl.getContext(ContextFactoryImpl.java:170)
        at oracle.security.jps.internal.core.runtime.ContextFactoryImpl.getContext(ContextFactoryImpl.java:191)
        at oracle.security.jps.internal.core.runtime.JpsContextFactoryImpl.getContext(JpsContextFactoryImpl.java:132)
        at oracle.security.jps.internal.core.runtime.JpsContextFactoryImpl.getContext(JpsContextFactoryImpl.java:127)
        at oracle.security.jps.internal.core.runtime.JpsServiceLocatorImpl.lookup(JpsServiceLocatorImpl.java:63)
        at oracle.security.jps.internal.common.audit.util.AuditDelegateImpl.getJpsAuditor(AuditDelegateImpl.java:99)
        at oracle.security.jps.internal.common.audit.util.AuditDelegateImpl.isEventLoggable(AuditDelegateImpl.java:58)
        at oracle.security.jps.util.AuthZAuditUtil.isEventLoggable(AuthZAuditUtil.java:125)
        at oracle.security.jps.util.AuthZAuditUtil.auditAuthZ(AuthZAuditUtil.java:346)
        at oracle.security.jps.util.JpsAuth.checkPermission(JpsAuth.java:574)
        at oracle.security.jps.internal.credstore.util.CsfUtil.checkPermission(CsfUtil.java:691)
        at oracle.security.jps.internal.credstore.ssp.SspCredentialStore.containsCredential(SspCredentialStore.java:478)
        at oracle.security.jps.internal.keystore.file.FileKeyStoreIntegrityChecker$3.run(FileKeyStoreIntegrityChecker.java:186)
        at oracle.security.jps.internal.keystore.file.FileKeyStoreIntegrityChecker$3.run(FileKeyStoreIntegrityChecker.java:184)
        at java.security.AccessController.doPrivileged(Native Method)
        at oracle.security.jps.internal.keystore.file.FileKeyStoreIntegrityChecker.CsContainsHash(FileKeyStoreIntegrityChecker.java:184)
        at oracle.security.jps.internal.keystore.file.FileKeyStoreIntegrityChecker.<init>(FileKeyStoreIntegrityChecker.java:90)
        at oracle.security.jps.internal.keystore.file.FileKeyStoreManager.<init>(FileKeyStoreManager.java:220)
        at oracle.security.jps.internal.keystore.file.FileKeyStoreManager.getInstance(FileKeyStoreManager.java:193)
        at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.doInit(FileKeyStoreServiceImpl.java:118)
        at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.start(FileKeyStoreServiceImpl.java:901)
        at oracle.security.jps.internal.keystore.FarmKeyStoreServiceImpl.initialize(FarmKeyStoreServiceImpl.java:148)
        at oracle.security.jps.internal.keystore.KeyStoreProvider.createInstance(KeyStoreProvider.java:361)
        at oracle.security.jps.internal.keystore.KeyStoreProvider.getInstance(KeyStoreProvider.java:134)
        at oracle.security.jps.internal.keystore.KeyStoreProvider.getInstance(KeyStoreProvider.java:101)
        at oracle.security.jps.internal.keystore.KeyStoreProvider.getInstance(KeyStoreProvider.java:97)
        at oracle.security.jps.internal.keystore.KeyStoreProvider.getInstance(KeyStoreProvider.java:77)
        at oracle.security.jps.internal.core.runtime.ContextFactoryImpl.findServiceInstance(ContextFactoryImpl.java:139)
        at oracle.security.jps.internal.core.runtime.DelegatingContextFactoryImpl.findServiceInstance(DelegatingContextFactoryImpl.java:61)
        at oracle.security.jps.internal.core.runtime.ContextFactoryImpl.getContext(ContextFactoryImpl.java:170)
        at oracle.security.jps.internal.core.runtime.ContextFactoryImpl.getContext(ContextFactoryImpl.java:191)
        at oracle.security.jps.internal.core.runtime.JpsContextFactoryImpl.getContextFromConfig(JpsContextFactoryImpl.java:174)
        at oracle.security.jps.internal.core.runtime.JpsContextFactoryImpl.getContextFromConfig(JpsContextFactoryImpl.java:170)
        at oracle.security.jps.internal.config.ldap.LdapCredStoreServiceConfigurator.migrateData(LdapCredStoreServiceConfigurator.java:92)
        at oracle.security.jps.internal.tools.configuration.ldap.LdapServiceEnabler.runConfiguration(LdapServiceEnabler.java:462)
        at oracle.security.jps.internal.tools.configuration.ldap.LdapServiceEnabler.configureCredentialStoreService(LdapServiceEnabler.java:232)
        at oracle.security.jps.internal.tools.configuration.ldap.LdapServiceEnabler.configureSecurityServices(LdapServiceEnabler.java:170)
        at oracle.security.jps.internal.tools.configuration.ldap.LdapServiceEnabler.main(LdapServiceEnabler.java:129)
Caused by: java.lang.NullPointerException
        at java.lang.System.arraycopy(Native Method)
        at oracle.ldap.util.guid.GUIDParamGenerator.generateNodeID(GUIDParamGenerator.java:75)
        at oracle.ldap.util.guid.GUIDStateManager.initializeGUIDParameters(GUIDStateManager.java:81)
        at oracle.ldap.util.guid.GUIDStateManager.<init>(GUIDStateManager.java:56)
        at oracle.ldap.util.guid.GUIDStateManager.<clinit>(GUIDStateManager.java:50)

solution: 

configureSecurityStore utility uses : Java - InetAddress.getLocalHost() to get the localhost name details.
The null pointer execption was comming when the InetAddress.getLocalHost() was executed.
To confirm, I executed "hostname" command on machines gave : abc.mydomain.com 
But when I executed ping command : 
ping: unknown host abc.mydomain.com 

Since there was no DNS configured for the localhost name and the entry was not present in /etc/hosts file, the error was thrown.

Because there was no dns server configured for this hostname and there was no entry in the /etc/hosts file for this hostname 

updated the /etc/hosts file as below :
10.254.4.136    abc      abc.mydomain.com 

Please follow and like us:

Please add your comments here