You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Emmanuel Lecharny <el...@gmail.com> on 2007/02/01 17:49:40 UTC

Re: ApacheDS non US-ASCII DN manipulation?

Ok, I have a little bit modified your code, and now, I get an error on your
test, just because the filter just filter too much data.

There is no such "ou=Offices,dc=ippon,dc=fr" dn in the Ldif file you sent
me.

However, just to say that, at least, the filters doe snot returns a NPE.

btw, if the server is embeded, no need to declare a port : we are going to
communicate with it directly, without using a socket, so the performances
will be *much* better.

Tell me if the code I sent you is ok, and what kind of pb you have if you
try to use it.

Emmanuel

On 1/31/07, Emmanuel Lecharny <el...@gmail.com> wrote:
>
> Ok, looking ...
>
> It may take a little while, I'm busy on fixing some nasty issue...
>
> On 1/31/07, Pierre-Alain RIVIERE < pariviere@ippon.fr> wrote:
> >
> >
> > Emmanuel Lecharny wrote:
> > > I'm sorry, but without a minimal ldif file, the test just throws an
> > > exdfeption (you have a loadDefaultData() call in the setUp()
> > method...)
> > I've attached a present for you ;). So only 2 fake users and 2 fake
> > groups.
> >
> > In the test file replace the searchFilter by one of the following :
> >
> >            "(&(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))";
> >
> >
> >
> > dn: ou=Offices,dc=ippon,dc=fr
> > objectClass: organizationalUnit
> > objectClass: top
> > ou: Offices
> >
> > dn: ou=Paris,ou=Offices,dc=ippon,dc=fr
> > objectClass: organizationalUnit
> > objectClass: top
> > ou: Paris
> >
> > dn: cn=Good One,ou=Paris,ou=Offices,dc=ippon,dc=fr
> > objectClass: ipponPerson
> > objectClass: inetOrgPerson
> > objectClass: organizationalPerson
> > objectClass: person
> > objectClass: top
> > cn: Good One
> > givenName: Good
> > initials: GO
> > mail: goodone@domain.com
> > sn: One
> > uid: goodone
> >
> > dn:: Y249QmFkIEXDqWvDoCxvdT1QYXJpcyxvdT1PZmZpY2VzLGRjPWlwcG9uLGRjPWZy
> > objectClass: ipponPerson
> > objectClass: inetOrgPerson
> > objectClass: organizationalPerson
> > objectClass: person
> > objectClass: top
> > cn:: QmFkIEXDqWvDoA==
> > givenName: Bad
> > initials: BE
> > sn:: RcOpa8Og
> > uid: bd
> >
> > dn: ou=Groups,dc=ippon,dc=fr
> > objectClass: organizationalUnit
> > objectClass: top
> > ou: Groups
> >
> > dn: cn=Group1,ou=Groups,dc=ippon,dc=fr
> > objectClass: ipponGroup
> > objectClass: top
> > cn: Group1
> > member::
> > Y249QmFkIEXDqWvDoCxvdT1QYXJpcyxvdT1PZmZpY2VzLGRjPWlwcG9uLGRjPWZy
> > member: cn=Good One,ou=Paris,ou=Offices,dc=ippon,dc=fr
> >
> > dn: cn=Group2,ou=Groups,dc=ippon,dc=fr
> > objectClass: ipponGroup
> > objectClass: top
> > cn: Group2
> > member: cn=Good One,ou=Paris,ou=Offices,dc=ippon,dc=fr
> >
> >
> >
>
>
> --
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>



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

Re: ApacheDS non US-ASCII DN manipulation?

Posted by Emmanuel Lecharny <el...@gmail.com>.
The correct repo to download the latest version (1.0.1-trunk) is :

http://svn.apache.org/repos/asf/directory/apacheds/branches/1.0-with-dependencies/

it will grab all the needed dependencies.

I gonna try to find some time today to check with your code what's going
wrong into the server. By no mean throwing a NPE is normal, so we should
have at least a fix to apply to avoid such a NPE.

Stay tuned!

Emmanuel

On 2/5/07, Pierre-Alain RIVIERE <pa...@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 <el...@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 <pa...@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

Re: ApacheDS non US-ASCII DN manipulation?

Posted by Emmanuel Lecharny <el...@gmail.com>.
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 <pa...@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 <el...@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 <pa...@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

Re: ApacheDS non US-ASCII DN manipulation?

Posted by Pierre-Alain RIVIERE <pa...@ippon.fr>.
Hi,

It works fine here too. Thks for help ;)

Emmanuel Lecharny wrote:
> Ok, I have patched the server, and your test is passing now.
>
> You will have to check out the last version of the branch (1.0.1) :
> svn co
> http://svn.apache.org/repos/asf/directory/apacheds/branches/1.0-with-dependencies/ 
>
>
> Information regarding building the server can be found here :
> http://directory.apache.org/apacheds/1.0/building.html
>
> If you have any pb, feel free to post a mail !
>
> Emmanuel Lécharny
>
> On 2/5/07, Pierre-Alain RIVIERE <pa...@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 <el...@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 <pa...@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
>> >>
>> >
>> >
>> >
>>
>>
>>
>
>


