How to setup a java based Spring Boot app to use Groovy scripting - groovy

How does one setup a Spring Boot app written mostly in java and be able to refer to Groovy scripts as well?
I read the following articles:
http://www.ibm.com/developerworks/library/j-groovierspring1/
http://www.ibm.com/developerworks/library/j-groovierspring2/
These were written well before Spring Boot's time. I want the runtime dynamic nature of Groovy scripts in my java based Spring Boot application. I don't want to compile my Groovy classes out-of-band and refer to them. I want the scripting ability (as described in the linked web pages).
What I've done so far is just create a bare bones Spring Boot app that really does nothing and tried to get the app to recognize a bean implemented by a Groovy script. I used a modified version of GroovyPdfGenerator that's mentioned in the linked articles.
Here's what I have:
// PdfGenerator.java, lives under demo
package demo;
public interface PdfGenerator {
String pdfFor(String name);
}
// GroovyPdfGenerator.groovy, lives under demo
package demo
import demo.PdfGenerator
class GroovyPdfGenerator implements PdfGenerator {
public String pdfFor(String name) {
return "Hello, World!"
}
}
// beans.xml, lives under src/main/resources
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/lang
http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">
<lang:groovy id="pdfGenerator" script source="classpath:GroovyPdfGenerator.groovy"/>
</beans>
// DemoGroovyTaskApplication.java, lives under demo
package demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;
#SpringBootApplication
#ImportResource(value = { "classpath:beans.xml" })
public class DemoGroovyTaskApplication {
public static void main(String[] args) {
SpringApplication.run(DemoGroovyTaskApplication.class, args);
}
}
I tried moving the Groovy file to under resources/ but that didn't work. Also, I couldn't figure out how to get Spring Boot to load the Groovy bean other than using a XML configuration.
Anyone know how this may work?
Forgot to mention, what I get w/ my code is a ClassNotFoundException. I broke on that exception and Spring is looking scriptFactory.pdfGenerator.
Here's the stack trace w/ debugging enabled (sans Negative Matches):
2015-01-23 05:47:49.646 INFO 56013 --- [ main] demo.DemoGroovyTaskApplication : Starting DemoGroovyTaskApplication on gary-fong2.local with PID 56013 (/Users/gary.fong/development/spring/experiments/my-workspace/demoGroovyTask/target/classes started by gary.fong in /Users/gary.fong/development/spring/experiments/my-workspace/demoGroovyTask)
2015-01-23 05:47:49.650 DEBUG 56013 --- [ main] o.s.boot.SpringApplication : Loading source class demo.DemoGroovyTaskApplication
2015-01-23 05:47:49.694 DEBUG 56013 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped config file 'file:./config/application.yaml' resource not found
2015-01-23 05:47:49.694 DEBUG 56013 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped config file 'file:./config/application.xml' resource not found
2015-01-23 05:47:49.694 DEBUG 56013 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped config file 'file:./config/application.properties' resource not found
2015-01-23 05:47:49.694 DEBUG 56013 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped config file 'file:./config/application.yml' resource not found
2015-01-23 05:47:49.694 DEBUG 56013 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped config file 'file:./application.yaml' resource not found
2015-01-23 05:47:49.694 DEBUG 56013 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped config file 'file:./application.xml' resource not found
2015-01-23 05:47:49.694 DEBUG 56013 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped config file 'file:./application.properties' resource not found
2015-01-23 05:47:49.695 DEBUG 56013 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped config file 'file:./application.yml' resource not found
2015-01-23 05:47:49.695 DEBUG 56013 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped config file 'classpath:/config/application.yaml' resource not found
2015-01-23 05:47:49.695 DEBUG 56013 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped config file 'classpath:/config/application.xml' resource not found
2015-01-23 05:47:49.695 DEBUG 56013 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped config file 'classpath:/config/application.properties' resource not found
2015-01-23 05:47:49.695 DEBUG 56013 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped config file 'classpath:/config/application.yml' resource not found
2015-01-23 05:47:49.695 DEBUG 56013 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped config file 'classpath:/application.yaml' resource not found
2015-01-23 05:47:49.695 DEBUG 56013 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped config file 'classpath:/application.xml' resource not found
2015-01-23 05:47:49.695 DEBUG 56013 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped config file 'classpath:/application.properties'
2015-01-23 05:47:49.695 DEBUG 56013 --- [ main] o.s.b.c.c.ConfigFileApplicationListener : Skipped config file 'classpath:/application.yml' resource not found
2015-01-23 05:47:49.700 INFO 56013 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext#a39e3dd: startup date [Fri Jan 23 05:47:49 PST 2015]; root of context hierarchy
2015-01-23 05:47:50.014 INFO 56013 --- [ main] o.s.b.f.xml.XmlBeanDefinitionReader : Loading XML bean definitions from class path resource [beans.xml]
2015-01-23 05:47:50.377 INFO 56013 --- [ main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [file:/Users/gary.fong/development/spring/experiments/my-workspace/demoGroovyTask/target/classes/, file:/Users/gary.fong/.m2/repository/org/springframework/boot/spring-boot-starter/1.2.1.RELEASE/spring-boot-starter-1.2.1.RELEASE.jar, file:/Users/gary.fong/.m2/repository/org/springframework/boot/spring-boot/1.2.1.RELEASE/spring-boot-1.2.1.RELEASE.jar, file:/Users/gary.fong/.m2/repository/org/springframework/spring-context/4.1.4.RELEASE/spring-context-4.1.4.RELEASE.jar, file:/Users/gary.fong/.m2/repository/org/springframework/spring-aop/4.1.4.RELEASE/spring-aop-4.1.4.RELEASE.jar, file:/Users/gary.fong/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar, file:/Users/gary.fong/.m2/repository/org/springframework/spring-beans/4.1.4.RELEASE/spring-beans-4.1.4.RELEASE.jar, file:/Users/gary.fong/.m2/repository/org/springframework/spring-expression/4.1.4.RELEASE/spring-expression-4.1.4.RELEASE.jar, file:/Users/gary.fong/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.2.1.RELEASE/spring-boot-autoconfigure-1.2.1.RELEASE.jar, file:/Users/gary.fong/.m2/repository/org/springframework/boot/spring-boot-starter-logging/1.2.1.RELEASE/spring-boot-starter-logging-1.2.1.RELEASE.jar, file:/Users/gary.fong/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.8/jcl-over-slf4j-1.7.8.jar, file:/Users/gary.fong/.m2/repository/org/slf4j/slf4j-api/1.7.8/slf4j-api-1.7.8.jar, file:/Users/gary.fong/.m2/repository/org/slf4j/jul-to-slf4j/1.7.8/jul-to-slf4j-1.7.8.jar, file:/Users/gary.fong/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.8/log4j-over-slf4j-1.7.8.jar, file:/Users/gary.fong/.m2/repository/ch/qos/logback/logback-classic/1.1.2/logback-classic-1.1.2.jar, file:/Users/gary.fong/.m2/repository/ch/qos/logback/logback-core/1.1.2/logback-core-1.1.2.jar, file:/Users/gary.fong/.m2/repository/org/springframework/spring-core/4.1.4.RELEASE/spring-core-4.1.4.RELEASE.jar, file:/Users/gary.fong/.m2/repository/org/yaml/snakeyaml/1.14/snakeyaml-1.14.jar]
2015-01-23 05:47:50.378 DEBUG 56013 --- [ main] utoConfigurationReportLoggingInitializer :
=========================
AUTO-CONFIGURATION REPORT
=========================
Positive matches:
-----------------
JmxAutoConfiguration
- #ConditionalOnClass classes found: org.springframework.jmx.export.MBeanExporter (OnClassCondition)
- matched (OnPropertyCondition)
JmxAutoConfiguration#mbeanExporter
- #ConditionalOnMissingBean (types: org.springframework.jmx.export.MBeanExporter; SearchStrategy: current) found no beans (OnBeanCondition)
JmxAutoConfiguration#mbeanServer
- #ConditionalOnMissingBean (types: javax.management.MBeanServer; SearchStrategy: all) found no beans (OnBeanCondition)
JmxAutoConfiguration#objectNamingStrategy
- #ConditionalOnMissingBean (types: org.springframework.jmx.export.naming.ObjectNamingStrategy; SearchStrategy: current) found no beans (OnBeanCondition)
PropertyPlaceholderAutoConfiguration#propertySourcesPlaceholderConfigurer
- #ConditionalOnMissingBean (types: org.springframework.context.support.PropertySourcesPlaceholderConfigurer; SearchStrategy: current) found no beans (OnBeanCondition)
2015-01-23 05:47:50.384 ERROR 56013 --- [ main] o.s.boot.SpringApplication : Application startup failed
java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
at java.lang.Class.getDeclaredMethods(Class.java:1860)
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:571)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:490)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:474)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:241)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1057)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1030)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.scripting.support.ScriptFactoryPostProcessor.prepareScriptBeans(ScriptFactoryPostProcessor.java:357)
at org.springframework.scripting.support.ScriptFactoryPostProcessor.predictBeanType(ScriptFactoryPostProcessor.java:251)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:599)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1397)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:434)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:404)
at org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:1046)
at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:726)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:477)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:961)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:950)
at demo.DemoGroovyTaskApplication.main(DemoGroovyTaskApplication.java:11)
Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.control.CompilationFailedException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 29 common frames omitted
2015-01-23 05:47:50.384 INFO 56013 --- [ main] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext#a39e3dd: startup date [Fri Jan 23 05:47:49 PST 2015]; root of context hierarchy
2015-01-23 05:47:50.386 WARN 56013 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception thrown from LifecycleProcessor on context close
java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.springframework.context.annotation.AnnotationConfigApplicationContext#a39e3dd: startup date [Fri Jan 23 05:47:49 PST 2015]; root of context hierarchy
at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:357)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:877)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:836)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:343)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:961)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:950)
at demo.DemoGroovyTaskApplication.main(DemoGroovyTaskApplication.java:11)
Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
at java.lang.Class.getDeclaredMethods(Class.java:1860)
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:571)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:490)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:474)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:241)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1057)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1030)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.scripting.support.ScriptFactoryPostProcessor.prepareScriptBeans(ScriptFactoryPostProcessor.java:357)
at org.springframework.scripting.support.ScriptFactoryPostProcessor.predictBeanType(ScriptFactoryPostProcessor.java:251)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:599)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1397)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:434)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:404)
at org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:1046)
at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:726)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:477)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:961)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:950)
at demo.DemoGroovyTaskApplication.main(DemoGroovyTaskApplication.java:11)
Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.control.CompilationFailedException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 29 more

