Hmmm...

Can't be...

i'm also quoting oids, and it workjs like a charm :

   public void testCreateObjectClassWithInvalidNameAttribute()
   throws NamingException
   {
       Attributes attributes = new BasicAttributes();
       Attribute  objectClassAttribute = new BasicAttribute( "objectClass" );

       objectClassAttribute.add( "top" );
       objectClassAttribute.add( "metaTop" );
       objectClassAttribute.add( "metaObjectClass" );

       attributes.put( objectClassAttribute );

       attributes.put( "m-oid", "testOID" );
...

Something else ?

On 6/18/07, Ole Ersoy <[EMAIL PROTECTED]> wrote:
I quoted the variable that contained the OID string.  In other words instead of 
doing:

attributes.put("m-oid", oid);

I did:

attributes.put("m-oid", "oid");

Thanks,
- Ole



Emmanuel Lecharny (JIRA) wrote:
>     [ 
https://issues.apache.org/jira/browse/DIRSERVER-973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505896
 ]
>
> Emmanuel Lecharny commented on DIRSERVER-973:
> ---------------------------------------------
>
> Ole,
>
> how id you get the NPE you mentionned in your first post ? I want to 
reproduce it to be able to fix it.
>
> Thanks !
>
>> NPE while adding an entry in schema without an ObjectClass attribute
>> --------------------------------------------------------------------
>>
>>                 Key: DIRSERVER-973
>>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-973
>>             Project: Directory ApacheDS
>>          Issue Type: Bug
>>            Reporter: Ole Ersoy
>>         Attachments: ObjectClassCreateTest.java
>>
>>
>> I was creating this test to show that when creating meta objectclass 
entries, invalid names are allowed.  However, the same name cannot be used as the 
value of the m-supObjectclass attribute of meta objectclasses.  When I run the test I 
get this exception:
>> org.apache.directory.server.core.interceptor.InterceptorException: 
Unexpected exception. [Root exception is java.lang.NullPointerException]
>>      at 
org.apache.directory.server.core.interceptor.InterceptorChain.throwInterceptorException(InterceptorChain.java:1515)
>> To run the test just drop it into an instance of the testing archetype and 
remember to update the dependencies :-):
>>     <dependency>
>>         <groupId>org.apache.directory.server</groupId>
>>         <artifactId>apacheds-core</artifactId>
>>         <version>1.5.1-SNAPSHOT</version>
>>       </dependency>
>> Cheers,
>> - Ole
>



--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Reply via email to