Return-Path: Delivered-To: apmail-directory-users-archive@www.apache.org Received: (qmail 92022 invoked from network); 4 Jul 2009 13:46:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Jul 2009 13:46:57 -0000 Received: (qmail 75147 invoked by uid 500); 4 Jul 2009 13:47:07 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 75065 invoked by uid 500); 4 Jul 2009 13:47:07 -0000 Mailing-List: contact users-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@directory.apache.org Delivered-To: mailing list users@directory.apache.org Received: (qmail 75055 invoked by uid 99); 4 Jul 2009 13:47:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Jul 2009 13:47:07 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FB_WORD1_END_DOLLAR,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of elecharny@gmail.com designates 209.85.219.225 as permitted sender) Received: from [209.85.219.225] (HELO mail-ew0-f225.google.com) (209.85.219.225) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Jul 2009 13:46:56 +0000 Received: by ewy25 with SMTP id 25so3691788ewy.25 for ; Sat, 04 Jul 2009 06:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=PGEHVnkz8MTm9zX8tFIzEdr3ofOcLn1n3DJbiH/ZVPU=; b=dN3wX9mNSNowB0eyzmFWEqLbSA0T3dvzsRzjJe//Zb70wMAs0QiUXtU/aEXM5E+Si2 7u/f2ENc3sTau1Od6r8aJq7uWn4/QocBrypOMNa71pXp3J/IO+FHye35exPtUnEvnTX/ lr/jGDrMHHNtDbrLS0uridaC+a8lxlr3gXX7Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=JGzI1evF1oJi+YoiJFIGTkDFEBFevozns0Oms45nl2H3D7GHDoKCttkYQ8qDBl+KZx 1NALFJh63TYDNYq5OSaNV3GA+9R6VO670ue+mI4lj5k1neInabSdSc0ogP53LUibTTv1 1FXc1n92GWf6yJSZU5DNB7bihojUhZ0WMl/OM= Received: by 10.210.89.4 with SMTP id m4mr3099111ebb.6.1246715196102; Sat, 04 Jul 2009 06:46:36 -0700 (PDT) Received: from ?192.168.0.1? (vol75-3-82-66-216-176.fbx.proxad.net [82.66.216.176]) by mx.google.com with ESMTPS id 24sm3800968eyx.3.2009.07.04.06.46.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 04 Jul 2009 06:46:35 -0700 (PDT) Sender: Emmanuel Lecharny Message-ID: <4A4F5D3D.6010906@nextury.com> Date: Sat, 04 Jul 2009 15:46:37 +0200 From: Emmanuel Lecharny User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: users@directory.apache.org Subject: Re: invalid .ldif? [newbie] References: <3c5d272e0907040458p540fb77bv23b95329004a417@mail.gmail.com> <4A4F5AF3.9000302@PingToo.com> In-Reply-To: <4A4F5AF3.9000302@PingToo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on 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