I was able to resolve my issue.
I had to 1) install Groovy-Eclipse, 2) add the Groovy libraries to the build path. For good measure, I also enabled [Enable script folder support] so that my script isn't compiled at build time.
Once I got all of this in, Eclipse reported an error with my "import" statement in the Groovy script. And once I removed that, it all worked. Very cool.
Thanks all

Related

JHipster and Node.js

I have see that there is possibility to use JHipster with node.js "generator-jhipster-nodejs" from the original JHipster branch. https://github.com/jhipster/generator-jhipster-nodejs
I'm trying to use it, but in particularly I have problem with one part.
I have installed a gateway to use as front end.
I have installed a microservice to use as back end.
And then I have downloaded from the JHipster repository the registry.
So I have:
Gateway
Microservice for Back end
Registry
Now If I start Gateway e Back end they communicate each other ( so for example if I make a get on front end I can read log about backed that makes the get call )
But the problem is the Registry.
I'm starting the registry using mvnw command, and then start the front end and back end. So when I go to localhost:8761 I should find all the application instances registered, but they aren't. I can see only the registry but not the gateway and microservice.
So my question is, how can I do to allows gateway and registry to communicate (and also microservice and registry) ?
I have checked the application-dev.yml file but it seems to be configurated to comunicate with the registry.
EDIT:
application-dev.yml
# ===================================================================
# Configuration for the "dev" profile.
#
# This configuration overrides the application.yml file.
#
# More information on profiles: https://www.jhipster.tech/profiles/
# More information on configuration properties: https://www.jhipster.tech/common-application-properties/
# ===================================================================
# ===================================================================
# Standard app properties.
# ===================================================================
eureka:
instance:
prefer-ip-address: true
client:
service-url:
defaultZone: http://admin:${jhipster.registry.password}#localhost:8761/eureka/
server:
port: 8081
mail:
host: localhost
port: 25
username:
password:
spring:
devtools:
restart:
enabled: true
additional-exclude: static/**
livereload:
enabled: false # we use Webpack dev server + BrowserSync for livereload
jackson:
serialization:
indent-output: true
cloud:
config:
uri: http://admin:${jhipster.registry.password}#localhost:8761/config
# name of the config server's property source (file.yml) that we want to use
name: NhipsterGateway
profile: dev
label: main # toggle to switch to a different version of the configuration as stored in git
# it can be set to any label, branch or commit of the configuration source Git repository
# ===================================================================
# JHipster specific properties
#
# Full reference is available at: https://www.jhipster.tech/common-application-properties/
# ===================================================================
jhipster:
mail: # specific JHipster mail property, for standard properties see MailProperties
from: NhipsterGateway#localhost
base-url: http://127.0.0.1:8082
gateway:
rate-limiting:
enabled: false
limit: 100000
duration-in-seconds: 3600
registry:
password: admin
cors:
allowed-origins: 'http://localhost:8100,http://localhost:9000'
allowed-methods: '*'
allowed-headers: '*'
exposed-headers: 'Authorization,Link,X-Total-Count,X-${jhipster.clientApp.name}-alert,X-${jhipster.clientApp.name}-error,X-${jhipster.clientApp.name}-params'
allow-credentials: true
max-age: 1800
# ===================================================================
# Application specific properties
# Add your own application properties here, see the ApplicationProperties class
# to have type-safe configuration, like in the JHipsterProperties above
#
# More documentation is available at:
# https://www.jhipster.tech/common-application-properties/
# ===================================================================
# application:
EDIT 2: (Logs about registry)
2022-02-22 11:01:52.721 INFO 18864 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : DiscoveryClient_JHIPSTER-REGISTRY/jhipsterRegistry:f94fa23db14e2a7bf396779dbcb6c37b - was unable to refresh its cache! This periodic background refresh will be retried in 10 seconds. status = Cannot execute request on any known server stacktrace = com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134)
at com.netflix.discovery.DiscoveryClient.getAndStoreFullRegistry(DiscoveryClient.java:1101)
at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:1014)
at com.netflix.discovery.DiscoveryClient.<init>(DiscoveryClient.java:441)
at com.netflix.discovery.DiscoveryClient.<init>(DiscoveryClient.java:283)
at com.netflix.discovery.DiscoveryClient.<init>(DiscoveryClient.java:279)
at org.springframework.cloud.netflix.eureka.CloudEurekaClient.<init>(CloudEurekaClient.java:66)
at org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration.eurekaClient(EurekaClientAutoConfiguration.java:295)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$1(AbstractBeanFactory.java:374)
at org.springframework.cloud.context.scope.GenericScope$BeanLifecycleWrapper.getBean(GenericScope.java:376)
at org.springframework.cloud.context.scope.GenericScope.get(GenericScope.java:179)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:371)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:195)
at com.sun.proxy.$Proxy136.getApplications(Unknown Source)
at org.springframework.cloud.netflix.eureka.server.EurekaServerAutoConfiguration.peerAwareInstanceRegistry(EurekaServerAutoConfiguration.java:148)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1380)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1380)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:338)
at tech.jhipster.registry.JHipsterRegistryApp.main(JHipsterRegistryApp.java:73)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
2022-02-22 11:01:52.748 INFO 18864 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Initial registry fetch from primary servers failed
2022-02-22 11:01:52.749 WARN 18864 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Using default backup registry implementation which does not do anything.
2022-02-22 11:01:52.750 INFO 18864 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Initial registry fetch from backup servers failed
2022-02-22 11:01:52.752 INFO 18864 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Starting heartbeat executor: renew interval is: 5
2022-02-22 11:01:52.754 INFO 18864 --- [ restartedMain] c.n.discovery.InstanceInfoReplicator : InstanceInfoReplicator onDemand update allowed rate per min is 12
2022-02-22 11:01:52.762 INFO 18864 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1645524112756 with initial instances count: 0
2022-02-22 11:01:52.785 INFO 18864 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1645524112785, current=DOWN, previous=STARTING]
2022-02-22 11:01:52.789 INFO 18864 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_JHIPSTER-REGISTRY/jhipsterRegistry:f94fa23db14e2a7bf396779dbcb6c37b: registering service...
2022-02-22 11:01:52.813 INFO 18864 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
2022-02-22 11:01:52.814 INFO 18864 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
2022-02-22 11:01:52.814 INFO 18864 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
2022-02-22 11:01:52.814 INFO 18864 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
2022-02-22 11:01:52.985 INFO 18864 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1645524112985, current=UP, previous=DOWN]
2022-02-22 11:01:52.986 WARN 18864 --- [ restartedMain] c.n.discovery.InstanceInfoReplicator : Ignoring onDemand update due to rate limiter
2022-02-22 11:01:52.987 WARN 18864 --- [ restartedMain] c.n.discovery.InstanceInfoReplicator : Ignoring onDemand update due to rate limiter
2022-02-22 11:01:53.063 INFO 18864 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
2022-02-22 11:01:53.063 INFO 18864 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
2022-02-22 11:01:53.063 INFO 18864 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
2022-02-22 11:01:53.063 INFO 18864 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
2022-02-22 11:01:53.330 INFO 18864 --- [ restartedMain] org.jboss.threads : JBoss Threads version 3.1.0.Final
2022-02-22 11:01:53.893 INFO 18864 --- [ restartedMain] t.jhipster.registry.JHipsterRegistryApp : Started JHipsterRegistryApp in 21.527 seconds (JVM running for 22.202)
2022-02-22 11:01:53.898 INFO 18864 --- [ restartedMain] t.jhipster.registry.JHipsterRegistryApp :
----------------------------------------------------------
Application 'jhipster-registry' is running! Access URLs:
Local: http://localhost:8761/
External: http://172.27.32.1:8761/
Profile(s): [composite, dev, api-docs]
----------------------------------------------------------
2022-02-22 11:01:53.905 INFO 18864 --- [ restartedMain] t.jhipster.registry.JHipsterRegistryApp :
----------------------------------------------------------
Config Server: Connected to the JHipster Registry config server!

How to customize AbstractCassandraConfiguration class?

I am new to Spring framework. I am working on a Spring Data Cassandra project where I want to set up a Cassandra keyspace and table programmatically. Most of the examples I found on the Web require manual set up of them using cqlsh.
As a start, I create a spring starter project on STS4 with only the Cassandra dependency selected. Here are the dependencies in my pom file:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-cassandra</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Then I added my CassandraConfiguration class which extends the AbstractCassandraConfiguration class. I fixed editor warning by implementing the only missing method getKeyspaceName(). Here is my added code.
package com.example.demo;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.cassandra.config.AbstractCassandraConfiguration;
import org.springframework.data.cassandra.repository.config.EnableCassandraRepositories;
#Configuration
#EnableCassandraRepositories
public class CassandraConfiguration extends AbstractCassandraConfiguration {
#Override
protected String getKeyspaceName() {
return "demo";
}
}
But when I launch my spring boot app, it has the following error:
2019-04-18 14:54:24.588 INFO 38410 --- [ main] com.datastax.driver.core : DataStax Java driver 3.6.0 for Apache Cassandra
2019-04-18 14:54:24.590 INFO 38410 --- [ main] c.d.driver.core.GuavaCompatibility : Detected Guava >= 19 in the classpath, using modern compatibility layer
2019-04-18 14:54:24.694 INFO 38410 --- [ main] com.datastax.driver.core.ClockFactory : Using native clock to generate timestamps.
2019-04-18 14:54:24.880 INFO 38410 --- [ main] com.datastax.driver.core.NettyUtil : Did not find Netty's native epoll transport in the classpath, defaulting to NIO.
2019-04-18 14:54:24.909 WARN 38410 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/example/demo/CassandraConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/codahale/metrics/JmxReporter
2019-04-18 14:54:27.174 INFO 38410 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-04-18 14:54:27.182 ERROR 38410 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/example/demo/CassandraConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/codahale/metrics/JmxReporter
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$76/1793436274.getObject(Unknown Source) ~[na:na]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:830) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.5.BUILD-SNAPSHOT.jar:2.1.5.BUILD-SNAPSHOT]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.5.BUILD-SNAPSHOT.jar:2.1.5.BUILD-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.5.BUILD-SNAPSHOT.jar:2.1.5.BUILD-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.5.BUILD-SNAPSHOT.jar:2.1.5.BUILD-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.5.BUILD-SNAPSHOT.jar:2.1.5.BUILD-SNAPSHOT]
at com.example.demo.CassandraDemoApplication.main(CassandraDemoApplication.java:10) [classes/:na]
Caused by: java.lang.NoClassDefFoundError: com/codahale/metrics/JmxReporter
at com.datastax.driver.core.Metrics.<init>(Metrics.java:146) ~[cassandra-driver-core-3.6.0.jar:na]
at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1501) ~[cassandra-driver-core-3.6.0.jar:na]
at com.datastax.driver.core.Cluster.init(Cluster.java:208) ~[cassandra-driver-core-3.6.0.jar:na]
at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:376) ~[cassandra-driver-core-3.6.0.jar:na]
at com.datastax.driver.core.Cluster.connect(Cluster.java:332) ~[cassandra-driver-core-3.6.0.jar:na]
at org.springframework.data.cassandra.config.CassandraCqlSessionFactoryBean.connect(CassandraCqlSessionFactoryBean.java:89) ~[spring-data-cassandra-2.1.6.RELEASE.jar:2.1.6.RELEASE]
at org.springframework.data.cassandra.config.CassandraCqlSessionFactoryBean.afterPropertiesSet(CassandraCqlSessionFactoryBean.java:82) ~[spring-data-cassandra-2.1.6.RELEASE.jar:2.1.6.RELEASE]
at org.springframework.data.cassandra.config.CassandraSessionFactoryBean.afterPropertiesSet(CassandraSessionFactoryBean.java:59) ~[spring-data-cassandra-2.1.6.RELEASE.jar:2.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1837) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1774) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
... 16 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.codahale.metrics.JmxReporter
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_45]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_45]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_45]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_45]
... 26 common frames omitted
So apparently besides the missing method, there are other things I need to add to my config class to make it work. Can someone give me an idea what I am missing and how to proceed?
In Metrics 4, JMX reporting was moved to a separate module, metrics-jmx, and this causes that error - it's even described in the documentation. You can either add to your pom.xml:
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-jmx</artifactId>
<version>4.0.2</version>
</dependency>
or specify withoutJMXReporting when creating the Cluster object...
Or you can override and disable the metrics in your CassandraConfiguration so you don't need to add the metrics-jmx module
#Override
protected boolean getMetricsEnabled() {
return false;
}

HikariPool-1 - Connection com.mysql.jdbc.JDBC4Connection#3e5a91e1 marked as broken because of SQLSTATE(08003), ErrorCode(0)

i just update the jhipster project from 4.14.3 to 4.14.4,i remained mostly code that generated on 4.14.3 the code is here,before updated it run successfully,but after updated when i use ./mvnw to start the background it return:
2018-06-04 22:07:11.189 WARN 71364 --- [ restartedMain] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is java.lang.IllegalStateException: All Hibernate caches should be created upfront. Please update CacheConfiguration.java to add com.sgcc.syn.domain.Authority
2018-06-04 22:07:11.209 WARN 71364 --- [ pmt-Executor-1] com.zaxxer.hikari.pool.ProxyConnection : HikariPool-1 - Connection com.mysql.jdbc.JDBC4Connection#3e5a91e1 marked as broken because of SQLSTATE(08003), ErrorCode(0)
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:861)
at com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1184)
at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1179)
at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4523)
at com.zaxxer.hikari.pool.ProxyConnection.rollback(ProxyConnection.java:377)
at com.zaxxer.hikari.pool.HikariProxyConnection.rollback(HikariProxyConnection.java)
at liquibase.database.jvm.JdbcConnection.rollback(JdbcConnection.java:337)
at liquibase.database.AbstractJdbcDatabase.rollback(AbstractJdbcDatabase.java:1166)
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:205)
at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:170)
at liquibase.Liquibase.update(Liquibase.java:196)
at liquibase.Liquibase.update(Liquibase.java:192)
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:431)
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:388)
at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.initDb(AsyncSpringLiquibase.java:94)
at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.lambda$afterPropertiesSet$0(AsyncSpringLiquibase.java:77)
at io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor.lambda$createWrappedRunnable$1(ExceptionHandlingAsyncTaskExecutor.java:68)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2018-06-04 22:07:11.210 WARN 71364 --- [ pmt-Executor-1] liquibase : Failed to restore the auto commit to true
2018-06-04 22:07:11.210 ERROR 71364 --- [ pmt-Executor-1] i.g.j.c.liquibase.AsyncSpringLiquibase : Liquibase could not start correctly, your database is NOT ready: java.sql.SQLException: Connection is closed
liquibase.exception.DatabaseException: java.sql.SQLException: Connection is closed
at liquibase.database.jvm.JdbcConnection.setAutoCommit(JdbcConnection.java:363)
at liquibase.database.AbstractJdbcDatabase.close(AbstractJdbcDatabase.java:1202)
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:397)
at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.initDb(AsyncSpringLiquibase.java:94)
at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.lambda$afterPropertiesSet$0(AsyncSpringLiquibase.java:77)
at io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor.lambda$createWrappedRunnable$1(ExceptionHandlingAsyncTaskExecutor.java:68)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLException: Connection is closed
at com.zaxxer.hikari.pool.ProxyConnection$ClosedConnection.lambda$getClosedConnection$0(ProxyConnection.java:490)
at com.sun.proxy.$Proxy116.setAutoCommit(Unknown Source)
at com.zaxxer.hikari.pool.ProxyConnection.setAutoCommit(ProxyConnection.java:395)
at com.zaxxer.hikari.pool.HikariProxyConnection.setAutoCommit(HikariProxyConnection.java)
at liquibase.database.jvm.JdbcConnection.setAutoCommit(JdbcConnection.java:361)
... 8 common frames omitted
2018-06-04 22:07:11.218 ERROR 71364 --- [ restartedMain] o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is java.lang.IllegalStateException: All Hibernate caches should be created upfront. Please update CacheConfiguration.java to add com.sgcc.syn.domain.Authority
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
how can i resolve it.

An error has occured but no error stacktrace

I created a new monolithic standalone jhipster project. I ran mvnw afterwards and no errors appeared in the console. However, once I've accessed it in the browser, the "An error has occurred :-(" page appeared, but there are no errors in the logs.
I've already followed the error page's recommendations like updating node.js, bower, and running jhipster --force, but the same error page appears. What's weird about this is that there's no error stacktrace appearing in the console.
Here's the complete console log:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Jhipster Jasper 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.5.12.RELEASE:run (default-cli) > test-compile # jhipster-jasper >>> [INFO]
[INFO] --- maven-resources-plugin:3.0.1:copy-resources (default-resources) # jhipster-jasper ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] Copying 13 resources
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) # jhipster-jasper ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] Copying 13 resources
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (enforce-versions) # jhipster-jasper ---
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:copy-resources (docker-resources) # jhipster-jasper ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.9:prepare-agent (pre-unit-tests) # jhipster-jasper ---
[INFO] argLine set to -javaagent:C:\\Users\\anthony\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.7.9\\org.jacoco.agent-0.7.9-runtime.jar=destfile=D:\\WORKSPACE\\RND\\jhipster_jasper\\target\\test-results\\coverage\\jacoco\\jacoco.exec -Djava.security.egd=file:/dev/./urandom -Xmx256m
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) # jhipster-jasper ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 75 source files to D:\WORKSPACE\RND\jhipster_jasper\target\classes
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) # jhipster-jasper ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) # jhipster-jasper ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:1.5.12.RELEASE:run (default-cli) < test-compile # jhipster-jasper <<< [INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:1.5.12.RELEASE:run (default-cli) # jhipster-jasper ---
[INFO] Attaching agents: []
The Class-Path manifest attribute in C:\Users\anthony\.m2\repository\org\liquibase\liquibase-core\3.5.5\liquibase-core-3.5.5.jar referenced one or more files that do not exist: file:/C:/Users/anthony/.m2/repository/org/liquibase/liquibase-core/3.5.5/lib/snakeyaml-1.13.jar
19:10:44.929 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Included patterns for restart : []
19:10:44.933 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Excluded patterns for restart : [/spring-boot-starter/target/classes/, /spring-boot-autoconfigure/target/classes/, /spring-boot-starter-[\w-]+/, /spring-boot/target/classes/, /spring-boot-actuator/target/classes/, /spring-boot-devtools/target/classes/]
19:10:44.935 [main] DEBUG org.springframework.boot.devtools.restart.ChangeableUrls - Matching URLs for reloading : [file:/D:/WORKSPACE/RND/jhipster_jasper/target/classes/]
██╗ ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗
██║ ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
██║ ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝
██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║
╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗
╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝
:: JHipster ? :: Running Spring Boot 1.5.12.RELEASE ::
:: http://www.jhipster.tech ::
2018-04-28 19:10:46.477 INFO 12852 --- [ restartedMain] n.o.jasperjhipster.JhipsterJasperApp : Starting JhipsterJasperApp on orphidian11 with PID 12852 (D:\WORKSPACE\RND\jhipster_jasper\target\classes started by orphidian11 in D:\WORKSPACE\RND\jhipster_jasper)
2018-04-28 19:10:46.480 DEBUG 12852 --- [ restartedMain] n.o.jasperjhipster.JhipsterJasperApp : Running with Spring Boot v1.5.12.RELEASE, Spring v4.3.16.RELEASE
2018-04-28 19:10:46.481 INFO 12852 --- [ restartedMain] n.o.jasperjhipster.JhipsterJasperApp : The following profiles are active: swagger,dev
2018-04-28 19:10:46.957 DEBUG 12852 --- [kground-preinit] org.jboss.logging : Logging Provider: org.jboss.logging.Slf4jLoggerProvider found via system property
2018-04-28 19:10:50.557 DEBUG 12852 --- [ restartedMain] n.o.j.config.AsyncConfiguration : Creating Async Task Executor
2018-04-28 19:10:51.778 DEBUG 12852 --- [ restartedMain] c.ehcache.core.Ehcache-usersByLogin : Initialize successful.
2018-04-28 19:10:51.796 DEBUG 12852 --- [ restartedMain] c.ehcache.core.Ehcache-usersByEmail : Initialize successful.
2018-04-28 19:10:52.182 DEBUG 12852 --- [ restartedMain] n.o.j.config.MetricsConfiguration : Registering JVM gauges
2018-04-28 19:10:52.211 DEBUG 12852 --- [ restartedMain] n.o.j.config.MetricsConfiguration : Monitoring the datasource
2018-04-28 19:10:52.213 DEBUG 12852 --- [ restartedMain] n.o.j.config.MetricsConfiguration : Initializing Metrics JMX reporting
2018-04-28 19:10:53.570 DEBUG 12852 --- [ restartedMain] n.o.jasperjhipster.config.WebConfigurer : Registering CORS filter
2018-04-28 19:10:53.846 INFO 12852 --- [ restartedMain] n.o.jasperjhipster.config.WebConfigurer : Web application configuration, using profiles: swagger
2018-04-28 19:10:53.848 DEBUG 12852 --- [ restartedMain] n.o.jasperjhipster.config.WebConfigurer : Initializing Metrics registries
2018-04-28 19:10:53.855 DEBUG 12852 --- [ restartedMain] n.o.jasperjhipster.config.WebConfigurer : Registering Metrics Filter
2018-04-28 19:10:53.857 DEBUG 12852 --- [ restartedMain] n.o.jasperjhipster.config.WebConfigurer : Registering Metrics Servlet
2018-04-28 19:10:53.862 DEBUG 12852 --- [ restartedMain] n.o.jasperjhipster.config.WebConfigurer : Initialize H2 console
2018-04-28 19:10:53.864 INFO 12852 --- [ restartedMain] n.o.jasperjhipster.config.WebConfigurer : Web application fully configured
2018-04-28 19:10:54.369 DEBUG 12852 --- [ restartedMain] n.o.j.config.DatabaseConfiguration : Configuring Liquibase
2018-04-28 19:10:54.390 WARN 12852 --- [sper-Executor-1] i.g.j.c.liquibase.AsyncSpringLiquibase : Starting Liquibase asynchronously, your database might not be ready at startup!
2018-04-28 19:10:56.859 DEBUG 12852 --- [sper-Executor-1] i.g.j.c.liquibase.AsyncSpringLiquibase : Liquibase has updated your database in 2465 ms
2018-04-28 19:11:05.124 DEBUG 12852 --- [ restartedMain] i.g.j.c.apidoc.SwaggerConfiguration : Starting Swagger
2018-04-28 19:11:05.136 DEBUG 12852 --- [ restartedMain] i.g.j.c.apidoc.SwaggerConfiguration : Started Swagger in 11 ms
2018-04-28 19:11:06.773 INFO 12852 --- [ restartedMain] n.o.jasperjhipster.JhipsterJasperApp : Started JhipsterJasperApp in 21.811 seconds (JVM running for 22.663)
2018-04-28 19:11:06.776 INFO 12852 --- [ restartedMain] n.o.jasperjhipster.JhipsterJasperApp :
----------------------------------------------------------
Application 'jhipster_jasper' is running! Access URLs:
Local: http://localhost:8080
External: http://192.168.56.1:8080
Profile(s): [swagger, dev]
----------------------------------------------------------
2018-04-28 19:23:03.930 WARN 12852 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Thread starvation or clock leap detected (housekeeper delta=4m39s68ms329┬╡s271ns).

how can i run jhipster-registry in my external server with war file

i have an application with one microservice and one gateway. I deploy my war(s) application in my external server
so how can i deploy jhipster-registry in my external server with war file
Thanks.
#Gaël Marziou
The log file of my Registry
:: Running Spring Boot 1.3.6.
:: http://jhipster.github.io
::-10-09 03:40:55.863 INFO 5278 --- [ost-startStop-1] i.g.jhipster.registry.ApplicationWebXml : The following profiles are active: dev
2016-10-09 03:40:57.076 WARN 5278 --- [ost-startStop-1] o.s.c.a.ConfigurationClassPostProcessor : Cannot enhance #Configuration bean definitio$
2016-10-09 03:40:57.646 DEBUG 5278 --- [ost-startStop-1] i.g.j.r.config.MetricsConfiguration : Registering JVM gauges
2016-10-09 03:40:57.672 DEBUG 5278 --- [ost-startStop-1] i.g.j.r.config.MetricsConfiguration : Initializing Metrics JMX reporting
2016-10-09 03:40:59.427 INFO 5278 --- [ost-startStop-1] i.g.j.registry.config.WebConfigurer : Web application configuration, using profile$
2016-10-09 03:40:59.427 DEBUG 5278 --- [ost-startStop-1] i.g.j.registry.config.WebConfigurer : Initializing Metrics registries
2016-10-09 03:40:59.430 DEBUG 5278 --- [ost-startStop-1] i.g.j.registry.config.WebConfigurer : Registering Metrics Filter
2016-10-09 03:40:59.431 DEBUG 5278 --- [ost-startStop-1] i.g.j.registry.config.WebConfigurer : Registering Metrics Servlet
2016-10-09 03:40:59.431 INFO 5278 --- [ost-startStop-1] i.g.j.registry.config.WebConfigurer : Web application fully configured
2016-10-09 03:40:59.442 INFO 5278 --- [ost-startStop-1] i.g.jhipster.registry.JHipsterRegistry : Running with Spring profile(s) : [dev]
2016-10-09 03:41:00.536 INFO 5278 --- [ost-startStop-1] com.netflix.discovery.DiscoveryClient : Client configured to neither register nor qu$
2016-10-09 03:41:00.545 INFO 5278 --- [ost-startStop-1] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 14$
2016-10-09 03:41:00.623 INFO 5278 --- [ost-startStop-1] c.n.eureka.DefaultEurekaServerContext : Initializing ...
2016-10-09 03:41:00.625 INFO 5278 --- [ost-startStop-1] c.n.eureka.cluster.PeerEurekaNodes : Adding new peer nodes [http ://admin:admin#lo$
2016-10-09 03:41:00.747 INFO 5278 --- [ost-startStop-1] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
2016-10-09 03:41:00.748 INFO 5278 --- [ost-startStop-1] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
2016-10-09 03:41:00.748 INFO 5278 --- [ost-startStop-1] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
2016-10-09 03:41:00.748 INFO 5278 --- [ost-startStop-1] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
2016-10-09 03:41:00.989 INFO 5278 --- [ost-startStop-1] c.n.eureka.cluster.PeerEurekaNodes : Replica node URL: http ://admin:admin#localh$
2016-10-09 03:41:00.997 INFO 5278 --- [ost-startStop-1] c.n.e.registry.AbstractInstanceRegistry : Finished initializing remote region registri$
2016-10-09 03:41:00.998 INFO 5278 --- [ost-startStop-1] c.n.eureka.DefaultEurekaServerContext : Initialized
2016-10-09 03:41:02.969 WARN 5278 --- [ost-startStop-1] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configurat$
2016-10-09 03:41:02.969 INFO 5278 --- [ost-startStop-1] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sour$
2016-10-09 03:41:02.977 WARN 5278 --- [ost-startStop-1] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configurat$
2016-10-09 03:41:02.977 INFO 5278 --- [ost-startStop-1] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sour$
2016-10-09 03:41:05.582 INFO 5278 --- [ Thread-13] c.n.e.r.PeerAwareInstanceRegistryImpl : Got 1 instances from neighboring DS node
2016-10-09 03:41:05.583 INFO 5278 --- [ Thread-13] c.n.e.r.PeerAwareInstanceRegistryImpl : Renew threshold is: 1
2016-10-09 03:41:05.583 INFO 5278 --- [ Thread-13] c.n.e.r.PeerAwareInstanceRegistryImpl : Changing status to UP
2016-10-09 03:41:05.660 INFO 5278 --- [ost-startStop-1] i.g.jhipster.registry.ApplicationWebXml : Started ApplicationWebXml in 11.934 seconds $
Oct 09, 2016 3:41:05 AM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHos$
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:799)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 6 more
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;
at org.apache.tomcat.websocket.server.WsServerContainer.(WsServerContainer.java:150)
at org.apache.tomcat.websocket.server.WsSci.init(WsSci.java:131)
at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:47)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5493)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
Oct 09, 2016 3:41:05 AM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHos$
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:731)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:799)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
Oct 09, 2016 3:41:05 AM org.apache.catalina.startup.Catalina start
SEVERE: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8004]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:731)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
Oct 09, 2016 3:41:05 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8762"]
Oct 09, 2016 3:41:05 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Oct 09, 2016 3:41:05 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8762"]
2016-10-09 03:41:05.706 INFO 5278 --- [ main] com.netflix.discovery.DiscoveryClient : Completed shut down of DiscoveryClient
2016-10-09 03:41:05.725 INFO 5278 --- [ main] c.n.eureka.DefaultEurekaServerContext : Shutting down ...
2016-10-09 03:41:05.735 INFO 5278 --- [ main] c.n.eureka.DefaultEurekaServerContext : Shut down
Oct 09, 2016 3:41:05 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [ReplicaAwareInstanceRegistry - RenewalThresholdUpdater] but has failed to$
Oct 09, 2016 3:41:05 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Eureka-JerseyClient-Conn-Cleaner2] but has failed to stop it. This is ver$
Oct 09, 2016 3:41:05 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [StatsMonitor-0] but has failed to stop it. This is very likely to create $
Oct 09, 2016 3:41:05 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Eureka-CacheFillTimer] but has failed to stop it. This is very likely to $
Oct 09, 2016 3:41:05 AM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load org.eclipse.jgit.util.FileUtils. The eventual fol$
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1610)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)
at org.springframework.cloud.config.server.support.AbstractScmAccessor$1.run(AbstractScmAccessor.java:91)
Exception in thread "Thread-5" java.lang.NoClassDefFoundError: org/eclipse/jgit/util/FileUtils
at org.springframework.cloud.config.server.support.AbstractScmAccessor$1.run(AbstractScmAccessor.java:91)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jgit.util.FileUtils
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1718)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)
... 1 more

Resources