[
https://issues.apache.org/jira/browse/DIRSERVER-2256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16675462#comment-16675462
]
Emmanuel Lecharny commented on DIRSERVER-2256:
----------------------------------------------
Crap... The schema reader, which is not schema aware - should it be at this
point ? I think so - considers that because the attribute is "creatorsName::
<blah>", it's a binary attribute, and fails.
There are three things that should be done here :
* first, keep the DN as it should be ({{uid=admin,ou=system}}) - ie, not as a
normalized form, it makes no sense -
* second, use a schema aware schema loader. We should be able to process the
fact that the attributeType can be a String but still encoded as LDIF using
{{::}} (typically something we should expect when using {{UTF-8}} chars)
* third, don't tag an attributeType as binary simply because we used a {{::}}
in the LDIF file. It's a semantic choice, not a lexical one.byt default {{::}}
does not imply binary...
> Schema Import - ERR_13215_VALUE_EXPECT_STRING
> ---------------------------------------------
>
> Key: DIRSERVER-2256
> URL: https://issues.apache.org/jira/browse/DIRSERVER-2256
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: schema
> Affects Versions: 2.0.0.AM25
> Environment: Windows 7, jre1.8.0_131, DS 2.0.0.AM25, Studio
> 2.0.0.v20180908-M14
> Reporter: Stefan Humbold
> Priority: Major
> Attachments: test.ldif
>
>
> The new Apache DS-Server 2.0.0.AM25 makes problems when we try to import our
> schema file (was not a problem so far).
> Importing a new schema-file in ldif-format don't generates errors.
> But when we try to restart the server then the server won't start up and we
> see the following exceptions in the log file:
> [17:07:23] INFO [org.apache.directory.server.UberjarMain] - Starting the
> service.
> [17:07:23] ERROR [org.apache.directory.api.ldap.model.entry.DefaultAttribute]
> - ERR_13215_VALUE_EXPECT_STRING The value is expected to be a String
> [17:07:23] ERROR
> [org.apache.directory.api.ldap.schema.loader.LdifSchemaLoader] -
> ERR_16009_LDIF_LOAD_FAIL Failed to load schema LDIF file cn=test.ldif
> org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException:
> ERR_13215_VALUE_EXPECT_STRING The value is expected to be a String
> at
> org.apache.directory.api.ldap.model.entry.DefaultAttribute.getString(DefaultAttribute.java:517)
> at
> org.apache.directory.api.ldap.model.schema.registries.AbstractSchemaLoader.getSchema(AbstractSchemaLoader.java:171)
> at
> org.apache.directory.api.ldap.schema.loader.LdifSchemaLoader.initializeSchemas(LdifSchemaLoader.java:141)
> at
> org.apache.directory.api.ldap.schema.loader.LdifSchemaLoader.<init>(LdifSchemaLoader.java:111)
> at
> org.apache.directory.server.ApacheDsService.initSchemaManager(ApacheDsService.java:288)
> at
> org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:183)
> at
> org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:152)
> at org.apache.directory.server.UberjarMain.start(UberjarMain.java:151)
> at org.apache.directory.server.UberjarMain.main(UberjarMain.java:77)
> [17:07:23] ERROR [org.apache.directory.server.UberjarMain] - Failed to start
> the service.
> org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException:
> ERR_13215_VALUE_EXPECT_STRING The value is expected to be a String
> at
> org.apache.directory.api.ldap.model.entry.DefaultAttribute.getString(DefaultAttribute.java:517)
> at
> org.apache.directory.api.ldap.model.schema.registries.AbstractSchemaLoader.getSchema(AbstractSchemaLoader.java:171)
> at
> org.apache.directory.api.ldap.schema.loader.LdifSchemaLoader.initializeSchemas(LdifSchemaLoader.java:141)
> at
> org.apache.directory.api.ldap.schema.loader.LdifSchemaLoader.<init>(LdifSchemaLoader.java:111)
> at
> org.apache.directory.server.ApacheDsService.initSchemaManager(ApacheDsService.java:288)
> at
> org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:183)
> at
> org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:152)
> at org.apache.directory.server.UberjarMain.start(UberjarMain.java:151)
> at org.apache.directory.server.UberjarMain.main(UberjarMain.java:77)
> [17:07:23] INFO [org.apache.directory.server.UberjarMain] - Stopping the
> service.
> [17:07:23] ERROR [org.apache.directory.server.UberjarMain] - Failed to start
> the service.
> java.lang.NullPointerException
> at
> org.apache.directory.server.ApacheDsService.stop(ApacheDsService.java:634)
> at org.apache.directory.server.UberjarMain.stop(UberjarMain.java:216)
> at org.apache.directory.server.UberjarMain.start(UberjarMain.java:158)
> at org.apache.directory.server.UberjarMain.main(UberjarMain.java:77)
>
> I could reproduce the errors with a very simple schema-file (test.ldif) -
> only one new attribute and one new objectclass.
> I think, the problem ist in the generated file called cn=test.ldif
> (...\partitions\schema\ou=schema\cn=test.ldif )
> In this file, the creatorsName ist set to "0.9.2342.19200300.100.1.1= admin
> ,2.5.4.11= system"
> creatorsName::
> MC45LjIzNDIuMTkyMDAzMDAuMTAwLjEuMT0gYWRtaW4gLDIuNS40LjExPSBzeXN0Z
> W0g
> When i manually change the creatorsName uid=admin,ou=system (like in the
> other lidf-schema-files) then the server starts again.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)