Как подружить Payara (GlassFish) с MySQL

164
19 января 2019, 12:00

Всем привет. Пытаюсь сделать свой небольшой pet-проект на Spring Boot с Payara в качестве Web сервера. Создаю Connection Pool по инструкции:

Resource Type: javax.sql.ConnectionPoolDataSource Datasource ClassName оставил по умолчанию: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource

В properties вбил:

serverName: localhost databaseName: test port: 3306 user: root password: root

Делаю ping, выдает:

Ping Connection Pool failed for mysql2. Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource Please check the server.log for more details.

Заметил, что данный класс расположен в другом месте, поменял на: com.mysql.cj.jdbc.MysqlConnectionPoolDataSource

Теперь выдает:

Ping Connection Pool failed for MySQLPool. Connection could not be allocated because: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. Please check the server.log for more details.

В логах такая петрушка:

[2018-09-28T17:07:57.246+0300] [Payara 4.1] [WARNING] [AS-DEPLOYMENT-00011] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=40 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1538143677246] [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:296)
    at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:592)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:461)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:445)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:339)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:93)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:419)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:394)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:269)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:278)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:239)
    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)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:822)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:379)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:220)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:508)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:544)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:540)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:360)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:539)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:570)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:562)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:360)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:561)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1469)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:111)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1851)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1727)
    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
    at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
    at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:483)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:539)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:593)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.crsh.plugin.PluginLifeCycle
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1655)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1501)
    ... 62 more
]]
[2018-09-28T17:07:57.277+0300] [Payara 4.1] [WARNING] [AS-DEPLOYMENT-00011] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=40 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1538143677277] [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:296)
    at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:141)
    at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:638)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:461)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:445)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:339)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:93)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:419)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:394)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:269)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:278)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:239)
    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)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:822)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:379)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:220)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:508)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:544)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:540)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:360)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:539)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:570)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:562)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:360)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:561)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1469)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:111)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1851)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1727)
    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
    at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
    at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:483)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:539)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:593)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.crsh.plugin.PluginLifeCycle
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1655)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1501)
    ... 63 more
]]
[2018-09-28T17:07:57.338+0300] [Payara 4.1] [SEVERE] [] [global] [tid: _ThreadID=40 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1538143677338] [levelValue: 1000] [[
  Class [ org/springframework/hateoas/ResourceSupport ] not found. Error while loading [ class org.springframework.boot.actuate.autoconfigure.EndpointWebMvcHypermediaManagementContextConfiguration$ActuatorEndpointLinksAdvice ]]]
[2018-09-28T17:07:57.646+0300] [Payara 4.1] [WARNING] [AS-DEPLOYMENT-00011] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=40 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1538143677646] [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:296)
    at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:592)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:461)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:445)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:339)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:93)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:419)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:394)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:269)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:278)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:239)
    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)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:822)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:379)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:220)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:508)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:544)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:540)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:360)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:539)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:570)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:562)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:360)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:561)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1469)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:111)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1851)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1727)
    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
    at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
    at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:483)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:539)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:593)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.springframework.batch.core.configuration.annotation.BatchConfigurer
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1655)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1501)
    ... 62 more
]]
[2018-09-28T17:07:57.680+0300] [Payara 4.1] [WARNING] [AS-DEPLOYMENT-00011] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=40 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1538143677680] [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:296)
    at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:141)
    at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:638)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:461)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:445)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:339)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:93)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:419)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:394)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:269)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:278)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:239)
    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)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:822)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:379)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:220)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:508)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:544)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:540)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:360)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:539)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:570)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:562)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:360)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:561)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1469)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:111)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1851)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1727)
    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
    at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
    at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:483)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:539)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:593)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.springframework.batch.core.configuration.annotation.BatchConfigurer
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1655)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1501)
    ... 63 more
]]

Нагуглил, что можно попробовать кинуть mysql-connector-java.jar в папку payara41\glassfish\domains\domain1 - кинул, не помогло. При создании конекшена к БД с такими же настройками непосредственно в IDE все прекрасно работает. Буду признателен если кто подскажет куда копать.

Answer 1

Для решения

java.lang.NoClassDefFoundError: org/crsh/plugin/PluginLifeCycle

добавьте

compile "org.crsh: crsh.site: 1.2.0-cr8" 

в разделе зависимостей в файле build.gradle.

Для решения

java.lang.NoClassDefFoundError: org/springframework/batch/core/configuration/annotation/BatchConfigurer

добавьте зависиость

compile "org.springframework.boot: spring-boot-starter-batch"
Answer 2

В общем проблему решить удалось, и решение оказалось в общем-то банальным - неправильные настройки подключения к MySQL. Если вдруг кому пригодится, завелось со следующими настройками:

Datasource Classname: com.mysql.cj.jdbc.MysqlConnectionPoolDataSource (по умолчанию стоит другой)

В Additional Properties помимо адреса, порта, логина-пароля: useSSL = false allowPublicKeyRetrieval = true serverTimezone = UTC

READ ALSO
Android. Внутренняя память. Данные появляются снова после переустановки

Android. Внутренняя память. Данные появляются снова после переустановки

У меня есть небольшая структура (из 6 текстовых полей примерно + дата), есть база которая содержит эти структурыБаза сохраняется и загружается...

109
Подсветка цифр в массиве

Подсветка цифр в массиве

У меня имеется массив чисел от 0 до 100 с повторениямиДлина массива N>100, например

126
Как передать данные между классами в Java [закрыт]

Как передать данные между классами в Java [закрыт]

Пробую писать программу на Java и столкнулся со следующей проблемой: у меня есть массив данных, который я генерирую в классе1, его нужно передать...

146
Выстроить блок в линию с переносом

Выстроить блок в линию с переносом

Как сделать, чтобы все дочерние элементы block были бы в одну строку, а если они не помещаются по ширине, то переносились бы на следующую, но не каким-то...

156