You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Antoine Levy-Lambert (JIRA)" <ji...@apache.org> on 2010/11/16 03:21:13 UTC
[jira] Created: (DIRSERVER-1581) attribute type with trailing space
in the description prevents apacheds from restarting
attribute type with trailing space in the description prevents apacheds from restarting
---------------------------------------------------------------------------------------
Key: DIRSERVER-1581
URL: https://issues.apache.org/jira/browse/DIRSERVER-1581
Project: Directory ApacheDS
Issue Type: Bug
Components: core
Environment: Windows XP, JDK 1.6
Reporter: Antoine Levy-Lambert
I had one attribute type with a trailing space in the description
attributetype ( 1.3.6.1.4.1.8104.1.1.37 NAME 'versionNumber' DESC
'versionNumber ' EQUALITY caseIgnoreMatch SUBSTR
caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE)
using directory 1.5.7 this translates in the following ldif :
dn: m-oid=1.3.6.1.4.1.8104.1.1.37, ou=attributeTypes, cn=lea, ou=schema
objectclass: metaAttributeType
objectclass: metaTop
objectclass: top
m-oid: 1.3.6.1.4.1.8104.1.1.37
m-name: versionNumber
m-description:: dmVyc2lvbk51bWJlciA=
m-equality: caseIgnoreMatch
m-substr: caseIgnoreSubstringsMatch
m-syntax: 1.3.6.1.4.1.1466.115.121.1.15
m-length: 0
m-singleValue: TRUE
I managed to get this LDIF imported into the directory server
Afterwards, I shutdown (hit Ctrl-C in fact) my directory server.
When restarting, I get the following exception :
[11:22:19] ERROR
[org.apache.directory.shared.ldap.entry.DefaultEntryAttribute] -
ERR_04131 The value is expected to be a String
org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException:
ERR_04131 The value is expected to be a String
at org.apache.directory.shared.ldap.entry.DefaultEntryAttribute.getString(DefaultEntryAttribute.java:500)
at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.setSchemaObjectProperties(SchemaEntityFactory.java:1080)
at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.getAttributeType(SchemaEntityFactory.java:985)
at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addAttributeTypes(DefaultSchemaManager.java:731)
at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addSchemaObjects(DefaultSchemaManager.java:238)
at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.load(DefaultSchemaManager.java:684)
at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadDepsFirst(DefaultSchemaManager.java:1138)
at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadWithDeps(DefaultSchemaManager.java:1037)
at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadAllEnabled(DefaultSchemaManager.java:928)
at org.apache.directory.server.ApacheDsService.initSchemaLdifPartition(ApacheDsService.java:222)
at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:154)
at org.apache.directory.server.UberjarMain.main(UberjarMain.java:58)
[11:22:19] ERROR [org.apache.directory.server.UberjarMain] - Failed to
start the service.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Created: (DIRSERVER-1581) attribute type with trailing
space in the description prevents apacheds from restarting
Posted by Emmanuel Lecharny <el...@gmail.com>.
On 11/16/10 3:29 PM, Antoine Levy-Lambert wrote:
> Alex,
>
> the Apache Directory Studio schema editor reexports 'versionNumber '
> as dmVyc2lvbk51bWJlciA= in LDIF. I read that there is a convention
> that strings with trailing spaces have to be encoded in LDIF. This
> LDIF has been imported into Apache DS 1.5.7 and the server was able to
> restart. So the persistent storage of this value might have been done
> incorrectly by Apache DS trunk.
Absolutely. I'm on the code atm, trying to find a fix.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: [jira] Created: (DIRSERVER-1581) attribute type with trailing
space in the description prevents apacheds from restarting
Posted by Antoine Levy-Lambert <an...@gmx.de>.
Alex,
the Apache Directory Studio schema editor reexports 'versionNumber ' as
dmVyc2lvbk51bWJlciA= in LDIF. I read that there is a convention that
strings with trailing spaces have to be encoded in LDIF. This LDIF has
been imported into Apache DS 1.5.7 and the server was able to restart.
So the persistent storage of this value might have been done incorrectly
by Apache DS trunk.
Regards,
Antoine
On 11/16/2010 7:47 AM, Alex Karasulu wrote:
> This might be due to the attribute value being binary rather than
> there being an extra trailing space. Lookie here:
>
> On Tue, Nov 16, 2010 at 4:21 AM, Antoine Levy-Lambert (JIRA)
> <jira@apache.org <ma...@apache.org>> wrote:
>
> attribute type with trailing space in the description prevents
> apacheds from restarting
> ---------------------------------------------------------------------------------------
>
> Key: DIRSERVER-1581
> URL:
> https://issues.apache.org/jira/browse/DIRSERVER-1581
>
> ...
>
> I had one attribute type with a trailing space in the description
>
> attributetype ( 1.3.6.1.4.1.8104.1.1.37 NAME 'versionNumber' DESC
> 'versionNumber ' EQUALITY caseIgnoreMatch SUBSTR
> caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
> SINGLE-VALUE)
>
> using directory 1.5.7 this translates in the following ldif :
>
> m-description:: dmVyc2lvbk51bWJlciA=
>
>
> Note the description field is being used as a binary attribute and
> this is probably why the error occurred on startup. Something is
> translating the description field into a binary value instead of a
> directory string if that space is present from the LDAP representation
> ==> ApacheDS LDIF format.
>
> Sorry would have put this in JIRA but my damn password is not working
> ... have to reset.
> --
> Alex Karasulu
> My Blog :: http://www.jroller.com/akarasulu/
> Apache Directory Server :: http://directory.apache.org
> Apache MINA :: http://mina.apache.org
> To set up a meeting with me: http://tungle.me/AlexKarasulu
Re: [jira] Created: (DIRSERVER-1581) attribute type with trailing
space in the description prevents apacheds from restarting
Posted by Alex Karasulu <ak...@apache.org>.
This might be due to the attribute value being binary rather than there
being an extra trailing space. Lookie here:
On Tue, Nov 16, 2010 at 4:21 AM, Antoine Levy-Lambert (JIRA) <
jira@apache.org> wrote:
> attribute type with trailing space in the description prevents apacheds
> from restarting
>
> ---------------------------------------------------------------------------------------
>
> Key: DIRSERVER-1581
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1581
>
...
> I had one attribute type with a trailing space in the description
>
> attributetype ( 1.3.6.1.4.1.8104.1.1.37 NAME 'versionNumber' DESC
> 'versionNumber ' EQUALITY caseIgnoreMatch SUBSTR
> caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
> SINGLE-VALUE)
>
> using directory 1.5.7 this translates in the following ldif :
>
> m-description:: dmVyc2lvbk51bWJlciA=
>
>
Note the description field is being used as a binary attribute and this is
probably why the error occurred on startup. Something is translating the
description field into a binary value instead of a directory string if that
space is present from the LDAP representation ==> ApacheDS LDIF format.
Sorry would have put this in JIRA but my damn password is not working ...
have to reset.
--
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org
To set up a meeting with me: http://tungle.me/AlexKarasulu
[jira] Commented: (DIRSERVER-1581) attribute type with trailing
space in the description prevents apacheds from restarting
Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-1581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932487#action_12932487 ]
Emmanuel Lecharny commented on DIRSERVER-1581:
----------------------------------------------
The problem is not the injection of such an attribute. It's the way we deal with it when we read it again. For some unknown reason (atm) the DESC AT is read and initialized as if it was a binary AT, despite its syntax.
Checking the LDIF reader now...
> attribute type with trailing space in the description prevents apacheds from restarting
> ---------------------------------------------------------------------------------------
>
> Key: DIRSERVER-1581
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1581
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: core
> Environment: Windows XP, JDK 1.6
> Reporter: Antoine Levy-Lambert
> Assignee: Emmanuel Lecharny
>
> I had one attribute type with a trailing space in the description
> attributetype ( 1.3.6.1.4.1.8104.1.1.37 NAME 'versionNumber' DESC
> 'versionNumber ' EQUALITY caseIgnoreMatch SUBSTR
> caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE)
> using directory 1.5.7 this translates in the following ldif :
> dn: m-oid=1.3.6.1.4.1.8104.1.1.37, ou=attributeTypes, cn=lea, ou=schema
> objectclass: metaAttributeType
> objectclass: metaTop
> objectclass: top
> m-oid: 1.3.6.1.4.1.8104.1.1.37
> m-name: versionNumber
> m-description:: dmVyc2lvbk51bWJlciA=
> m-equality: caseIgnoreMatch
> m-substr: caseIgnoreSubstringsMatch
> m-syntax: 1.3.6.1.4.1.1466.115.121.1.15
> m-length: 0
> m-singleValue: TRUE
> I managed to get this LDIF imported into the directory server
> Afterwards, I shutdown (hit Ctrl-C in fact) my directory server.
> When restarting, I get the following exception :
> [11:22:19] ERROR
> [org.apache.directory.shared.ldap.entry.DefaultEntryAttribute] -
> ERR_04131 The value is expected to be a String
> org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException:
> ERR_04131 The value is expected to be a String
> at org.apache.directory.shared.ldap.entry.DefaultEntryAttribute.getString(DefaultEntryAttribute.java:500)
> at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.setSchemaObjectProperties(SchemaEntityFactory.java:1080)
> at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.getAttributeType(SchemaEntityFactory.java:985)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addAttributeTypes(DefaultSchemaManager.java:731)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addSchemaObjects(DefaultSchemaManager.java:238)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.load(DefaultSchemaManager.java:684)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadDepsFirst(DefaultSchemaManager.java:1138)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadWithDeps(DefaultSchemaManager.java:1037)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadAllEnabled(DefaultSchemaManager.java:928)
> at org.apache.directory.server.ApacheDsService.initSchemaLdifPartition(ApacheDsService.java:222)
> at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:154)
> at org.apache.directory.server.UberjarMain.main(UberjarMain.java:58)
> [11:22:19] ERROR [org.apache.directory.server.UberjarMain] - Failed to
> start the service.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (DIRSERVER-1581) attribute type with trailing
space in the description prevents apacheds from restarting
Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-1581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny reassigned DIRSERVER-1581:
--------------------------------------------
Assignee: Emmanuel Lecharny
> attribute type with trailing space in the description prevents apacheds from restarting
> ---------------------------------------------------------------------------------------
>
> Key: DIRSERVER-1581
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1581
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: core
> Environment: Windows XP, JDK 1.6
> Reporter: Antoine Levy-Lambert
> Assignee: Emmanuel Lecharny
>
> I had one attribute type with a trailing space in the description
> attributetype ( 1.3.6.1.4.1.8104.1.1.37 NAME 'versionNumber' DESC
> 'versionNumber ' EQUALITY caseIgnoreMatch SUBSTR
> caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE)
> using directory 1.5.7 this translates in the following ldif :
> dn: m-oid=1.3.6.1.4.1.8104.1.1.37, ou=attributeTypes, cn=lea, ou=schema
> objectclass: metaAttributeType
> objectclass: metaTop
> objectclass: top
> m-oid: 1.3.6.1.4.1.8104.1.1.37
> m-name: versionNumber
> m-description:: dmVyc2lvbk51bWJlciA=
> m-equality: caseIgnoreMatch
> m-substr: caseIgnoreSubstringsMatch
> m-syntax: 1.3.6.1.4.1.1466.115.121.1.15
> m-length: 0
> m-singleValue: TRUE
> I managed to get this LDIF imported into the directory server
> Afterwards, I shutdown (hit Ctrl-C in fact) my directory server.
> When restarting, I get the following exception :
> [11:22:19] ERROR
> [org.apache.directory.shared.ldap.entry.DefaultEntryAttribute] -
> ERR_04131 The value is expected to be a String
> org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException:
> ERR_04131 The value is expected to be a String
> at org.apache.directory.shared.ldap.entry.DefaultEntryAttribute.getString(DefaultEntryAttribute.java:500)
> at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.setSchemaObjectProperties(SchemaEntityFactory.java:1080)
> at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.getAttributeType(SchemaEntityFactory.java:985)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addAttributeTypes(DefaultSchemaManager.java:731)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addSchemaObjects(DefaultSchemaManager.java:238)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.load(DefaultSchemaManager.java:684)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadDepsFirst(DefaultSchemaManager.java:1138)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadWithDeps(DefaultSchemaManager.java:1037)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadAllEnabled(DefaultSchemaManager.java:928)
> at org.apache.directory.server.ApacheDsService.initSchemaLdifPartition(ApacheDsService.java:222)
> at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:154)
> at org.apache.directory.server.UberjarMain.main(UberjarMain.java:58)
> [11:22:19] ERROR [org.apache.directory.server.UberjarMain] - Failed to
> start the service.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRSERVER-1581) attribute type with trailing
space in the description prevents apacheds from restarting
Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-1581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932499#action_12932499 ]
Emmanuel Lecharny commented on DIRSERVER-1581:
----------------------------------------------
Ok, once the AT is stored on disk, as a LDIF file, we read it back using a LdifReader. This reader thinks that every AT with '::' is a binary AT, so stores the values as byte[], and nt STring.
It should not be a problem, as soon as we are aware that the AT is a String, which is an information we have in the schema.
We are just loading the schema, so it's a bit a chicken and egg issue here. Hopefully, the meta-schema should be available to check the type of m-description, and see it's a String.
Not very simple, but fixable ...
> attribute type with trailing space in the description prevents apacheds from restarting
> ---------------------------------------------------------------------------------------
>
> Key: DIRSERVER-1581
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1581
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: core
> Environment: Windows XP, JDK 1.6
> Reporter: Antoine Levy-Lambert
> Assignee: Emmanuel Lecharny
>
> I had one attribute type with a trailing space in the description
> attributetype ( 1.3.6.1.4.1.8104.1.1.37 NAME 'versionNumber' DESC
> 'versionNumber ' EQUALITY caseIgnoreMatch SUBSTR
> caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE)
> using directory 1.5.7 this translates in the following ldif :
> dn: m-oid=1.3.6.1.4.1.8104.1.1.37, ou=attributeTypes, cn=lea, ou=schema
> objectclass: metaAttributeType
> objectclass: metaTop
> objectclass: top
> m-oid: 1.3.6.1.4.1.8104.1.1.37
> m-name: versionNumber
> m-description:: dmVyc2lvbk51bWJlciA=
> m-equality: caseIgnoreMatch
> m-substr: caseIgnoreSubstringsMatch
> m-syntax: 1.3.6.1.4.1.1466.115.121.1.15
> m-length: 0
> m-singleValue: TRUE
> I managed to get this LDIF imported into the directory server
> Afterwards, I shutdown (hit Ctrl-C in fact) my directory server.
> When restarting, I get the following exception :
> [11:22:19] ERROR
> [org.apache.directory.shared.ldap.entry.DefaultEntryAttribute] -
> ERR_04131 The value is expected to be a String
> org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException:
> ERR_04131 The value is expected to be a String
> at org.apache.directory.shared.ldap.entry.DefaultEntryAttribute.getString(DefaultEntryAttribute.java:500)
> at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.setSchemaObjectProperties(SchemaEntityFactory.java:1080)
> at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.getAttributeType(SchemaEntityFactory.java:985)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addAttributeTypes(DefaultSchemaManager.java:731)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addSchemaObjects(DefaultSchemaManager.java:238)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.load(DefaultSchemaManager.java:684)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadDepsFirst(DefaultSchemaManager.java:1138)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadWithDeps(DefaultSchemaManager.java:1037)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadAllEnabled(DefaultSchemaManager.java:928)
> at org.apache.directory.server.ApacheDsService.initSchemaLdifPartition(ApacheDsService.java:222)
> at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:154)
> at org.apache.directory.server.UberjarMain.main(UberjarMain.java:58)
> [11:22:19] ERROR [org.apache.directory.server.UberjarMain] - Failed to
> start the service.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (DIRSERVER-1581) attribute type with trailing
space in the description prevents apacheds from restarting
Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-1581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny resolved DIRSERVER-1581.
------------------------------------------
Resolution: Fixed
Should be fixed with :
http://svn.apache.org/viewvc?rev=1035690&view=rev
> attribute type with trailing space in the description prevents apacheds from restarting
> ---------------------------------------------------------------------------------------
>
> Key: DIRSERVER-1581
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1581
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: core
> Affects Versions: 1.5.7
> Environment: Windows XP, JDK 1.6
> Reporter: Antoine Levy-Lambert
> Assignee: Emmanuel Lecharny
>
> I had one attribute type with a trailing space in the description
> attributetype ( 1.3.6.1.4.1.8104.1.1.37 NAME 'versionNumber' DESC
> 'versionNumber ' EQUALITY caseIgnoreMatch SUBSTR
> caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE)
> using directory 1.5.7 this translates in the following ldif :
> dn: m-oid=1.3.6.1.4.1.8104.1.1.37, ou=attributeTypes, cn=lea, ou=schema
> objectclass: metaAttributeType
> objectclass: metaTop
> objectclass: top
> m-oid: 1.3.6.1.4.1.8104.1.1.37
> m-name: versionNumber
> m-description:: dmVyc2lvbk51bWJlciA=
> m-equality: caseIgnoreMatch
> m-substr: caseIgnoreSubstringsMatch
> m-syntax: 1.3.6.1.4.1.1466.115.121.1.15
> m-length: 0
> m-singleValue: TRUE
> I managed to get this LDIF imported into the directory server
> Afterwards, I shutdown (hit Ctrl-C in fact) my directory server.
> When restarting, I get the following exception :
> [11:22:19] ERROR
> [org.apache.directory.shared.ldap.entry.DefaultEntryAttribute] -
> ERR_04131 The value is expected to be a String
> org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException:
> ERR_04131 The value is expected to be a String
> at org.apache.directory.shared.ldap.entry.DefaultEntryAttribute.getString(DefaultEntryAttribute.java:500)
> at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.setSchemaObjectProperties(SchemaEntityFactory.java:1080)
> at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.getAttributeType(SchemaEntityFactory.java:985)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addAttributeTypes(DefaultSchemaManager.java:731)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addSchemaObjects(DefaultSchemaManager.java:238)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.load(DefaultSchemaManager.java:684)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadDepsFirst(DefaultSchemaManager.java:1138)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadWithDeps(DefaultSchemaManager.java:1037)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadAllEnabled(DefaultSchemaManager.java:928)
> at org.apache.directory.server.ApacheDsService.initSchemaLdifPartition(ApacheDsService.java:222)
> at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:154)
> at org.apache.directory.server.UberjarMain.main(UberjarMain.java:58)
> [11:22:19] ERROR [org.apache.directory.server.UberjarMain] - Failed to
> start the service.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRSERVER-1581) attribute type with trailing
space in the description prevents apacheds from restarting
Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-1581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932480#action_12932480 ]
Emmanuel Lecharny commented on DIRSERVER-1581:
----------------------------------------------
I confirm there is an issue. The DESC is considered as binary, thus can't be transformed to a String.
I have added a junit test, currently debugging the server.
Thanks for the report.
Workaround : remove the trailing space.
> attribute type with trailing space in the description prevents apacheds from restarting
> ---------------------------------------------------------------------------------------
>
> Key: DIRSERVER-1581
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1581
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: core
> Environment: Windows XP, JDK 1.6
> Reporter: Antoine Levy-Lambert
> Assignee: Emmanuel Lecharny
>
> I had one attribute type with a trailing space in the description
> attributetype ( 1.3.6.1.4.1.8104.1.1.37 NAME 'versionNumber' DESC
> 'versionNumber ' EQUALITY caseIgnoreMatch SUBSTR
> caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE)
> using directory 1.5.7 this translates in the following ldif :
> dn: m-oid=1.3.6.1.4.1.8104.1.1.37, ou=attributeTypes, cn=lea, ou=schema
> objectclass: metaAttributeType
> objectclass: metaTop
> objectclass: top
> m-oid: 1.3.6.1.4.1.8104.1.1.37
> m-name: versionNumber
> m-description:: dmVyc2lvbk51bWJlciA=
> m-equality: caseIgnoreMatch
> m-substr: caseIgnoreSubstringsMatch
> m-syntax: 1.3.6.1.4.1.1466.115.121.1.15
> m-length: 0
> m-singleValue: TRUE
> I managed to get this LDIF imported into the directory server
> Afterwards, I shutdown (hit Ctrl-C in fact) my directory server.
> When restarting, I get the following exception :
> [11:22:19] ERROR
> [org.apache.directory.shared.ldap.entry.DefaultEntryAttribute] -
> ERR_04131 The value is expected to be a String
> org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException:
> ERR_04131 The value is expected to be a String
> at org.apache.directory.shared.ldap.entry.DefaultEntryAttribute.getString(DefaultEntryAttribute.java:500)
> at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.setSchemaObjectProperties(SchemaEntityFactory.java:1080)
> at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.getAttributeType(SchemaEntityFactory.java:985)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addAttributeTypes(DefaultSchemaManager.java:731)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addSchemaObjects(DefaultSchemaManager.java:238)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.load(DefaultSchemaManager.java:684)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadDepsFirst(DefaultSchemaManager.java:1138)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadWithDeps(DefaultSchemaManager.java:1037)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadAllEnabled(DefaultSchemaManager.java:928)
> at org.apache.directory.server.ApacheDsService.initSchemaLdifPartition(ApacheDsService.java:222)
> at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:154)
> at org.apache.directory.server.UberjarMain.main(UberjarMain.java:58)
> [11:22:19] ERROR [org.apache.directory.server.UberjarMain] - Failed to
> start the service.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRSERVER-1581) attribute type with trailing
space in the description prevents apacheds from restarting
Posted by "Antoine Levy-Lambert (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-1581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932682#action_12932682 ]
Antoine Levy-Lambert commented on DIRSERVER-1581:
-------------------------------------------------
I have tested the head revision of apacheds and I can confirm that this issue is fixed. Thanks very much Emmanuel.
Antoine
> attribute type with trailing space in the description prevents apacheds from restarting
> ---------------------------------------------------------------------------------------
>
> Key: DIRSERVER-1581
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1581
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: core
> Affects Versions: 1.5.7
> Environment: Windows XP, JDK 1.6
> Reporter: Antoine Levy-Lambert
> Assignee: Emmanuel Lecharny
> Fix For: 2.0.0-RC1
>
>
> I had one attribute type with a trailing space in the description
> attributetype ( 1.3.6.1.4.1.8104.1.1.37 NAME 'versionNumber' DESC
> 'versionNumber ' EQUALITY caseIgnoreMatch SUBSTR
> caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE)
> using directory 1.5.7 this translates in the following ldif :
> dn: m-oid=1.3.6.1.4.1.8104.1.1.37, ou=attributeTypes, cn=lea, ou=schema
> objectclass: metaAttributeType
> objectclass: metaTop
> objectclass: top
> m-oid: 1.3.6.1.4.1.8104.1.1.37
> m-name: versionNumber
> m-description:: dmVyc2lvbk51bWJlciA=
> m-equality: caseIgnoreMatch
> m-substr: caseIgnoreSubstringsMatch
> m-syntax: 1.3.6.1.4.1.1466.115.121.1.15
> m-length: 0
> m-singleValue: TRUE
> I managed to get this LDIF imported into the directory server
> Afterwards, I shutdown (hit Ctrl-C in fact) my directory server.
> When restarting, I get the following exception :
> [11:22:19] ERROR
> [org.apache.directory.shared.ldap.entry.DefaultEntryAttribute] -
> ERR_04131 The value is expected to be a String
> org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException:
> ERR_04131 The value is expected to be a String
> at org.apache.directory.shared.ldap.entry.DefaultEntryAttribute.getString(DefaultEntryAttribute.java:500)
> at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.setSchemaObjectProperties(SchemaEntityFactory.java:1080)
> at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.getAttributeType(SchemaEntityFactory.java:985)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addAttributeTypes(DefaultSchemaManager.java:731)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addSchemaObjects(DefaultSchemaManager.java:238)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.load(DefaultSchemaManager.java:684)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadDepsFirst(DefaultSchemaManager.java:1138)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadWithDeps(DefaultSchemaManager.java:1037)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadAllEnabled(DefaultSchemaManager.java:928)
> at org.apache.directory.server.ApacheDsService.initSchemaLdifPartition(ApacheDsService.java:222)
> at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:154)
> at org.apache.directory.server.UberjarMain.main(UberjarMain.java:58)
> [11:22:19] ERROR [org.apache.directory.server.UberjarMain] - Failed to
> start the service.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRSERVER-1581) attribute type with trailing
space in the description prevents apacheds from restarting
Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-1581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932513#action_12932513 ]
Emmanuel Lecharny commented on DIRSERVER-1581:
----------------------------------------------
I think I have a fix. We should first set the isHR flag to true for every meta-schema AT, then add a check in the getString() : if the value is binary and the isHR is true, then convert the byte[] to a String :
public String getString() throws LdapInvalidAttributeValueException
{
Value<?> value = get();
if ( value instanceof StringValue )
{
return value.getString();
}
else
{
if ( isHR )
{
// Try to convert the value from a byte[] to a String
String valueStr = StringTools.utf8ToString( (byte[])value.getReference() );
return valueStr;
}
String message = I18n.err( I18n.ERR_04131 );
LOG.error( message );
throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, message );
}
}
Should work. (at east, it works with the test I have added)
> attribute type with trailing space in the description prevents apacheds from restarting
> ---------------------------------------------------------------------------------------
>
> Key: DIRSERVER-1581
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1581
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: core
> Environment: Windows XP, JDK 1.6
> Reporter: Antoine Levy-Lambert
> Assignee: Emmanuel Lecharny
>
> I had one attribute type with a trailing space in the description
> attributetype ( 1.3.6.1.4.1.8104.1.1.37 NAME 'versionNumber' DESC
> 'versionNumber ' EQUALITY caseIgnoreMatch SUBSTR
> caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE)
> using directory 1.5.7 this translates in the following ldif :
> dn: m-oid=1.3.6.1.4.1.8104.1.1.37, ou=attributeTypes, cn=lea, ou=schema
> objectclass: metaAttributeType
> objectclass: metaTop
> objectclass: top
> m-oid: 1.3.6.1.4.1.8104.1.1.37
> m-name: versionNumber
> m-description:: dmVyc2lvbk51bWJlciA=
> m-equality: caseIgnoreMatch
> m-substr: caseIgnoreSubstringsMatch
> m-syntax: 1.3.6.1.4.1.1466.115.121.1.15
> m-length: 0
> m-singleValue: TRUE
> I managed to get this LDIF imported into the directory server
> Afterwards, I shutdown (hit Ctrl-C in fact) my directory server.
> When restarting, I get the following exception :
> [11:22:19] ERROR
> [org.apache.directory.shared.ldap.entry.DefaultEntryAttribute] -
> ERR_04131 The value is expected to be a String
> org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException:
> ERR_04131 The value is expected to be a String
> at org.apache.directory.shared.ldap.entry.DefaultEntryAttribute.getString(DefaultEntryAttribute.java:500)
> at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.setSchemaObjectProperties(SchemaEntityFactory.java:1080)
> at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.getAttributeType(SchemaEntityFactory.java:985)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addAttributeTypes(DefaultSchemaManager.java:731)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addSchemaObjects(DefaultSchemaManager.java:238)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.load(DefaultSchemaManager.java:684)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadDepsFirst(DefaultSchemaManager.java:1138)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadWithDeps(DefaultSchemaManager.java:1037)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadAllEnabled(DefaultSchemaManager.java:928)
> at org.apache.directory.server.ApacheDsService.initSchemaLdifPartition(ApacheDsService.java:222)
> at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:154)
> at org.apache.directory.server.UberjarMain.main(UberjarMain.java:58)
> [11:22:19] ERROR [org.apache.directory.server.UberjarMain] - Failed to
> start the service.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DIRSERVER-1581) attribute type with trailing space
in the description prevents apacheds from restarting
Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-1581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny updated DIRSERVER-1581:
-----------------------------------------
Affects Version/s: 1.5.7
Fix Version/s: 2.0.0-RC1
> attribute type with trailing space in the description prevents apacheds from restarting
> ---------------------------------------------------------------------------------------
>
> Key: DIRSERVER-1581
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1581
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: core
> Affects Versions: 1.5.7
> Environment: Windows XP, JDK 1.6
> Reporter: Antoine Levy-Lambert
> Assignee: Emmanuel Lecharny
> Fix For: 2.0.0-RC1
>
>
> I had one attribute type with a trailing space in the description
> attributetype ( 1.3.6.1.4.1.8104.1.1.37 NAME 'versionNumber' DESC
> 'versionNumber ' EQUALITY caseIgnoreMatch SUBSTR
> caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE)
> using directory 1.5.7 this translates in the following ldif :
> dn: m-oid=1.3.6.1.4.1.8104.1.1.37, ou=attributeTypes, cn=lea, ou=schema
> objectclass: metaAttributeType
> objectclass: metaTop
> objectclass: top
> m-oid: 1.3.6.1.4.1.8104.1.1.37
> m-name: versionNumber
> m-description:: dmVyc2lvbk51bWJlciA=
> m-equality: caseIgnoreMatch
> m-substr: caseIgnoreSubstringsMatch
> m-syntax: 1.3.6.1.4.1.1466.115.121.1.15
> m-length: 0
> m-singleValue: TRUE
> I managed to get this LDIF imported into the directory server
> Afterwards, I shutdown (hit Ctrl-C in fact) my directory server.
> When restarting, I get the following exception :
> [11:22:19] ERROR
> [org.apache.directory.shared.ldap.entry.DefaultEntryAttribute] -
> ERR_04131 The value is expected to be a String
> org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException:
> ERR_04131 The value is expected to be a String
> at org.apache.directory.shared.ldap.entry.DefaultEntryAttribute.getString(DefaultEntryAttribute.java:500)
> at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.setSchemaObjectProperties(SchemaEntityFactory.java:1080)
> at org.apache.directory.shared.ldap.schema.loader.ldif.SchemaEntityFactory.getAttributeType(SchemaEntityFactory.java:985)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addAttributeTypes(DefaultSchemaManager.java:731)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.addSchemaObjects(DefaultSchemaManager.java:238)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.load(DefaultSchemaManager.java:684)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadDepsFirst(DefaultSchemaManager.java:1138)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadWithDeps(DefaultSchemaManager.java:1037)
> at org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager.loadAllEnabled(DefaultSchemaManager.java:928)
> at org.apache.directory.server.ApacheDsService.initSchemaLdifPartition(ApacheDsService.java:222)
> at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:154)
> at org.apache.directory.server.UberjarMain.main(UberjarMain.java:58)
> [11:22:19] ERROR [org.apache.directory.server.UberjarMain] - Failed to
> start the service.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.