Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-1954

Second startup of an embedded server fails (after an ungraceful shutdown of the first startup)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0-M14
    • Fix Version/s: 2.0.0-M16
    • Component/s: jdbm
    • Labels:
      None

      Description

      I have created an embedded server based on the code from:

      http://svn.apache.org/repos/asf/directory/sandbox/kayyagari/embedded-sample-trunk/src/main/java/org/apache/directory/seserver/EmbeddedADSVerTrunk.java

      I slimmed it down (removed code for creating partitions/indices) so it only starts a DirectoryService and LdapServer. I will attach the source code of the class.

      The first run goes as expected. Everything runs smooth:

      log4j:WARN No appenders could be found for logger (org.apache.directory.server.core.api.CacheService).
      log4j:WARN Please initialize the log4j system properly.
      log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
      The server is running.

      Then I stop the process by using the square red button in the console window of Eclipse. I will add a screenshot. I think this will kill the JVM, but I am not sure.

      The second run always fails with the following error:

      log4j:WARN No appenders could be found for logger (org.apache.directory.server.core.api.CacheService).
      log4j:WARN Please initialize the log4j system properly.
      log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
      schema partition already exists, skipping schema extraction
      org.apache.directory.api.ldap.model.exception.LdapEntryAlreadyExistsException: ERR_250_ENTRY_ALREADY_EXISTS ou=system already exists!
      at org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition.add(AbstractBTreePartition.java:615)
      at org.apache.directory.server.core.DefaultDirectoryService.initializeSystemPartition(DefaultDirectoryService.java:1770)
      at org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:1827)
      at org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:1253)
      at server.EmbeddedADSVerTrunk.initDirectoryService(EmbeddedADSVerTrunk.java:164)
      at server.EmbeddedADSVerTrunk.<init>(EmbeddedADSVerTrunk.java:178)
      at server.EmbeddedADSVerTrunk.main(EmbeddedADSVerTrunk.java:215)

      The third run will be smooth again.So will the fourth, fifth, etc.

        Attachments

        1. apacheds.log
          1.45 MB
          Hal Deadman
        2. example.zip
          9.45 MB
          Bouke Nijhuis
        3. EmbeddedADSVerTrunkV2.java
          7 kB
          Bouke Nijhuis
        4. after_second_run.png
          100 kB
          Bouke Nijhuis
        5. after_first_run.png
          83 kB
          Bouke Nijhuis
        6. console.png
          93 kB
          Bouke Nijhuis
        7. EmbeddedADSVerTrunk.java
          7 kB
          Bouke Nijhuis

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bouke.nijhuis@gmail.com Bouke Nijhuis
              • Votes:
                7 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated: