[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: Cant' add an add. faxadress to OPENLDAP via JNDI??? LDAP OR J NDI PROBLEM???



Hi,

how is the facsimileTelephoneNumber configured in the schema? is it
SINGLE-VALUE? Other differences to attribute-type 'mail' in the schema?

Regards,

Martin

-----Original Message-----
From: Andre Konopka [mailto:andre.konopka@presse-data.de]
Sent: Tuesday, May 28, 2002 09:58
To: openldap-software@OpenLDAP.org
Subject: Cant' add an add. faxadress to OPENLDAP via JNDI??? LDAP OR
JNDI PROBLEM???


Hi,

I'am using openldap-2.0.23 and java 1.3

With ldapadd I can add additional fax-addresses without any problem, but 
with JNDI I can't.
Strange to say this happens only with the attribute 
'facsimileTelephoneNumber'. If I use for example 'mail' there is no problem.

Here is my little java program:


import java.util.Hashtable;
import java.util.Enumeration;
import javax.naming.*;^M
import javax.naming.directory.*;^M

public class JNDIMod
{
    public static String INITCTX = "com.sun.jndi.ldap.LdapCtxFactory";^M

    public static String MY_HOST = "ldap://pdkbswww:389";^M
    public static String MGR_DN = "cn=root, c=de";
    public static String MGR_PW = "mysecret";
    public static String MY_SEARCHBASE = "c=de";

    public static void main(String args[])
    {
       try
       {
          //Hashtable for environmental information
          Hashtable env = new Hashtable();

         env.put(Context.INITIAL_CONTEXT_FACTORY, INITCTX);
          env.put(Context.PROVIDER_URL,MY_HOST);
          env.put(Context.SECURITY_AUTHENTICATION,"simple");
          env.put(Context.SECURITY_PRINCIPAL,MGR_DN);
          env.put(Context.SECURITY_CREDENTIALS,MGR_PW);


          DirContext ctx = new InitialDirContext(env);

          ModificationItem[] mods = new ModificationItem[1];

          Attribute mod0 = new 
BasicAttribute("facsimiletelephonenumber","3443");

          mods[0] = new ModificationItem(DirContext.ADD_ATTRIBUTE,mod0);
          I   	 
ctx.modifyAttributes("uid=pbs013,ou=Basis-Systeme,o=Presse-Data,c=de",
mods);
    }

       catch(Exception e)
       {
          e.printStackTrace();
          System.exit(1);
       }
    }
}


Here ist the exception:


javax.naming.directory.InvalidSearchFilterException: [LDAP: error code 
18 - modify: add values failed]; remain
ing name 'uid=pbs013,ou=Basis-Systeme,o=Presse-Data,c=de'
         at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:2740)
         at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2682)
         at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2488)
         at com.sun.jndi.ldap.LdapCtx.c_modifyAttributes(LdapCtx.java:1290)
         at 
com.sun.jndi.toolkit.ctx.ComponentDirContext.p_modifyAttributes(ComponentDir
Context.java:258)
         at 
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(Partial
CompositeDirContext.jav
a:175)
         at 
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(Partial
CompositeDirContext.jav
a:164)
         at 
javax.naming.directory.InitialDirContext.modifyAttributes(InitialDirContext.
java:149)
         at JNDIMod.main(JNDIMod.java:46)


Here is the debugging info from the LDAP Server (started with -d 255)


ldap_read: want=127, got=127
   0000:  02 01 02 66 5d 04 2e 75  69 64 3d 70 62 73 30 31 
...f]..uid=pbs01
   0010:  33 2c 6f 75 3d 42 61 73  69 73 2d 53 79 73 74 65 
3,ou=Basis-Syste
   0020:  6d 65 2c 6f 3d 50 72 65  73 73 65 2d 44 61 74 61 
me,o=Presse-Data
   0030:  2c 63 3d 64 65 30 2b 30  29 0a 01 00 30 24 04 18 
,c=de0+0)...0$..
   0040:  66 61 63 73 69 6d 69 6c  65 74 65 6c 65 70 68 6f 
facsimiletelepho
   0050:  6e 65 6e 75 6d 62 65 72  31 08 04 06 35 35 33 34 
nenumber1...5534
   0060:  34 33 a0 1b 30 19 04 17  32 2e 31 36 2e 38 34 30 
43 .0...2.16.840
   0070:  2e 31 2e 31 31 33 37 33  30 2e 33 2e 34 2e 32      .1.113730.3.4.2
ber_get_next: tag 0x30 len 127 contents:
ber_dump: buf=0x400e6aa0 ptr=0x400e6aa0 end=0x400e6b1f len=127
   0000:  02 01 02 66 5d 04 2e 75  69 64 3d 70 62 73 30 31 
...f]..uid=pbs01
   0010:  33 2c 6f 75 3d 42 61 73  69 73 2d 53 79 73 74 65 
3,ou=Basis-Syste
   0020:  6d 65 2c 6f 3d 50 72 65  73 73 65 2d 44 61 74 61 
me,o=Presse-Data
   0030:  2c 63 3d 64 65 30 2b 30  29 0a 01 00 30 24 04 18 
,c=de0+0)...0$..
   0040:  66 61 63 73 69 6d 69 6c  65 74 65 6c 65 70 68 6f 
facsimiletelepho
   0050:  6e 65 6e 75 6d 62 65 72  31 08 04 06 35 35 33 34 
