Unable to Add Security Policy "Reserve" Method to Specific Data Source - EnDuplicateKeyException Occurs (Doc ID 2305881.1)

Last updated on SEPTEMBER 14, 2017

Applies to:

Oracle WebLogic Server - Version 12.1.3.0.0 and later
Information in this document applies to any platform.

Symptoms

Configuring Oracle WebLogic Server and unable to add security policy for "Reserve" method to a particular data source.

It only occurs to a specific data source and with the Reserve specific method, i.e. others methods can be added and issue does not occur to others data sources.

It fails with below EnDuplicateKeyException exception:

Caused By: weblogic.entitlement.data.EnDuplicateKeyException: Entitlement policy definition for 'type=, application=, module=, resourceType=ConnectionPool, resource=DataSourceName, action=reserve' already exist.
at weblogic.security.providers.authorization.DefaultAuthorizerImpl.createPolicy(DefaultAuthorizerImpl.java:171)
at weblogic.security.providers.authorization.DefaultAuthorizerMBeanImpl.createPolicy(DefaultAuthorizerMBeanImpl.java:343)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.management.jmx.modelmbean.WLSModelMBean.invoke(WLSModelMBean.java:437)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)
at java.security.AccessController.doPrivileged(Native Method)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
at weblogic.management.mbeanservers.internal.JMXContextInterceptor.invoke(JMXContextInterceptor.java:263)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)
at java.security.AccessController.doPrivileged(Native Method)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
at weblogic.management.mbeanservers.internal.SecurityInterceptor.invoke(SecurityInterceptor.java:445)
at weblogic.management.jmx.mbeanserver.WLSMBeanServer.invoke(WLSMBeanServer.java:323)
at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder$11$1.run(JMXConnectorSubjectForwarder.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder$11.run(JMXConnectorSubjectForwarder.java:662)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder.invoke(JMXConnectorSubjectForwarder.java:655)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)

 

Issue was reproduced by following below steps:

1. Log in to WebLogic Server Administration Console.
2. Go to data sources under services .
3. Navigate to a specific data source
4. Click on "security" tab and then create a role under "Role" subtab.
5. Click on Policy subtab and then choose "reserve" from Administrative methods and create a policy with condition having the newly created role.
6. When try to save it throws "weblogic.management.utils.AlreadyExistsException" but there is no other policy defined of the same kind.

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