You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Alex Karasulu (JIRA)" <di...@incubator.apache.org> on 2004/11/27 18:12:18 UTC

[jira] Created: (DIREVE-89) Better exception handling on Modify ops

Better exception handling on Modify ops
---------------------------------------

         Key: DIREVE-89
         URL: http://nagoya.apache.org/jira/browse/DIREVE-89
     Project: Directory Eve
        Type: Improvement
  Components: jndi-provider, protocol  
    Reporter: Alex Karasulu
 Assigned to: Alex Karasulu 


Modifications where we have an unknown attribute should throw the right Attribute unknow or whatever exception as required by the LDAP JNDI provider implementers guide.  Here's an example of a cryptic modification exception:


12:04:42 PM: Failed to read entry uid=admin, ou=system
Root error: [LDAP: error code 54 - failed on search operation:
org.apache.ldap.common.message.SearchRequestImpl@16f5261
javax.naming.NamingException: OID for name 'blah' was not found within the OID registry
	at org.apache.eve.schema.GlobalOidRegistry.getOid(GlobalOidRegistry.java:161)
	at org.apache.eve.schema.GlobalAttributeTypeRegistry.lookup(GlobalAttributeTypeRegistry.java:135)
	at org.apache.eve.jndi.ibs.SchemaService$BinaryAttributeFilter.doFilter(SchemaService.java:149)
	at org.apache.eve.jndi.ibs.SchemaService$BinaryAttributeFilter.accept(SchemaService.java:192)
	at org.apache.eve.jndi.ibs.FilterServiceImpl.accept(FilterServiceImpl.java:228)
	at org.apache.eve.jndi.ibs.FilterServiceImpl.access$0(FilterServiceImpl.java:219)
	at org.apache.eve.jndi.ibs.FilterServiceImpl$2.accept(FilterServiceImpl.java:193)
	at org.apache.eve.db.ResultFilteringEnumeration.prefetch(ResultFilteringEnumeration.java:254)
	at org.apache.eve.db.ResultFilteringEnumeration.<init>(ResultFilteringEnumeration.java:88)
	at org.apache.eve.jndi.ibs.FilterServiceImpl.search(FilterServiceImpl.java:186)
	at org.apache.eve.jndi.BaseInterceptor.invoke(BaseInterceptor.java:173)
	at org.apache.eve.jndi.FailFastPipeline.invoke(FailFastPipeline.java:62)
	at org.apache.eve.jndi.EveJndiProvider.invoke(EveJndiProvider.java:241)
	at $Proxy0.search(Unknown Source)
	at org.apache.eve.jndi.EveDirContext.search(EveDirContext.java:539)
	at org.apache.eve.jndi.EveDirContext.search(EveDirContext.java:498)
	at org.apache.eve.protocol.SearchHandler.handle(SearchHandler.java:91)
	at org.apache.seda.protocol.DefaultRequestProcessor.reply(DefaultRequestProcessor.java:133)
	at org.apache.seda.protocol.DefaultRequestProcessor.access$200(DefaultRequestProcessor.java:44)
	at org.apache.seda.protocol.DefaultRequestProcessor$ProcessorStageHandler.handleEvent(DefaultRequestProcessor.java:207)
	at org.apache.seda.stage.DefaultStage$ExecutableHandler.run(DefaultStage.java:311)
	at org.apache.seda.thread.AbstractThreadPool$AbstractWorker.run(AbstractThreadPool.java:202)




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIREVE-89) Better exception handling on Modify ops

Posted by "Enrique Rodriguez (JIRA)" <di...@incubator.apache.org>.
     [ http://nagoya.apache.org/jira/browse/DIREVE-89?page=comments#action_55939 ]
     
Enrique Rodriguez commented on DIREVE-89:
-----------------------------------------

More official version (from Sun), slightly updated:

http://java.sun.com/j2se/1.4.2/docs/guide/jndi/jndi-ldap-gl.html


> Better exception handling on Modify ops
> ---------------------------------------
>
>          Key: DIREVE-89
>          URL: http://nagoya.apache.org/jira/browse/DIREVE-89
>      Project: Directory Eve
>         Type: Improvement
>   Components: jndi-provider, protocol
>     Reporter: Alex Karasulu
>     Assignee: Alex Karasulu

>
> Modifications where we have an unknown attribute should throw the right Attribute unknow or whatever exception as required by the LDAP JNDI provider implementers guide.  Here's an example of a cryptic modification exception:
> 12:04:42 PM: Failed to read entry uid=admin, ou=system
> Root error: [LDAP: error code 54 - failed on search operation:
> org.apache.ldap.common.message.SearchRequestImpl@16f5261
> javax.naming.NamingException: OID for name 'blah' was not found within the OID registry
> 	at org.apache.eve.schema.GlobalOidRegistry.getOid(GlobalOidRegistry.java:161)
> 	at org.apache.eve.schema.GlobalAttributeTypeRegistry.lookup(GlobalAttributeTypeRegistry.java:135)
> 	at org.apache.eve.jndi.ibs.SchemaService$BinaryAttributeFilter.doFilter(SchemaService.java:149)
> 	at org.apache.eve.jndi.ibs.SchemaService$BinaryAttributeFilter.accept(SchemaService.java:192)
> 	at org.apache.eve.jndi.ibs.FilterServiceImpl.accept(FilterServiceImpl.java:228)
> 	at org.apache.eve.jndi.ibs.FilterServiceImpl.access$0(FilterServiceImpl.java:219)
> 	at org.apache.eve.jndi.ibs.FilterServiceImpl$2.accept(FilterServiceImpl.java:193)
> 	at org.apache.eve.db.ResultFilteringEnumeration.prefetch(ResultFilteringEnumeration.java:254)
> 	at org.apache.eve.db.ResultFilteringEnumeration.<init>(ResultFilteringEnumeration.java:88)
> 	at org.apache.eve.jndi.ibs.FilterServiceImpl.search(FilterServiceImpl.java:186)
> 	at org.apache.eve.jndi.BaseInterceptor.invoke(BaseInterceptor.java:173)
> 	at org.apache.eve.jndi.FailFastPipeline.invoke(FailFastPipeline.java:62)
> 	at org.apache.eve.jndi.EveJndiProvider.invoke(EveJndiProvider.java:241)
> 	at $Proxy0.search(Unknown Source)
> 	at org.apache.eve.jndi.EveDirContext.search(EveDirContext.java:539)
> 	at org.apache.eve.jndi.EveDirContext.search(EveDirContext.java:498)
> 	at org.apache.eve.protocol.SearchHandler.handle(SearchHandler.java:91)
> 	at org.apache.seda.protocol.DefaultRequestProcessor.reply(DefaultRequestProcessor.java:133)
> 	at org.apache.seda.protocol.DefaultRequestProcessor.access$200(DefaultRequestProcessor.java:44)
> 	at org.apache.seda.protocol.DefaultRequestProcessor$ProcessorStageHandler.handleEvent(DefaultRequestProcessor.java:207)
> 	at org.apache.seda.stage.DefaultStage$ExecutableHandler.run(DefaultStage.java:311)
> 	at org.apache.seda.thread.AbstractThreadPool$AbstractWorker.run(AbstractThreadPool.java:202)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIREVE-89) Better exception handling on Modify ops

Posted by "Alex Karasulu (JIRA)" <di...@incubator.apache.org>.
     [ http://nagoya.apache.org/jira/browse/DIREVE-89?page=comments#action_55933 ]
     
Alex Karasulu commented on DIREVE-89:
-------------------------------------

Check this out for the proper exception type to use:

http://webdocs.math.univ-rennes1.fr/java/j2sdk-1.4/guide/jndi/jndi-ldap-gl.html#EXCEPT



> Better exception handling on Modify ops
> ---------------------------------------
>
>          Key: DIREVE-89
>          URL: http://nagoya.apache.org/jira/browse/DIREVE-89
>      Project: Directory Eve
>         Type: Improvement
>   Components: jndi-provider, protocol
>     Reporter: Alex Karasulu
>     Assignee: Alex Karasulu

>
> Modifications where we have an unknown attribute should throw the right Attribute unknow or whatever exception as required by the LDAP JNDI provider implementers guide.  Here's an example of a cryptic modification exception:
> 12:04:42 PM: Failed to read entry uid=admin, ou=system
> Root error: [LDAP: error code 54 - failed on search operation:
> org.apache.ldap.common.message.SearchRequestImpl@16f5261
> javax.naming.NamingException: OID for name 'blah' was not found within the OID registry
> 	at org.apache.eve.schema.GlobalOidRegistry.getOid(GlobalOidRegistry.java:161)
> 	at org.apache.eve.schema.GlobalAttributeTypeRegistry.lookup(GlobalAttributeTypeRegistry.java:135)
> 	at org.apache.eve.jndi.ibs.SchemaService$BinaryAttributeFilter.doFilter(SchemaService.java:149)
> 	at org.apache.eve.jndi.ibs.SchemaService$BinaryAttributeFilter.accept(SchemaService.java:192)
> 	at org.apache.eve.jndi.ibs.FilterServiceImpl.accept(FilterServiceImpl.java:228)
> 	at org.apache.eve.jndi.ibs.FilterServiceImpl.access$0(FilterServiceImpl.java:219)
> 	at org.apache.eve.jndi.ibs.FilterServiceImpl$2.accept(FilterServiceImpl.java:193)
> 	at org.apache.eve.db.ResultFilteringEnumeration.prefetch(ResultFilteringEnumeration.java:254)
> 	at org.apache.eve.db.ResultFilteringEnumeration.<init>(ResultFilteringEnumeration.java:88)
> 	at org.apache.eve.jndi.ibs.FilterServiceImpl.search(FilterServiceImpl.java:186)
> 	at org.apache.eve.jndi.BaseInterceptor.invoke(BaseInterceptor.java:173)
> 	at org.apache.eve.jndi.FailFastPipeline.invoke(FailFastPipeline.java:62)
> 	at org.apache.eve.jndi.EveJndiProvider.invoke(EveJndiProvider.java:241)
> 	at $Proxy0.search(Unknown Source)
> 	at org.apache.eve.jndi.EveDirContext.search(EveDirContext.java:539)
> 	at org.apache.eve.jndi.EveDirContext.search(EveDirContext.java:498)
> 	at org.apache.eve.protocol.SearchHandler.handle(SearchHandler.java:91)
> 	at org.apache.seda.protocol.DefaultRequestProcessor.reply(DefaultRequestProcessor.java:133)
> 	at org.apache.seda.protocol.DefaultRequestProcessor.access$200(DefaultRequestProcessor.java:44)
> 	at org.apache.seda.protocol.DefaultRequestProcessor$ProcessorStageHandler.handleEvent(DefaultRequestProcessor.java:207)
> 	at org.apache.seda.stage.DefaultStage$ExecutableHandler.run(DefaultStage.java:311)
> 	at org.apache.seda.thread.AbstractThreadPool$AbstractWorker.run(AbstractThreadPool.java:202)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DIREVE-89) Better exception handling on Modify ops

Posted by "Alex Karasulu (JIRA)" <di...@incubator.apache.org>.
     [ http://nagoya.apache.org/jira/browse/DIREVE-89?page=comments#action_55942 ]
     
Alex Karasulu commented on DIREVE-89:
-------------------------------------

Also noticed that error handing is totally wacked when we try to access entries in various operations that do not exist.  Like Modify or ModifyRdn operations are not giving good error messages when operations are performed on entries that do not exist as one example. 

> Better exception handling on Modify ops
> ---------------------------------------
>
>          Key: DIREVE-89
>          URL: http://nagoya.apache.org/jira/browse/DIREVE-89
>      Project: Directory Eve
>         Type: Improvement
>   Components: jndi-provider, protocol
>     Reporter: Alex Karasulu
>     Assignee: Alex Karasulu

>
> Modifications where we have an unknown attribute should throw the right Attribute unknow or whatever exception as required by the LDAP JNDI provider implementers guide.  Here's an example of a cryptic modification exception:
> 12:04:42 PM: Failed to read entry uid=admin, ou=system
> Root error: [LDAP: error code 54 - failed on search operation:
> org.apache.ldap.common.message.SearchRequestImpl@16f5261
> javax.naming.NamingException: OID for name 'blah' was not found within the OID registry
> 	at org.apache.eve.schema.GlobalOidRegistry.getOid(GlobalOidRegistry.java:161)
> 	at org.apache.eve.schema.GlobalAttributeTypeRegistry.lookup(GlobalAttributeTypeRegistry.java:135)
> 	at org.apache.eve.jndi.ibs.SchemaService$BinaryAttributeFilter.doFilter(SchemaService.java:149)
> 	at org.apache.eve.jndi.ibs.SchemaService$BinaryAttributeFilter.accept(SchemaService.java:192)
> 	at org.apache.eve.jndi.ibs.FilterServiceImpl.accept(FilterServiceImpl.java:228)
> 	at org.apache.eve.jndi.ibs.FilterServiceImpl.access$0(FilterServiceImpl.java:219)
> 	at org.apache.eve.jndi.ibs.FilterServiceImpl$2.accept(FilterServiceImpl.java:193)
> 	at org.apache.eve.db.ResultFilteringEnumeration.prefetch(ResultFilteringEnumeration.java:254)
> 	at org.apache.eve.db.ResultFilteringEnumeration.<init>(ResultFilteringEnumeration.java:88)
> 	at org.apache.eve.jndi.ibs.FilterServiceImpl.search(FilterServiceImpl.java:186)
> 	at org.apache.eve.jndi.BaseInterceptor.invoke(BaseInterceptor.java:173)
> 	at org.apache.eve.jndi.FailFastPipeline.invoke(FailFastPipeline.java:62)
> 	at org.apache.eve.jndi.EveJndiProvider.invoke(EveJndiProvider.java:241)
> 	at $Proxy0.search(Unknown Source)
> 	at org.apache.eve.jndi.EveDirContext.search(EveDirContext.java:539)
> 	at org.apache.eve.jndi.EveDirContext.search(EveDirContext.java:498)
> 	at org.apache.eve.protocol.SearchHandler.handle(SearchHandler.java:91)
> 	at org.apache.seda.protocol.DefaultRequestProcessor.reply(DefaultRequestProcessor.java:133)
> 	at org.apache.seda.protocol.DefaultRequestProcessor.access$200(DefaultRequestProcessor.java:44)
> 	at org.apache.seda.protocol.DefaultRequestProcessor$ProcessorStageHandler.handleEvent(DefaultRequestProcessor.java:207)
> 	at org.apache.seda.stage.DefaultStage$ExecutableHandler.run(DefaultStage.java:311)
> 	at org.apache.seda.thread.AbstractThreadPool$AbstractWorker.run(AbstractThreadPool.java:202)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira