title: java.lang.NoSuchFieldError: parallelCapableClassLoaderAvailable
body: <p>hi it's me again i have now this error when launching my app : </p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoSuchFieldError: parallelCapableClassLoaderAvailable
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1717) ~[spring-beans-5.0.0.RC2.jar:5.0.0.RC2]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:581) ~[spring-beans-5.0.0.RC2.jar:5.0.0.RC2]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.0.0.RC2.jar:5.0.0.RC2]
          at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:305) ~[spring-beans-5.0.0.RC2.jar:5.0.0.RC2]
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:233) ~[spring-beans-5.0.0.RC2.jar:5.0.0.RC2]
          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:303) ~[spring-beans-5.0.0.RC2.jar:5.0.0.RC2]
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[spring-beans-5.0.0.RC2.jar:5.0.0.RC2]
          at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1078) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:857) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
          at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
          at com.o2xp.ats.accountManager.test.App.main(App.java:42) [classes/:na]
      Caused by: java.lang.NoSuchFieldError: parallelCapableClassLoaderAvailable
          at org.springframework.instrument.classloading.SimpleThrowawayClassLoader.&lt;clinit&gt;(SimpleThrowawayClassLoader.java:34) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
          at org.springframework.orm.jpa.persistenceunit.SpringPersistenceUnitInfo.getNewTempClassLoader(SpringPersistenceUnitInfo.java:90) ~[spring-orm-4.3.9.RELEASE.jar:4.3.9.RELEASE]
          at org.hibernate.jpa.boot.internal.PersistenceUnitInfoDescriptor.getTempClassLoader(PersistenceUnitInfoDescriptor.java:78) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
          at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.populate(EntityManagerFactoryBuilderImpl.java:765) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
          at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.&lt;init&gt;(EntityManagerFactoryBuilderImpl.java:186) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
          at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.&lt;init&gt;(EntityManagerFactoryBuilderImpl.java:149) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
          at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:54) ~[spring-orm-4.3.9.RELEASE.jar:4.3.9.RELEASE]
          at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:353) ~[spring-orm-4.3.9.RELEASE.jar:4.3.9.RELEASE]
          at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:370) ~[spring-orm-4.3.9.RELEASE.jar:4.3.9.RELEASE]
          at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:359) ~[spring-orm-4.3.9.RELEASE.jar:4.3.9.RELEASE]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1774) ~[spring-beans-5.0.0.RC2.jar:5.0.0.RC2]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1713) ~[spring-beans-5.0.0.RC2.jar:5.0.0.RC2]
          ... 15 common frames omitted
  </code></pre>
  
  <p>I can't find why, I precise that is a maven project with modules, so I put all dependencies in the parent module pom file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
     &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;   
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
             &lt;plugin&gt;
                &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;  
                &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
             &lt;/plugin&gt;
         &lt;/plugins&gt;
     &lt;/build&gt;
    &lt;packaging&gt;pom&lt;/packaging&gt;
    &lt;groupId&gt;com.o2xp&lt;/groupId&gt;
    &lt;artifactId&gt;ats-impl&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;ats-impl&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
    &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
    &lt;/properties&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;4.12&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.mockito&lt;/groupId&gt;
          &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;
          &lt;version&gt;1.9.5&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-context-support&lt;/artifactId&gt;
        &lt;version&gt;4.3.9.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
        &lt;version&gt;4.3.9.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
        &lt;version&gt;4.3.9.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
        &lt;version&gt;LATEST&lt;/version&gt;
        &lt;scope&gt;4.3.9.RELEASE&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
        &lt;version&gt;1.5.4.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.h2database&lt;/groupId&gt;
        &lt;artifactId&gt;h2&lt;/artifactId&gt;
        &lt;version&gt;LATEST&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
        &lt;version&gt;1.5.4.RELEASE&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot&lt;/artifactId&gt;
          &lt;version&gt;1.5.4.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.mapstruct&lt;/groupId&gt;
          &lt;artifactId&gt;mapstruct-processor&lt;/artifactId&gt;
          &lt;version&gt;1.1.0.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;io.github.jhipster&lt;/groupId&gt;
          &lt;artifactId&gt;jhipster&lt;/artifactId&gt;
          &lt;version&gt;1.1.6&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
     &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-releases&lt;/id&gt;
              &lt;name&gt;Spring Releases&lt;/name&gt;
              &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;org.jboss.repository.releases&lt;/id&gt;
              &lt;name&gt;JBoss Maven Release Repository&lt;/name&gt;
              &lt;url&gt;https://repository.jboss.org/nexus/content/repositories/releases&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-milestone&lt;/id&gt;
              &lt;name&gt;Spring Milestone Repository&lt;/name&gt;
              &lt;url&gt;https://repo.spring.io/milestone&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
              &lt;id&gt;spring-releases&lt;/id&gt;
              &lt;name&gt;Spring Releases&lt;/name&gt;
              &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt;
          &lt;/pluginRepository&gt;
      &lt;/pluginRepositories&gt;
    &lt;modules&gt;
      &lt;module&gt;ats-application-context&lt;/module&gt;
      &lt;module&gt;ats-notice-manager&lt;/module&gt;
      &lt;module&gt;ats-common&lt;/module&gt;
      &lt;module&gt;ats-accountManager&lt;/module&gt;
    &lt;/modules&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>And here is my app class:</p>
  
  <pre><code>package com.o2xp.ats.accountManager.test;
  
  import java.util.ArrayList;
  
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  import org.springframework.boot.CommandLineRunner;
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.boot.autoconfigure.domain.EntityScan;
  import org.springframework.context.annotation.Bean;
  import org.springframework.context.annotation.ComponentScan;
  import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
  
  import com.o2xp.ats.accountManager.services.ti.ApplicantService;
  import com.o2xp.ats.accountManager.to.ApplicantTO;
  import com.o2xp.ats.accountManager.to.JobExperienceTO;
  import com.o2xp.ats.api.common.DomainIdentifier;
  import com.o2xp.ats.common.services.ti.CategoryService;
  import com.o2xp.ats.common.services.ti.DomainService;
  import com.o2xp.ats.common.services.ti.LocationService;
  import com.o2xp.ats.common.services.ti.SkillService;
  import com.o2xp.ats.common.to.CategoryTO;
  import com.o2xp.ats.common.to.DomainTO;
  import com.o2xp.ats.common.to.LocationTO;
  import com.o2xp.ats.common.to.SkillTO;
  
  /**
   * Hello world!
   *
   */
  @SpringBootApplication
  @ComponentScan({ "com.o2xp.ats.common.domain", "com.o2xp.ats.common.services", "com.o2xp.ats.common.mapper",
          "com.o2xp.ats.accountManager.services", "com.o2xp.ats.accountManager.mapper",
          "com.o2xp.ats.accountManager.domain" })
  @EnableJpaRepositories({ "com.o2xp.ats.common.repository", "com.o2xp.ats.accountManager.repository" })
  @EntityScan({ "com.o2xp.ats.common.domain", "com.o2xp.ats.accountManager.domain" })
  public class App {
      private static final Logger log = LoggerFactory.getLogger(App.class);
  
      public static void main(String[] args) {
          SpringApplication.run(App.class);
      }
  
      @Bean
      public CommandLineRunner demo(CategoryService categoryService, SkillService skillService,
              LocationService locationService, ApplicantService applicantService, DomainService domainService) {
          return (args) -&gt; {
  
              DomainIdentifier dI1 = new DomainIdentifier((long) 1, "DevOps");
              DomainIdentifier dI2 = new DomainIdentifier((long) 2, "RH");
  
              DomainTO d1 = (DomainTO) domainService.save(new DomainTO(dI1));
              DomainTO d2 = (DomainTO) domainService.save(new DomainTO(dI2));
  
              ApplicantTO a1 = (ApplicantTO) applicantService.save(new ApplicantTO((long) 1, "Nahmias", "Vincent",
                      "sdfgs@gmail.com", "040511kev", new ArrayList&lt;LocationTO&gt;(), false, false, false, false, false, 0,
                      d2, new ArrayList&lt;CategoryTO&gt;(), new ArrayList&lt;SkillTO&gt;(), new ArrayList&lt;JobExperienceTO&gt;()));
              a1 = (ApplicantTO) applicantService.addDomain("DevOps", a1.getId());
  
              // System.out.println(a1.getDomain());
              System.out.println(applicantService.getAllApplicants());
  
          };
      }
  }
  </code></pre>
  
  <p>I think the problem comes from pom, but I can't find where.</p>