directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny" <elecha...@gmail.com>
Subject Re: ApacheDS non US-ASCII DN manipulation?
Date Wed, 07 Feb 2007 12:25:53 GMT
Ok, the test you attached is perfect. I also get a NPE...

Here is the status :
- we have a NPE because we try to normalize a byte[] when a String or a Name
or a LdapDN are expected. This is BAD. A new issue has been created to cover
this case : http://issues.apache.org/jira/browse/DIRSERVER-843 (and a fix
will be submitted shortly)
- the NPE is just a symptom. Even if we have had trhown a NamingException,
this is still a problem : the member DN is stored as byte[] because the ldif
file contains the DN in base64 form. There is no way to know that the
attribute value should be an UTF-8 string or a byte[], until we pass through
the schema checker. In our case, the schema checker don't really mind that
the data is a byte[], it send it directly to the backend as is. So we store
a byte[] instead of a String.

The conclusion is that we have a really serious bug in the schema handling :
we must fix itr. The good news is that it should be quite easy to fix.

I'm currently working on it. (issue created :
http://issues.apache.org/jira/browse/DIRSERVER-844)


On 2/5/07, Pierre-Alain RIVIERE <pariviere@ippon.fr> wrote:
>
> Hi,
>
> I've just added my problematic test case into the DemoTest from
> http://directory.apache.org/apacheds/1.0/embedding.html. LDIF file has
> also been modified.
>
> The result is just the same. NPE throw by DNNormalizer.
>
> I got 1.0.1 and 0.9.5.4 versions from the following SVN root and install
> them into my local maven repository. Tell me if I'm wrong about this.
> http://svn.apache.org/repos/asf/directory/apacheds/branches/1.0   ->
> apacheds
> http://svn.apache.org/repos/asf/directory/shared/branches/0.9.5    ->
> shared
>
>
>
>
> Emmanuel Lecharny wrote:
> > Ok,
> >
> > I have wrote a mini-tutorial which explain how to create unit-tests
> using
> > Apache Directory Server as a backend. I hope that it's not buggy, and
> > that
> > it can help you to setup a test environment.
> >
> > Note that it won't work with the current 1.0.0 version (there is a
> > problem
> > in one of the unit test class used in the server), and this is the
> reason
> > you had to rewrote it.
> >
> > I just expect to be able to reproduce your problem now that I have
> > setup a
> > correct env to reproduce it :)
> >
> > Here is the link to the turorial :
> > http://directory.apache.org/apacheds/1.0/embedding.html
> >
> > Hope it helps.
> >
> >
> > On 2/2/07, Emmanuel Lecharny <elecharny@gmail.com> wrote:
> >>
> >> Ok, I think I have to start again and build a sample that simply works.
> >>
> >> What I suggest is taht I will try to setup a real sample and add all
> the
> >> necessary steps to use ADS as an embeded server for unit tests
> >> purpose into
> >> a wiki pages, so that everybody will be able to play with it.
> >>
> >> It will take a little bit time (let say it can be done by the end of
> >> this
> >> week), but I really think it's needed.
> >>
> >> It won't be #1 on my priority list, but not far...
> >>
> >> I'll get you informed !
> >>
> >> Thanks !
> >>
> >> Emmanuel
> >>
> >> On 2/1/07, Pierre-Alain RIVIERE <pariviere@ippon.fr> wrote:
> >> >
> >> > Emmanuel Lecharny wrote:
> >> > >
> >> > > Well, I was wrong. What I wanted to say is that the filter is
> >> looking
> >> > > for :
> >> > > member=cn=Pierre-Alain
> >> > > RIVIERE,ou=Peoples,ou=Paris,ou=Offices,dc=ippon,dc=fr
> >> > > and there is no entry with this value, hence the exception.
> >> > The result is the same even if you process a search over an existing
> >> > entry.
> >> >
> >> > "(&(member=cn=Bad Eékà,ou=Paris,ou=Offices,dc=ippon,dc=fr)" +
> >> >           "(objectClass=ipponGroup))";
> >> >
> >> > "(&(member=cn=Good One,ou=Paris,ou=Offices,dc=ippon,dc=fr)" +
> >> >            "(objectClass=ipponGroup))";
> >> >
> >> > And even if "member=cn=Pierre-Alain
> >> > RIVIERE,ou=Peoples,ou=Paris,ou=Offices,dc=ippon,dc=fr" does not exist
> >> > ApacheDS should not throw NPE.
> >> > >
> >> > > I have the same pb... Looking...
> >> > >
> >> > > Sorry, I did the test while fixing many differnet other things,
> >> so the
> >> >
> >> > > bumpy
> >> > > feeling you may have...
> >> >
> >> > No problem, you seem to be a busy guy ;)
> >> >
> >>
> >>
> >>
> >> --
> >> Cordialement,
> >> Emmanuel Lécharny
> >> www.iktek.com
> >>
> >
> >
> >
>
>
>


-- 
Cordialement,
Emmanuel Lécharny
www.iktek.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message