Unable To Delete OID Attribute -- Unable to View Schema in ODSM -- " java.lang.StringIndexOutOfBoundsException: String index out of range: -1"

(Doc ID 1949978.1)

Last updated on JULY 26, 2017

Applies to:

Oracle Internet Directory - Version 11.1.1.7.0 and later
Information in this document applies to any platform.

Symptoms

While creating an a cutom attribute at command line in OID, an attribute was accidently created with a space in the beginning of the name:

Example:
attributetypes=( 99.99.99.99.14 NAME ' fromEmailAddress' DESC 'Custom DFAS attribute' EQUALITY caseIgnoreMatch SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )

this in turn has caused issues with ODSM.  ODSM now throws " Detail java.lang.StringIndexOutOfBoundsException: String index out of range: -1"

Trying to drop/delete the attribute with the following ldif file:

dn: cn=subschemaSubentry
changetype: modify
delete: attributetypes
attributetypes: ( 99.99.99.99.14 NAME ' fromEmailAddress' DESC 'Custom DFAS attribute' EQUALITY caseIgnoreMatch SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )

but hit the following error on execution:   ldap_modify: Object class violation


and in ODSM
Not able to view schema objects


wls_diagnostic.log
 
Module oracle.ldap.admin.SubSchema
Host mysun.us.oracle.com
 
User
Thread ID [ACTIVE].ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)'
ECID 10f0da8d732bd456:-47b27a2:14916589ef1:-8000-00000000000007d3

 
Message String index out of range: -1

Supplemental Detail java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1937)
at oracle.ldap.admin.SchemaObject.populateAttributeMembers(SchemaObject.java:1381)
at oracle.ldap.admin.SchemaObject.parseSubschemaAttributeValue(SchemaObject.java:1875)
at oracle.ldap.admin.SchemaObject.(SchemaObject.java:225)
at oracle.ldap.admin.Attribute.(Attribute.java:127)
at oracle.ldap.admin.SubSchema.parseSubschemaAttribute(SubSchema.java:273)
at oracle.ldap.admin.SubSchema.parseSubschema(SubSchema.java:481)
at oracle.ldap.admin.SubSchema.parseSubschema(SubSchema.java:572)
at oracle.ldap.admin.Root.searchFoundEntry2(Root.java:2515)
at oracle.ldap.admin.Root.searchFoundEntry(Root.java:2193)
at oracle.ldap.admin.ServerAccessWrappersJNDI.findObject(ServerAccessJNDI.java:2211)
at oracle.ldap.admin.ServerAccessJNDI.findObject(ServerAccessJNDI.java:2665)
at oracle.ldap.admin.ServerAccessWrappersJNDI.findObject(ServerAccessJNDI.java:2124)
at oracle.ldap.admin.ServerAccessJNDI.findObject(ServerAccessJNDI.java:2665)
at oracle.ldap.admin.Root.findSubschema(Root.java:1364)
at oracle.ldap.admin.Root.updateSchema(Root.java:1448)
at oracle.ldap.admin.SubSchema.update(SubSchema.java:194)
at oracle.ldap.admin.SubSchema.doRefresh(SubSchema.java:141)
at oracle.ldap.admin.Attributes.doCommand(Attributes.java:252)
at oracle.ldap.admin.common.CommandProp.run(CommandProp.java:486)
at oracle.ldap.admin.common.CommandProp.getProp(CommandProp.java:403)
at oracle.ldap.odsm.ui.common.Action.doAction(Action.java:378)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:187)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:148)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:889)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:379)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
at javax.faces.webapp.FacesServlet.service

 

Changes

 Created a corrupt schema object.

Notice the extra space before the value of the name

attributetypes: ( 99.99.99.99.14 NAME ' fromEmailAddress' DESC 'Custom DFAS attribute' EQUALITY caseIgnoreMatch SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )

Entry should look like :

attributetypes: ( 99.99.99.99.14 NAME 'fromEmailAddress' DESC 'Custom DFAS attribute' EQUALITY caseIgnoreMatch SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )

The same issue can occur if there is a space as the first character of the Description

example:

attributetypes: ( 99.99.99.99.14 NAME 'fromEmailAddress' DESC ' Custom DFAS attribute' EQUALITY caseIgnoreMatch SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )

Entry should look like:

attributetypes: ( 99.99.99.99.14 NAME 'fromEmailAddress' DESC 'Custom DFAS attribute' EQUALITY caseIgnoreMatch SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )

 

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