/*
 */
package org.datadryad.rest.servlet;
import com.sun.jersey.spi.container.servlet.ServletContainer;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import org.apache.log4j.Logger;
import org.dspace.core.ConfigurationManager;

/**
 *
 * @author Dan Leehr <dan.leehr@nescent.org>
 */
public class DryadAPIServletContainer extends ServletContainer {
    private final static Logger log = Logger.getLogger(DryadAPIServletContainer.class);
    @Override
    public void init(ServletConfig config) throws ServletException {
        super.init(config);
        log.info("initializing DryadAPIServletContainer - loading dspace config");
        String configFile = config.getServletContext().getInitParameter("dspace.config");
        ConfigurationManager.loadConfig(configFile);
        log.info("initialized DryadAPIServletContainer");
    }
}

@@ -547,36 +547,8 @@
 n %7B%0A
-        super.init(config);%0A
     
@@ -823,20 +823,156 @@
 ontainer%22);%0A
+        // Must load configFile before initializing, some singletons depend on%0A        // configured DSpace%0A        super.init(config);%0A
     %7D%0A%7D%0A

Load dspace configFile before calling super.init()