No such method error with dropwizard-websockets - java

I'm trying to use dropwizard-websockets v1.2 with dropwizard 1.0.3 but getting the below error. Is dropwizard-guice getting in the way?
web_1 | WARN [2016-12-21 12:50:53,665] org.eclipse.jetty.servlet.ServletHandler:
web_1 | ! java.lang.NoSuchMethodError: org.eclipse.jetty.io.AbstractConnection.<init>(Lorg/eclipse/jetty/io/EndPoint;Ljava/util/concurrent/Executor;Z)V
web_1 | ! at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.<init>(AbstractWebSocketConnection.java:225)
web_1 | ! at org.eclipse.jetty.websocket.server.WebSocketServerConnection.<init>(WebSocketServerConnection.java:41)
web_1 | ! at org.eclipse.jetty.websocket.server.WebSocketServerFactory.upgrade(WebSocketServerFactory.java:520)
web_1 | ! at org.eclipse.jetty.websocket.server.WebSocketServerFactory.acceptWebSocket(WebSocketServerFactory.java:186)
web_1 | ! at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:206)
web_1 | ! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
web_1 | ! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:34)
web_1 | ! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
web_1 | ! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:50)
web_1 | ! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:44)
web_1 | ! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
web_1 | ! at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:119)
web_1 | ! at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)
web_1 | ! at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)
web_1 | ! at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)
web_1 | ! at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)
web_1 | ! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
web_1 | ! at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
web_1 | ! at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
web_1 | ! at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
web_1 | ! at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
web_1 | ! at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
web_1 | ! at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
web_1 | ! at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
web_1 | ! at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
web_1 | ! at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
web_1 | ! at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
web_1 | ! at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
web_1 | ! ... 26 common frames omitted
web_1 | ! Causing: javax.servlet.ServletException: Filtered request failed.
web_1 | ! at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:384)
web_1 | ! at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
web_1 | ! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
web_1 | ! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
web_1 | ! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
web_1 | ! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
web_1 | ! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
web_1 | ! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
web_1 | ! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
web_1 | ! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240)
web_1 | ! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51)
web_1 | ! at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
web_1 | ! at io.dropwizard.jetty.BiDiGzipHandler.handle(BiDiGzipHandler.java:68)
web_1 | ! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:169)
web_1 | ! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
web_1 | ! at org.eclipse.jetty.server.Server.handle(Server.java:524)
web_1 | ! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
web_1 | ! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
web_1 | ! at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
web_1 | ! at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
web_1 | ! at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
web_1 | ! at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
web_1 | ! at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
web_1 | ! at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
web_1 | ! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
web_1 | ! at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
web_1 | ! at java.lang.Thread.run(Thread.java:745)

Maven central holds a version 1.2 of dropwizard-websockets, which is old and out of date but a higher number than more recent versions so displayed by default.
Version 1.0.0-1 works fine.

Related

Spring Boot and MySQL can't connect on Docker while using docker-compose - Shows "Failed to create/setup connection: Communications link failure"

I'm just trying to setup a starter project based on Spring Boot and MySQL using Docker. So I tried to run this github project on the Docker. But I am unable to establish connection between Java and MySQL.
I'm running Ubuntu 16.04.
I'm getting "Failed to create/setup connection: Communications link failure...." error while executing "docker-compose up" command.
Also this error doesn't show up if I use Docker Client. Like when I do as:
# 1. docker run -d -p 6033:3306 --name=docker-mysql --env="MYSQL_ROOT_PASSWORD=root" --env="MYSQL_PASSWORD=root" --env="MYSQL_DATABASE=book_manager" mysql
# 2. docker build -t springio/gs-spring-boot-docker .
# 3. docker run -t --link docker-mysql:mysql -p 10222:10222 springio/gs-spring-boot-docker
I tried to setup same environment through docker-compose but somehow its not working.
Below are the configuration details:
application.properties
logging.level.org.springframework=INFO
logging.level.com.mkyong=INFO
logging.level.com.zaxxer=DEBUG
logging.level.root=ERROR
logging.pattern.console=%-5level %logger{36} - %msg%n
## MySQL
spring.datasource.url=jdbc:mysql://docker-mysql:3306/book_manager
spring.datasource.username=root
spring.datasource.password=root
server.port=10222
connection.driver.class = com.mysql.jdbc.Driver
hibernate.dialect=org.hibernate.dialect.MySQLDialect
#`hibernate_sequence' doesn't exist
spring.jpa.hibernate.use-new-id-generator-mappings=false
hibernate.show_sql=false
#drop n create table again, good for testing, comment this in production
spring.jpa.hibernate.ddl-auto=create
Dockerfile for the java application container (service)
FROM openjdk:8-jdk-alpine
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} spring-data-jpa-mysql-1.0.jar
ENTRYPOINT ["java","-jar","/spring-data-jpa-mysql-1.0.jar"]
docker-compose.yml
version: '3'
services:
docker-mysql:
restart: always
container_name: docker-mysql
image: mysql
environment:
MYSQL_DATABASE: book_manager
MYSQL_ROOT_PASSWORD: root
ports:
- "6033:3306"
networks:
- spring-boot-mysql-network
book-manager-app:
build:
context: ./
dockerfile: Dockerfile
expose:
- "10222"
ports:
- "10222:10222"
depends_on:
- "docker-mysql"
networks:
- spring-boot-mysql-network
networks:
spring-boot-mysql-network:
driver: bridge
The following is the error log that I'm getting:
$/spring-data-jpa-mysql-compose$ docker-compose up
Creating network "spring-data-jpa-mysql-compose_spring-boot-mysql-network" with driver "bridge"
Creating docker-mysql ... done
Creating spring-data-jpa-mysql-compose_book-manager-app_1 ... done
Attaching to docker-mysql, spring-data-jpa-mysql-compose_book-manager-app_1
docker-mysql | 2020-04-07 13:44:39+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
docker-mysql | 2020-04-07 13:44:39+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
docker-mysql | 2020-04-07 13:44:39+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
docker-mysql | 2020-04-07 13:44:39+00:00 [Note] [Entrypoint]: Initializing database files
docker-mysql | 2020-04-07T13:44:39.855069Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
docker-mysql | 2020-04-07T13:44:39.855190Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.19) initializing of server in progress as process 42
book-manager-app_1 |
book-manager-app_1 | . ____ _ __ _ _
book-manager-app_1 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
book-manager-app_1 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
book-manager-app_1 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
book-manager-app_1 | ' |____| .__|_| |_|_| |_\__, | / / / /
book-manager-app_1 | =========|_|==============|___/=/_/_/_/
book-manager-app_1 | :: Spring Boot :: (v2.1.2.RELEASE)
book-manager-app_1 |
book-manager-app_1 | INFO com.mkyong.StartApplication - Starting StartApplication v1.0 on 3638e84181ae with PID 1 (/spring-data-jpa-mysql-1.0.jar started by root in /)
book-manager-app_1 | INFO com.mkyong.StartApplication - No active profile set, falling back to default profiles: default
book-manager-app_1 | INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode.
book-manager-app_1 | INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 134ms. Found 1 repository interfaces.
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - Driver class com.mysql.cj.jdbc.Driver found in Thread context class loader org.springframework.boot.loader.LaunchedURLClassLoader#5d099f62
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - HikariPool-1 - configuration:
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - allowPoolSuspension.............false
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - autoCommit......................true
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - catalog.........................none
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - connectionInitSql...............none
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - connectionTestQuery.............none
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - connectionTimeout...............30000
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - dataSource......................none
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - dataSourceClassName.............none
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - dataSourceJNDI..................none
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - dataSourceProperties............{password=<masked>}
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - driverClassName................."com.mysql.cj.jdbc.Driver"
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - healthCheckProperties...........{}
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - healthCheckRegistry.............none
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - idleTimeout.....................600000
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - initializationFailTimeout.......1
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - isolateInternalQueries..........false
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - jdbcUrl.........................jdbc:mysql://docker-mysql:3306/book_manager
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - leakDetectionThreshold..........0
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - maxLifetime.....................1800000
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - maximumPoolSize.................10
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - metricRegistry..................none
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - metricsTrackerFactory...........none
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - minimumIdle.....................10
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - password........................<masked>
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - poolName........................"HikariPool-1"
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - readOnly........................false
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - registerMbeans..................false
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - scheduledExecutor...............none
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - schema..........................none
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - threadFactory...................internal
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - transactionIsolation............default
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - username........................"root"
book-manager-app_1 | DEBUG com.zaxxer.hikari.HikariConfig - validationTimeout...............5000
book-manager-app_1 | INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
book-manager-app_1 | DEBUG com.zaxxer.hikari.pool.PoolBase - HikariPool-1 - Failed to create/setup connection: Communications link failure
book-manager-app_1 |
book-manager-app_1 | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
book-manager-app_1 | DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Cannot acquire connection from data source
book-manager-app_1 | com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
book-manager-app_1 |
book-manager-app_1 | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
book-manager-app_1 | at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
book-manager-app_1 | at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
book-manager-app_1 | at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:835)
book-manager-app_1 | at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:455)
book-manager-app_1 | at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240)
book-manager-app_1 | at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:207)
book-manager-app_1 | at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:136)
book-manager-app_1 | at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:369)
book-manager-app_1 | at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:198)
book-manager-app_1 | at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:467)
book-manager-app_1 | at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:541)
book-manager-app_1 | at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
book-manager-app_1 | at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
book-manager-app_1 | at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:157)
book-manager-app_1 | at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:115)
book-manager-app_1 | at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:78)
book-manager-app_1 | at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:319)
book-manager-app_1 | at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:356)
book-manager-app_1 | at org.springframework.boot.autoconfigure.orm.jpa.DatabaseLookup.getDatabase(DatabaseLookup.java:73)
book-manager-app_1 | at org.springframework.boot.autoconfigure.orm.jpa.JpaProperties.determineDatabase(JpaProperties.java:142)
book-manager-app_1 | at org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.jpaVendorAdapter(JpaBaseConfiguration.java:112)
book-manager-app_1 | at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration$$EnhancerBySpringCGLIB$$ff868e63.CGLIB$jpaVendorAdapter$8(<generated>)
book-manager-app_1 | at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration$$EnhancerBySpringCGLIB$$ff868e63$$FastClassBySpringCGLIB$$5875e117.invoke(<generated>)
book-manager-app_1 | at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
book-manager-app_1 | at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
book-manager-app_1 | at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration$$EnhancerBySpringCGLIB$$ff868e63.jpaVendorAdapter(<generated>)
book-manager-app_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
book-manager-app_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
book-manager-app_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
book-manager-app_1 | at java.lang.reflect.Method.invoke(Method.java:498)
book-manager-app_1 | at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
book-manager-app_1 | at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
book-manager-app_1 | at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
book-manager-app_1 | at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
book-manager-app_1 | at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:91)
book-manager-app_1 | at com.mysql.cj.NativeSession.connect(NativeSession.java:152)
book-manager-app_1 | at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:955)
book-manager-app_1 | at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:825)
book-manager-app_1 | ... 83 common frames omitted
book-manager-app_1 | Caused by: java.net.ConnectException: Connection refused (Connection refused)
book-manager-app_1 | at java.net.PlainSocketImpl.socketConnect(Native Method)
book-manager-app_1 | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
book-manager-app_1 | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
book-manager-app_1 | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
book-manager-app_1 | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
book-manager-app_1 | at java.net.Socket.connect(Socket.java:589)
book-manager-app_1 | at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155)
book-manager-app_1 | at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65)
book-manager-app_1 | ... 86 common frames omitted
book-manager-app_1 | ERROR com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Exception during pool initialization.
book-manager-app_1 | com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
book-manager-app_1 |
book-manager-app_1 | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
book-manager-app_1 | at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
book-manager-app_1 | at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
book-manager-app_1 | at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:835)
book-manager-app_1 | at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:455)
book-manager-app_1 | at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240)
book-manager-app_1 | at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:207)
book-manager-app_1 | at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:136)
book-manager-app_1 | at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:369)
book-manager-app_1 | at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:198)
book-manager-app_1 | at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:467)
book-manager-app_1 | at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:541)
book-manager-app_1 | at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
book-manager-app_1 | at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
book-manager-app_1 | at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:157)
book-manager-app_1 | at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:115)
book-manager-app_1 | at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:78)
book-manager-app_1 | at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:319)
book-manager-app_1 | at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:356)
book-manager-app_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1127)
book-manager-app_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
book-manager-app_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
book-manager-app_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
book-manager-app_1 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
book-manager-app_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
book-manager-app_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
book-manager-app_1 | at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1083)
book-manager-app_1 | at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:853)
book-manager-app_1 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
book-manager-app_1 | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
book-manager-app_1 | at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
book-manager-app_1 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
book-manager-app_1 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
book-manager-app_1 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
book-manager-app_1 | at com.mkyong.StartApplication.main(StartApplication.java:19)
book-manager-app_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
book-manager-app_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
book-manager-app_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
book-manager-app_1 | at java.lang.reflect.Method.invoke(Method.java:498)
book-manager-app_1 | at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
book-manager-app_1 | at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
book-manager-app_1 | at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
book-manager-app_1 | at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
book-manager-app_1 | Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
book-org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
book-manager-app_1 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
book-manager-app_1 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
book-manager-app_1 | at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
book-manager-app_1 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
book-manager-app_1 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
book-manager-app_1 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
book-manager-app_1 | at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMertiesSet(AbstractEntityManagerFactoryBean.java:377)
book-manager-app_1 | at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341)
book-manager-app_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1804)
book-manager-app_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1741)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
book-manager-app_1 | at java.lang.reflect.Method.invoke(Method.java:498)
book-manager-app_1 | at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
book-manager-app_1 | at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
book-manager-app_1 | at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
book-manager-app_1 | at com.cketImpl.java:392)
book-manager-app_1 | at java.net.Socket.connect(Socket.java:589)
book-manager-app_1 | at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155)
book-manager-app_1 | at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65)
book-manager-app_1 | ... 59 common frames omitted
book-manager-app_1 | WARN o.s.c.a.AnnotationConfigApplicationContext - 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/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
book-manager-app_1 | INFO o.s.b.a.l.ConditionEvaluationReportLoggingListener -
book-manager-app_1 |
book-manager-app_1 | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
book-manager-app_1 | ERROR o.s.boot.SpringApplication - Application run failed
book-manager-app_1 | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
book-manager-app_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1745)
book-manager-app_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576)
book-manager-app_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(Abstractorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:853)
book-manager-app_1 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
book-manager-app_1 | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
book-manager-app_1 | at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
book-manager-app_1 | Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
book-manager-app_1 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:275)
book-manager-app_1 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
book-manager-app_1 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
book-manager-app_1 | at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentityManagerFactoryBuilderImpl.java:904)
book-manager-app_1 | at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:935)
book-manager-app_1 | at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityMaAbstractEntityManagerFactoryBean.java:377)
book-manager-app_1 | at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341)
book-manager-app_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1804)
book-manager-app_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1741)
book-manager-app_1 | ... 23 common frames omitted
book-manager-app_1 | Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
book-manager-app_1 | at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImporg.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:94)
book-manager-app_1 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
book-manager-app_1 | ... 40 common frames omitted
spring-data-jpa-mysql-compose_book-manager-app_1 exited with code 1

