I'm running a docker image of Wildfly, it seems to be starting properly since no errors are showing until it starts deploying an ear that uses apache log4j, commons and lombok. I don't know why, but I expected them to be included in the ear or war files; since they were included in the pom dependencies.
I've been able to fix it by include the missing jars inside the modules\system\layers\base wildfly folder; But as far as I know it shouldn't be necessary since I want to use the docker files that you can read below.
When it starts deploying it fails and throws this error:
wildfly | 20:39:46,793 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0001: /content/SIC.ear/org.co.oengin-SIC-WEB-3.1.war/WEB-INF/jboss-deployment-structure.xml in subdeployment ignored. jboss-deployment-structure.xml is only parsed for top level deployments.
wildfly | 20:39:46,800 INFO [org.jboss.as.pojo] (MSC service thread 1-4) WFLYPOJO0001: Found legacy bean/pojo namespace: urn:jboss:bean-deployer:2.0 - might be missing some xml features (potential exceptions).
wildfly | 20:39:46,807 INFO [org.jboss.as.jpa] (MSC service thread 1-4) WFLYJPA0002: Read persistence.xml for Portal-PersistenceUnit
wildfly | 20:39:46,810 INFO [org.jboss.as.jpa] (MSC service thread 1-7) WFLYJPA0002: Read persistence.xml for SIC-PersistenceUnit
wildfly | 20:39:46,965 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 74) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'SIC.ear#Portal-PersistenceUnit'
wildfly | 20:39:46,966 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 74) HHH000204: Processing PersistenceUnitInfo [
wildfly | name: Portal-PersistenceUnit
wildfly | ...]
wildfly | 20:39:46,966 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 28) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'SIC.ear/org.co.oengin-SIC-Persistence-3.1.jar#SIC-PersistenceUnit'
wildfly | 20:39:46,967 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 28) HHH000204: Processing PersistenceUnitInfo [
wildfly | name: SIC-PersistenceUnit
wildfly | ...]
wildfly | 20:39:46,967 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) WFLYWELD0003: Processing weld deployment SIC.ear
wildfly | 20:39:47,027 INFO [org.jboss.weld.deployer] (MSC service thread 1-7) WFLYWELD0003: Processing weld deployment org.co.oengin-SIC-EPOS-INTEGRATION-3.1.jar
wildfly | 20:39:47,032 WARN [org.jboss.modules.define] (MSC service thread 1-8) Failed to define class org.co.oengin.utils.web.jsf.JSFBaseBean in Module "ingeneo.utils.fyl-web" from local module loader #4470fbd6 (finder: local module finder #15d49048 (roots: /opt/jboss/wildfly/modules,/opt/jboss/wildfly/modules/system/layers/base)): org.jboss.modules.ModuleLoadError: org.lombok
wildfly | at org.jboss.modules.Module.addExportedPaths(Module.java:1417)
wildfly | at org.jboss.modules.Module.addPaths(Module.java:1295)
wildfly | at org.jboss.modules.Module.link(Module.java:1622)
wildfly | at org.jboss.modules.Module.getPaths(Module.java:1583)
wildfly | at org.jboss.modules.Module.getPathsUnchecked(Module.java:1606)
wildfly | at org.jboss.modules.Module.loadModuleClass(Module.java:726)
wildfly | at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
wildfly | at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
wildfly | at java.base/java.lang.ClassLoader.defineClass1(Native Method)
wildfly | at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
wildfly | at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:423)
wildfly | at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
wildfly | at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
wildfly | at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
wildfly | at org.jboss.modules.Module.loadModuleClass(Module.java:731)
wildfly | at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
wildfly | at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
wildfly | at java.base/java.lang.ClassLoader.defineClass1(Native Method)
wildfly | at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
wildfly | at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1096)
wildfly | at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
wildfly | at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
wildfly | at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
wildfly | at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
wildfly | at org.jboss.modules.Module.loadModuleClass(Module.java:731)
wildfly | at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
wildfly | at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
wildfly | at java.base/java.lang.ClassLoader.defineClass1(Native Method)
wildfly | at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
wildfly | at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1096)
wildfly | at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
wildfly | at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
wildfly | at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
wildfly | at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
wildfly | at org.jboss.modules.Module.loadModuleClass(Module.java:731)
wildfly | at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
wildfly | at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
wildfly | at org.jboss.as.jsf#16.0.0.Final//org.jboss.as.jsf.deployment.JSFComponentProcessor.deploy(JSFComponentProcessor.java:105)
wildfly | at org.jboss.as.server#8.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
wildfly | at org.jboss.msc#1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
wildfly | at org.jboss.msc#1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
wildfly | at org.jboss.msc#1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
wildfly | at org.jboss.threads#2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
wildfly | at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
wildfly | at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
wildfly | at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
wildfly | at java.base/java.lang.Thread.run(Thread.java:834)
wildfly |
wildfly | 20:39:47,032 WARN [org.jboss.modules.define] (MSC service thread 1-8) Failed to define class org.co.oengin.cim.web.util.JSFBaseBeanSIC in Module "deployment.SIC.ear.org.co.oengin-SIC-WEB-3.1.war" from Service Module Loader: org.jboss.modules.ModuleLoadError: org.lombok
wildfly | at org.jboss.modules.Module.addExportedPaths(Module.java:1417)
wildfly | at org.jboss.modules.Module.addPaths(Module.java:1295)
wildfly | at org.jboss.modules.Module.link(Module.java:1622)
wildfly | at org.jboss.modules.Module.getPaths(Module.java:1583)
wildfly | at org.jboss.modules.Module.getPathsUnchecked(Module.java:1606)
wildfly | at org.jboss.modules.Module.loadModuleClass(Module.java:726)
wildfly | at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
wildfly | at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
wildfly | at java.base/java.lang.ClassLoader.defineClass1(Native Method)
wildfly | at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
wildfly | at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:423)
wildfly | at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
wildfly | at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
wildfly | at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
wildfly | at org.jboss.modules.Module.loadModuleClass(Module.java:731)
wildfly | at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
wildfly | at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
wildfly | at java.base/java.lang.ClassLoader.defineClass1(Native Method)
wildfly | at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
wildfly | at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1096)
wildfly | at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
wildfly | at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
wildfly | at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
wildfly | at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
wildfly | at org.jboss.modules.Module.loadModuleClass(Module.java:731)
wildfly | at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
wildfly | at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
wildfly | at java.base/java.lang.ClassLoader.defineClass1(Native Method)
wildfly | at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
wildfly | at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1096)
wildfly | at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
wildfly | at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
wildfly | at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
wildfly | at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
wildfly | at org.jboss.modules.Module.loadModuleClass(Module.java:731)
wildfly | at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
wildfly | at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
wildfly | at org.jboss.as.jsf#16.0.0.Final//org.jboss.as.jsf.deployment.JSFComponentProcessor.deploy(JSFComponentProcessor.java:105)
wildfly | at org.jboss.as.server#8.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
wildfly | at org.jboss.msc#1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
wildfly | at org.jboss.msc#1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
wildfly | at org.jboss.msc#1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
wildfly | at org.jboss.threads#2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
wildfly | at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
wildfly | at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
wildfly | at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
wildfly | at java.base/java.lang.Thread.run(Thread.java:834)
wildfly |
wildfly | 20:39:47,033 WARN [org.jboss.modules.define] (MSC service thread 1-8) Failed to define class org.co.oengin.cim.web.controller.DistributorTreeController in Module "deployment.SIC.ear.org.co.oengin-SIC-WEB-3.1.war" from Service Module Loader: org.jboss.modules.ModuleLoadError: org.lombok
wildfly | at org.jboss.modules.Module.addExportedPaths(Module.java:1417)
wildfly | at org.jboss.modules.Module.addPaths(Module.java:1295)
wildfly | at org.jboss.modules.Module.link(Module.java:1622)
wildfly | at org.jboss.modules.Module.getPaths(Module.java:1583)
wildfly | at org.jboss.modules.Module.getPathsUnchecked(Module.java:1606)
wildfly | at org.jboss.modules.Module.loadModuleClass(Module.java:726)
wildfly | at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
wildfly | at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
wildfly | at java.base/java.lang.ClassLoader.defineClass1(Native Method)
wildfly | at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
wildfly | at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:423)
wildfly | at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
wildfly | at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
wildfly | at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
wildfly | at org.jboss.modules.Module.loadModuleClass(Module.java:731)
wildfly | at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
wildfly | at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
wildfly | at java.base/java.lang.ClassLoader.defineClass1(Native Method)
wildfly | at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
wildfly | at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1096)
wildfly | at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
wildfly | at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
wildfly | at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
wildfly | at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
wildfly | at org.jboss.modules.Module.loadModuleClass(Module.java:731)
wildfly | at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
wildfly | at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
wildfly | at java.base/java.lang.ClassLoader.defineClass1(Native Method)
wildfly | at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
wildfly | at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1096)
wildfly | at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
wildfly | at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
wildfly | at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
wildfly | at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
wildfly | at org.jboss.modules.Module.loadModuleClass(Module.java:731)
wildfly | at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
wildfly | at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
wildfly | at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
wildfly | at org.jboss.as.jsf#16.0.0.Final//org.jboss.as.jsf.deployment.JSFComponentProcessor.deploy(JSFComponentProcessor.java:105)
wildfly | at org.jboss.as.server#8.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
wildfly | at org.jboss.msc#1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
wildfly | at org.jboss.msc#1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
wildfly | at org.jboss.msc#1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
wildfly | at org.jboss.threads#2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
wildfly | at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
wildfly | at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
wildfly | at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
wildfly | at java.base/java.lang.Thread.run(Thread.java:834)
wildfly |
wildfly | 20:39:47,033 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.subunit."SIC.ear"."org.co.oengin-SIC-WEB-3.1.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."SIC.ear"."org.co.oengin-SIC-WEB-3.1.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of subdeployment "org.co.oengin-SIC-WEB-3.1.war" of deployment "SIC.ear"
wildfly | at org.jboss.as.server#8.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:183)
wildfly | at org.jboss.msc#1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
wildfly | at org.jboss.msc#1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
wildfly | at org.jboss.msc#1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
wildfly | at org.jboss.threads#2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
wildfly | at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
wildfly | at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
wildfly | at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
wildfly | at java.base/java.lang.Thread.run(Thread.java:834)
wildfly | Caused by: org.jboss.modules.ModuleLoadError: org.lombok
wildfly | at org.jboss.modules.Module.addExportedPaths(Module.java:1417)
wildfly | at org.jboss.as.jsf#16.0.0.Final//org.jboss.as.jsf.deployment.JSFComponentProcessor.deploy(JSFComponentProcessor.java:105)
wildfly | at org.jboss.as.server#8.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
wildfly | ... 8 more
Using the following files:
pom.xml of war
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.co.oengin</groupId>
<artifactId>Portal</artifactId>
<version>3.1</version>
</parent>
<artifactId>Portal-Web</artifactId>
<packaging>war</packaging>
<name>Portal-Web</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<webResources>
<resource>
<directory>${basedir}/src/main/webapp</directory>
<filtering>true</filtering>
<includes>
<include>WEB-INF/*.xml</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<compilerVersion>${java.version}</compilerVersion>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${org.projectlombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.co.oengin</groupId>
<artifactId>Portal-Business</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${org.projectlombok.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>1.9.22</version>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>8.0</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.5</version>
</dependency>
<dependency>
<groupId>commons-el</groupId>
<artifactId>commons-el</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.0.10</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>javax.faces-api</artifactId>
<version>2.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>4.6.2.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
<version>4.6.2.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.myfaces.tomahawk</groupId>
<artifactId>tomahawk20</artifactId>
<version>1.1.14</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>${taglibs-standard.version}</version>
</dependency>
</dependencies>
</project>
DockerFile
FROM jboss/wildfly:16.0.0.Final
RUN /opt/jboss/wildfly/bin/add-user.sh admin Admin#70365 --silent
ADD wildfly/modules/postgres /opt/jboss/wildfly/modules/system/layers/base/org/postgresql/main
ADD wildfly/modules/oracle /opt/jboss/wildfly/modules/system/layers/base/oracle/main
ADD wildfly/modules/org /opt/jboss/wildfly/modules/system/layers/base/org
COPY wildfly/standalone.xml /opt/jboss/wildfly/standalone/configuration # to add the datasources
COPY wildfly/ejb.properties /opt/jboss/wildfly/standalone/configuration
EXPOSE 8080 9990
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]
docker-compose.yml
services:
wildfly:
build:
context: .
dockerfile: Dockerfile
container_name: wildfly
restart: always
ports:
- "8080:8080"
- "9990:9990"
volumes:
- ./wildfly_deployment_scanner:/opt/jboss/wildfly/standalone/deployments/
entrypoint: ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]`
Related
Java client with code to publish messages to pubsub gcp topic. This code works fine in my localhost but when I try runnnig my jar on linux and with proxy this error is shown:
INFO | jvm 1 | 2022/10/25 12:28:38 | WARNING: [Channel<1>: (pubsub.googleapis.com:443)] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host pubsub.googleapis.com, cause=java.lang.RuntimeException: java.net.UnknownHostException: pubsub.googleapis.com: Name or service not known
INFO | jvm 1 | 2022/10/25 12:28:38 | at io.grpc.internal.DnsNameResolver.resolveAddresses(DnsNameResolver.java:223)
INFO | jvm 1 | 2022/10/25 12:28:38 | at io.grpc.internal.DnsNameResolver.doResolve(DnsNameResolver.java:282)
INFO | jvm 1 | 2022/10/25 12:28:38 | at io.grpc.grpclb.GrpclbNameResolver.doResolve(GrpclbNameResolver.java:63)
INFO | jvm 1 | 2022/10/25 12:28:38 | at io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:318)
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.lang.Thread.run(Thread.java:750)
INFO | jvm 1 | 2022/10/25 12:28:38 | Caused by: java.net.UnknownHostException: pubsub.googleapis.com: Name or service not known
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929)
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324)
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.net.InetAddress.getAllByName0(InetAddress.java:1277)
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.net.InetAddress.getAllByName(InetAddress.java:1193)
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.net.InetAddress.getAllByName(InetAddress.java:1127)
INFO | jvm 1 | 2022/10/25 12:28:38 | at io.grpc.internal.DnsNameResolver$JdkAddressResolver.resolveAddress(DnsNameResolver.java:631)
INFO | jvm 1 | 2022/10/25 12:28:38 | at io.grpc.internal.DnsNameResolver.resolveAddresses(DnsNameResolver.java:219)
INFO | jvm 1 | 2022/10/25 12:28:38 | ... 6 more`
This is my code:
public HttpTransportFactory getHttpTranpostFactory(String proxy, String puerto) {
Proxy prox = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxy, Integer.parseInt(puerto)));
HttpTransport httpTransport = new NetHttpTransport.Builder().setProxy(prox).build();
return new HttpTransportFactory() {
#Override
public HttpTransport create() {
return httpTransport;
}
};
}`
In main class:
HttpTransportFactory httpTransport = getHttpTranpostFactory("myvalidproxy.com", "8080");
credentialsProvider = FixedCredentialsProvider.create(
ServiceAccountCredentials.fromStream(new FileInputStream("/path/to/accountservice"), httpTransport));
TopicName topicName = TopicName.of("avalidgcpproject","avalidtopic");
Publisher publisher = Publisher.newBuilder(topicName)
.setEnableCompression(true)
.setCompressionBytesThreshold(100000L)
.setCredentialsProvider(credentialsProvider)
.build();
ByteString data = ByteString.copyFromUtf8("Hello World!");
PubsubMessage pubsubMessage = PubsubMessage.newBuilder()
.setData(data)
.build();
ApiFuture<String> messageIdFuture = publisher.publish(pubsubMessage); //Error is in this line
System.out.println(messageIdFuture.get());`
Maven dependencies:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsub</artifactId>
<version>1.120.16</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.cloud/google-cloud-core -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-core</artifactId>
<version>2.8.12</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20220320</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.3.7</version>
</dependency>
Error is on ApiFuture messageIdFuture = publisher.publish(pubsubMessage); line
When I generate the jar, I have to change the io.grpc.LoadBalancerProvider inside META-INF/services file with content: io.grpc.internal.PickFirstLoadBalancerProvider because if I dont do that, jar thrown another exception.
i have a problem with docker compose when i try to run docker-compose every time i get the following error i tried many solutions but nothing helps. Please help.
I will add that I created the docker image using Cloud Native Buildpacks. I used the command:
mvn spring-boot: build-image -Dspring-boot.build-image.imageName = jakuczczubak/infrastock
and then uploaded the image to dockerhub
dockerhub: dockerhub
github: github
docker-compose.yml
services:
mysql:
image: mysql:5.7
container_name: test-mysql-docker
environment:
- MYSQL_ROOT_PASSWORD=mysqlpw
- MYSQL_USER=infrastock
- MYSQL_DATABASE=infrastock
- MYSQL_PASSWORD=infrastock123
ports:
- 33067:3306
adminer:
image: adminer
restart: always
ports:
- 8080:8080
depends_on:
- mysql
api:
image: czubakjakub/infrastock:v1.0.0
environment:
- SPRING_DATASOURCE_URL=jdbc:mysql://root:mysqlpw#test-mysql-docker:3306/infrastock?useSSL=false
- SPRING_JPA_HIBERNATE_DDL-AUTO=update
ports:
- 9090:9090
depends_on:
- mysql
application.properties
server.port=9090
spring.datasource.url=jdbc:mysql://root:mysqlpw#host.docker.internal:33067/infrastock
spring.jpa.hibernate.ddl-auto=update
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
error:
- Network docker-compose_default Created 2.6s
- Container test-mysql-docker Created 0.6s
- Container docker-compose-api-1 Created 0.6s
- Container docker-compose-adminer-1 Created 0.5s
Attaching to docker-compose-adminer-1, docker-compose-api-1, test-mysql-docker
test-mysql-docker | 2022-06-22 18:55:25+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.38-1debian10 started.
test-mysql-docker | 2022-06-22 18:55:25+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
test-mysql-docker | 2022-06-22 18:55:25+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.38-1debian10 started.
test-mysql-docker | 2022-06-22 18:55:25+00:00 [Note] [Entrypoint]: Initializing database files
test-mysql-docker | 2022-06-22T18:55:25.410856Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
test-mysql-docker | 2022-06-22T18:55:27.139862Z 0 [Warning] InnoDB: New log files created, LSN=45790
test-mysql-docker | 2022-06-22T18:55:27.489120Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
test-mysql-docker | 2022-06-22T18:55:27.590997Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: e1816692-f25c-11ec-951c-0242ac130002.
test-mysql-docker | 2022-06-22T18:55:27.604367Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
test-mysql-docker | 2022-06-22T18:55:28.037561Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
test-mysql-docker | 2022-06-22T18:55:28.037615Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
test-mysql-docker | 2022-06-22T18:55:28.038212Z 0 [Warning] CA certificate ca.pem is self signed.
test-mysql-docker | 2022-06-22T18:55:28.080678Z 1 [Warning] root#localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
docker-compose-adminer-1 | [Wed Jun 22 18:55:29 2022] PHP 7.4.30 Development Server (http://[::]:8080) started
docker-compose-api-1 | Setting Active Processor Count to 8
docker-compose-api-1 | Calculating JVM memory based on 7046808K available memory
docker-compose-api-1 | `For more information on this calculation, see https://paketo.io/docs/reference/java-reference/#memory-calculator
docker-compose-api-1 | Calculated JVM Memory Configuration: -XX:MaxDirectMemorySize=10M -Xmx6417274K -XX:MaxMetaspaceSize=117533K -XX:ReservedCodeCacheSize=240M -Xss1M (Total Memory: 7046808K, Thread Count: 250, Loaded Class Count: 18337, Headroom: 0%)
docker-compose-api-1 | Enabling Java Native Memory Tracking
docker-compose-api-1 | Adding 127 container CA certificates to JVM truststore
docker-compose-api-1 | Spring Cloud Bindings Enabled
docker-compose-api-1 | Picked up JAVA_TOOL_OPTIONS: -Djava.security.properties=/layers/paketo-buildpacks_bellsoft-liberica/java-security-properties/java-security.properties -XX:+ExitOnOutOfMemoryError -XX:ActiveProcessorCount=8 -XX:MaxDirectMemorySize=10M -Xmx6417274K -XX:MaxMetaspaceSize=117533K -XX:ReservedCodeCacheSize=240M -Xss1M -XX:+UnlockDiagnosticVMOptions -XX:NativeMemoryTracking=summary -XX:+PrintNMTStatistics -Dorg.springframework.cloud.bindings.boot.enable=true
docker-compose-api-1 |
docker-compose-api-1 | . ____ _ __ _ _
docker-compose-api-1 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
docker-compose-api-1 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
docker-compose-api-1 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
docker-compose-api-1 | ' |____| .__|_| |_|_| |_\__, | / / / /
docker-compose-api-1 | =========|_|==============|___/=/_/_/_/
docker-compose-api-1 | :: Spring Boot :: (v2.6.3)
docker-compose-api-1 |
docker-compose-api-1 | 2022-06-22 18:55:31.261 INFO 1 --- [ main] c.e.infrastock.InfraStockApplication : Starting InfraStockApplication v0.0.1-SNAPSHOT using Java 11.0.15.1 on a109f4fe4312 with PID 1 (/workspace/BOOT-INF/classes started by cnb in /workspace)
docker-compose-api-1 | 2022-06-22 18:55:31.270 INFO 1 --- [ main] c.e.infrastock.InfraStockApplication : No active profile set, falling back to default profiles: default
docker-compose-api-1 | 2022-06-22 18:55:32.883 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
docker-compose-api-1 | 2022-06-22 18:55:33.021 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 124 ms. Found 4 JPA repository interfaces.
docker-compose-api-1 | 2022-06-22 18:55:34.554 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 9090 (http)
docker-compose-api-1 | 2022-06-22 18:55:34.583 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
docker-compose-api-1 | 2022-06-22 18:55:34.584 INFO 1 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.56]
docker-compose-api-1 | 2022-06-22 18:55:34.777 INFO 1 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
docker-compose-api-1 | 2022-06-22 18:55:34.777 INFO 1 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 3377 ms
docker-compose-api-1 | Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
docker-compose-api-1 | 2022-06-22 18:55:35.258 INFO 1 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
docker-compose-api-1 | 2022-06-22 18:55:35.367 INFO 1 --- [ main] org.hibernate.Version
: HHH000412: Hibernate ORM core version 5.6.4.Final
docker-compose-api-1 | 2022-06-22 18:55:35.583 INFO 1 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
docker-compose-api-1 | 2022-06-22 18:55:35.753 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
docker-compose-api-1 | 2022-06-22 18:55:35.772 WARN 1 --- [ main] com.zaxxer.hikari.util.DriverDataSource : Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
docker-compose-api-1 | 2022-06-22 18:55:36.976 ERROR 1 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
docker-compose-api-1 |
docker-compose-api-1 | com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
docker-compose-api-1 |
docker-compose-api-1 | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
docker-compose-api-1 | at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-java-8.0.28.jar:8.0.28]
docker-compose-api-1 | at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) ~[mysql-connector-java-8.0.28.jar:8.0.28]
docker-compose-api-1 | at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:829) ~[mysql-connector-java-8.0.28.jar:8.0.28]
docker-compose-api-1 | at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:449) ~[mysql-connector-java-8.0.28.jar:8.0.28]
docker-compose-api-1 | at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:242) ~[mysql-connector-java-8.0.28.jar:8.0.28]
docker-compose-api-1 | at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198) ~[mysql-connector-java-8.0.28.jar:8.0.28]
docker-compose-api-1 | at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:121) ~[HikariCP-4.0.3.jar:na]
docker-compose-api-1 | at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) ~[HikariCP-4.0.3.jar:na]
docker-compose-api-1 | at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) ~[HikariCP-4.0.3.jar:na]
docker-compose-api-1 | at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) ~[HikariCP-4.0.3.jar:na]
docker-compose-api-1 | at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) ~[HikariCP-4.0.3.jar:na]
docker-compose-api-1 | at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) ~[HikariCP-4.0.3.jar:na]
docker-compose-api-1 | at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) ~[HikariCP-4.0.3.jar:na]
docker-compose-api-1 | at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) ~[hibernate-core-5.6.4.Final.jar:5.6.4.Final]
docker-compose-api-1 | at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:181) ~[hibernate-core-5.6.4.Final.jar:5.6.4.Final]
docker-compose-api-1 | at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) ~[hibernate-core-5.6.4.Final.jar:5.6.4.Final]
docker-compose-api-1 | at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35) ~[hibernate-core-5.6.4.Final.jar:5.6.4.Final]
docker-compose-api-1 | at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101) ~[hibernate-core-5.6.4.Final.jar:5.6.4.Final]
docker-compose-api-1 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) ~[hibernate-core-5.6.4.Final.jar:5.6.4.Final]
docker-compose-api-1 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237) ~[hibernate-core-5.6.4.Final.jar:5.6.4.Final]
docker-compose-api-1 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214) ~[hibernate-core-5.6.4.Final.jar:5.6.4.Final]
docker-compose-api-1 | at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:175) ~[hibernate-core-5.6.4.Final.jar:5.6.4.Final]
docker-compose-api-1 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286) ~[hibernate-core-5.6.4.Final.jar:5.6.4.Final]
docker-compose-api-1 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243) ~[hibernate-core-5.6.4.Final.jar:5.6.4.Final]
docker-compose-api-1 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214) ~[hibernate-core-5.6.4.Final.jar:5.6.4.Final]
docker-compose-api-1 | at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:173) ~[hibernate-core-5.6.4.Final.jar:5.6.4.Final]
docker-compose-api-1 | at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:127) ~[hibernate-core-5.6.4.Final.jar:5.6.4.Final]
docker-compose-api-1 | at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1460) ~[hibernate-core-5.6.4.Final.jar:5.6.4.Final]
docker-compose-api-1 | at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1494) ~[hibernate-core-5.6.4.Final.jar:5.6.4.Final]
docker-compose-api-1 | at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) ~[spring-orm-5.3.15.jar:5.3.15]
docker-compose-api-1 | at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.3.15.jar:5.3.15]
docker-compose-api-1 | at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) ~[spring-orm-5.3.15.jar:5.3.15]
docker-compose-api-1 | at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-5.3.15.jar:5.3.15]
docker-compose-api-1 | at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) ~[spring-orm-5.3.15.jar:5.3.15]
docker-compose-api-1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.15.jar:5.3.15]
docker-compose-api-1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.15.jar:5.3.15]
docker-compose-api-1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.15.jar:5.3.15]
docker-compose-api-1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.15.jar:5.3.15]
docker-compose-api-1 | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.15.jar:5.3.15]
docker-compose-api-1 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.15.jar:5.3.15]
docker-compose-api-1 | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.15.jar:5.3.15]
docker-compose-api-1 | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.15.jar:5.3.15]
docker-compose-api-1 | at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154) ~[spring-context-5.3.15.jar:5.3.15]
docker-compose-api-1 | at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:908) ~[spring-context-5.3.15.jar:5.3.15]
docker-compose-api-1 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.15.jar:5.3.15]
Full stack trace: https://pastebin.com/mLPfHNbJ
Full docker-compose.yml logslogs
Ive got a springboot application that when bundled into a docker image and published to Amazon ECS fails to start
The error message is:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| timestamp | message |
|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1645724032287 | . ____ _ __ _ _ |
| 1645724032287 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ |
| 1645724032287 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ |
| 1645724032287 | \\/ ___)| |_)| | | | | || (_| | ) ) ) ) |
| 1645724032287 | ' |____| .__|_| |_|_| |_\__, | / / / / |
| 1645724032287 | =========|_|==============|___/=/_/_/_/ |
| 1645724032290 | :: Spring Boot :: |
| 1645724033092 | 17:33:53.090 [main] INFO com.jtmaxwell.Microservice.DocumentGenerator.Application - Starting Application using Java 11.0.14.1 on ip-172-31-20-189.eu-west-1.compute.internal with PID 1 (/app.jar started by root in /) |
| 1645724033093 | 17:33:53.093 [main] DEBUG com.jtmaxwell.Microservice.DocumentGenerator.Application - Running with Spring Boot, Spring |
| 1645724033093 | 17:33:53.093 [main] INFO com.jtmaxwell.Microservice.DocumentGenerator.Application - No active profile set, falling back to default profiles: default |
| 1645724033095 | 17:33:53.095 [main] DEBUG org.springframework.boot.SpringApplication - Loading source class com.jtmaxwell.Microservice.DocumentGenerator.Application |
| 1645724033893 | 17:33:53.893 [main] DEBUG org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#13acb0d1 |
| 1645724034087 | 17:33:54.087 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' |
| 1645724034591 | 17:33:54.590 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/app.jar!/com/jtmaxwell/Microservice/DocumentGenerator/config/MessagingConfig.class] |
| 1645724034601 | 17:33:54.599 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/app.jar!/com/jtmaxwell/Microservice/DocumentGenerator/consumer/User.class] |
| 1645724034697 | 17:33:54.693 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/app.jar!/com/jtmaxwell/Microservice/DocumentGenerator/publisher/OrderPublisher.class] |
| 1645724035094 | 17:33:55.094 [main] ERROR org.springframework.boot.SpringApplication - Application run failed |
| 1645724035094 | java.lang.IllegalArgumentException: No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make sure that file is correct. |
| 1645724035094 | at org.springframework.util.Assert.notEmpty(Assert.java:470) |
| 1645724035094 | at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.getCandidateConfigurations(AutoConfigurationImportSelector.java:180) |
| 1645724035094 | at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.getAutoConfigurationEntry(AutoConfigurationImportSelector.java:123) |
| 1645724035094 | at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector$AutoConfigurationGroup.process(AutoConfigurationImportSelector.java:434) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGrouping.getImports(ConfigurationClassParser.java:879) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:809) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorHandler.process(ConfigurationClassParser.java:780) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:193) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:331) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:247) |
| 1645724035094 | at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311) |
| 1645724035094 | at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:112) |
| 1645724035094 | at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:746) |
| 1645724035094 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564) |
| 1645724035094 | at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) |
| 1645724035094 | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) |
| 1645724035094 | at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:412) |
| 1645724035094 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) |
| 1645724035094 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) |
| 1645724035094 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1290) |
| 1645724035094 | at com.jtmaxwell.Microservice.DocumentGenerator.Application.main(Application.java:18) |
| 1645724035293 | 17:33:55.290 [main] DEBUG org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#13acb0d1, started on Thu Feb 24 17:33:53 UTC 2022 |
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The pom.xml is
<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.jtmaxwell</groupId>
<artifactId>microservice.documentgenerator</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Microservice.DocumentGenerator</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>11</java.version>
</properties>
<repositories>
<repository>
<id>clojars.org</id>
<url>https://repo.clojars.org</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.github.erdos</groupId>
<artifactId>stencil-core</artifactId>
<version>0.3.29</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.13.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Can you please check first the docker images run outside of ECS? Seem there are some libs not got bundled as part of the docker build.
Also i assume your spring boot app runs locally
The answer here was as others highlighted. The image was missing dependencies due to the jar file from Visual Code being used for the docker build.
I ran the supplied
mvnw package
Then used the resulting jar file to build the docker image
following scenario:
SCENARIO:
I developed a Microservice Application with Spring Boot 2 on eclipse. The application works fine. Now I want to run it with docker. In addition, the Image has to interact with a mysql db.
To build the docker image I use the com.spotify plugin in my pom.xml.
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<imageName>usermanagementservice</imageName>
<baseImage>openjdk:8-jre-alpine</baseImage>
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
<!-- copy the service's jar file from target into the root directory of the image -->
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
this create a docker file and the .jar file in my target folder:
Docker file:
FROM java:8
ENTRYPOINT ["java", "-jar", "/UserManagementService-0.0.1-SNAPSHOT.jar"]
So now I want to run the project with docker compose:
> compose file: version: '2.1' services: usermanagement-service:
> image: usermanagementservice
> restart: on-failure
> ports:
> - "7778:7778"
> depends_on:
> mysqldb:
> condition: service_healthy
>
> mysqldb:
> image: mysql
> volumes:
> - ./mysql-data:/var/lib/mysql
> - ./mysql-init-files:/docker-entrypoint-initdb.d
> restart: always
> environment:
> MYSQL_ROOT_PASSWORD: root
> MYSQL_DATABASE: userdb
> MYSQL_USER: testuser
> MYSQL_PASSWORD: testuser
> expose:
> - "3306"
> healthcheck:
> test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
> timeout: 3s
> retries: 10
Expected behaviour
The usermanagementservice should wait until my sql db is initialized and ready. Once this is done, the service should connect to it and start.
Problem:
The part with the init mysql works but my usermanagementservice crashes on startup. I get a load of unsatisfied bean exceptions.
Stacktrace:
usermanagement-service_1 | ERROR 04-02-2019 08:51:18,870 main o.s.b.w.e.t.TomcatStarter: Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'customBasicAuthenticat
ionFilter': Unsatisfied dependency expressed through field 'mobileUserController'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mobileUserController': Unsatisfied dependency expressed thro
ugh field 'restTemplate'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'doctorController': Unsatisfied dependency expressed through field 'restTemplate'; nested exception is org.springframe
work.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'restTemplate': Requested bean is currently in creation: Is there an unresolvable circular reference?
usermanagement-service_1 | Feb 04, 2019 8:51:18 AM org.apache.catalina.core.StandardService stopInternal
usermanagement-service_1 | INFO: Stopping service [Tomcat]
usermanagement-service_1 | Feb 04, 2019 8:51:18 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
usermanagement-service_1 | WARNING: The web application [ROOT] appears to have started a thread named [HikariPool-1 housekeeper] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
usermanagement-service_1 | sun.misc.Unsafe.park(Native Method)
usermanagement-service_1 | java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
usermanagement-service_1 | java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
usermanagement-service_1 | java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
usermanagement-service_1 | java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
usermanagement-service_1 | java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
usermanagement-service_1 | java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
usermanagement-service_1 | java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
usermanagement-service_1 | java.lang.Thread.run(Thread.java:748)
usermanagement-service_1 | Feb 04, 2019 8:51:18 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
usermanagement-service_1 | WARNING: The web application [ROOT] appears to have started a thread named [HikariPool-1 connection adder] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
usermanagement-service_1 | sun.misc.Unsafe.park(Native Method)
usermanagement-service_1 | java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
usermanagement-service_1 | java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
usermanagement-service_1 | java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
usermanagement-service_1 | java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073)
usermanagement-service_1 | java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
usermanagement-service_1 | java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
usermanagement-service_1 | java.lang.Thread.run(Thread.java:748)
usermanagement-service_1 | WARN 04-02-2019 08:51:18,918 main o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextExcep
tion: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
usermanagement-service_1 | INFO 04-02-2019 08:51:18,921 main o.s.o.j.LocalContainerEntityManagerFactoryBean: Closing JPA EntityManagerFactory for persistence unit 'default'
usermanagement-service_1 | INFO 04-02-2019 08:51:18,925 main c.z.h.HikariDataSource: HikariPool-1 - Shutdown initiated...
usermanagement-service_1 | INFO 04-02-2019 08:51:18,947 main c.z.h.HikariDataSource: HikariPool-1 - Shutdown completed.
usermanagement-service_1 | INFO 04-02-2019 08:51:18,985 main o.s.b.a.l.ConditionEvaluationReportLoggingListener:
usermanagement-service_1 |
usermanagement-service_1 | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
usermanagement-service_1 | ERROR 04-02-2019 08:51:18,990 main o.s.b.SpringApplication: Application run failed
usermanagement-service_1 | org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
usermanagement-service_1 | at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:155)
usermanagement-service_1 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540)
usermanagement-service_1 | at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
usermanagement-service_1 | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
usermanagement-service_1 | at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
usermanagement-service_1 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
usermanagement-service_1 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
usermanagement-service_1 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
usermanagement-service_1 | at com.usermanagement.UserManagementServiceApplication.main(UserManagementServiceApplication.java:21)
usermanagement-service_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
usermanagement-service_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
usermanagement-service_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
usermanagement-service_1 | at java.lang.reflect.Method.invoke(Method.java:498)
usermanagement-service_1 | at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
usermanagement-service_1 | at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
usermanagement-service_1 | at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
usermanagement-service_1 | at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
usermanagement-service_1 | Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
usermanagement-service_1 | at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:125)
usermanagement-service_1 | at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86)
usermanagement-service_1 | at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:414)
usermanagement-service_1 | at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:174)
usermanagement-service_1 | at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:179)
usermanagement-service_1 | at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:152)
usermanagement-service_1 | ... 16 more
usermanagement-service_1 | Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'customBasicAuthenticationFilter': Unsatisfied dependency expressed through field 'mobileUserController'; nested exception is
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mobileUserController': Unsatisfied dependency expressed through field 'restTemplate'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyE
xception: Error creating bean with name 'doctorController': Unsatisfied dependency expressed through field 'restTemplate'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'restTemplate': Req
uested bean is currently in creation: Is there an unresolvable circular reference?
usermanagement-service_1 | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596)
usermanagement-service_1 | at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
usermanagement-service_1 | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374)
usermanagement-service_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1378)
usermanagement-service_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:575)
usermanagement-service_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
usermanagement-service_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
usermanagement-service_1 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
usermanagement-service_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
usermanagement-service_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
usermanagement-service_1 | at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:236)
usermanagement-service_1 | at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:192)
usermanagement-service_1 | at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:187)
usermanagement-service_1 | at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAdaptableBeans(ServletContextInitializerBeans.java:169)
usermanagement-service_1 | at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:89)
usermanagement-service_1 | at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:250)
usermanagement-service_1 | at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:237)
usermanagement-service_1 | at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:54)
usermanagement-service_1 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5098)
usermanagement-service_1 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
usermanagement-service_1 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
usermanagement-service_1 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
usermanagement-service_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
usermanagement-service_1 | at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
usermanagement-service_1 | at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
usermanagement-service_1 | at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
usermanagement-service_1 | at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
usermanagement-service_1 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
usermanagement-service_1 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
usermanagement-service_1 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
usermanagement-service_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
usermanagement-service_1 | at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
usermanagement-service_1 | at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
usermanagement-service_1 | at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
usermanagement-service_1 | at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
usermanagement-service_1 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
usermanagement-service_1 | at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
usermanagement-service_1 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
usermanagement-service_1 | at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
usermanagement-service_1 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
usermanagement-service_1 | at org.apache.catalina.startup.Tomcat.start(Tomcat.java:370)
usermanagement-service_1 | at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:106)
usermanagement-service_1 | ... 21 more
Attempts
I followed some online tutorials with different Docker Files and so on. But nothing worked.
I guess it might be a Problem ob the entry point because Beans are created before application startup as singletons.
Is there any import in my dockerfile I have to add or any modification on the entrypoint?
Thanks in advance
It causes the same stacktrace.
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'customBasicAuthenticationFilter': Unsatisfied dependency expressed through field 'mobileUserController'; nested exception is org.springframework.beans.factory.Unsat
isfiedDependencyException: Error creating bean with name 'mobileUserController': Unsatisfied dependency expressed through field 'restTemplate'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'doctorContr
oller': Unsatisfied dependency expressed through field 'restTemplate'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'restTemplate': Requested bean is currently in creation: Is there an unresolvable c
ircular reference?
UPDATE:
POM.xml
<?xml version="1.0" encoding="UTF-8"?>
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.usermanagement</groupId>
<artifactId>UserManagementService</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>UserManagementService</name>
<description>Microservice for usermanagement</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.0.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-hateoas</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>3.3.5</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j</artifactId>
<version>1.2.8.RELEASE</version>
</dependency>
<dependency>
<groupId>javax.json</groupId>
<artifactId>javax.json-api</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180813</version>
</dependency>
<!-- <dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.1</version>
</dependency> -->
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<imageName>usermanagementservice</imageName>
<baseImage>openjdk:8-jre-alpine</baseImage>
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
<!-- copy the service's jar file from target into the root directory of the image -->
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
</project>
I've been trying to use jboss/keycloak-mysql in a docker-compose file to stand up a Keycloak server and a mysql database. I'm running into a problem during the local deploy that is telling me that the WEB_ORIGINS table doesn't exist. I can confirm that the linked mysql db is up and there are lots of keycloak tables. This error is preventing the docker keycloak container from starting.
Docker Image I'm using:
https://hub.docker.com/r/jboss/keycloak-mysql/
Docker-Compose File:
version: '3'
services:
keycloak:
build:
context: .
dockerfile: Dockerfile
links:
- mysql:mysql
ports:
- "8080:8080"
environment:
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=password
- MYSQL_DATABASE=keycloak
- MYSQL_USERNAME=keycloak
- MYSQL_PASSWORD=password
- MYSQL_PORT_3306_TCP_ADDR=mysql
- MYSQL_PORT_3306_TCP_PORT=3308
entrypoint: sh -c "sleep 20;/opt/jboss/docker-entrypoint.sh"
mysql:
image: mysql
ports:
- "3308:3306"
environment:
- MYSQL_DATABASE=keycloak
- MYSQL_USER=keycloak
- MYSQL_PASSWORD=password
- MYSQL_ROOT_PASSWORD=password
Error:
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'keycloak.WEB_ORIGINS' doesn't exist
Full Stack Trace:
keycloak_1 | 20:40:05,429 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool -- 51) SQL Error: 1146, SQLState: 42S02
keycloak_1 | 20:40:05,429 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool -- 51) Table 'keycloak.WEB_ORIGINS' doesn't exist
keycloak_1 | 20:40:05,441 INFO [org.jboss.as.server] (Thread-2) WFLYSRV0220: Server shutdown has been requested via an OS signal
keycloak_1 | 20:40:05,445 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 51) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./auth: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./auth: java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
keycloak_1 | at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:84)
keycloak_1 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
keycloak_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
keycloak_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
keycloak_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
keycloak_1 | at java.lang.Thread.run(Thread.java:748)
keycloak_1 | at org.jboss.threads.JBossThread.run(JBossThread.java:320)
keycloak_1 | Caused by: java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
keycloak_1 | at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:162)
keycloak_1 | at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2298)
keycloak_1 | at org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:340)
keycloak_1 | at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:253)
keycloak_1 | at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:120)
keycloak_1 | at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)
keycloak_1 | at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
keycloak_1 | at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)
keycloak_1 | at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
keycloak_1 | at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:250)
keycloak_1 | at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:133)
keycloak_1 | at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:565)
keycloak_1 | at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:536)
keycloak_1 | at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
keycloak_1 | at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
keycloak_1 | at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
keycloak_1 | at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
keycloak_1 | at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
keycloak_1 | at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
keycloak_1 | at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
keycloak_1 | at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:578)
keycloak_1 | at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
keycloak_1 | at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)
keycloak_1 | ... 6 more
keycloak_1 | Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
keycloak_1 | at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)
keycloak_1 | at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
keycloak_1 | at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
keycloak_1 | at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
keycloak_1 | at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:79)
keycloak_1 | at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.getResultSet(AbstractLoadPlanBasedLoader.java:434)
keycloak_1 | at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeQueryStatement(AbstractLoadPlanBasedLoader.java:186)
keycloak_1 | at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:121)
keycloak_1 | at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:86)
keycloak_1 | at org.hibernate.loader.collection.plan.AbstractLoadPlanBasedCollectionInitializer.initialize(AbstractLoadPlanBasedCollectionInitializer.java:88)
keycloak_1 | at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:688)
keycloak_1 | at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:75)
keycloak_1 | at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:2004)
keycloak_1 | at org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:567)
keycloak_1 | at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:249)
keycloak_1 | at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:563)
keycloak_1 | at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:132)
keycloak_1 | at org.hibernate.collection.internal.PersistentSet.iterator(PersistentSet.java:163)
keycloak_1 | at java.util.AbstractCollection.addAll(AbstractCollection.java:343)
keycloak_1 | at org.keycloak.models.jpa.ClientAdapter.getWebOrigins(ClientAdapter.java:138)
keycloak_1 | at org.keycloak.models.cache.infinispan.entities.CachedClient.<init>(CachedClient.java:91)
keycloak_1 | at org.keycloak.models.cache.infinispan.RealmCacheSession.getClientById(RealmCacheSession.java:992)
keycloak_1 | at org.keycloak.models.jpa.RealmAdapter.getMasterAdminClient(RealmAdapter.java:1006)
keycloak_1 | at org.keycloak.models.cache.infinispan.entities.CachedRealm.<init>(CachedRealm.java:220)
keycloak_1 | at org.keycloak.models.cache.infinispan.RealmCacheSession.getRealm(RealmCacheSession.java:424)
keycloak_1 | at org.keycloak.models.jpa.JpaRealmProvider.getRealms(JpaRealmProvider.java:106)
keycloak_1 | at org.keycloak.models.cache.infinispan.RealmCacheSession.getRealms(RealmCacheSession.java:484)
keycloak_1 | at org.keycloak.services.managers.ApplianceBootstrap.isNewInstall(ApplianceBootstrap.java:46)
keycloak_1 | at org.keycloak.services.resources.KeycloakApplication.migrateAndBootstrap(KeycloakApplication.java:210)
keycloak_1 | at org.keycloak.services.resources.KeycloakApplication$1.run(KeycloakApplication.java:144)
keycloak_1 | at org.keycloak.models.utils.KeycloakModelUtils.runJobInTransaction(KeycloakModelUtils.java:227)
keycloak_1 | at org.keycloak.services.resources.KeycloakApplication.<init>(KeycloakApplication.java:135)
keycloak_1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
keycloak_1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
keycloak_1 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
keycloak_1 | at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
keycloak_1 | at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:150)
keycloak_1 | ... 28 more
keycloak_1 | Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'keycloak.WEB_ORIGINS' doesn't exist
keycloak_1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
keycloak_1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
keycloak_1 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
keycloak_1 | at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
keycloak_1 | at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
keycloak_1 | at com.mysql.jdbc.Util.getInstance(Util.java:386)
keycloak_1 | at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
keycloak_1 | at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)
keycloak_1 | at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)
keycloak_1 | at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)
keycloak_1 | at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
keycloak_1 | at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)
keycloak_1 | at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)
keycloak_1 | at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2293)
keycloak_1 | at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:504)
keycloak_1 | at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:70)
keycloak_1 | ... 60 more
keycloak_1 |
keycloak_1 | 20:40:05,455 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "keycloak-server.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./auth" => "java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
keycloak_1 | Caused by: java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
keycloak_1 | Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
keycloak_1 | Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'keycloak.WEB_ORIGINS' doesn't exist"}}
keycloak_1 | 20:40:05,481 INFO [org.jboss.as.server] (ServerService Thread Pool -- 49) WFLYSRV0010: Deployed "keycloak-server.war" (runtime-name : "keycloak-server.war")
keycloak_1 | 20:40:05,493 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-5) WFLYJCA0010: Unbound data source [java:jboss/datasources/KeycloakDS]
keycloak_1 | 20:40:05,507 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0008: Undertow HTTPS listener https suspending
keycloak_1 | 20:40:05,511 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) WFLYJCA0010: Unbound data source [java:jboss/datasources/ExampleDS]
keycloak_1 | 20:40:05,523 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0019: Stopped Driver service with driver-name = h2
keycloak_1 | 20:40:05,525 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0007: Undertow HTTPS listener https stopped, was bound to 127.0.0.1:8443
keycloak_1 | 20:40:05,541 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0019: Host default-host stopping
keycloak_1 | 20:40:05,550 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) WFLYJCA0019: Stopped Driver service with driver-name = mysql
keycloak_1 | 20:40:05,554 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0008: Undertow HTTP listener default suspending
keycloak_1 | 20:40:05,555 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0007: Undertow HTTP listener default stopped, was bound to 127.0.0.1:8080
keycloak_1 | 20:40:05,556 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0004: Undertow 1.4.18.Final stopping
keycloak_1 | 20:40:05,563 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 46) WFLYCLINF0003: Stopped authenticationSessions cache from keycloak container
keycloak_1 | 20:40:05,563 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 49) WFLYCLINF0003: Stopped users cache from keycloak container
keycloak_1 | 20:40:05,563 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 48) WFLYCLINF0003: Stopped keys cache from keycloak container
keycloak_1 | 20:40:05,564 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 33) WFLYCLINF0003: Stopped client-mappings cache from ejb container
keycloak_1 | 20:40:05,564 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) WFLYCLINF0003: Stopped offlineSessions cache from keycloak container
keycloak_1 | 20:40:05,572 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 35) WFLYCLINF0003: Stopped sessions cache from keycloak container
keycloak_1 | 20:40:05,573 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 47) WFLYCLINF0003: Stopped realms cache from keycloak container
keycloak_1 | 20:40:05,575 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 28) WFLYCLINF0003: Stopped actionTokens cache from keycloak container
keycloak_1 | 20:40:05,576 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 30) WFLYCLINF0003: Stopped authorization cache from keycloak container
keycloak_1 | 20:40:05,576 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 45) WFLYCLINF0003: Stopped work cache from keycloak container
keycloak_1 | 20:40:05,584 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 38) WFLYCLINF0003: Stopped loginFailures cache from keycloak container
keycloak_1 | 20:40:05,589 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0028: Stopped deployment keycloak-server.war (runtime-name: keycloak-server.war) in 97ms
keycloak_1 | 20:40:05,598 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-5) WFLYCLINF0003: Stopped authorizationRevisions cache from keycloak container
keycloak_1 | 20:40:05,603 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-5) WFLYCLINF0003: Stopped realmRevisions cache from keycloak container
keycloak_1 | 20:40:05,606 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-5) WFLYCLINF0003: Stopped userRevisions cache from keycloak container
keycloak_1 | 20:40:05,634 INFO [org.jboss.as] (MSC service thread 1-7) WFLYSRV0050: Keycloak 3.3.0.CR2 (WildFly Core 3.0.1.Final) stopped in 144ms
keycloak_1 | keycloak_keycloak_1 exited with code 1
If tables do not exist try adding a create or update to your docker file.
If tables exist and is not be populated with data yet, then delete the table and again.