Discussion:
[jira] [Created] (DIRSERVER-2256) Schema Import - ERR_13215_VALUE_EXPECT_STRING
Stefan Humbold (JIRA)
2018-11-05 16:32:00 UTC
Permalink
Stefan Humbold created DIRSERVER-2256:
-----------------------------------------

Summary: 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
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)
Emmanuel Lecharny (JIRA)
2018-11-05 17:01:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/DIRSERVER-2256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16675429#comment-16675429 ]

Emmanuel Lecharny commented on DIRSERVER-2256:
----------------------------------------------

I confirm that the server cannot restarts after having loaded the schema. I'm inverstigating.
Post by Stefan Humbold (JIRA)
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.
[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)
Emmanuel Lecharny (JIRA)
2018-11-05 17:35:00 UTC
Permalink
[ 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...
Post by Stefan Humbold (JIRA)
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.
[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)
Emmanuel Lecharny (JIRA)
2018-11-05 22:48:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/DIRSERVER-2256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16675842#comment-16675842 ]

Emmanuel Lecharny commented on DIRSERVER-2256:
----------------------------------------------

So we can't really use a schema aware ldif loader while initializing... the schema !
Post by Stefan Humbold (JIRA)
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.
[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)
Emmanuel Lecharny (JIRA)
2018-11-06 00:35:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/DIRSERVER-2256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16675925#comment-16675925 ]

Emmanuel Lecharny commented on DIRSERVER-2256:
----------------------------------------------

Ok, I have a fix: the {{getString()}} method will try to convert the {{byte[]}} to a String if the {{DefaultAttribute}} is not schema aware.

Now, I wonder why the stored ldif file contains a base64 encoded {{creatorsName}} attribute value to start with. Investigating that atm...
Post by Stefan Humbold (JIRA)
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.
[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)
Emmanuel Lecharny (JIRA)
2018-11-06 00:57:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/DIRSERVER-2256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16675948#comment-16675948 ]

Emmanuel Lecharny commented on DIRSERVER-2256:
----------------------------------------------

Ok, the {{LdifUtils.convertToLdif}} method does not properly check the attribute it has to encode. typically, we have an attribute which value is a DN, and that should be encoded as a String, and isn't because it's considered as not H-R. This might be improved.

Note that this will not solve the initial problem (the previous fix is going to fix it), but it's the way to process the value no matter what.

I'll get it patched tomorrow.
Post by Stefan Humbold (JIRA)
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.
[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)
Emmanuel Lecharny (JIRA)
2018-11-06 04:38:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/DIRSERVER-2256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16676122#comment-16676122 ]

Emmanuel Lecharny commented on DIRSERVER-2256:
----------------------------------------------

Never mind. The {{LdifUtils.convertToLdif}} method is correct. The value is base64 encoded because we use the normalized form of the DN, and it ends with a space - which need to be kept -.
Post by Stefan Humbold (JIRA)
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.
[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)
Emmanuel Lecharny (JIRA)
2018-11-10 08:12:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/DIRAPI-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny updated DIRAPI-326:
-------------------------------------
Affects Version/s: (was: 2.0.0.AM25)
2.0.0.AM2
Component/s: (was: schema)
Key: DIRAPI-326 (was: DIRSERVER-2256)
Project: Directory Client API (was: Directory ApacheDS)
Post by Stefan Humbold (JIRA)
Schema Import - ERR_13215_VALUE_EXPECT_STRING
---------------------------------------------
Key: DIRAPI-326
URL: https://issues.apache.org/jira/browse/DIRAPI-326
Project: Directory Client API
Issue Type: Bug
Affects Versions: 2.0.0.AM2
Environment: Windows 7, jre1.8.0_131, DS 2.0.0.AM25, Studio 2.0.0.v20180908-M14
Reporter: Stefan Humbold
Priority: Major
Fix For: 2.0.0.AM3
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.
[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)
Emmanuel Lecharny (JIRA)
2018-11-10 08:12:00 UTC
Permalink
[ https://issues.apache.org/jira/browse/DIRAPI-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny resolved DIRAPI-326.
--------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0.AM3

Fixed with commit 6f9b6506290a76b82825079fe198245136821011
Post by Stefan Humbold (JIRA)
Schema Import - ERR_13215_VALUE_EXPECT_STRING
---------------------------------------------
Key: DIRAPI-326
URL: https://issues.apache.org/jira/browse/DIRAPI-326
Project: Directory Client API
Issue Type: Bug
Affects Versions: 2.0.0.AM2
Environment: Windows 7, jre1.8.0_131, DS 2.0.0.AM25, Studio 2.0.0.v20180908-M14
Reporter: Stefan Humbold
Priority: Major
Fix For: 2.0.0.AM3
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.
[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)

Loading...