Stack Exchange
Ошибка при запуске Spring Boot приложения
Пытайюсь задеплоить приложение Spring Boot на Payara.
Вот что получаеться в итоге:
[2017-08-21 12:02:12,725] Artifact Gradle : library-0.0.1-SNAPSHOT.war (exploded): Artifact is being deployed, please wait...
[2017-08-21 12:02:48,102] Artifact Gradle : library-0.0.1-SNAPSHOT.war (exploded): Error during artifact deployment. See server log for details.
[2017-08-21 12:02:48,103] Artifact Gradle : library-0.0.1-SNAPSHOT.war (exploded): java.io.IOException: com.sun.enterprise.admin.remote.RemoteFailureException: Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/JndiDataSourceAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.jdbc.datasource.lookup.DataSourceLookupFailureException: Failed to look up JNDI DataSource with name 'jdbc/Library'; nested exception is javax.naming.NamingException: Lookup failed for 'jdbc/Library' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: Library not found]. Please see server.log for more details.

Логи:
Class [ com/querydsl/core/types/Expression ] not found. Error while loading [ class org.springframework.data.jpa.repository.support.QueryDslRepositorySupport ]]]

[2017-08-21T00:02:29.311+0300] [Payara 4.1] [WARNING] [AS-DEPLOYMENT-00011] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=45 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1503262949311] [levelValue: 900] [[
  Error in annotation processing: {0}.
java.lang.NoClassDefFoundError: org/crsh/plugin/PluginLifeCycle
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1089)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1620)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1501)
    at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:297)
    at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:586)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:463)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:447)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:335)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:93)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:421)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
    at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
    at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:199)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:223)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:91)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:882)
[2017-08-21T00:02:29.417+0300] [Payara 4.1] [WARNING] [AS-DEPLOYMENT-00011] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=45 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1503262949417] [levelValue: 900] [[
  Error in annotation processing: {0}.
java.lang.NoClassDefFoundError: org/crsh/plugin/PluginLifeCycle
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1089)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1620)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1501)
    at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:297)
    at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:133)
    at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:627)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:463)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:447)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:335)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:93)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:421)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
    at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
    at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:199)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:223)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:91)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:882)
  Class [ org/springframework/hateoas/ResourceSupport ] not found. Error while loading [ class org.springframework.boot.actuate.autoconfigure.EndpointWebMvcHypermediaManagementContextConfiguration$ActuatorEndpointLinksAdvice ]]]

[2017-08-21T00:02:30.060+0300] [Payara 4.1] [WARNING] [AS-DEPLOYMENT-00011] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=45 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1503262950060] [levelValue: 900] [[
  Error in annotation processing: {0}.
java.lang.NoClassDefFoundError: org/springframework/batch/core/configuration/annotation/BatchConfigurer
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1089)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1620)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1501)
    at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:297)
    at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:586)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:463)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:447)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:335)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:93)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:421)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
    at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
    at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:199)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:223)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:91)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:882)
[2017-08-21T00:02:30.112+0300] [Payara 4.1] [WARNING] [AS-DEPLOYMENT-00011] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=45 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1503262950112] [levelValue: 900] [[
  Error in annotation processing: {0}.
java.lang.NoClassDefFoundError: org/springframework/batch/core/configuration/annotation/BatchConfigurer
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1089)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1620)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1501)
    at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:297)
    at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:133)
    at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:627)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:463)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:447)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:335)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:93)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:421)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
    at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
    at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:199)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:223)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:91)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:882)
  Class [ liquibase/integration/spring/SpringLiquibase ] not found. Error while loading [ class org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration$LiquibaseConfiguration ]]]

[2017-08-21T00:02:30.239+0300] [Payara 4.1] [SEVERE] [] [global] [tid: _ThreadID=45 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1503262950239] [levelValue: 1000] [[
  Class [ Lgroovy/text/markup/MarkupTemplateEngine; ] not found. Error while loading [ class org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAutoConfiguration$GroovyMarkupConfiguration ]]]

