Search in sources :

Example 11 with ConfigurationParseException

use of org.jboss.pnc.common.json.ConfigurationParseException in project pnc by project-ncl.

the class UIConfigurationServletJson method init.

@Override
public void init() throws ServletException {
    try {
        UiConfigRest configRest = UiConfigRestBuilder.build(configuration);
        this.uiConfig = JsonOutputConverterMapper.apply(configRest);
    } catch (ConfigurationParseException e) {
        throw new ServletException("Lazy-loading of UI configuration failed because the servlet was not able to fetch the configuration.", e);
    }
}
Also used : ServletException(javax.servlet.ServletException) ConfigurationParseException(org.jboss.pnc.common.json.ConfigurationParseException)

Aggregations

ConfigurationParseException (org.jboss.pnc.common.json.ConfigurationParseException)11 Test (org.junit.Test)7 Consumer (java.util.function.Consumer)5 BuildExecutionStatus (org.jboss.pnc.enums.BuildExecutionStatus)5 Logger (org.slf4j.Logger)5 LoggerFactory (org.slf4j.LoggerFactory)5 BuildDriverException (org.jboss.pnc.spi.builddriver.exception.BuildDriverException)4 HashSet (java.util.HashSet)3 Set (java.util.Set)3 TimeoutException (java.util.concurrent.TimeoutException)3 Inject (javax.inject.Inject)3 Deployment (org.jboss.arquillian.container.test.api.Deployment)3 Arquillian (org.jboss.arquillian.junit.Arquillian)3 Configuration (org.jboss.pnc.common.Configuration)3 ObjectWrapper (org.jboss.pnc.common.util.ObjectWrapper)3 BuildDriverFactory (org.jboss.pnc.executor.servicefactories.BuildDriverFactory)3 EnvironmentDriverFactory (org.jboss.pnc.executor.servicefactories.EnvironmentDriverFactory)3 RepositoryManagerFactory (org.jboss.pnc.executor.servicefactories.RepositoryManagerFactory)3 TestProjectConfigurationBuilder (org.jboss.pnc.mock.model.builders.TestProjectConfigurationBuilder)3 BuildConfiguration (org.jboss.pnc.model.BuildConfiguration)3