Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-7006

Rest2Ldap: failures during starting app at Wildfly due to ~config.json no such file or directory


    • Type: Bug
    • Status: Done
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 7.0.0
    • Fix Version/s: Not applicable
    • Component/s: documentation
    • Labels:
    • Environment:
      Linux Mint 19.1, OpenDJ: 7.0.0-SNAPSHOT e041bae9568, WildFly 18.0.1.Final, Rest2LdapGateway 7.0.0-SNAPSHOT, jdk11 (OpenJDK 11.0.6)


      When deploy rest2ldapGateway war file to Wildfly and send request to the endpoint, than WildFly raise error at server.log

      ERROR [org.forgerock.http.servlet.HttpFrameworkServlet] (default task-1) Error while starting the application.: org.forgerock.http.HttpApplicationException: Unable to start Rest2Ldap Http Application due to the configuration error: '/content/opendj-rest2ldap-servlet-7.0.0-SNAPSHOT.war/WEB-INF/classes/config.json (No such file or directory)'
      Caused by: java.io.FileNotFoundException: /content/opendj-rest2ldap-servlet-7.0.0-SNAPSHOT.war/WEB-INF/classes/config.json (No such file or directory)
      	at java.base/java.io.FileInputStream.open0(Native Method)
      	at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
      	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
      	at deployment.opendj-rest2ldap-servlet-7.0.0-SNAPSHOT.war//org.forgerock.opendj.rest2ldap.Rest2LdapJsonConfigurator.readJson(Rest2LdapJsonConfigurator.java:291)
      	at deployment.opendj-rest2ldap-servlet-7.0.0-SNAPSHOT.war//org.forgerock.opendj.rest2ldap.Rest2LdapHttpApplication.start(Rest2LdapHttpApplication.java:237)
      	... 48 more

      More you can see at the file server.log

      I have open PR with creating Wildfly.py to pyforge https://stash.forgerock.org/projects/QA/repos/pyforge/pull-requests/16479 , where is possible to run some tests for set up OpenDJ, wildfly...

      ./run-pybot.py -v -s rest2ldap_group.ReadWildfly OpenDJ

      Steps to reproduce manually:

      1. Download and unzip all thinks
      2. Set up DJ
      3. Change configuration for Wildfly (ports, hostname etc. at Standalone.xml file)
      4. Start Wildfly standalone
      5. Add users with script add-user.sh
      6. Copy war file to ~wildfly/standalone/deployments/*
      7. Wait on war is deployed
      8. Navigate to endpoint via browser (example endpoint: http://localhost:8081/opendj-rest2ldap-servlet-7.0.0-SNAPSHOT/api/read/users/user.0 )

      Request failed with 500 response code, at server.log we can see now error.

      Logs for failed tests on my locale machine: log.html debug.txt server.log


        1. debug.txt
          365 kB
        2. image-2020-06-30-10-17-36-992.png
          40 kB
        3. log.html
          339 kB
        4. server.log
          32 kB

          Issue Links



              • Assignee:
                miroslav.meca Miroslav Meca
                miroslav.meca Miroslav Meca
                Dev Assignee:
                Matthew Swift
                QA Assignee:
                Miroslav Meca
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created: