Trouble using Spring Config Server in jhipster-registry - jhipster

I created a microservice architecture using JHipster. I am using the jhipster-registry v2.8.0. I renamed the 'dev' profile to 'devdmi' because I will have many 'dev' profiles. It is working OK using the "dev,native" profiles for the jhipster-registry and each microservice including it's application-devdmi.yml / boostrap-devdmi.yml files.
I tried to convert this configuration over to using a Git repo. I built my Git repo with .yml files, but I'm not exactly sure of the configuration to use. At the moment I've got:
MyConfig/app1/MyApp1-devdmi.yml
MyConfig/app2/MyApp2-devdmi.yml
I also tried using:
MyConfig/MyApp1-devdmi.yml
MyConfig/MyApp2-devdmi.yml
In MyApp1, I renamed src/main/resources/config/application-devdmi.yml to application-devdmi.yml.bak hoping it would pick up the config from the jhipster-registry acting as a Spring Cloud Config Server.
In MyApp1, I have a bootstrap-devdmi.yml with:
spring:
application:
name: my-app-1
cloud:
config:
fail-fast: true
uri: http://admin:${jhipster.registry.password}#my.host.com:8761/config
name: MyApp1
profile: devdmi
label: master
The jhipster-registry starts up and shows it is connected to the Git repo by looking at the Configuration webpage.
MyApps1 doesn't start and throws an error about Liquibase not knowing which database to connect to:
2017-05-23 13:09:52.669 WARN 60704 --- [ main] o.s.boot.SpringApplication : Error handling failed (Error creating bean with name 'delegatingApplicationListener' defined in class path resource [org/springframework/security/config/annotation /web/configuration/WebSecurityConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor' defined in class path resource [org/springframework/transaction/annotation/ProxyTransactionManagementConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor]: Factory method 'transactionAdvisor' threw exception; nested exception is java.lang.NullPointerException)
2017-05-23 13:09:52.683 ERROR 60704 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Cannot determine embedded database driver class for database type NONE
Any ideas?

Related

Grails module inside maven archetype parent project not able to load grails plugins inside grails module

I have a parent maven archetype reactor project having a grails 2.4.4 project as submodule (standalone grails 2.4.4 project in process to a multimodule project), all build phases are working fine only during integration test (the grails project is using functional-test-1.2.7 grails plugin for it's integration test failsafe is not used here) it is not able to load the plugins below is the error.
[ERROR] ProjectBuildingException for org.grails.plugins:easyb:zip:2.0.5:test: Some problems were encountered while processing the POMs:
[ERROR] Unknown packaging: zip # line 6, column 14
[ERROR] ProjectBuildingException for org.grails.plugins:functional-test:zip:1.2.7:test: Some problems were encountered while processing the POMs:
[ERROR] Unknown packaging: zip # line 6, column 14
[ERROR] ProjectBuildingException for org.grails.plugins:tomcat:zip:7.0.54:test: Some problems were encountered while processing the POMs:
[ERROR] Unknown packaging: zip # line 6, column 14
It started the Integration test but after 4-5 scenarios it fails like below:
SCENARIO the login form should reject invalid credentials, such as_an empty domain
GIVEN functional testing DSL is initalized
WHEN the client accesses the login form
WHEN supplies invalid credentials, such as_an empty domain
WHEN submits the form
Clicked [Login] which resolved to a [class com.gargoylesoftware.htmlunit.html.HtmlSubmitInput]
THEN login rejects the credentials and returns the client to the login form with an error message
THEN tear down functional testing DSL
THEN enable login form
Error |
Error running easyb tests: null (Use --stacktrace to see the full trace)
The old non-module grails project is working fine, and all IT tests are getting passed in local but in case of the multimodule project it is getting failed after 4-5 scenarios (it had total 251 test scenarios)
I've made sure both of them are identical.

Issue while connecting to Cassandra running in docker from Spring boot application

**application.properties: **
spring.data.cassandra.local-datacenter=datacenter1
spring.data.cassandra.keyspace-name=oboe
spring.data.cassandra.contact-points=cassandra
spring.data.cassandra.port=9042
spring.data.cassandra.username=cassandra
spring.data.cassandra.password=cassandra
spring.data.cassandra.schema-action=create_if_not_exists
spring.data.cassandra.entity-base-package=com.example.cassandra.connectivity
**Error while starting Spring applciation: **
2022-10-06 23:55:34.844 WARN 3284 --- [ s0-admin-1] c.d.o.d.i.c.control.ControlConnection : [s0] Error connecting to Node(endPoint=cassandra/<unresolved>:9042, hostId=null, hashCode=68e4631), trying next node (UnknownHostException: No such host is known (cassandra))
2022-10-06 23:55:36.980 WARN 3284 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'scanLocationDataController': Unsatisfied dependency expressed through field 'service'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'scanLocationDataService': Unsatisfied dependency expressed through field 'repo'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scanLocationDataRepo' defined in org.gcs.cassandra.repo.ScanLocationDataRepo defined in #EnableCassandraRepositories declared on CassandraRepositoriesRegistrar.EnableCassandraRepositoriesConfiguration: Cannot resolve reference to bean 'cassandraTemplate' while setting bean property 'cassandraTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [org/gcs/cassandra/config/CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cassandraSessionFactory' defined in class path resource [org/gcs/cassandra/config/CassandraConfig.class]: Unsatisfied dependency expressed through method 'cassandraSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraSession' defined in class path resource [org/gcs/cassandra/config/CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.oss.driver.api.core.AllNodesFailedException: Could not reach any contact point, make sure you've provided valid addresses (showing first 1 nodes, use getAllErrors() for more): Node(endPoint=cassandra/<unresolved>:9042, hostId=null, hashCode=68e4631): [java.net.UnknownHostException: No such host is known (cassandra)]
**Docker Container logs: **
cassandra 21:35:51.97 INFO ==> ** Starting Cassandra setup **
cassandra 21:35:51.98 WARN ==> CASSANDRA_HOST not set, defaulting to system hostname
cassandra 21:35:51.98 INFO ==> Validating settings in CASSANDRA_* env vars..
cassandra 21:35:51.99 WARN ==> You've not provided a password. Default password "cassandra" will be used. For safety reasons, please provide a secure password in a production environment.
cassandra 21:35:51.99 WARN ==> You set the environment variable CASSANDRA_PASSWORD=cassandra. This is the default value when bootstrapping Cassandra and should not be used in production environments.
cassandra 21:35:52.01 INFO ==> Initializing Cassandra database...
cassandra 21:35:52.21 INFO ==> Deploying Cassandra from scratch
cassandra 21:35:52.22 INFO ==> Starting Cassandra
cassandra 21:35:52.22 INFO ==> Checking that it started up correctly
cassandra 21:36:57.30 INFO ==> Found CQL startup log line
cassandra 21:36:58.74 INFO ==> Nodetool reported the successful startup of Cassandra
cassandra 21:36:58.75 INFO ==> Non-seeder node. Waiting for synchronization
cassandra 21:36:58.75 INFO ==> Trying to access CQL server # ccff4fe7e189
cassandra 21:37:11.24 INFO ==> Accessed CQL server successfully
cassandra 21:37:11.25 INFO ==> ** Cassandra setup finished! **

Get "No such file" exception in sftp outbound-gateway after upgrade spring integration version from 4.3.12 to 5.2.5

After we upgrade spring integration version from 4.3.12 to 5.2.5, the new exception occurred as follows:
org.springframework.messaging.MessageHandlingException: error occurred in message handler [bean 'ollSrFeedbackDeliver$child.ollSrFeedbackOutboundGateway.handler' for component 'ollSrFeedbackDeliver$child.ollSrFeedbackOutboundGateway'; defined in: 'class path resource [config/olltms/olltms_srFeedback_context.xml]'; from source: ''int-sftp:outbound-gateway' with id='ollSrFeedbackOutboundGateway'']; nested exception is org.springframework.messaging.MessagingException: Failed to execute on session; nested exception is org.springframework.core.NestedIOException: failed to rename from /out/DCS_SR_FEEDBACK/SVR3oBweZKH7sf5Lf1Szlef-20200618211747550.xml to /out/DCS_SR_FEEDBACK/backup/SVR3oBweZKH7sf5Lf1Szlef-20200618211747550.xml; nested exception is 2: No such file
our config as follows:
<int-sftp:inbound-streaming-channel-adapter id="ollSrFeedbackInboundAdapter"
comparator="sftpFileModifiedTimeComparator"
session-factory="cachingSftpSessionFactory"
channel="ollSrFeedbackInputChannel"
filename-pattern="${filename-pattern}"
remote-file-separator="/"
remote-directory="${sr-feedback-remote-directory}">
<int:poller fixed-delay="${sftp-in-fixed-delay}"/>
</int-sftp:inbound-streaming-channel-adapter>
use outbound gateway to move file to backup folder:
<int-sftp:outbound-gateway session-factory="cachingSftpSessionFactory"
id="ollSrFeedbackOutboundGateway"
command="mv"
expression="headers.file_remoteDirectory+'/'+headers.file_remoteFile"
rename-expression="headers.file_remoteDirectory+'/backup/'+headers.file_remoteFile"
/>
Before the upgrade, everything is running normally, and problems occurred after the upgrade. After check jsch log, find:
DEBUG [task-scheduler-2] SftpSession: - File: /out/DCS_SR_FEEDBACK/SVR3oBweZKH7sf5Lf1Szlef-20200618211747550.xml was successfully renamed to /out/DCS_SR_FEEDBACK/backup/SVR3oBweZKH7sf5Lf1Szlef-20200618211747550.xml
DEBUG [task-scheduler-3] SftpSession: - Initial File rename failed, possibly because file already exists. Will attempt to delete file: /out/DCS_SR_FEEDBACK/backup/SVR3oBweZKH7sf5Lf1Szlef-20200618211747550.xml and execute rename again.
DEBUG [task-scheduler-3] SftpSession: - Delete file: /out/DCS_SR_FEEDBACK/backup/SVR3oBweZKH7sf5Lf1Szlef-20200618211747550.xml succeeded. Will attempt rename again
is there anything change after upgrade ?

Connexion error login in Admin (pb MySQL) with Jhipster

i'm installing Jhipster for the first time, and when launching it, the page web is well displayed but I can't login with admin...
(Failed to sign in! Please check your credentials and try again.)
regarding the npm console, I have this error :
[HPM] Error occurred while trying to proxy request /api/authenticate from localhost:9060 to http://127.0.0.1:8080 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
Any idea of this problem ?
Generators :
monolythic
no registry
JWT
MySQL (P)
MySQL (Dev)
EhCache
2nd level cache : Hibernate
Maven
Angular
No Sass
No internationalization
Protractor
No Marketspace
2019-02-14 15:19:05.673 WARN 23640 --- [ XNIO-2 task-13] o.z.problem.spring.common.AdviceTrait : Unauthorized: Could not roll back JPA transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to
acquire JDBC Connection
2019-02-14 15:19:05.779 WARN 23640 --- [ XNIO-2 task-13] .m.m.a.ExceptionHandlerExceptionResolver : Resolved exception caused by handler execution: org.springframework.security.authentication.InternalAuthenticationServiceExceptio
n: Could not roll back JPA transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection

While deploying more than one Spring Boot application in a single Tomcat server means showing exception. How to solve this?

I am using Spring Boot in my Java application, and to deployment used Tomcat 7. I was trying to deploy multiple Spring Boot projects in the same server it showing exceptions. But deploy one Spring Boot application and another one was Spring application means it's working.
The exception is:
2016-01-22 08:05:18.301 INFO 16021 --- [ost-startStop-1] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'environmentManager' has been autodetected for JMX exposure
2016-01-22 08:05:18.303 INFO 16021 --- [ost-startStop-1] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'environmentManager': registering with JMX server as MBean [org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager]
2016-01-22 08:05:18.312 INFO 16021 --- [ost-startStop-1] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/classes/, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/activation-1.1.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/antlr-2.7.7.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/aopalliance-1.0.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/aopalliance-repackaged-2.3.0-b10.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/apns-0.1.6.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/asm-all-repackaged-2.3.0-b10.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/aspectjrt-1.8.6.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/aspectjweaver-1.8.6.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/bcpkix-jdk15on-1.47.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/bcprov-jdk15on-1.47.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/bean-validator-2.3.0-b10.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/class-model-2.3.0-b10.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/classmate-1.0.0.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/com.ibm.jbatch-tck-spi-1.0.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/commons-beanutils-1.9.2.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/commons-codec-1.9.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/commons-collections-3.2.1.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/commons-digester-2.1.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/commons-fileupload-1.3.1.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/commons-io-2.2.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/commons-lang-2.4.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/commons-logging-1.0.4.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/commons-validator-1.3.1.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/config-types-2.3.0-b10.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/core-2.3.0-b10.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/dom4j-1.6.1.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hamcrest-core-1.3.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hibernate-commons-annotations-4.0.5.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hibernate-core-4.3.10.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hibernate-entitymanager-4.3.10.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hibernate-jpamodelgen-4.3.10.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hibernate-validator-5.1.3.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hk2-2.3.0-b10.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hk2-api-2.3.0-b10.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hk2-config-2.3.0-b10.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hk2-locator-2.3.0-b10.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hk2-runlevel-2.3.0-b10.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hk2-utils-2.3.0-b10.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hornetq-commons-2.4.7.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hornetq-core-client-2.4.7.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hornetq-jms-client-2.4.7.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hornetq-journal-2.4.7.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hornetq-native-2.4.7.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/hsqldb-2.3.3.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/httpclient-4.5.1.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/httpcore-4.4.3.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/imgscalr-lib-4.2.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jackson-annotations-2.4.6.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jackson-core-2.4.6.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jackson-core-asl-1.4.0.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jackson-databind-2.4.6.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jackson-jaxrs-base-2.3.2.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jackson-jaxrs-json-provider-2.3.2.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jackson-mapper-asl-1.4.0.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jackson-module-jaxb-annotations-2.3.2.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jandex-1.1.0.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/javassist-3.18.1-GA.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/javax.annotation-api-1.2.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/javax.batch-api-1.0.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/javax.inject-1.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/javax.inject-2.3.0-b10.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/javax.transaction-api-1.2.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/javax.ws.rs-api-2.0.1.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jboss-annotations-api_1.2_spec-1.0.0.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jboss-jms-api_2.0_spec-1.0.0.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jboss-logging-3.1.3.GA.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jboss-logging-annotations-1.2.0.Beta1.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jboss-websocket-api_1.1_spec-1.1.0.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jcl-over-slf4j-1.7.12.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jersey-bean-validation-2.12.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jersey-client-2.12.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jersey-common-2.12.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jersey-container-servlet-2.12.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jersey-container-servlet-core-2.12.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jersey-guava-2.12.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jersey-media-json-jackson-2.12.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jersey-media-multipart-2.12.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jersey-server-2.12.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jersey-spring3-2.12.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jettison-1.2.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jgroups-3.3.4.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/json-simple-1.1.1.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/jul-to-slf4j-1.7.12.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/junit-4.12.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/log4j-over-slf4j-1.7.12.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/logback-classic-1.1.3.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/logback-core-1.1.3.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/mail-1.4.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/mimepull-1.9.3.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/mysql-connector-java-5.1.35.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/neo4j-cypher-compiler-2.1-2.1.5.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/netty-all-4.0.13.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/opencsv-2.3.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/osgi-resource-locator-1.0.1.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/parboiled-core-1.1.6.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/parboiled-scala_2.10-1.1.6.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/scala-library-2.10.4.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/slf4j-api-1.7.12.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/snakeyaml-1.14.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-aop-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-aspects-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-batch-core-3.0.4.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-batch-infrastructure-3.0.4.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-beans-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-boot-1.2.5.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-boot-actuator-1.2.5.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-boot-autoconfigure-1.2.5.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-boot-starter-1.2.5.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-boot-starter-actuator-1.2.5.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-boot-starter-aop-1.2.5.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-boot-starter-batch-1.2.5.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-boot-starter-data-jpa-1.2.5.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-boot-starter-hornetq-1.2.5.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-boot-starter-jdbc-1.2.5.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-boot-starter-jersey-1.2.5.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-boot-starter-logging-1.2.5.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-boot-starter-security-1.2.5.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-boot-starter-undertow-1.2.5.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-boot-starter-web-1.2.5.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-bridge-2.3.0-b10.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-cloud-commons-1.0.2.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-cloud-context-1.0.2.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-cloud-security-1.0.2.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-cloud-starter-1.0.3.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-cloud-starter-oauth2-1.0.3.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-cloud-starter-security-1.0.3.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-context-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-core-4.1.7.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-data-commons-1.9.2.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-data-jpa-1.7.2.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-expression-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-jdbc-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-jms-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-messaging-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-orm-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-retry-1.1.2.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-security-config-3.2.7.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-security-core-3.2.7.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-security-crypto-3.2.7.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-security-jwt-1.0.3.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-security-oauth2-2.0.7.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-security-web-3.2.7.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-social-core-1.1.2.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-tx-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-web-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/spring-webmvc-4.1.6.RELEASE.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/tiger-types-1.4.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/tomcat-jdbc-8.0.23.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/tomcat-juli-8.0.23.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/undertow-core-1.1.7.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/undertow-servlet-1.1.7.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/undertow-websockets-jsr-1.1.7.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/validation-api-1.1.0.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/xml-apis-1.0.b2.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/xmlpull-1.1.3.1.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/xnio-api-3.3.0.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/xnio-nio-3.3.0.Final.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/xpp3_min-1.1.4c.jar, file:/usr/local/apache-tomcat-7.0.34/webapps/sunbox/WEB-INF/lib/xstream-1.4.2.jar]
2016-01-22 08:05:18.317 INFO 16021 --- [ost-startStop-1] utoConfigurationReportLoggingInitializer :
Error starting ApplicationContext. To display the auto-configuration report enable debug logging (start with --debug)
2016-01-22 08:05:18.324 ERROR 16021 --- [ost-startStop-1] o.s.boot.SpringApplication : Application startup failed
org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [org.springframework.cloud.context.environment.EnvironmentManager#5edb3f8d] with key 'environmentManager'; nested exception is javax.management.InstanceAlreadyExistsException: org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager
at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:625)
at org.springframework.jmx.export.MBeanExporter.registerBeans(MBeanExporter.java:550)
at org.springframework.jmx.export.MBeanExporter.afterSingletonsInstantiated(MBeanExporter.java:432)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:775)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.context.web.SpringBootServletInitializer.run(SpringBootServletInitializer.java:119)
at org.springframework.boot.context.web.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:110)
at org.springframework.boot.context.web.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:69)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5274)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: javax.management.InstanceAlreadyExistsException: org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager
at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
at org.springframework.jmx.support.MBeanRegistrationSupport.doRegister(MBeanRegistrationSupport.java:195)
at org.springframework.jmx.export.MBeanExporter.registerBeanInstance(MBeanExporter.java:678)
at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:615)
... 25 common frames omitted
I think what happens when you deploy multiple Spring Boot applications is those apps try to register to jmx on the same jvm using the same name.
Check this issue for the solution https://github.com/spring-cloud/spring-cloud-config/issues/118
Copy-paste from DavidBiesack's solution
(regarding application.properties or application.yaml)
I was able to solve this by defining the following in my application.properties
spring.application.name=my-app-name
spring.jmx.default-domain=my-app-name
Or for application.yaml:
spring:
application:
name: my-app-name
jmx:
default-domain: my-app-name
In my case, we need to have two of the same application online during updates before cutting over sessions to maintain 100% uptime. In this case, you cannot just specify a unique name (unless you update it for each potential deployment). Instead, I disabled jmx with the following setting in my application.yml file for all profiles:
spring:
jmx:
enabled: false
I think the jmx doesn't allow 2 beans with the same objectName to be created.
You have 2 options.
Turn off JMX and try to start it again.
Change the name of the bean environmentManager(and any other duplicated bean) on one of the applications you are putting in the same container

Resources