directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <aok...@bellsouth.net>
Subject Re: [jira] Created: (DIRLDAP-28) ClassCast excpetion in org.apache.ldap.common.berlib.asn1.SnickersEncoder
Date Sun, 30 Jan 2005 20:25:09 GMT
Shoot I was afraid someone would start using those crappy clients.  I 
and a fellow named Jeff worked on em.  I could not maintain them and the 
server at the same time so I left it up to Jeff.  Jeff has not been 
around for a while.  Anyhow these clients are looking for some 
attention.  #1 on the list is taking anything Avalon out of them.

Anyone interested?  Emmanuel?

Cheers,
Alex

Emmanuel Lecharny (JIRA) wrote:

>ClassCast excpetion in org.apache.ldap.common.berlib.asn1.SnickersEncoder
>-------------------------------------------------------------------------
>
>         Key: DIRLDAP-28
>         URL: http://issues.apache.org/jira/browse/DIRLDAP-28
>     Project: Directory LDAP
>        Type: Bug
>  Components: Snickers Codec Provider  
>    Versions: 0.8.0    
> Environment: Not relevant
>    Reporter: Emmanuel Lecharny
> Assigned to: Alex Karasulu 
>    Priority: Blocker
>
>
>I get a ClassCast exception while running LdapSearch main :
>java.lang.ClassCastException
>	at org.apache.ldap.common.berlib.asn1.SnickersEncoder$OutputCallback.encodeOccurred(SnickersEncoder.java:177)
>	at org.apache.asn1.codec.stateful.AbstractStatefulEncoder.encodeOccurred(AbstractStatefulEncoder.java:130)
>	at org.apache.asn1.ber.TupleEncodingVisitor.flush(TupleEncodingVisitor.java:173)
>	at org.apache.ldap.common.berlib.asn1.encoder.SnickersLdapEncoder.encode(SnickersLdapEncoder.java:209)
>	at org.apache.ldap.common.berlib.asn1.SnickersEncoder.encodeBlocking(SnickersEncoder.java:66)
>	at org.apache.ldap.common.message.MessageEncoder.encodeBlocking(MessageEncoder.java:90)
>	at org.apache.ldap.clients.LdapBind.bind(LdapBind.java:350)
>	at org.apache.ldap.clients.LdapSearch.main(LdapSearch.java:408)
>
>       public void encodeOccurred(StatefulEncoder encoder, Object encoded) {
>            try
>            {
>                channel.write( ( ByteBuffer ) encoded );   <--- Object is supposed
to be a ByteBuffer [], not a ByteBuffer
>
>Substituing those lines to the one that cause the exception seems to correct it :
>
>       public void encodeOccurred(StatefulEncoder encoder, Object encoded) {
>            try
>            {
>                //channel.write( ( ByteBuffer ) encoded );   <--- Object is supposed
to be a ByteBuffer [], not a ByteBuffer
>                ByteBuffer[] buffers = (ByteBuffer[])encoded;
>                
>                // int nbWritten = 0;  // for debug sake
>                
>                for (int i=0; i<buffers.length; i++) {
>                    //nbWritten += channel.write(buffers[i]);
>                    channel.write(buffers[i]);
>                }
>                
>                // System.out.println("Bytes written (" + nbWritten + ") :");
>                ...
>
>No more exception, then, but, as far as I went, it does not help the whole thing to work
correctly. I do not receive any answer from my favorite OpenLdap server. I'm currently checking
the PDU to see if it's FUBR or not (ethereal to the rescue). Takes time...
>
>  
>


Mime
View raw message