Re: ApacheDS non US-ASCII DN manipulation?

Posted by Emmanuel Lecharny <el...@gmail.com>.
Ok, I have patched the server, and your test is passing now.

You will have to check out the last version of the branch (1.0.1) :
svn co
http://svn.apache.org/repos/asf/directory/apacheds/branches/1.0-with-dependencies/

Information regarding building the server can be found here :
http://directory.apache.org/apacheds/1.0/building.html

If you have any pb, feel free to post a mail !

Emmanuel Lécharny

On 2/5/07, Pierre-Alain RIVIERE <pa...@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 <el...@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 <pa...@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

Re: ApacheDS non US-ASCII DN manipulation?

Posted by Pierre-Alain RIVIERE <pa...@ippon.fr>.
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 <el...@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 <pa...@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
>>
>
>
>


Re: ApacheDS non US-ASCII DN manipulation?

Posted by Emmanuel Lecharny <el...@gmail.com>.
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 <el...@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 <pa...@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

Re: ApacheDS non US-ASCII DN manipulation?

Posted by Emmanuel Lecharny <el...@gmail.com>.
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 <pa...@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

Re: ApacheDS non US-ASCII DN manipulation?

Posted by Pierre-Alain RIVIERE <pa...@ippon.fr>.
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 ;)

Re: ApacheDS non US-ASCII DN manipulation?

Posted by Emmanuel Lecharny <el...@gmail.com>.
On 2/1/07, Pierre-Alain RIVIERE <pa...@ippon.fr> wrote:
>
> Hi and thanks for your help
>
> Emmanuel Lecharny wrote:
>
> > There is no such "ou=Offices,dc=ippon,dc=fr" dn in the Ldif file you
> > sent me.
> I don't understand. The file you've just sent contains an LDIF file with
> "ou=Offices,dc=ippon,dc=fr" as first entry.


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.


> <snip/>
> But when I'm using this line (line 141)
>
>     // Notice that the provider URL is not really a URL but a DN
>     // This time instead of ou=system we're accessing the dc=ippon,dc=fr
>     partition
>     env.put( Context.PROVIDER_URL, "dc=ippon,dc=fr" );
>
> I get an error :
>
>     org.apache.directory.shared.ldap.exception.LdapNameNotFoundException:
>     Attempt to search under non-existant entry:
>     2.5.4.11=groups,0.9.2342.19200300.100.1.25=ippon,
> 0.9.2342.19200300.100.1.25=fr,0.9.2342.19200300.100.1.25=ippon,
> 0.9.2342.19200300.100.1.25=fr
>
> As u see, dc=ippon,dc=fr is repeated twice. Using env.put(
> Context.PROVIDER_URL, "" ) is much better here. I understand it should
> be "dc=ippon,dc=fr" instead of "" but only the first one is correct on
> my computer.


I have the same pb... Looking...

Sorry, I did the test while fixing many differnet other things, so the bumpy
feeling you may have...



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

Re: ApacheDS non US-ASCII DN manipulation?

Posted by Pierre-Alain RIVIERE <pa...@ippon.fr>.
Hi and thanks for your help

Emmanuel Lecharny wrote:
> Ok, I have a little bit modified your code, and now, I get an error on 
> your test, just because the filter just filter too much data.
>
> There is no such "ou=Offices,dc=ippon,dc=fr" dn in the Ldif file you 
> sent me.
I don't understand. The file you've just sent contains an LDIF file with 
"ou=Offices,dc=ippon,dc=fr" as first entry.
>
> However, just to say that, at least, the filters doe snot returns a NPE.
>
> btw, if the server is embeded, no need to declare a port : we are 
> going to communicate with it directly, without using a socket, so the 
> performances will be *much* better.
>
> Tell me if the code I sent you is ok, and what kind of pb you have if 
> you try to use it.

Thanks for the modification. Smarter indeed.

But when I'm using this line (line 141)

    // Notice that the provider URL is not really a URL but a DN
    // This time instead of ou=system we're accessing the dc=ippon,dc=fr
    partition
    env.put( Context.PROVIDER_URL, "dc=ippon,dc=fr" );

I get an error :

    org.apache.directory.shared.ldap.exception.LdapNameNotFoundException:
    Attempt to search under non-existant entry:
    2.5.4.11=groups,0.9.2342.19200300.100.1.25=ippon,0.9.2342.19200300.100.1.25=fr,0.9.2342.19200300.100.1.25=ippon,0.9.2342.19200300.100.1.25=fr

As u see, dc=ippon,dc=fr is repeated twice. Using env.put( 
Context.PROVIDER_URL, "" ) is much better here. I understand it should 
be "dc=ippon,dc=fr" instead of "" but only the first one is correct on 
my computer.


Next, once Context.PROVIDER_URL set to "",  again the same error (NPE).

I really take only the source files you've just sent. All my librairies 
come from maven central repository.