nenumber1...5534
   0060:  34 33 a0 1b 30 19 04 17  32 2e 31 36 2e 38 34 30 
43 .0...2.16.840
   0070:  2e 31 2e 31 31 33 37 33  30 2e 33 2e 34 2e 32      .1.113730.3.4.2
ber_get_next
do_modify
ber_scanf fmt ({a) ber:
ber_dump: buf=0x400e6aa0 ptr=0x400e6aa3 end=0x400e6b1f len=124
   0000:  66 5d 04 2e 75 69 64 3d  70 62 73 30 31 33 2c 6f 
f]..uid=pbs013,o
   0010:  75 3d 42 61 73 69 73 2d  53 79 73 74 65 6d 65 2c 
u=Basis-Systeme,
   0020:  6f 3d 50 72 65 73 73 65  2d 44 61 74 61 2c 63 3d 
o=Presse-Data,c=
   0030:  64 65 30 2b 30 29 0a 01  00 30 24 04 18 66 61 63 
de0+0)...0$..fac
   0040:  73 69 6d 69 6c 65 74 65  6c 65 70 68 6f 6e 65 6e 
similetelephonen
   0050:  75 6d 62 65 72 31 08 04  06 35 35 33 34 34 33 a0 
umber1...553443 
   0060:  1b 30 19 04 17 32 2e 31  36 2e 38 34 30 2e 31 2e 
.0...2.16.840.1.
ldap_read: want=1 error=Resource temporarily unavailable
   0070:  31 31 33 37 33 30 2e 33  2e 34 2e 32               113730.3.4.2
do_modify: dn (uid=pbs013,ou=Basis-Systeme,o=Presse-Data,c=de)
ber_scanf fmt ({i{a[V]}}) ber:
ber_dump: buf=0x400e6aa0 ptr=0x400e6ad7 end=0x400e6b1f len=72
ber_get_next on fd 7 failed errno=11 (Resource temporarily unavailable)
   0000:  30 29 0a 01 00 30 24 04  18 66 61 63 73 69 6d 69 
0)...0$..facsimi
daemon: select: listen=6 active_threads=1 tvp=NULL
   0010:  6c 65 74 65 6c 65 70 68  6f 6e 65 6e 75 6d 62 65 
letelephonenumbe
   0020:  72 31 08 04 06 35 35 33  34 34 33 a0 1b 30 19 04 
r1...553443 .0..
   0030:  17 32 2e 31 36 2e 38 34  30 2e 31 2e 31 31 33 37 
.2.16.840.1.1137
   0040:  33 30 2e 33 2e 34 2e 32                            30.3.4.2
=> get_ctrls
ber_scanf fmt ({a) ber:
ber_dump: buf=0x400e6aa0 ptr=0x400e6b04 end=0x400e6b1f len=27
   0000:  30 19 04 17 32 2e 31 36  2e 38 34 30 2e 31 2e 31 
0...2.16.840.1.1
   0010:  31 33 37 33 30 2e 33 2e  34 2e 32                  13730.3.4.2
=> get_ctrls: oid="2.16.840.1.113730.3.4.2" (noncritical)
<= get_ctrls: 1 0
modifications:
         add: facsimiletelephonenumber
ldbm_back_modify:
dn2entry_w: dn: "UID=PBS013,OU=BASIS-SYSTEME,O=PRESSE-DATA,C=DE"
=> dn2id( "UID=PBS013,OU=BASIS-SYSTEME,O=PRESSE-DATA,C=DE" )
=> ldbm_cache_open( "dn2id.dbb", 73, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 283
=> id2entry_w( 283 )
=> ldbm_cache_open( "id2entry.dbb", 73, 600 )
<= ldbm_cache_open (cache 1)
=> str2entry
<= str2entry(uid=pbs013, ou=Basis-Systeme, o=Presse-Data, c=de) -> -1 
(0x40104)
<= id2entry_w( 283 ) 0x40104400 (disk)
ldbm_modify_internal: UID=PBS013,OU=BASIS-SYSTEME,O=PRESSE-DATA,C=DE
<= acl_access_allowed: granted to database root
ldbm_modify_internal: add
ldbm_modify_internal: 18 modify: asend_ldap_result: conn=0 op=1 p=3
send_ldap_result: 18::modify: add values failed
send_ldap_response: msgid=2 tag=103 err=18
ber_flush: 39 bytes to sd 7
   0000:  30 25 02 01 02 67 20 0a  01 12 04 00 04 19 6d 6f   0%...g 
.......mo
   0010:  64 69 66 79 3a 20 61 64  64 20 76 61 6c 75 65 73   dify: add 
values
   0020:  20 66 61 69 6c 65 64                                failed
ldap_write: want=39, written=39
   0000:  30 25 02 01 02 67 20 0a  01 12 04 00 04 19 6d 6f   0%...g 
.......mo
   0010:  64 69 66 79 3a 20 61 64  64 20 76 61 6c 75 65 73   dify: add 
values
   0020:  20 66 61 69 6c 65 64                                failed
====> cache_return_entry_w( 283 ): created (0)
daemon: activity on 1 descriptors
daemon: activity on: 7r
daemon: read activity on 7
connection_get(7)
connection_get(7): got connid=0
connection_read(7): checking for input on id=0
ber_get_next
dd values failed


Can someone HELP???

I don't undestand the LDAP output???


Andre