Connect tomcat and mysql in docker-compose

I'm working on project for studies. Now I am at the stage of moving project to docker containers. I have placet tomcat with my website and mysql with database do docker-compose.yml. Unfortunately classes from tomcat can't connect with database
Java code
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
public class Waliduj {
String url="jdbc:mysql://localhost:3306/uczelnia?useTimezone=true&serverTimezone=UTC";
String username="root";
String password="121212";
public boolean Waliduje(String uname,String pass) {
try {
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection(url,username,password);
PreparedStatement st=con.prepareStatement("SELECT email,haslo FROM logowanie WHERE email=? AND haslo=?");
st.setString(1,uname);
st.setString(2,pass);
ResultSet rs = st.executeQuery();
if(rs.next()) {
return true;
}
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException se) {
// TODO Auto-generated catch block
se.printStackTrace();
}
return false;
}
}
Dockerfile code
FROM tomcat:8.0.41-jre8
COPY ./webapp /usr/local/tomcat/webapps/webapp
CMD ["catalina.sh", "run"]
docker-compose.yml code
version: '3'
services:
web:
build: .
ports:
- "8080:8080"
links:
- "db:uczelnia"
db:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: 121212
MYSQL_DATABASE: uczelnia
ports:
- "3306:3306"
PhpMyAdmin:
image: nazarpc/phpmyadmin
ports:
- "8090:80"
links:
- db:mysql
Error code
web_1 | com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
web_1 |
web_1 | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
web_1 | at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:172)
web_1 | at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
web_1 | at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:862)
web_1 | at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:444)
web_1 | at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:230)
web_1 | at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:226)
web_1 | at java.sql.DriverManager.getConnection(DriverManager.java:664)
web_1 | at java.sql.DriverManager.getConnection(DriverManager.java:247)
web_1 | at com.login.walidacja.Waliduj.Waliduje(Waliduj.java:20)
web_1 | at com.login.Login.doPost(Login.java:27)
web_1 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
web_1 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
web_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
web_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
web_1 | at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
web_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
web_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
web_1 | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
web_1 | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
web_1 | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
web_1 | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
web_1 | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
web_1 | at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
web_1 | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
web_1 | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509)
web_1 | at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)
web_1 | at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
web_1 | at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2508)
web_1 | at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2497)
web_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
web_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
web_1 | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
web_1 | at java.lang.Thread.run(Thread.java:745)
web_1 | Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
web_1 |
web_1 | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
web_1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
web_1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
web_1 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
web_1 | at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
web_1 | at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:59)
web_1 | at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:103)
web_1 | at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:149)
web_1 | at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:165)
web_1 | at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:92)
web_1 | at com.mysql.cj.NativeSession.connect(NativeSession.java:152)
web_1 | at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:982)
web_1 | at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:852)
web_1 | ... 30 more
web_1 | Caused by: java.net.ConnectException: Connection refused (Connection refused)
web_1 | at java.net.PlainSocketImpl.socketConnect(Native Method)
web_1 | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
web_1 | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
web_1 | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
web_1 | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
web_1 | at java.net.Socket.connect(Socket.java:589)
web_1 | at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:173)
web_1 | at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:66)
web_1 | ... 33 more
Additional informations:
I'm working on windows 10 so docker is on windows too.
I apologize for spelling errors but I'm from poland so english is not
my
Via the compose file, your database service will be referencable on the network via db. The links keyword isn't necessary unless you simply need a different name for your container. If you change your java code to connect to jdbc:mysql://db:3306/uczelnia?useTimezone=true&serverTimezone=UTC it should work as expected.
https://docs.docker.com/compose/networking/

