From: Graham B. <gb...@po...> - 2001-02-06 21:38:55
|
This is one of those times when you wish you could get the entry returned from the search. Just like when ->new returns undef, where do you find out what went wrong. I have been considering adding a bool overload in some places so that a boolean test would return false even though an object is returned. In this case if Net::LDAP::Schema did that you could then call $schema->entry to get the entry, but all other methods would return undef. Anyhow, I am rambling. Jim, could you modify the schema method to return the $mesg object then extract the entry and dump it to ldif. We can then use that to debug the Schema module. (That is if you could forward the LDIF to Clif and I. If you cannot do that we will have to do things via you, but not having to do the search will help speed the process up) Thanks, Graham. On Tue, Feb 06, 2001 at 04:20:27PM -0500, Jim Harle wrote: > Clif, > I commented out the dIT stuff in LDAP.pm as follows: > $mesg = $self->search( > base => $base, > scope => 'base', > filter => '(objectClass=subschema)', > attrs => [ "objectClasses", > "attributeTypes", > "matchingRules", > "matchingRuleUse", > # "dITStructureRules", > # "dITContentRules", > "nameForms", > "ldapSyntaxes", > ], > ); > then did a make, which moved it to its proper place. That still didn't > help. I got the same error. > > Graham had said: changing the constructor to > > $ldap = Net::LDAP->new('directory.usna.edu', debug => 15); > > may help > > I tried that (before and after commenting out dIT stuff in LDAP.pm) and it > spewed forth tons of stuff indicating that it was actually getting the > schema from the server, the problem appears to be that the schema() method > isn't returning anything. Note that I commented out several lines from > the orginally posted code. Here is some of the end of what I got: > > 00049AC1 04 308: STRING = '( 3x computer system policy-oid NAME > 'xComputerSystemPolicy' DESC 'Standard ObjectClass' SUP (Policy $ > wIN31Policy $ workstationPolicy ) STRUCTURAL MAY (wM3XCSPUpdateInformation > $ wM3XCSPFileData $ zenpolWorkstationType $ zenpolWin3xPlatform ) > X-NDS_NAME '3x Computer System Policy' X-NDS_NOT_CONTAINER '1' )' > 00049BF9 04 335: STRING = '( ws restrict login policy-oid NAME > 'wSRestrictLoginPolicy' DESC 'Standard ObjectClass' SUP (Policy $ > workstationPolicy $ wINNTPolicy $ wIN95Policy ) STRUCTURAL MAY > (wMWSRLInclusions $ wMWSRLExclusions $ zenpolWorkstationType $ > zenpolWinNTPlatform $ zenpolWin9xPlatform ) X-NDS_NAME 'WS Restrict Login > Policy' X-NDS_NOT_CONTAINER '1' )' > 00049D4C : } > 00049D4C : } > 00049D4C : } > 00049D4C : } > 00049D4C : } > Net::LDAP=HASH(0x29774) received: > > 30 0C 02 01 05 65 07 0A 01 00 04 00 04 00 __ __ 0....e........ > > 0000 30 12: SEQUENCE { > 0002 02 1: INTEGER = 5 > 0005 65 7: [APPLICATION 5] { > 0007 0A 1: ENUM = 0 > 000A 04 0: STRING = '' > 000C 04 0: STRING = '' > 000E : } > 000E : } > Can't call method "is_objectclass" on an undefined value at findschema > line 23, <STDIN> chunk 1. > > > --Jim > > > On Tue, 6 Feb 2001, Clif Harden wrote: > > > > > I have found the problem with the Schema changes I sent. > > Lucky it has nothing to do with the changes I sent out, > > but is a result of those changes. > > > > In the changes I made I asked for attributes like > > dITContentRules, dITStrutureRules, etc. > > > > In my Exchange schema there is a line for dITContentRules but > > this line does not have a definition, or data, for > > dITContentRules. > > > > Example; > > > > dITContentRules > > > > attributeTypes (2.5.4.0 NAME 'objectClass' STNTAX 'OID') > > > > The _parse_schema function will not accept a dITContentRules > > with no defined data, it will return a undefined error. > > > > This is probably a situation we should have comprehended in > > advance. Until a solution is found you could comment out the > > lines LDAP.pm that ask for attributes dITContentRules, etc, that > > have no definition. > > > > I suspect that Jim Harle's problem is his schema has one of > > the attributes listed but with no definition. > > > > Regards, > > > > Clif Harden INTERNET: c-h...@ti... > > > > > > > > |