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

RE: Fwd: [Fwd: JDBC-LDAP bridge driver error]



Arun,

Try not adding the o=WSSPL, c=INDIA to the credentials and see what
happens.  

Marc

On Wed, 2003-06-25 at 10:45, Arun wrote:
> Hi  Marc,
> 
> Thanks for your mail.
> The error is happening again.
> Below is the ldap  configuration file,
> My root of directory  " o=WSSPL,c=INDIA" is it correct?
> The rootdn "cn=CIMOM, o=WSSPL, c=INDIA" is the credential.
> I have modified the  code  accordingly.
> I have attached the modified code and the ldap logs below.
> Notice in the log file that the baseDN get duplicated(o=WSSPl,C=INDIA comes
> twices).
> What could be the problem.
> 
> ====================================
> LDAP CONFIGURATION  FILE
> 
>  # include directives
> include /etc/openldap/schema/core.schema
> include /home/old-home/user/wilson/cimom/ldap/sample/managed-element.txt
> 
> schemacheck     on
> 
> pidfile     /home/old-home/user/wilson/cimom/ldap/sample/slapd.pid
> 
> #######################################################################
> # ldbm database definitions
> #######################################################################
> 
> database    ldbm
> suffix      "o=WSSPL,c=INDIA"
> directory   /home/old-home/user/wilson/cimom/ldap/sample/database
> rootdn      "cn=CIMOM,o=WSSPL,c=INDIA"
> rootpw       secret
> index           objectClass pres,eq
> index           uid     pres,eq,sub
> index           cn,sn   pres,eq,sub,subany
> 
> dbnosync
> dbnolocking
> =====================================
> 
> ===============================
> LDAP LOG  FILE
> 
> do_bind
> ber_scanf fmt ({iat) ber:
> ber_dump: buf=0x080d81a8 ptr=0x080d81ab end=0x080d81ef len=68
>   0000:  60 25 02 01 03 04 18 63  6e 3d 43 49 4d 4f 4d 2c   `%.....cn=CIMOM,
>   0010:  6f 3d 57 53 53 50 4c 2c  63 3d 49 4e 44 49 41 80   o=WSSPL,c=INDIA.
>   0020:  06 73 65 63 72 65 74 a0  1b 30 19 04 17 32 2e 31   .secret..0...2.1
>   0030:  36 2e 38 34 30 2e 31 2e  31 31 33 37 33 30 2e 33   6.840.1.113730.3
>   0040:  2e 34 2e 32                                        .4.2
> ber_scanf fmt (o}) ber:
> ber_dump: buf=0x080d81a8 ptr=0x080d81ca end=0x080d81ef len=37
>   0000:  80 06 73 65 63 72 65 74  a0 1b 30 19 04 17 32 2e   ..secret..0...2.
>   0010:  31 36 2e 38 34 30 2e 31  2e 31 31 33 37 33 30 2e   16.840.1.113730.
>   0020:  33 2e 34 2e 32                                     3.4.2
> => get_ctrls
> ber_scanf fmt ({a) ber:
> ber_dump: buf=0x080d81a8 ptr=0x080d81d4 end=0x080d81ef 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
> do_bind: version=3 dn="cn=CIMOM,o=WSSPL,c=INDIA" method=128
> conn=0 op=0 BIND dn="CN=CIMOM,O=WSSPL,C=INDIA" method=128
> ==> ldbm_back_bind: dn: cn=CIMOM,o=WSSPL,c=INDIA
> dn2entry_r: dn: "CN=CIMOM,O=WSSPL,C=INDIA"
> => dn2id( "CN=CIMOM,O=WSSPL,C=INDIA" )
> => ldbm_cache_open(
> "/home/old-home/user/wilson/cimom/ldap/sample/database/dn2id.gdbm", 82, 600
> )
> ldbm_cache_open (blksize 4096) (maxids 1022) (maxindirect 9)
> <= ldbm_cache_open (opened 0)
> <= dn2id 2
> => id2entry_r( 2 )
> => ldbm_cache_open(
> "/home/old-home/user/wilson/cimom/ldap/sample/database/id2entry.gdbm", 82,
> 600 )
> ldbm_cache_open (blksize 4096) (maxids 1022) (maxindirect 9)
> <= ldbm_cache_open (opened 1)
> => str2entry
> <= str2entry(cn=CIMOM, o=WSSPL, c=INDIA) -> -1 (0x80d6b28)
> <= id2entry_r( 2 ) 0x80d6b28 (disk)
> ====> cache_return_entry_r( 2 ): created (0)
> do_bind: v3 bind: "cn=CIMOM,o=WSSPL,c=INDIA" to "cn=CIMOM,o=WSSPL,c=INDIA"
> send_ldap_result: conn=0 op=0 p=3
> send_ldap_result: 0::
> send_ldap_response: msgid=1 tag=97 err=0
> ber_flush: 14 bytes to sd 9
>   0000:  30 0c 02 01 01 61 07 0a  01 00 04 00 04 00         0....a........
> ldap_write: want=14, written=14
>   0000:  30 0c 02 01 01 61 07 0a  01 00 04 00 04 00         0....a........
> conn=0 op=0 RESULT tag=97 err=0 text=
> daemon: activity on 1 descriptors
> daemon: activity on: 9r
> daemon: read activity on 9
> connection_get(9)
> connection_get(9): got connid=0
> connection_read(9): checking for input on id=0
> ber_get_next
> ldap_read: want=1, got=1
>   0000:  30                                                 0
> ldap_read: want=1, got=1
>   0000:  61                                                 a
> ldap_read: want=97, got=97
>   0000:  02 01 02 63 3f 04 1f 6f  3d 57 53 53 50 4c 2c 63   ...c?..o=WSSPL,c
>   0010:  3d 49 4e 44 49 41 2c 6f  3d 57 53 53 50 4c 2c 63   =INDIA,o=WSSPL,c
>   0020:  3d 49 4e 44 49 41 0a 01  00 0a 01 03 02 01 00 02   =INDIA..........
>   0030:  01 00 01 01 00 87 0b 6f  62 6a 65 63 74 43 6c 61   .......objectCla
>   0040:  73 73 30 00 a0 1b 30 19  04 17 32 2e 31 36 2e 38   ss0...0...2.16.8
>   0050:  34 30 2e 31 2e 31 31 33  37 33 30 2e 33 2e 34 2e   40.1.113730.3.4.
>   0060:  32                                                 2
> ber_get_next: tag 0x30 len 97 contents:
> ber_dump: buf=0x080d81a8 ptr=0x080d81a8 end=0x080d8209 len=97
>   0000:  02 01 02 63 3f 04 1f 6f  3d 57 53 53 50 4c 2c 63   ...c?..o=WSSPL,c
>   0010:  3d 49 4e 44 49 41 2c 6f  3d 57 53 53 50 4c 2c 63   =INDIA,o=WSSPL,c
>   0020:  3d 49 4e 44 49 41 0a 01  00 0a 01 03 02 01 00 02   =INDIA..........
>   0030:  01 00 01 01 00 87 0b 6f  62 6a 65 63 74 43 6c 61   .......objectCla
>   0040:  73 73 30 00 a0 1b 30 19  04 17 32 2e 31 36 2e 38   ss0...0...2.16.8
>   0050:  34 30 2e 31 2e 31 31 33  37 33 30 2e 33 2e 34 2e   40.1.113730.3.4.
>   0060:  32                                                 2
> ber_get_next
> ldap_read: want=1 error=Resource temporarily unavailable
> ber_get_next on fd 9 failed errno=11 (Resource temporarily unavailable)
> daemon: select: listen=6 active_threads=1 tvp=NULL
> do_search
> ber_scanf fmt ({aiiiib) ber:
> ber_dump: buf=0x080d81a8 ptr=0x080d81ab end=0x080d8209 len=94
>   0000:  63 3f 04 1f 6f 3d 57 53  53 50 4c 2c 63 3d 49 4e   c?..o=WSSPL,c=IN
>   0010:  44 49 41 2c 6f 3d 57 53  53 50 4c 2c 63 3d 49 4e   DIA,o=WSSPL,c=IN
>   0020:  44 49 41 0a 01 00 0a 01  03 02 01 00 02 01 00 01   DIA.............
>   0030:  01 00 87 0b 6f 62 6a 65  63 74 43 6c 61 73 73 30   ....objectClass0
>   0040:  00 a0 1b 30 19 04 17 32  2e 31 36 2e 38 34 30 2e   ...0...2.16.840.
>   0050:  31 2e 31 31 33 37 33 30  2e 33 2e 34 2e 32         1.113730.3.4.2
> SRCH "o=WSSPL,c=INDIA,o=WSSPL,c=INDIA" 0 3    0 0 0
> begin get_filter
> PRESENT
> ber_scanf fmt (o) ber:
> ber_dump: buf=0x080d81a8 ptr=0x080d81dd end=0x080d8209 len=44
>   0000:  87 0b 6f 62 6a 65 63 74  43 6c 61 73 73 30 00 a0   ..objectClass0..
>   0010:  1b 30 19 04 17 32 2e 31  36 2e 38 34 30 2e 31 2e   .0...2.16.840.1.
>   0020:  31 31 33 37 33 30 2e 33  2e 34 2e 32               113730.3.4.2
> end get_filter 0
>     filter: (objectClass=*)
> ber_scanf fmt ({v}}) ber:
> ber_dump: buf=0x080d81a8 ptr=0x080d81ea end=0x080d8209 len=31
>   0000:  30 00 a0 1b 30 19 04 17  32 2e 31 36 2e 38 34 30   0...0...2.16.840
>   0010:  2e 31 2e 31 31 33 37 33  30 2e 33 2e 34 2e 32      .1.113730.3.4.2
> => get_ctrls
> ber_scanf fmt ({a) ber:
> ber_dump: buf=0x080d81a8 ptr=0x080d81ee end=0x080d8209 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
>     attrs:
> conn=0 op=1 SRCH base="o=WSSPL,c=INDIA,o=WSSPL,c=INDIA" scope=0
> filter="(objectClass=*)"
> => ldbm_back_search
> dn2entry_r: dn: "O=WSSPL,C=INDIA,O=WSSPL,C=INDIA"
> => dn2id( "O=WSSPL,C=INDIA,O=WSSPL,C=INDIA" )
> => ldbm_cache_open(
> "/home/old-home/user/wilson/cimom/ldap/sample/database/dn2id.gdbm", 82, 600
> )
> <= ldbm_cache_open (cache 0)
> <= dn2id NOID
> dn2entry_r: dn: "C=INDIA,O=WSSPL,C=INDIA"
> => dn2id( "C=INDIA,O=WSSPL,C=INDIA" )
> => ldbm_cache_open(
> "/home/old-home/user/wilson/cimom/ldap/sample/database/dn2id.gdbm", 82, 600
> )
> <= ldbm_cache_open (cache 0)
> <= dn2id NOID
> dn2entry_r: dn: "O=WSSPL,C=INDIA"
> => dn2id( "O=WSSPL,C=INDIA" )
> => ldbm_cache_open(
> "/home/old-home/user/wilson/cimom/ldap/sample/database/dn2id.gdbm", 82, 600
> )
> <= ldbm_cache_open (cache 0)
> <= dn2id 1
> => id2entry_r( 1 )
> => ldbm_cache_open(
> "/home/old-home/user/wilson/cimom/ldap/sample/database/id2entry.gdbm", 82,
> 600 )
> <= ldbm_cache_open (cache 1)
> => str2entry
> <= str2entry(o=WSSPL, c=INDIA) -> -1 (0x80d8250)
> <= id2entry_r( 1 ) 0x80d8250 (disk)
> ====> cache_return_entry_r( 1 ): created (0)
> send_ldap_result: conn=0 op=1 p=3
> send_ldap_result: 10:o=WSSPL, c=INDIA:
> send_ldap_response: msgid=2 tag=101 err=32
> ber_flush: 30 bytes to sd 9
>   0000:  30 1c 02 01 02 65 17 0a  01 20 04 10 6f 3d 57 53   0....e... ..o=WS
>   0010:  53 50 4c 2c 20 63 3d 49  4e 44 49 41 04 00         SPL, c=INDIA..
> ldap_write: want=30, written=30
>   0000:  30 1c 02 01 02 65 17 0a  01 20 04 10 6f 3d 57 53   0....e... ..o=WS
>   0010:  53 50 4c 2c 20 63 3d 49  4e 44 49 41 04 00         SPL, c=INDIA..
> conn=0 op=1 RESULT tag=101 err=32 text=
> daemon: activity on 1 descriptors
> daemon: activity on: 9r
> daemon: read activity on 9
> connection_get(9)
> connection_get(9): got connid=0
> connection_read(9): checking for input on id=0
> 
> =====================================
> ====================================
> DRIVER.JAVA
> 
> class  driver {
> 
>  public  static void  main(String[]  args) {
>   try {
>     Class.forName("com.octetstring.jdbcLdap.sql.JdbcLdapDriver");
> 
>     String ldapConnStr =
> "jdbc:ldap://134.15.15.4:9998/o=WSSPL,c=INDIA?SEARCH_SCOPE:=subTreeScope";;
> 
>    Connection  con =
> DriverManager.getConnection(ldapConnStr,"cn=CIMOM,o=WSSPL,c=INDIA","secret")
> ;
>    // PreparedStatement  pstmt = null;
>    String stmt =  "SELECT cn FROM o=WSSPL,c=INDIA  WHERE cn=?";
>    PreparedStatement pstmt = con.prepareStatement(stmt);
>    ResultSet rs = pstmt.executeQuery(stmt);
>   while(rs.next())
>        {
>  {
> 
>      System.out.println("The DN=" +  rs.getString("dn") + ", cn=" +
> rs.getString("cn"));
> 
>         }
> 
>      }
> catch (SQLException ex){
>     System.out.println("SQL exception");
>     }
> catch (Exception ex1){
>     System.out.println("exception");
>     }
> 
>  }
> 
> ==========================================
> 
> Thanks and Regards.
> 
> -----Original Message-----
> From: Marc Boorshtein
> To: Arun
> Cc: support@octetstring.com
> Sent: 6/25/2003 6:44 PM
> Subject: Re: Fwd: [Fwd: JDBC-LDAP bridge driver  error]
> 
> Arun,
> 
> It seems that you are trying to refrence something from inside of your
> base context.  Is "cn=CIMOM,o=WSSPL,C=INDIA" the root for your
> directory?  I noticed that you used it for both your base context and
> credentials and you refrence C=INDIA in the FROM clause fo your SELECT
> statement.
> 
> Marc Boorshtein
> 
> 
> 
-- 
Marc Boorshtein, Software Engineer
Octet String Inc.
Phone: +1-847-466-1884
Email: marc.boorshtein@octetstring.com