Problems when moving from the jetty server to the tomcat server

I'm really stuck with a problem
I have built an Axis 2 client running against an API using a .WSDL file. I have used a local jetty server when I have developed, but I need to move it over to a local tomcat server. When I moved my .war file to the local Tomcat, I get the following error. Can someone please give me some advice so I'm going in the right direction
SLL debug in tomcat:
http-nio-8080-exec-1, WRITE: TLSv1.2 Handshake, length = 189
http-nio-8080-exec-1, handling exception: java.net.SocketException: Connection reset
http-nio-8080-exec-1, SEND TLSv1.2 ALERT: fatal, description = unexpected_message
http-nio-8080-exec-1, WRITE: TLSv1.2 Alert, length = 2
http-nio-8080-exec-1, Exception sending alert: java.net.SocketException: Connection reset by peer: socket write error
http-nio-8080-exec-1, called closeSocket()
http-nio-8080-exec-1, called close()
http-nio-8080-exec-1, called closeInternal(true)
A
INFO | jvm 1 | 2016/12/21 13:28:59.193 | Unable to sendViaPost to url[https://someurl.com/Service.svc]
INFO | jvm 1 | 2016/12/21 13:28:59.194 | org.apache.axis2.AxisFault: Connection reset
INFO | jvm 1 | 2016/12/21 13:28:59.196 | at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
INFO | jvm 1 | 2016/12/21 13:28:59.197 | at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:99)
INFO | jvm 1 | 2016/12/21 13:28:59.198 | at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
INFO | jvm 1 | 2016/12/21 13:28:59.199 | at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
INFO | jvm 1 | 2016/12/21 13:28:59.201 | at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
INFO | jvm 1 | 2016/12/21 13:28:59.204 | at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
INFO | jvm 1 | 2016/12/21 13:28:59.205 | at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
INFO | jvm 1 | 2016/12/21 13:28:59.206 | at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
INFO | jvm 1 | 2016/12/21 13:28:59.207 | at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.executeMethod(HTTPSenderImpl.java:900)
INFO | jvm 1 | 2016/12/21 13:28:59.209 | at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.sendViaPost(HTTPSenderImpl.java:212)
INFO | jvm 1 | 2016/12/21 13:28:59.213 | at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
INFO | jvm 1 | 2016/12/21 13:28:59.215 | at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:403)
INFO | jvm 1 | 2016/12/21 13:28:59.218 | at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:234)
INFO | jvm 1 | 2016/12/21 13:28:59.220 | at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
INFO | jvm 1 | 2016/12/21 13:28:59.222 | at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:399)
INFO | jvm 1 | 2016/12/21 13:28:59.224 | at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
INFO | jvm 1 | 2016/12/21 13:28:59.227 | at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150)
INFO | jvm 1 | 2016/12/21 13:28:59.229 | at se.docpub.documentfolderservice.DocumentFolderServiceStub.loadFolder(DocumentFolderServiceStub.java:769)
INFO | jvm 1 | 2016/12/21 13:28:59.231 | at se.soleilit.document_api.resources.DocumentResource.getPublishedFolder(DocumentResource.java:96)
INFO | jvm 1 | 2016/12/21 13:28:59.233 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2016/12/21 13:28:59.235 | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:28:59.236 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:28:59.237 | at java.lang.reflect.Method.invoke(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:28:59.239 | at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
INFO | jvm 1 | 2016/12/21 13:28:59.246 | at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
INFO | jvm 1 | 2016/12/21 13:28:59.250 | at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
INFO | jvm 1 | 2016/12/21 13:28:59.255 | at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205)
INFO | jvm 1 | 2016/12/21 13:28:59.265 | at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
INFO | jvm 1 | 2016/12/21 13:28:59.270 | at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
INFO | jvm 1 | 2016/12/21 13:28:59.279 | at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
INFO | jvm 1 | 2016/12/21 13:28:59.283 | at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
INFO | jvm 1 | 2016/12/21 13:28:59.290 | at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
INFO | jvm 1 | 2016/12/21 13:28:59.298 | at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
INFO | jvm 1 | 2016/12/21 13:28:59.302 | at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
INFO | jvm 1 | 2016/12/21 13:28:59.304 | at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
INFO | jvm 1 | 2016/12/21 13:28:59.306 | at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
INFO | jvm 1 | 2016/12/21 13:28:59.308 | at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
INFO | jvm 1 | 2016/12/21 13:28:59.314 | at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
INFO | jvm 1 | 2016/12/21 13:28:59.316 | at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
INFO | jvm 1 | 2016/12/21 13:28:59.324 | at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
INFO | jvm 1 | 2016/12/21 13:28:59.330 | at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
INFO | jvm 1 | 2016/12/21 13:28:59.333 | at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
INFO | jvm 1 | 2016/12/21 13:28:59.336 | at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
INFO | jvm 1 | 2016/12/21 13:28:59.339 | at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
INFO | jvm 1 | 2016/12/21 13:28:59.345 | at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
INFO | jvm 1 | 2016/12/21 13:28:59.348 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
INFO | jvm 1 | 2016/12/21 13:28:59.352 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
INFO | jvm 1 | 2016/12/21 13:28:59.354 | at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
INFO | jvm 1 | 2016/12/21 13:28:59.356 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
INFO | jvm 1 | 2016/12/21 13:28:59.357 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
INFO | jvm 1 | 2016/12/21 13:28:59.363 | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
INFO | jvm 1 | 2016/12/21 13:28:59.365 | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
INFO | jvm 1 | 2016/12/21 13:28:59.367 | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
INFO | jvm 1 | 2016/12/21 13:28:59.369 | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
INFO | jvm 1 | 2016/12/21 13:28:59.371 | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
INFO | jvm 1 | 2016/12/21 13:28:59.373 | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
INFO | jvm 1 | 2016/12/21 13:28:59.375 | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
INFO | jvm 1 | 2016/12/21 13:28:59.376 | at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
INFO | jvm 1 | 2016/12/21 13:29:00.224 | at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
INFO | jvm 1 | 2016/12/21 13:29:00.532 | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
INFO | jvm 1 | 2016/12/21 13:29:00.534 | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
INFO | jvm 1 | 2016/12/21 13:29:00.535 | at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.537 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.539 | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
INFO | jvm 1 | 2016/12/21 13:29:00.541 | at java.lang.Thread.run(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.542 | Caused by: java.net.SocketException: Connection reset
INFO | jvm 1 | 2016/12/21 13:29:00.543 | at java.net.SocketInputStream.read(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.555 | at java.net.SocketInputStream.read(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.558 | at sun.security.ssl.InputRecord.readFully(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.560 | at sun.security.ssl.InputRecord.readV3Record(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.573 | at sun.security.ssl.InputRecord.read(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.590 | at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.593 | at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.618 | at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.621 | at sun.security.ssl.AppOutputStream.write(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.656 | at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.659 | at java.io.BufferedOutputStream.flush(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.726 | at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:95)
INFO | jvm 1 | 2016/12/21 13:29:00.738 | ... 63 more

AbstractRememberMeServices throwing Nullpointer Exception

I am using Spring-security-web-3.2.5 jar and Java 8 and Spring-web-mvc 4.1.7 in hybris 6 Platform.
I am getting Nullpointer Exception in ApplicationFilterProxy and in class
AbstractRememberMeServices.
When I debug this class I observed that the logger object is null and when code is trying to perform the following operation , throws NullPointer Exception
this.logger.debug("Interactive login attempt was unsuccessful.");
Exception StackTrace :
SEVERE: Servlet.service() for servlet [DispatcherServlet] in context with path [] threw exception [Error while processing internal filterchain. Exception occurred at chain position: 9 of 16. Current filter: 'FilterChainProxy[Filter Chains: [[ Ant [pattern='/_ui/**'], []], [ Ant [pattern='/checkout/**'], [org.springframework.security.web.access.channel.ChannelProcessingFilter#f6a714c, org.springframework.security.web.context.SecurityContextPersistenceFilter#3aa9c43e, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#148b51b7, org.springframework.security.web.authentication.logout.LogoutFilter#7dc977d4, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#21759930, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#55893114, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#1bc1c4fb, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#2d007780, org.springframework.security.web.access.ExceptionTranslationFilter#20b1d709, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#3c2c439a]], [ com.example.storefront.security.ExcludeUrlRequestMatcher#3a6c99ce, [org.springframework.security.web.access.channel.ChannelProcessingFilter#31cb980a, org.springframework.security.web.context.SecurityContextPersistenceFilter#3ef9fc3c, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#28aef10c, org.springframework.security.web.authentication.logout.LogoutFilter#7652af3e, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#1bb47236, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#6add7560, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#3524cfa6, org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter#566cad63, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#6ef1505a, org.springframework.security.web.access.ExceptionTranslationFilter#6f065e91, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#7ccce528]]]]'!; nested exception is java.lang.NullPointerException] with root cause
INFO | jvm 1 | main | 2016/09/22 15:23:01.365 | java.lang.NullPointerException
INFO | jvm 1 | main | 2016/09/22 15:23:01.366 | at org.springframework.security.web.authentication.rememberme.AbstractRememberMeServices.loginFail(AbstractRememberMeServices.java:239)
INFO | jvm 1 | main | 2016/09/22 15:23:01.369 | at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.unsuccessfulAuthentication(AbstractAuthenticationProcessingFilter.java:353)
INFO | jvm 1 | main | 2016/09/22 15:23:01.369 | at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:225)
INFO | jvm 1 | main | 2016/09/22 15:23:01.370 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
INFO | jvm 1 | main | 2016/09/22 15:23:01.371 | at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
INFO | jvm 1 | main | 2016/09/22 15:23:01.372 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
INFO | jvm 1 | main | 2016/09/22 15:23:01.378 | at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
INFO | jvm 1 | main | 2016/09/22 15:23:01.379 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
INFO | jvm 1 | main | 2016/09/22 15:23:01.380 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
INFO | jvm 1 | main | 2016/09/22 15:23:01.383 | at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
INFO | jvm 1 | main | 2016/09/22 15:23:01.391 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
INFO | jvm 1 | main | 2016/09/22 15:23:01.392 | at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:144)
INFO | jvm 1 | main | 2016/09/22 15:23:01.393 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
INFO | jvm 1 | main | 2016/09/22 15:23:01.393 | at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
INFO | jvm 1 | main | 2016/09/22 15:23:01.393 | at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
INFO | jvm 1 | main | 2016/09/22 15:23:01.393 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.394 | at com.example.storefront.filters.SiteMinderFilter.doFilter(SiteMinderFilter.java:119)
INFO | jvm 1 | main | 2016/09/22 15:23:01.394 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.395 | at com.example.storefront.filters.UrlEncoderFilter.doFilterInternal(UrlEncoderFilter.java:87)
INFO | jvm 1 | main | 2016/09/22 15:23:01.395 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
INFO | jvm 1 | main | 2016/09/22 15:23:01.396 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.396 | at com.example.storefront.filters.StorefrontFilter.doFilter(StorefrontFilter.java:74)
INFO | jvm 1 | main | 2016/09/22 15:23:01.396 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.397 | at com.example.storefront.filters.cms.CMSSiteFilter.doFilterInternal(CMSSiteFilter.java:100)
INFO | jvm 1 | main | 2016/09/22 15:23:01.397 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
INFO | jvm 1 | main | 2016/09/22 15:23:01.398 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.399 | at com.example.storefront.filters.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:89)
INFO | jvm 1 | main | 2016/09/22 15:23:01.399 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.399 | at com.example.storefront.filters.AcceleratorAddOnFilter.doFilter(AcceleratorAddOnFilter.java:92)
INFO | jvm 1 | main | 2016/09/22 15:23:01.399 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.406 | at de.hybris.platform.servicelayer.web.SessionFilter.doFilter(SessionFilter.java:71)
INFO | jvm 1 | main | 2016/09/22 15:23:01.407 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.408 | at de.hybris.platform.servicelayer.web.Log4JFilter.doFilter(Log4JFilter.java:45)
INFO | jvm 1 | main | 2016/09/22 15:23:01.408 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.409 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain.doFilterInternal(AbstractPlatformFilterChain.java:154)
INFO | jvm 1 | main | 2016/09/22 15:23:01.410 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
INFO | jvm 1 | main | 2016/09/22 15:23:01.410 | at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
INFO | jvm 1 | main | 2016/09/22 15:23:01.411 | at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
INFO | jvm 1 | main | 2016/09/22 15:23:01.411 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
INFO | jvm 1 | main | 2016/09/22 15:23:01.412 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
INFO | jvm 1 | main | 2016/09/22 15:23:01.413 | at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
INFO | jvm 1 | main | 2016/09/22 15:23:01.413 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
INFO | jvm 1 | main | 2016/09/22 15:23:01.413 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
INFO | jvm 1 | main | 2016/09/22 15:23:01.413 | at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
INFO | jvm 1 | main | 2016/09/22 15:23:01.414 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
INFO | jvm 1 | main | 2016/09/22 15:23:01.414 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
INFO | jvm 1 | main | 2016/09/22 15:23:01.415 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
INFO | jvm 1 | main | 2016/09/22 15:23:01.415 | at com.example.storefront.filters.AcceleratorAddOnFilter.doFilter(AcceleratorAddOnFilter.java:92)
INFO | jvm 1 | main | 2016/09/22 15:23:01.416 | at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
INFO | jvm 1 | main | 2016/09/22 15:23:01.416 | at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
INFO | jvm 1 | main | 2016/09/22 15:23:01.416 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
INFO | jvm 1 | main | 2016/09/22 15:23:01.417 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
INFO | jvm 1 | main | 2016/09/22 15:23:01.417 | at de.hybris.platform.servicelayer.web.XSSFilter.processPatternsAndDoFilter(XSSFilter.java:293)
INFO | jvm 1 | main | 2016/09/22 15:23:01.419 | at de.hybris.platform.servicelayer.web.XSSFilter.doFilter(XSSFilter.java:247)
INFO | jvm 1 | main | 2016/09/22 15:23:01.419 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
INFO | jvm 1 | main | 2016/09/22 15:23:01.420 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
INFO | jvm 1 | main | 2016/09/22 15:23:01.420 | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
INFO | jvm 1 | main | 2016/09/22 15:23:01.423 | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
INFO | jvm 1 | main | 2016/09/22 15:23:01.424 | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
INFO | jvm 1 | main | 2016/09/22 15:23:01.425 | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
INFO | jvm 1 | main | 2016/09/22 15:23:01.426 | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
INFO | jvm 1 | main | 2016/09/22 15:23:01.427 | at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
INFO | jvm 1 | main | 2016/09/22 15:23:01.428 | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
INFO | jvm 1 | main | 2016/09/22 15:23:01.428 | at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
INFO | jvm 1 | main | 2016/09/22 15:23:01.429 | at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
INFO | jvm 1 | main | 2016/09/22 15:23:01.430 | at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
INFO | jvm 1 | main | 2016/09/22 15:23:01.430 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
INFO | jvm 1 | main | 2016/09/22 15:23:01.431 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
INFO | jvm 1 | main | 2016/09/22 15:23:01.433 | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
INFO | jvm 1 | main | 2016/09/22 15:23:01.448 | at java.lang.Thread.run(Thread.java:745)
I am unable to figure out why this is happening , Any help is greatly appreciated.

Why does my Spring Boot boot 5 times?

I am using Spring boot for my tomcat deploy of my webapp. On my mac, and on a fellow developers linux install (not sure of his distro), the catalina.out file has just one instance of the spring ascii art indicating that it booted up just once as expected.
On our development and production servers, both centOS and mirrors of one another, the catalina.out file has five instances of the Spring ascii art indicating that it is "booting" 5 times! I have code that runs in the onStartup method of my RestApplication that extends SpringBootServletInitializer and that code runs 5 times verifying that spring is booting up 5 times. Why is this happening on our production machines but not on our development machines? War files are deployed to tomcat 8 in all instances.
It takes many minutes before the webapp is ready as a result.
At first I thought maybe it was linked the number of clases tagged #RestController since that seemed about 5, but it turns out we have 7 classes with this tag. So, I can't find anything that would match up with this number of 5 boots.
Any thoughts? Cheers.
UPDATE
Here is my log file with an exception stack trace in the onStartup method. It is looking for a file of the name servletContext.getContextPath() + "_init.properties". As you can see we are alternating between a DeployWar with the name of "wildbook" (correct name of my war file) and a StartChild with the name of "". Except the last DeployWar does not seem to trigger a StartChild.
INFO | jvm 1 | 2015/09/30 19:40:53 |
INFO | jvm 1 | 2015/09/30 19:40:53 | . ____ _ __ _ _
INFO | jvm 1 | 2015/09/30 19:40:53 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
INFO | jvm 1 | 2015/09/30 19:40:53 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
INFO | jvm 1 | 2015/09/30 19:40:53 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
INFO | jvm 1 | 2015/09/30 19:40:53 | ' |____| .__|_| |_|_| |_\__, | / / / /
INFO | jvm 1 | 2015/09/30 19:40:53 | =========|_|==============|___/=/_/_/_/
INFO | jvm 1 | 2015/09/30 19:40:53 | :: Spring Boot :: (v1.2.1.RELEASE)
INFO | jvm 1 | 2015/09/30 19:40:53 |
INFO | jvm 1 | 2015/09/30 19:41:02 | [WARN] org.ecocean.rest.RestApplication - Can't read init property file, building simple props from init params.
INFO | jvm 1 | 2015/09/30 19:41:02 | java.io.FileNotFoundException: /opt/tomcat8/conf/wildbook_init.properties (No such file or directory)
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.io.FileInputStream.<init>(FileInputStream.java:131) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at com.samsix.util.io.ResourceReaderImpl.addSource(ResourceReaderImpl.java:1182) ~[s6-util-1.0.6.jar:na]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.ecocean.rest.RestApplication.onStartup(RestApplication.java:98) ~[RestApplication.class:na]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:03 | [WARN] o.f.core.internal.command.DbMigrate - outOfOrder mode is active. Migration of schema "public" may not be reproducible.
INFO | jvm 1 | 2015/09/30 19:41:17 |
INFO | jvm 1 | 2015/09/30 19:41:17 | . ____ _ __ _ _
INFO | jvm 1 | 2015/09/30 19:41:17 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:17 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:17 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
INFO | jvm 1 | 2015/09/30 19:41:17 | ' |____| .__|_| |_|_| |_\__, | / / / /
INFO | jvm 1 | 2015/09/30 19:41:17 | =========|_|==============|___/=/_/_/_/
INFO | jvm 1 | 2015/09/30 19:41:17 | :: Spring Boot :: (v1.2.1.RELEASE)
INFO | jvm 1 | 2015/09/30 19:41:17 |
INFO | jvm 1 | 2015/09/30 19:41:24 | [WARN] org.ecocean.rest.RestApplication - Can't read init property file, building simple props from init params.
INFO | jvm 1 | 2015/09/30 19:41:24 | java.io.FileNotFoundException: /opt/tomcat8/conf/_init.properties (No such file or directory)
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.io.FileInputStream.<init>(FileInputStream.java:131) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:24 | at com.samsix.util.io.ResourceReaderImpl.addSource(ResourceReaderImpl.java:1182) ~[s6-util-1.0.6.jar:na]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.ecocean.rest.RestApplication.onStartup(RestApplication.java:98) ~[RestApplication.class:na]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:25 | [WARN] o.f.core.internal.command.DbMigrate - outOfOrder mode is active. Migration of schema "public" may not be reproducible.
INFO | jvm 1 | 2015/09/30 19:41:34 |
INFO | jvm 1 | 2015/09/30 19:41:34 | . ____ _ __ _ _
INFO | jvm 1 | 2015/09/30 19:41:34 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:34 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:34 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
INFO | jvm 1 | 2015/09/30 19:41:34 | ' |____| .__|_| |_|_| |_\__, | / / / /
INFO | jvm 1 | 2015/09/30 19:41:34 | =========|_|==============|___/=/_/_/_/
INFO | jvm 1 | 2015/09/30 19:41:34 | :: Spring Boot :: (v1.2.1.RELEASE)
INFO | jvm 1 | 2015/09/30 19:41:34 |
INFO | jvm 1 | 2015/09/30 19:41:40 | [WARN] org.ecocean.rest.RestApplication - Can't read init property file, building simple props from init params.
INFO | jvm 1 | 2015/09/30 19:41:40 | java.io.FileNotFoundException: /opt/tomcat8/conf/wildbook_init.properties (No such file or directory)
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.io.FileInputStream.<init>(FileInputStream.java:131) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at com.samsix.util.io.ResourceReaderImpl.addSource(ResourceReaderImpl.java:1182) ~[s6-util-1.0.6.jar:na]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.ecocean.rest.RestApplication.onStartup(RestApplication.java:98) ~[RestApplication.class:na]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:41 | [WARN] o.f.core.internal.command.DbMigrate - outOfOrder mode is active. Migration of schema "public" may not be reproducible.
INFO | jvm 1 | 2015/09/30 19:41:50 |
INFO | jvm 1 | 2015/09/30 19:41:50 | . ____ _ __ _ _
INFO | jvm 1 | 2015/09/30 19:41:50 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:50 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:50 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
INFO | jvm 1 | 2015/09/30 19:41:50 | ' |____| .__|_| |_|_| |_\__, | / / / /
INFO | jvm 1 | 2015/09/30 19:41:50 | =========|_|==============|___/=/_/_/_/
INFO | jvm 1 | 2015/09/30 19:41:50 | :: Spring Boot :: (v1.2.1.RELEASE)
INFO | jvm 1 | 2015/09/30 19:41:50 |
INFO | jvm 1 | 2015/09/30 19:41:55 | [WARN] org.ecocean.rest.RestApplication - Can't read init property file, building simple props from init params.
INFO | jvm 1 | 2015/09/30 19:41:55 | java.io.FileNotFoundException: /opt/tomcat8/conf/_init.properties (No such file or directory)
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.io.FileInputStream.<init>(FileInputStream.java:131) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:55 | at com.samsix.util.io.ResourceReaderImpl.addSource(ResourceReaderImpl.java:1182) ~[s6-util-1.0.6.jar:na]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.ecocean.rest.RestApplication.onStartup(RestApplication.java:98) ~[RestApplication.class:na]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:56 | [WARN] o.f.core.internal.command.DbMigrate - outOfOrder mode is active. Migration of schema "public" may not be reproducible.
INFO | jvm 1 | 2015/09/30 19:42:05 |
INFO | jvm 1 | 2015/09/30 19:42:05 | . ____ _ __ _ _
INFO | jvm 1 | 2015/09/30 19:42:05 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
INFO | jvm 1 | 2015/09/30 19:42:05 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
INFO | jvm 1 | 2015/09/30 19:42:05 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
INFO | jvm 1 | 2015/09/30 19:42:05 | ' |____| .__|_| |_|_| |_\__, | / / / /
INFO | jvm 1 | 2015/09/30 19:42:05 | =========|_|==============|___/=/_/_/_/
INFO | jvm 1 | 2015/09/30 19:42:05 | :: Spring Boot :: (v1.2.1.RELEASE)
INFO | jvm 1 | 2015/09/30 19:42:05 |
INFO | jvm 1 | 2015/09/30 19:42:13 | [WARN] org.ecocean.rest.RestApplication - Can't read init property file, building simple props from init params.
INFO | jvm 1 | 2015/09/30 19:42:13 | java.io.FileNotFoundException: /opt/tomcat8/conf/wildbook_init.properties (No such file or directory)
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.io.FileInputStream.<init>(FileInputStream.java:131) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at com.samsix.util.io.ResourceReaderImpl.addSource(ResourceReaderImpl.java:1182) ~[s6-util-1.0.6.jar:na]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.ecocean.rest.RestApplication.onStartup(RestApplication.java:98) ~[RestApplication.class:na]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | [WARN] o.f.core.internal.command.DbMigrate - outOfOrder mode is active. Migration of schema "public" may not be reproducible.
Second Update
Here is my SpringBootServletInitializer in it's entirety as requested.
package org.ecocean.rest;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import org.ecocean.ShepherdPMF;
import org.flywaydb.core.Flyway;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.embedded.ServletRegistrationBean;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import com.samsix.database.ConnectionInfo;
#Configuration
#EnableAutoConfiguration
#ComponentScan
public class RestApplication extends SpringBootServletInitializer {
/**
* This method should allow you to start up the rest service from a compiled jar rather
* than having to make a war and stick it in tomcat.
*/
public static void main(final String[] args) {
SpringApplication.run(RestApplication.class, args);
}
#Override
protected final SpringApplicationBuilder configure(final SpringApplicationBuilder application) {
// ObjectMapper mapper = new ObjectMapper();
// mapper.registerModule(new JodaModule());
return application.sources(RestApplication.class);
}
#Override
public void onStartup(final ServletContext servletContext) throws ServletException
{
super.onStartup(servletContext);
//
// Uses default location of db/migration on classpath. You will find it in the src/main/resources folder.
// OutOfOrder = true makes it so that if two developers create SQL in a different order and one somehow
// gets applied to the database, the other's should too. This should only be an issue on development
// databases and allows me to get other developers sql patches even if I've applied a newer one myself
// locally. In production, everything should be fine.
//
ConnectionInfo connectionInfo = ShepherdPMF.getConnectionInfo();
Flyway flyway = new Flyway();
flyway.setOutOfOrder(true);
flyway.setSqlMigrationPrefix("");
flyway.setDataSource(connectionInfo.getUrl(), connectionInfo.getUserName(), connectionInfo.getPassword());
flyway.migrate();
}
#Bean
public ServletRegistrationBean servletRegistrationBean(){
return new ServletRegistrationBean(new MediaUploadServlet(),"/mediaupload");
}
}

Categories