directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon.Tem...@saaconsultants.com
Subject Could not find java.naming.ldap.attributes.binary key in environment
Date Mon, 05 Dec 2005 17:09:41 GMT




I'm having real problems with binary data  and hope someone can help?

When I start my embedded server I set the property
java.naming.ldap.attributes.binary.  The log4j states this is set:

2005-12-05 15:53:42,656 INFO
[org.apache.ldap.server.DefaultDirectoryService](main) Startup environment
contains java.naming.ldap.attributes.binary
2005-12-05 15:53:42,656 INFO
[org.apache.ldap.server.DefaultDirectoryService](main) Setting binaries to
union of schema defined binaries and those provided in
java.naming.ldap.attributes.binary
2005-12-05 15:53:42,656 DEBUG
[org.apache.ldap.server.DefaultDirectoryService](main) binary ids used:
[1.2.6.1.4.1.18060.1.1.1.3.22, bytecode, userpassword,
1.3.6.1.4.1.42.2.27.4.1.8, usersmimecertificate, deltarevocationlist,
personalsignature, 2.5.4.40, krb5key, 0.9.2342.19200300.100.1.7, 2.5.4.35,
photo, 2.6.1.4.12, x500uniqueidentifier, vcselementbinaryvalue,
crosscertificatepair, supportedalgorithms, 0.9.2342.19200300.100.1.55,
2.5.4.38, userpkcs12, javaserializeddata, 0.9.2342.19200300.100.1.60,
2.16.840.1.113730.3.1.40, 2.5.4.37, cacertificate,
certificaterevocationlist, authorityrevocationlist, jpegphoto, audio,
2.5.4.52, 2.5.4.36, 2.16.840.1.113730.3.1.216, 2.5.4.39, 2.5.4.53,
usercertificate, 0.9.2342.19200300.100.1.53]

However when I perform a remote connection to the directory the
MessageDecoder has not been initialised with my environment:

      org.apache.ldap.common.message.MessageDecoder]Could not find
java.naming.ldap.attributes.binary key in environment.  Using empty set for
binaries.

I added an env.toString() and a stack dump to the start of MessageDecoder
to enable me to see the value of env and from where it was being called:

2005-12-05 16:36:32,031 INFO  [STDOUT](IoThreadPool-2) env
{asn.1.berlib.provider=org.apache.ldap.common.berlib.asn1.SnickersProvider}
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2) Stack
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.ldap.common.message.MessageDecoder.<init>(MessageDecoder.java:87)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.ldap.common.message.MessageDecoder.<init>(MessageDecoder.java:68)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.ldap.server.protocol.LdapProtocolProvider$ProtocolCodecFactoryImpl.getDecoder(LdapProtocolProvider.java:343)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.mina.filter.codec.ProtocolCodecFilter.getDecoder(ProtocolCodecFilter.java:186)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:40)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:513)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:51)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.mina.common.support.AbstractIoFilterChain$Entry$1.messageReceived(AbstractIoFilterChain.java:708)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.mina.common.support.AbstractIoFilterChain$1.messageReceived(AbstractIoFilterChain.java:119)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:513)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.mina.common.support.AbstractIoFilterChain.messageReceived(AbstractIoFilterChain.java:504)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.mina.common.support.IoSessionManagerFilterChain$1.messageReceived(IoSessionManagerFilterChain.java:92)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:513)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:51)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.mina.common.support.AbstractIoFilterChain$Entry$1.messageReceived(AbstractIoFilterChain.java:708)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.mina.filter.ThreadPoolFilter.processEvent(ThreadPoolFilter.java:615)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.mina.filter.ThreadPoolFilter$Worker.processEvents(ThreadPoolFilter.java:371)
2005-12-05 16:36:32,031 ERROR [STDERR](IoThreadPool-2)      at
org.apache.mina.filter.ThreadPoolFilter$Worker.run(ThreadPoolFilter.java:326)


Question:  Can anyone help me find where the environment hashtable is being
dropped or truncated so I can figure out a patch.
(Somewhere between DefaultDirectoryService and MessageDecoder I think)


===================================================================================================================================================

My binary problem details :

Binding javaserializeddata via a remote LDAP connection and then retrieving
it fails on the deserialize.  I'm hoping this is due to the uninitialised
environment

        try
        {
            Hashtable h = new Hashtable();
            h.put("Hello", "World");
            String name = "cn=Wibble,"+instanceNodeName;
            context.bind(name, h);
            Object o = context.lookup(name);
            System.out.println(o.toString());
        }
        catch (Exception ex)
        {
            ex.printStackTrace();
        }

javax.naming.NamingException.  Root exception is
java.io.StreamCorruptedException: invalid stream header
      at java.io.ObjectInputStream.readStreamHeader(
ObjectInputStream.java:737)
      at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)


Many thanks

- Simon Temple


Mime
View raw message