OES11g- Getting NullPointerException trying to perform Policy Distribution Programatically

(Doc ID 2339386.1)

Last updated on DECEMBER 21, 2017

Applies to:

Oracle Entitlements Server - Version 11.1.2.2.0 and later
Information in this document applies to any platform.

Symptoms

On : 11.1.2.2.0 version

When attempting to distribute the application using the MAPI with out the pdp.service in the jps-config.xml  the following error occurs.

using the ( Custom code) REST API to doing the distribute application . To  distribute Application, passing the jps-config.xml to the code, The  jps-config.xml has the following ( pdp.service and Policystore) . so that it will check these values in the jps-config.xml and it will do distributes and works fine ( in case of one JAVASM1)

<serviceInstance name="policystore.rdbms" provider="policy.rdbms">
<property name="jdbc.driver" value="oracle.jdbc.OracleDriver"/>

<property name="jdbc.url" value="connectionstring"/>
<property name="oracle.security.jps.ldap.root.name" value="cn=jpsroot"/>
<property name="oracle.security.jps.farm.name" value="cn=base_domain"/>
<property name="jdbc.user" value="DEV03_OPSS"/>
<property name="jdbc.password" value="password"/>
</serviceInstance>

<serviceInstance name="pdp.service" provider="pdp.service.provider">
<description>Runtime PDP service instance</description>
<property name="oracle.security.jps.runtime.pd.client.policyDistributionMode" value="controlled-pull"/>
<property name="oracle.security.jps.runtime.pd.client.sm_name" value="JavaSM1"/>
<property name="oracle.security.jps.runtime.pd.client.SMinstanceType" value="java"/>
<property name="oracle.security.jps.pd.client.PollingTimerEnabled"value="true"/>

<property name="oracle.security.jps.pd.client.PollingTimerInterval" value="600"/>
<property name="jdbc.driver" value="oracle.jdbc.driver.OracleDriver"/>
<property name="jdbc.url" value="jdbc:oracle:thin:@DB_HOST:1521/orcl"/>
<property name="oracle.security.jps.ldap.root.name" value="cn=jpsroot"/>
<property name="oracle.security.jps.farm.name" value="value="cn=base_domain""/>
<property name="bootstrap.security.principal.key" value="oes_sm_key"/>
<property name="bootstrap.security.principal.map" value="oes_sm_map"/>
<property name="policystore.type" value="DB_ORACLE"/>
</serviceInstance>

</serviceInstances>
<jpsContexts default="default">
<jpsContext name="default">
<serviceInstanceRef ref="pdp.service"/>
<serviceInstanceRef ref="policystore.rdbms"/>

The above works fine, when having one Java Security Module.

When having multiple Java Security Modules, i.e: Java SM1, Java SM2, etc , it is not possible set multiple pdp.service section for each Java Security Module to distribute.

When removing the pdp.service section, seeing below error:

oracle.security.jps.service.policystore.PolicyStoreException:
Exception in thread "main"
oracle.security.jps.service.policystore.PolicyStoreException
at oracle.security.jps.internal.policystore.entitymanager.impl.DistributionManagerImpl.distributePolicyInternal(DistributionManagerImpl.java:254)
at oracle.security.jps.internal.policystore.entitymanager.impl.DistributionManagerImpl.distributePolicyInternal(DistributionManagerImpl.java:227)
at oracle.security.jps.internal.policystore.entitymanager.impl.DistributionManagerImpl.distributePolicyWithNoAuthzCheck(DistributionManagerImpl.java:223)
at oracle.security.jps.internal.policystore.entitymanager.impl.DistributionManagerImpl.distributePolicy(DistributionManagerImpl.java:180)
at oracle.security.jps.internal.policystore.entityauditmanager.PolicyDistributionAuditManager.distributePolicy(PolicyDistributionAuditManager.java:75)
at OESClientTest2.distributePolicies(OESClientTest2.java:263)
at OESClientTest2.main(OESClientTest2.java:108)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at oracle.security.jps.internal.policystore.entitymanager.impl.DistributionManagerImpl.distributePolicyInternal(DistributionManagerImpl.java:235)
... 6 more
Caused by: java.lang.NullPointerException
at
oracle.security.jps.az.internal.management.pd.PD.initializeInternal(PD.java:109)
at oracle.security.jps.az.internal.management.pd.PD.getEngine(PD.java:308)
... 11 more

How distribute the Application for all Java SM at one shot without using the pdp.service instances in jps-config.xml, like distributing the application from OES console?

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms