You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Torgeir Veimo <to...@pobox.com> on 2008/01/08 08:45:07 UTC
directory studio & schema files
Directory Studio seems to be very picky about the schema files when
importing a schema, eg. it doesn't seem to like a DESC field with an
empty string, ''.
Is is possible to relax the schema strictness when importing? Also,
does anyone know any tool to validate and point out errors in schema
files? Directory Studio silently halts the schema import without any
logs anywhere that I can find when it encounters these problems..
--
Torgeir Veimo
torgeir@pobox.com
Re: [studio] directory studio & schema files
Posted by Torgeir Veimo <to...@pobox.com>.
On 9 Jan 2008, at 17:20, Emmanuel Lecharny wrote:
> Thanks a lot for all those reports ! This help us a lot !
Another thing I encountered when starting to use Studio was that it's
not readily apparent for the novice user that the schema editor
doesn't actually add schema entries to the LDAP server, one needs to
import schemas (eg from openldap files), then export as LDIF, then
import the LDIF file for the Directory server in use. This could be
documented much better.
Should I file a Jira issue for this as well?
--
Torgeir Veimo
torgeir@pobox.com
Re: [studio] directory studio & schema files
Posted by Alex Karasulu <ak...@apache.org>.
Oh wait is this for 1.0 and the 1.0 maven schema plugin is used? Phheww
that thing is broke.
Alex
On Jan 9, 2008 4:31 PM, Emmanuel Lecharny <el...@gmail.com> wrote:
> Alex Karasulu wrote:
> >>> The thing is ApacheDS will not accept X-ORIGIN because
> >>> this is specific to Netscape derived servers.
> >>>
> >> The thing is that it's not an LDIF file, but a schema. You have in the
> >> latest RFC (4512) an 'extensions' keyword which has been added to
> >> AttributeTypes and many other constructs, and we don't support those
> guys.
> >>
> >>
> >
> > I thought our parsers supported extensions? Stefan Seelmann had written
> it
> > in I had thought. See this file here:
> >
> >
> >
> https://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/antlr/schema-extension.g?revision=602936&view=markup
> >
>
> I have to double check this on our current implementation, but AFAIR,
> this file concerns AttributeTypes injected through Ldap requests, not to
> schema used to start the server. The shema plugin (which use the
> openldap.g file) does not accept extension, I think.
>
> Not 100% sure though ...
> >
> >
> >> This is a clear problem, and we should fix it. It should not be
> complex,
> >> just a matter of adding some new rule into the parser and a new member
> >> into the classes which handles the objects.
> >>
> >>
> >
> > Yeah exactly. I was just confused about this grammar file.
> >
> > Alex
> >
> >
>
>
> --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>
Re: [studio] directory studio & schema files
Posted by Emmanuel Lecharny <el...@gmail.com>.
Alex Karasulu wrote:
>>> The thing is ApacheDS will not accept X-ORIGIN because
>>> this is specific to Netscape derived servers.
>>>
>> The thing is that it's not an LDIF file, but a schema. You have in the
>> latest RFC (4512) an 'extensions' keyword which has been added to
>> AttributeTypes and many other constructs, and we don't support those guys.
>>
>>
>
> I thought our parsers supported extensions? Stefan Seelmann had written it
> in I had thought. See this file here:
>
>
> https://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/antlr/schema-extension.g?revision=602936&view=markup
>
I have to double check this on our current implementation, but AFAIR,
this file concerns AttributeTypes injected through Ldap requests, not to
schema used to start the server. The shema plugin (which use the
openldap.g file) does not accept extension, I think.
Not 100% sure though ...
>
>
>> This is a clear problem, and we should fix it. It should not be complex,
>> just a matter of adding some new rule into the parser and a new member
>> into the classes which handles the objects.
>>
>>
>
> Yeah exactly. I was just confused about this grammar file.
>
> Alex
>
>
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org
Re: [studio] directory studio & schema files
Posted by Alex Karasulu <ak...@apache.org>.
On Jan 9, 2008 9:47 AM, Emmanuel Lecharny <el...@gmail.com> wrote:
> Alex Karasulu wrote:
> > Schema extensions are server specific and optional. Also the LDIF
> loader
> > used by studio should load I think because the description is just an
> > attribute value.
> Exactly.
> > The thing is ApacheDS will not accept X-ORIGIN because
> > this is specific to Netscape derived servers.
> The thing is that it's not an LDIF file, but a schema. You have in the
> latest RFC (4512) an 'extensions' keyword which has been added to
> AttributeTypes and many other constructs, and we don't support those guys.
>
I thought our parsers supported extensions? Stefan Seelmann had written it
in I had thought. See this file here:
https://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/antlr/schema-extension.g?revision=602936&view=markup
>
> This is a clear problem, and we should fix it. It should not be complex,
> just a matter of adding some new rule into the parser and a new member
> into the classes which handles the objects.
>
Yeah exactly. I was just confused about this grammar file.
Alex
Re: [studio] directory studio & schema files
Posted by Emmanuel Lecharny <el...@gmail.com>.
Alex Karasulu wrote:
> Schema extensions are server specific and optional. Also the LDIF loader
> used by studio should load I think because the description is just an
> attribute value.
Exactly.
> The thing is ApacheDS will not accept X-ORIGIN because
> this is specific to Netscape derived servers.
The thing is that it's not an LDIF file, but a schema. You have in the
latest RFC (4512) an 'extensions' keyword which has been added to
AttributeTypes and many other constructs, and we don't support those guys.
This is a clear problem, and we should fix it. It should not be complex,
just a matter of adding some new rule into the parser and a new member
into the classes which handles the objects.
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org
Re: [studio] directory studio & schema files
Posted by Alex Karasulu <ak...@apache.org>.
Just got an idea after hitting send ...
Might be nice to have the import and export capabilities understand these
kinds of server specifics based on a kind of server profile. This way
studio can accommodate these kinds of changes for some rudimentary ETL like
operations.
On Jan 9, 2008 8:44 AM, Alex Karasulu <ak...@apache.org> wrote:
> Schema extensions are server specific and optional. Also the LDIF loader
> used by studio should load I think because the description is just an
> attribute value. The thing is ApacheDS will not accept X-ORIGIN because
> this is specific to Netscape derived servers. ApacheDS uses a similar
> extension called X-SCHEMA which tells you what schema the schema element
> comes from.
>
> Alex
>
>
> On Jan 9, 2008 2:20 AM, Emmanuel Lecharny <el...@gmail.com> wrote:
>
> > Hi Torgeir !
> >
> > Torgeir Veimo wrote:
> > >
> > > On 8 Jan 2008, at 22:16, Emmanuel Lecharny wrote:
> > >
> > >> I have modified the parser to accept empty DESC.
> > >
> > >
> > > Ok, now I get an error message which is very helpful. Thx!
> > >
> > > I exported a schema from a Fedora LDAP server with Studio, and it
> > > contains X-ORIGIN statements for all attribute types. This breaks the
> > > import into Apache DS. X-ORIGIN is allowed by the RFC for schema
> > files?
> >
> > I'm afraid that the current parser does not support extensions right
> > now. This is something we must add into the parser. Can you fill a JIRA
> > for this?
> >
> > Thanks a lot for all those reports ! This help us a lot !
> > >
> > > --Torgeir Veimo
> > > torgeir@pobox.com
> > >
> > >
> > >
> > >
> >
> >
> > --
> > --
> > cordialement, regards,
> > Emmanuel Lécharny
> > www.iktek.com
> > directory.apache.org
> >
> >
> >
>
Re: [studio] directory studio & schema files
Posted by Alex Karasulu <ak...@apache.org>.
Schema extensions are server specific and optional. Also the LDIF loader
used by studio should load I think because the description is just an
attribute value. The thing is ApacheDS will not accept X-ORIGIN because
this is specific to Netscape derived servers. ApacheDS uses a similar
extension called X-SCHEMA which tells you what schema the schema element
comes from.
Alex
On Jan 9, 2008 2:20 AM, Emmanuel Lecharny <el...@gmail.com> wrote:
> Hi Torgeir !
>
> Torgeir Veimo wrote:
> >
> > On 8 Jan 2008, at 22:16, Emmanuel Lecharny wrote:
> >
> >> I have modified the parser to accept empty DESC.
> >
> >
> > Ok, now I get an error message which is very helpful. Thx!
> >
> > I exported a schema from a Fedora LDAP server with Studio, and it
> > contains X-ORIGIN statements for all attribute types. This breaks the
> > import into Apache DS. X-ORIGIN is allowed by the RFC for schema files?
>
> I'm afraid that the current parser does not support extensions right
> now. This is something we must add into the parser. Can you fill a JIRA
> for this?
>
> Thanks a lot for all those reports ! This help us a lot !
> >
> > --Torgeir Veimo
> > torgeir@pobox.com
> >
> >
> >
> >
>
>
> --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>
Re: [studio] directory studio & schema files
Posted by Emmanuel Lecharny <el...@gmail.com>.
Hi Torgeir !
Torgeir Veimo wrote:
>
> On 8 Jan 2008, at 22:16, Emmanuel Lecharny wrote:
>
>> I have modified the parser to accept empty DESC.
>
>
> Ok, now I get an error message which is very helpful. Thx!
>
> I exported a schema from a Fedora LDAP server with Studio, and it
> contains X-ORIGIN statements for all attribute types. This breaks the
> import into Apache DS. X-ORIGIN is allowed by the RFC for schema files?
I'm afraid that the current parser does not support extensions right
now. This is something we must add into the parser. Can you fill a JIRA
for this?
Thanks a lot for all those reports ! This help us a lot !
>
> --Torgeir Veimo
> torgeir@pobox.com
>
>
>
>
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org
Re: [studio] directory studio & schema files
Posted by Torgeir Veimo <to...@pobox.com>.
On 8 Jan 2008, at 22:16, Emmanuel Lecharny wrote:
> I have modified the parser to accept empty DESC.
Ok, now I get an error message which is very helpful. Thx!
I exported a schema from a Fedora LDAP server with Studio, and it
contains X-ORIGIN statements for all attribute types. This breaks the
import into Apache DS. X-ORIGIN is allowed by the RFC for schema files?
--
Torgeir Veimo
torgeir@pobox.com
Re: [studio] directory studio & schema files
Posted by Torgeir Veimo <to...@pobox.com>.
On 8 Jan 2008, at 22:40, Torgeir Veimo wrote:
>
> On 8 Jan 2008, at 22:16, Emmanuel Lecharny wrote:
>
>> I have modified the parser to accept empty DESC.
>
>
> Independent of the parser accepting empty DESC or not, shouldn't
> errors on input files end up in the interface rather than in the log
> file, leaving the user high and dry about what's happening?
At least it would be nice to have a line number where the problem occur;
!ENTRY org.apache.directory.studio.schemaeditor 4 0 2008-01-08
18:57:37.899
!MESSAGE An error occured when importing the schema epd-export.schema.
!STACK 0
org
.apache
.directory
.studio.schemaeditor.model.io.OpenLdapSchemaFileImportException: The
file '/Users/torgeir/Desktop/epd-export.schema' can not be read
correctly.
at
org
.apache
.directory
.studio
.schemaeditor.model.io.OpenLdapSchemaFileImporter.getSchema(Unknown
Source)
at
org
.apache
.directory
.studio.schemaeditor.view.wizards.ImportSchemasFromOpenLdapWizard
$1.run(Unknown Source)
at org.eclipse.jface.operation.ModalContext
$ModalContextThread.run(ModalContext.java:113)
--
Torgeir Veimo
torgeir@pobox.com
Re: directory studio & schema files
Posted by Torgeir Veimo <to...@pobox.com>.
On 8 Jan 2008, at 23:10, Emmanuel Lecharny wrote:
> Can you fill a JIRA with this request, so that the Studio team can
> deal with this improvment adn not forget about it ?
Ok, created DIRSTUDIO-254
Are there prerelese builds for download anywhere, or do I have to
build from SVN myself?
--
Torgeir Veimo
torgeir@pobox.com
Re: directory studio & schema files
Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
There's no need to to that. There's already a Jira opened here :
https://issues.apache.org/jira/browse/DIRSTUDIO-239
As I said earlier, "We will now indicate the exact location where the
parsing has failed in the error box." This includes the line _and_ column of
the error.
If you want, you can test it by building the latest trunk. All the
information is on the website in the developer guide. ;)
Regards,
Pierre-Arnaud
On 1/8/08, Emmanuel Lecharny <el...@gmail.com> wrote:
>
> Can you fill a JIRA with this request, so that the Studio team can
> deal with this improvment adn not forget about it ?
>
> Thanks !
>
> On 1/8/08, Torgeir Veimo <to...@pobox.com> wrote:
> >
> > On 8 Jan 2008, at 22:16, Emmanuel Lecharny wrote:
> >
> > > I have modified the parser to accept empty DESC.
> >
> >
> > Independent of the parser accepting empty DESC or not, shouldn't
> > errors on input files end up in the interface rather than in the log
> > file, leaving the user high and dry about what's happening?
> >
> > --
> > Torgeir Veimo
> > torgeir@pobox.com
> >
> >
> >
> >
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
Re: directory studio & schema files
Posted by Emmanuel Lecharny <el...@gmail.com>.
Can you fill a JIRA with this request, so that the Studio team can
deal with this improvment adn not forget about it ?
Thanks !
On 1/8/08, Torgeir Veimo <to...@pobox.com> wrote:
>
> On 8 Jan 2008, at 22:16, Emmanuel Lecharny wrote:
>
> > I have modified the parser to accept empty DESC.
>
>
> Independent of the parser accepting empty DESC or not, shouldn't
> errors on input files end up in the interface rather than in the log
> file, leaving the user high and dry about what's happening?
>
> --
> Torgeir Veimo
> torgeir@pobox.com
>
>
>
>
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: directory studio & schema files
Posted by Torgeir Veimo <to...@pobox.com>.
On 8 Jan 2008, at 22:16, Emmanuel Lecharny wrote:
> I have modified the parser to accept empty DESC.
Independent of the parser accepting empty DESC or not, shouldn't
errors on input files end up in the interface rather than in the log
file, leaving the user high and dry about what's happening?
--
Torgeir Veimo
torgeir@pobox.com
Re: directory studio & schema files
Posted by Emmanuel Lecharny <el...@gmail.com>.
Hi guys,
I have modified the parser to accept empty DESC.
I will push it tonite.
On 1/8/08, Pierre-Arnaud Marcelot <pa...@marcelot.net> wrote:
> Hi Torgeir,
>
> On 1/8/08, Torgeir Veimo <to...@pobox.com> wrote:
> >
> > Directory Studio seems to be very picky about the schema files when
> > importing a schema, eg. it doesn't seem to like a DESC field with an
> > empty string, ''.
> >
> > Is is possible to relax the schema strictness when importing?
>
>
> You are right, we should relax it a little. Could you please file a Jira
> issue about that ? Thanks.
>
> Also, does anyone know any tool to validate and point out errors in schema
> > files? Directory Studio silently halts the schema import without any
> > logs anywhere that I can find when it encounters these problems..
>
>
> You could try to have a look in the log file here
> -> {home_folder}/.ApacheDirectoryStudio/.metadata/.log
>
> This point will be fixed in the upcoming Apache Directory Studio
> 1.1.0release due at this end of this month. We will now indicate the
> exact
> location where the parsing has failed in the error box.
>
> Regards,
> Pierre-Arnaud Marcelot
>
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: directory studio & schema files
Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Torgeir,
On 1/8/08, Torgeir Veimo <to...@pobox.com> wrote:
>
> Directory Studio seems to be very picky about the schema files when
> importing a schema, eg. it doesn't seem to like a DESC field with an
> empty string, ''.
>
> Is is possible to relax the schema strictness when importing?
You are right, we should relax it a little. Could you please file a Jira
issue about that ? Thanks.
Also, does anyone know any tool to validate and point out errors in schema
> files? Directory Studio silently halts the schema import without any
> logs anywhere that I can find when it encounters these problems..
You could try to have a look in the log file here
-> {home_folder}/.ApacheDirectoryStudio/.metadata/.log
This point will be fixed in the upcoming Apache Directory Studio
1.1.0release due at this end of this month. We will now indicate the
exact
location where the parsing has failed in the error box.
Regards,
Pierre-Arnaud Marcelot