You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Dan Armbrust <da...@gmail.com> on 2005/05/19 19:36:56 UTC

trying to load custom-schema data...

I'm trying to load up the Apache LDAP server for the first time, and to 
complicate things, my data adheres to a custom schema.

I have not loaded the schema into the Apache server yet so, when I try 
to load my data, I get errors like this:


javax.naming.NamingException: OID for name 'codingScheme' was not found 
within the OID registry at 
org.apache.ldap.server.schema.GlobalOidRegistry.getOid(GlobalOidRegistry.java:195)
at 
org.apache.ldap.server.schema.GlobalAttributeTypeRegistry.lookup(GlobalAttributeTypeRegistry.java:134)
...

and then errors like this:


javax.naming.InvalidNameException: codingScheme=Automobiles, 
dc=CodingSchemes: [LDAP: error code 34 - failed to add entry 
codingScheme=Automobiles, dc=CodingSchemes,dc=lexgrid,dc=org:
org.apache.ldap.common.exception.LdapInvalidNameException: Parser 
failure on name:
	codingScheme=Automobiles,dc=CodingSchemes,dc=lexgrid,dc=org
Antlr exception trace:
line 9:25: unexpected token: ,
	at 
org.apache.ldap.common.name.antlrNameParser.attributeTypeAndValue(antlrNameParser.java:181)


I presume this is because I haven't loaded my schemas.  Am I on the 
right track here?

I found this documentation: 
http://directory.apache.org/subprojects/apacheds/users/plugin.html

and I'm going to try to go through that process now.  Please let me know 
if I'm on the wrong track entirely.

Thanks

Dan

Re: trying to load custom-schema data...

Posted by Dan Armbrust <da...@gmail.com>.
Thanks for looking at this... I got everything to parse late last night, 
but I didn't take the time to send another message saying I got it all 
to work.

I had to fix a few attributeTypes -> attributetypes - and then 
everything else that I had problems with was due to me not having things 
in the correct order - for example, ORDERING needed to be before SUBSTR 
   for your parser.  There were a couple of others like that.  Now to 
try installing my generated schema files :)

Dan



Alex Karasulu wrote:
> Try this attached file instead ...
> 
> I just changes attributeType to attributetype.  There is an issue with 
> the maven plugin's OpenLDAP file parser.  My fault but I did not have 
> time to fix it.
> 
> Alex
> 
> 

Re: trying to load custom-schema data...

Posted by Alex Karasulu <ao...@bellsouth.net>.
Try this attached file instead ...

I just changes attributeType to attributetype.  There is an issue with 
the maven plugin's OpenLDAP file parser.  My fault but I did not have 
time to fix it.

Alex


Re: trying to load custom-schema data...

Posted by Dan Armbrust <da...@gmail.com>.
ps - the "directory:genrate" was just a typo in my translation to e-mail..



Dan Armbrust wrote:
> I'm having a problem trying to generate schema from my custom schema.
> I added my schema files to the core\src\main\schema folder, and then I
> added their names to the end of the maven.ldap.server.schemas line in
> the project.properties file.
> 
> Now, when I run the maven build, it does this:
> 
> 
> \apacheds-0.9-src\apacheds-0.9\core>maven -V directory:genrate

Re: trying to load custom-schema data...

Posted by Alex Karasulu <ao...@bellsouth.net>.
Dan Armbrust wrote:

> That I did not... Silly me, I thought that part was optional.
>
> Now I'm getting new errors, but at least I can make progress on those 
> - its currently choking on the word "ORDERING" lines in my schema file.

Ahhh the parser sucks - use lowercase :).

Alex

Re: trying to load custom-schema data...

Posted by Dan Armbrust <da...@gmail.com>.
That I did not... Silly me, I thought that part was optional.

Now I'm getting new errors, but at least I can make progress on those - 
its currently choking on the word "ORDERING" lines in my schema file.

Thanks for the tip.

Dan

Scott Bridges wrote:
> 
> Did you also add a dependency line in the project.properties file?
> i.e. "maven.ldap.server.schema.deps.namingauthority="
> 
> Dan Armbrust wrote:
> 
>> I added their names to the end of the maven.ldap.server.schemas line in
>> the project.properties file.
>>  
>>
> 

Re: trying to load custom-schema data...

Posted by Dan Armbrust <da...@gmail.com>.
I'm having a problem trying to generate schema from my custom schema.
I added my schema files to the core\src\main\schema folder, and then I
added their names to the end of the maven.ldap.server.schemas line in
the project.properties file.

Now, when I run the maven build, it does this:


\apacheds-0.9-src\apacheds-0.9\core>maven -V directory:genrate
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0.2

build:start:

directory:prepare-filesystem:

directory:generate:
    [echo] Generated schema producer classes for apachedns.schema
    [echo] Generated schema producer classes for autofs.schema
    [echo] Generated schema producer classes for core.schema
    [echo] Generated schema producer classes for cosine.schema
    [echo] Generated schema producer classes for corba.schema
    [echo] Generated schema producer classes for apache.schema
    [echo] Generated schema producer classes for inetorgperson.schema
    [echo] Generated schema producer classes for java.schema
    [echo] Generated schema producer classes for krb5kdc.schema
    [echo] Generated schema producer classes for nis.schema
    [echo] Generated schema producer classes for system.schema
    [echo] Generated schema producer classes for dhcp.schema
    [echo] Generated schema producer classes for samba.schema

BUILD FAILED
File...... C:\Documents and
Settings\ARMBRUST\.maven\cache\maven-directory-plugin-0.9\plugin.jelly
Element... j:useBean
Line...... 59
Column.... 87
java.lang.reflect.InvocationTargetException
Total time: 4 seconds
Finished at: Thu May 19 14:02:29 CDT 2005

My first schema file is attached - is there something wrong with it? 
All of my schema is valid (according to OpenLDAP anyway)

Or maybe I'm just doing something else wrong - any advice would be appreciated.

Thanks, 

Dan