You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Jonathan Camilleri <ca...@gmail.com> on 2009/07/04 13:58:29 UTC

invalid .ldif? [newbie]

I've just loaded an .ldif file within Apache Directory Studio and the
program is pointing out *Unexpected token*.  I can't see anything wrong with
the file, any ideas pls?

-- 
Jonathan Camilleri

Mobile (MT): 00356 7982 7113
E-mail: camilleri.jon@gmail.com
Please consider your environmental responsibility before printing this
e-mail.

I usually reply to e-mails within 2 business days.  If it's urgent, give me
a call.

Re: invalid .ldif? [newbie]

Posted by Jonathan Camilleri <ca...@gmail.com>.
And now it's fine.  Hard to explain why, but I must have done something
wrong :)

2009/7/4 Jonathan Camilleri <ca...@gmail.com>

> I've just loaded an .ldif file within Apache Directory Studio and the
> program is pointing out *Unexpected token*.  I can't see anything wrong
> with the file, any ideas pls?
>
> --
> Jonathan Camilleri
>
> Mobile (MT): 00356 7982 7113
> E-mail: camilleri.jon@gmail.com
> Please consider your environmental responsibility before printing this
> e-mail.
>
> I usually reply to e-mails within 2 business days.  If it's urgent, give me
> a call.
>



-- 
Jonathan Camilleri

Mobile (MT): 00356 7982 7113
E-mail: camilleri.jon@gmail.com
Please consider your environmental responsibility before printing this
e-mail.

I usually reply to e-mails within 2 business days.  If it's urgent, give me
a call.

Re: invalid .ldif? [newbie]

Posted by Emmanuel Lecharny <el...@apache.org>.
Jonathan Camilleri wrote:
> Sorry about that :), I'm using Apache Directory Studio 1.4.0v20090407;
> re-attaching the file.
>   
Damn... You probably attached the file the first time, too.

So forgive me for my ironical comment...

I'm afraid that the spam system has removed the attached file (I didn't 
received it either).

Can you post it on http://pastebin.com/ ?

Thanks !

-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: invalid .ldif? [newbie]

Posted by Jonathan Camilleri <ca...@gmail.com>.
I've also noted the attached error when loading Apache Directory Studio for
the 2nd time.  A visual check of the file didn't catch anything unusual.

2009/7/4 Jonathan Camilleri <ca...@gmail.com>

> Sorry about that :), I'm using Apache Directory Studio 1.4.0v20090407;
> re-attaching the file.
>
> 2009/7/4 Emmanuel Lecharny <el...@apache.org>
>
> Jonathan Camilleri wrote:
>>
>>> I've just loaded an .ldif file within Apache Directory Studio and the
>>> program is pointing out *Unexpected token*.  I can't see anything wrong
>>> with
>>> the file, any ideas pls?
>>>
>>>
>>
>> Hmmmm, given the input, I would say "there is something wrong in your
>> ldif"... ;)
>>
>> Ok, can you post the ldif so that we can give you a more appropriate clue
>> about what's going on ?
>>
>> Thanks !
>>
>> PS : *please, please, please*, provide any useful information when you
>> post a question, like the version you are using. We are good at Apache, but
>> we can't read in your mind !!!
>>
>> --
>> --
>> cordialement, regards,
>> Emmanuel Lécharny
>> www.iktek.com
>> directory.apache.org
>>
>>
>>
>
>
> --
> Jonathan Camilleri
>
> Mobile (MT): 00356 7982 7113
> E-mail: camilleri.jon@gmail.com
> Please consider your environmental responsibility before printing this
> e-mail.
>
> I usually reply to e-mails within 2 business days.  If it's urgent, give me
> a call.
>



-- 
Jonathan Camilleri

Mobile (MT): 00356 7982 7113
E-mail: camilleri.jon@gmail.com
Please consider your environmental responsibility before printing this
e-mail.

I usually reply to e-mails within 2 business days.  If it's urgent, give me
a call.

Re: invalid .ldif? [newbie]

Posted by Jonathan Camilleri <ca...@gmail.com>.
Sorry about that :), I'm using Apache Directory Studio 1.4.0v20090407;
re-attaching the file.

2009/7/4 Emmanuel Lecharny <el...@apache.org>

> Jonathan Camilleri wrote:
>
>> I've just loaded an .ldif file within Apache Directory Studio and the
>> program is pointing out *Unexpected token*.  I can't see anything wrong
>> with
>> the file, any ideas pls?
>>
>>
>
> Hmmmm, given the input, I would say "there is something wrong in your
> ldif"... ;)
>
> Ok, can you post the ldif so that we can give you a more appropriate clue
> about what's going on ?
>
> Thanks !
>
> PS : *please, please, please*, provide any useful information when you post
> a question, like the version you are using. We are good at Apache, but we
> can't read in your mind !!!
>
> --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>


-- 
Jonathan Camilleri

Mobile (MT): 00356 7982 7113
E-mail: camilleri.jon@gmail.com
Please consider your environmental responsibility before printing this
e-mail.

I usually reply to e-mails within 2 business days.  If it's urgent, give me
a call.

Re: invalid .ldif? [newbie]

Posted by Emmanuel Lecharny <el...@apache.org>.
Jonathan Camilleri wrote:
> I've just loaded an .ldif file within Apache Directory Studio and the
> program is pointing out *Unexpected token*.  I can't see anything wrong with
> the file, any ideas pls?
>   

Hmmmm, given the input, I would say "there is something wrong in your 
ldif"... ;)

Ok, can you post the ldif so that we can give you a more appropriate 
clue about what's going on ?

Thanks !

PS : *please, please, please*, provide any useful information when you 
post a question, like the version you are using. We are good at Apache, 
but we can't read in your mind !!!

-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: invalid .ldif? [newbie]

Posted by Stefan Seelmann <se...@apache.org>.
Hi Jonathan,

Jonathan Camilleri wrote:
> Well, it seems to me that lines 8/9 do not start off with a space, although
> Burch wrote that they should be .  Apache Directory Studio seemed to point
> out issues in that part, so I'm thinking that the parser "did not like" the
> spacing there, is this so?

Almost all your lines (except line 1) start with one or two spaces. I'd
suggest you remove them all. Maybe that is really an issue with CR/LF.

>From RFC2849 [1]:
Any line that begins with a single space MUST be treated as a
continuation of the previous (non-empty) line.

An issue in the Studio LDIF editor is that it needs a newline at the end
of the file, so please add one.

Kind Regards,
Stefan

[1] http://www.ietf.org/rfc/rfc2849.txt

Re: invalid .ldif? [newbie]

Posted by Jonathan Camilleri <ca...@gmail.com>.
Well, it seems to me that lines 8/9 do not start off with a space, although
Burch wrote that they should be .  Apache Directory Studio seemed to point
out issues in that part, so I'm thinking that the parser "did not like" the
spacing there, is this so?


http://pastebin.com/m7b7788e7

2009/7/4 Emmanuel Lecharny <el...@apache.org>

> Brian Burch wrote:
>
>> Jonathan Camilleri wrote:
>>
>>> I've just loaded an .ldif file within Apache Directory Studio and the
>>> program is pointing out /Unexpected token/.  I can't see anything wrong with
>>> the file, any ideas pls?
>>>
>>
>> Don't know about apache studio, but I've often had this sort of error with
>> command line ldapmodify when I've copied a windoze or os2 based ldif file to
>> unix and then updated it there. In almost every case, I've tracked it down
>> to a cr/lf problem.
>>
> Unlikely ...
>
> Otherwise, there are many potential traps :
>
> * no space after the ':' or '::'
> * a  multi-line value not starting with a space
> * an attribute type with a non valid char in it
> * a missing ':'
> * a missing RC at the end of the file (not sure if it still generates an
> error...)
> * the #version:1 does not contain the valid '1' number
>
> Without the file, it's hard to say ...
>
>
>> If this is possible in your case, edit the file under linux; go to EVERY
>> single end-of-line position and delete characters until the next line
>> concatenates with the current one; hit return. (repeat for every line,
>> including the last empty line).
>>
> A trick on linux/unix, to remove window$ ^M : open your file in vi, and
> type :%s/^V^M// in command mode
> (to produce the ^V, just hit the control key and the V key. The very same
> for ^M). Doing the same with sed should also work...
>
>
>
> --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>


-- 
Jonathan Camilleri

Mobile (MT): 00356 7982 7113
E-mail: camilleri.jon@gmail.com
Please consider your environmental responsibility before printing this
e-mail.

I usually reply to e-mails within 2 business days.  If it's urgent, give me
a call.

Re: invalid .ldif? [newbie]

Posted by Jonathan Camilleri <ca...@gmail.com>.
Thanks

2009/7/4 Emmanuel Lecharny <el...@apache.org>

> Jonathan Camilleri wrote:
>
>> http://pastebin.com/m7b7788e7
>>
>>
>
> Thanks,
>
> so the first lines start with a space. No chance that the parser will
> accept it.
>
> A space on first line is always considered as the continuation of a
> previous line, which is not the case.
>
> LDIF is a pretty strict format...
>
>
> --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>