[2017-08-21T00:02:30.282+0300] [Payara 4.1] [SEVERE] [] [global] [tid: _ThreadID=45 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1503262950282] [levelValue: 1000] [[
  Class [ org/thymeleaf/spring4/templateresolver/SpringResourceTemplateResolver ] not found. Error while loading [ class org.springframework.boot.autoconfigure.thymeleaf.AbstractTemplateResolverConfiguration ]]]

  Class [ com/samskivert/mustache/Mustache$Collector ] not found. Error while loading [ class org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration ]]]

[2017-08-21T00:02:30.398+0300] [Payara 4.1] [SEVERE] [] [global] [tid: _ThreadID=45 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1503262950398] [levelValue: 1000] [[
  Class [ org/springframework/ldap/core/ContextSource ] not found. Error while loading [ class org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLdapAutoConfiguration ]]]

[2017-08-21T00:02:30.412+0300] [Payara 4.1] [SEVERE] [] [global] [tid: _ThreadID=45 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1503262950412] [levelValue: 1000] [[
  Class [ org/flywaydb/core/Flyway ] not found. Error while loading [ class org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration ]]]

[2017-08-21T00:02:30.528+0300] [Payara 4.1] [SEVERE] [] [global] [tid: _ThreadID=45 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1503262950528] [levelValue: 1000] [[
  Class [ org/springframework/mail/javamail/JavaMailSenderImpl ] not found. Error while loading [ class org.springframework.boot.autoconfigure.mail.MailSenderValidatorAutoConfiguration ]]]

[2017-08-21T00:02:30.563+0300] [Payara 4.1] [SEVERE] [] [global] [tid: _ThreadID=45 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1503262950563] [levelValue: 1000] [[
  Class [ Lcom/mongodb/MongoClientOptions; ] not found. Error while loading [ class org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration ]]]

[2017-08-21T00:02:31.571+0300] [Payara 4.1] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=45 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1503262951571] [levelValue: 900] [[
  The web application [unknown] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.]]

Gradle: 
buildscript {
    ext {
        springBootVersion = '1.5.6.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'war'
apply plugin: 'org.springframework.boot'

war {
    baseName = 'library'
    version = '0.0.1-SNAPSHOT'
}



sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
    mavenCentral()
}



ext['hibernate.version'] = '5.2.3.Final'

configurations {
    providedRuntime

    compile.exclude module: 'spring-boot-starter-tomcat'// исключаем Tomcat, т.к. мы используем GlassFish

}

dependencies {
    compile('org.springframework.boot:spring-boot-starter-actuator')
    compile('org.springframework.boot:spring-boot-starter-aop')
    compile('org.springframework.boot:spring-boot-starter-data-jpa')
    compile('org.springframework.boot:spring-boot-starter-security')
    compile('org.springframework.boot:spring-boot-starter-web')
    compileOnly('org.projectlombok:lombok')

    compile ('com.google.guava:guava:+')

    compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.13'
    compileOnly 'javax:javaee-api:7.0'
}

Помогите, пожалуйста, решить проблему
Ошибка при попытки вытащить из базы: 
  Class [ com/querydsl/core/types/Expression ] not found. Error while loading [ class org.springframework.data.jpa.repository.support.QueryDslRepositorySupport ]]]

[2017-08-21T01:16:34.771+0300] [Payara 4.1] [WARNING] [AS-DEPLOYMENT-00011] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1503267377773] [timeMillis: 1503267394771] [levelValue: 900] [[
  Error in annotation processing: {0}.
java.lang.NoClassDefFoundError: org/crsh/plugin/PluginLifeCycle
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1089)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1620)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1501)
    at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:297)
    at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:586)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:463)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:447)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:335)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:93)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:421)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
    at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
    at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:199)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:223)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:91)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:882)
[2017-08-21T01:16:34.819+0300] [Payara 4.1] [WARNING] [AS-DEPLOYMENT-00011] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1503267377773] [timeMillis: 1503267394819] [levelValue: 900] [[
  Error in annotation processing: {0}.
java.lang.NoClassDefFoundError: org/crsh/plugin/PluginLifeCycle
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1089)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1620)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1501)
    at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:297)
    at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:133)
    at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:627)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:463)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:447)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:335)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:93)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:421)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
    at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
    at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:199)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:223)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:91)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:882)
  Class [ org/springframework/hateoas/ResourceSupport ] not found. Error while loading [ class org.springframework.boot.actuate.autoconfigure.EndpointWebMvcHypermediaManagementContextConfiguration$ActuatorEndpointLinksAdvice ]]]

[2017-08-21T01:16:35.288+0300] [Payara 4.1] [WARNING] [AS-DEPLOYMENT-00011] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1503267377773] [timeMillis: 1503267395288] [levelValue: 900] [[
  Error in annotation processing: {0}.
java.lang.NoClassDefFoundError: org/springframework/batch/core/configuration/annotation/BatchConfigurer
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1089)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1620)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1501)
    at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:297)
    at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:586)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:463)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:447)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:335)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:93)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:421)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
    at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
    at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:199)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:223)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:91)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:882)
[2017-08-21T01:16:35.320+0300] [Payara 4.1] [WARNING] [AS-DEPLOYMENT-00011] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1503267377773] [timeMillis: 1503267395320] [levelValue: 900] [[
  Error in annotation processing: {0}.
java.lang.NoClassDefFoundError: org/springframework/batch/core/configuration/annotation/BatchConfigurer
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1089)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1620)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1501)
    at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:297)
    at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:133)
    at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:627)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:463)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:447)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:335)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:93)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:421)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
    at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
    at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:199)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:223)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:91)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:882)
  Class [ org/springframework/ldap/core/ContextSource ] not found. Error while loading [ class org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLdapAutoConfiguration ]]]

[2017-08-21T01:16:35.746+0300] [Payara 4.1] [SEVERE] [] [global] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1503267377773] [timeMillis: 1503267395746] [levelValue: 1000] [[
  Class [ Lcom/mongodb/MongoClientOptions; ] not found. Error while loading [ class org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration ]]]

[2017-08-21T01:16:35.765+0300] [Payara 4.1] [SEVERE] [] [global] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1503267377773] [timeMillis: 1503267395765] [levelValue: 1000] [[
  Class [ org/thymeleaf/spring4/templateresolver/SpringResourceTemplateResolver ] not found. Error while loading [ class org.springframework.boot.autoconfigure.thymeleaf.AbstractTemplateResolverConfiguration ]]]

[2017-08-21T01:16:35.793+0300] [Payara 4.1] [SEVERE] [] [global] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1503267377773] [timeMillis: 1503267395793] [levelValue: 1000] [[
  Class [ org/flywaydb/core/Flyway ] not found. Error while loading [ class org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$FlywayConfiguration ]]]

[2017-08-21T01:16:35.819+0300] [Payara 4.1] [SEVERE] [] [global] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1503267377773] [timeMillis: 1503267395819] [levelValue: 1000] [[
  Class [ com/samskivert/mustache/Mustache$Collector ] not found. Error while loading [ class org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration ]]]

[2017-08-21T01:16:35.844+0300] [Payara 4.1] [SEVERE] [] [global] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1503267377773] [timeMillis: 1503267395844] [levelValue: 1000] [[
  Class [ Lgroovy/text/markup/MarkupTemplateEngine; ] not found. Error while loading [ class org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAutoConfiguration$GroovyMarkupConfiguration ]]]

[2017-08-21T01:16:35.855+0300] [Payara 4.1] [SEVERE] [] [global] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1503267377773] [timeMillis: 1503267395855] [levelValue: 1000] [[
  Class [ liquibase/integration/spring/SpringLiquibase ] not found. Error while loading [ class org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration$LiquibaseConfiguration ]]]


В JNDI не определено имя "jdbc/Library".

@SergeyGornostaev спасибо, задеплоилось, но когда пытаюсь вытащить данные из таблицы вылазит ошибка. Описал ее в задании

Первые же результаты в Google по вашей ошибке ведут на баг Glassfish. Видимо, Payara его унаследовал. Всем столкнувшимся с этой ошибкой, дают две рекомендации - обновить сервер до последней версии и положить в WEB-INF/classes/META-INF файл beans.xml с содержимым
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
          http://java.sun.com/xml/ns/javaee http://docs.jboss.org/cdi/beans_1_0.xsd"
    bean-discovery-mode="none">
    <scan>
        <exclude name="org.springframework.**" />
        <exclude name="org.apache.**" />
        <exclude name="com.google.**" />
    </scan>
</beans>