-- 
Jonathan Camilleri

Mobile (MT): 00356 7982 7113
E-mail: camilleri.jon@gmail.com
Please consider your environmental responsibility before printing this
e-mail.

I usually reply to e-mails within 2 business days.  If it's urgent, give me
a call.

Re: invalid .ldif? [newbie]

Posted by Emmanuel Lecharny <el...@apache.org>.
Jonathan Camilleri wrote:
> http://pastebin.com/m7b7788e7
>   

Thanks,

so the first lines start with a space. No chance that the parser will 
accept it.

A space on first line is always considered as the continuation of a 
previous line, which is not the case.

LDIF is a pretty strict format...

-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: invalid .ldif? [newbie]

Posted by Jonathan Camilleri <ca...@gmail.com>.
http://pastebin.com/m7b7788e7

2009/7/4 Emmanuel Lecharny <el...@apache.org>

> Brian Burch wrote:
>
>> Jonathan Camilleri wrote:
>>
>>> I've just loaded an .ldif file within Apache Directory Studio and the
>>> program is pointing out /Unexpected token/.  I can't see anything wrong with
>>> the file, any ideas pls?
>>>
>>
>> Don't know about apache studio, but I've often had this sort of error with
>> command line ldapmodify when I've copied a windoze or os2 based ldif file to
>> unix and then updated it there. In almost every case, I've tracked it down
>> to a cr/lf problem.
>>
> Unlikely ...
>
> Otherwise, there are many potential traps :
>
> * no space after the ':' or '::'
> * a  multi-line value not starting with a space
> * an attribute type with a non valid char in it
> * a missing ':'
> * a missing RC at the end of the file (not sure if it still generates an
> error...)
> * the #version:1 does not contain the valid '1' number
>
> Without the file, it's hard to say ...
>
>
>> If this is possible in your case, edit the file under linux; go to EVERY
>> single end-of-line position and delete characters until the next line
>> concatenates with the current one; hit return. (repeat for every line,
>> including the last empty line).
>>
> A trick on linux/unix, to remove window$ ^M : open your file in vi, and
> type :%s/^V^M// in command mode
> (to produce the ^V, just hit the control key and the V key. The very same
> for ^M). Doing the same with sed should also work...
>
>
>
> --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>


-- 
Jonathan Camilleri

Mobile (MT): 00356 7982 7113
E-mail: camilleri.jon@gmail.com
Please consider your environmental responsibility before printing this
e-mail.

I usually reply to e-mails within 2 business days.  If it's urgent, give me
a call.

Re: invalid .ldif? [newbie]

Posted by Emmanuel Lecharny <el...@apache.org>.
Brian Burch wrote:
> Jonathan Camilleri wrote:
>> I've just loaded an .ldif file within Apache Directory Studio and the 
>> program is pointing out /Unexpected token/.  I can't see anything 
>> wrong with the file, any ideas pls?
>
> Don't know about apache studio, but I've often had this sort of error 
> with command line ldapmodify when I've copied a windoze or os2 based 
> ldif file to unix and then updated it there. In almost every case, 
> I've tracked it down to a cr/lf problem.
Unlikely ...

Otherwise, there are many potential traps :

* no space after the ':' or '::'
* a  multi-line value not starting with a space
* an attribute type with a non valid char in it
* a missing ':'
* a missing RC at the end of the file (not sure if it still generates an 
error...)
* the #version:1 does not contain the valid '1' number

Without the file, it's hard to say ...

>
> If this is possible in your case, edit the file under linux; go to 
> EVERY single end-of-line position and delete characters until the next 
> line concatenates with the current one; hit return. (repeat for every 
> line, including the last empty line).
A trick on linux/unix, to remove window$ ^M : open your file in vi, and 
type :%s/^V^M// in command mode
(to produce the ^V, just hit the control key and the V key. The very 
same for ^M). Doing the same with sed should also work...


-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: invalid .ldif? [newbie]

Posted by Brian Burch <br...@PingToo.com>.
Jonathan Camilleri wrote:
> I've just loaded an .ldif file within Apache Directory Studio and the 
> program is pointing out /Unexpected token/.  I can't see anything wrong 
> with the file, any ideas pls?

Don't know about apache studio, but I've often had this sort of error 
with command line ldapmodify when I've copied a windoze or os2 based 
ldif file to unix and then updated it there. In almost every case, I've 
tracked it down to a cr/lf problem.

If this is possible in your case, edit the file under linux; go to EVERY 
single end-of-line position and delete characters until the next line 
concatenates with the current one; hit return. (repeat for every line, 
including the last empty line).

Hope that helps!

Brian