I've read many post in order to find a solution. I would like to ask for help finding the problem. Below is the application.properties configuration file and the output with the error messages.
aplication.properties:
# DATASOURCE
spring.datasource.url=jdbc:mysql://localhost:3306/hibernatedb
spring.datasource.name=hibernatedb
spring.datasource.username=nunit
spring.datasource.password=nunit
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
# CONTAINER
server.port=8080
server.context-path=/nunit/api
# JPA
spring.jpa.hibernate.ddl-auto=update
spring.jpa.hibernate.show_sql=true
spring.jpa.hibernate.format_sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
spring.jpa.show-sql=true
# JDBC.X
db.driverClassName=com.mysql.jdbc.Driver
db.url=jdbc:mysql://localhost:3306;databaseName=hibernatedb
db.user=nunit
db.pass=nunit
# HIBERNATE.X
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.show_sql=true
hibernate.format_sql=true
hibernate.hbm2ddl.auto=create-drop
hibernate.
# SECURITY
security.basic.enabled=true
# HTTP REQUEST
spring.mvc.dispatch-options-request=true
# CORS configuration
endpoints.cors.allowed-origins=*
endpoints.cors.allowed-headers=*
endpoints.cors.allowed-methods=*
endpoints.cors.mapping=/**
#JACKSON
spring.jackson.date-format=MM/dd/yyyy
spring.jackson.serialization.write_dates_as_timestamps=false
Console output:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.3.5.RELEASE)
2016-08-13 19:30:19.656 INFO 3868 --- [ main] com.nunit.NUnitServices : Starting NUnitServices on iNViNCiBLe with PID 3868 (C:\Users\nUnit\workspace_neon\nUnitServices\target\classes started by nUnit in C:\Users\nUnit\workspace_neon\nUnitServices)
2016-08-13 19:30:19.656 INFO 3868 --- [ main] com.nunit.NUnitServices : No active profile set, falling back to default profiles: default
2016-08-13 19:30:19.794 INFO 3868 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#140e5a13: startup date [Sat Aug 13 19:30:19 EEST 2016]; root of context hierarchy
2016-08-13 19:30:23.766 INFO 3868 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$673436dd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-08-13 19:30:25.120 INFO 3868 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2016-08-13 19:30:25.162 INFO 3868 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2016-08-13 19:30:25.165 INFO 3868 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.0.33
2016-08-13 19:30:25.482 INFO 3868 --- [ost-startStop-1] o.a.c.c.C.[.[localhost].[/nunit/api] : Initializing Spring embedded WebApplicationContext
2016-08-13 19:30:25.483 INFO 3868 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 5689 ms
2016-08-13 19:30:26.626 INFO 3868 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2016-08-13 19:30:26.627 INFO 3868 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2016-08-13 19:30:26.628 INFO 3868 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2016-08-13 19:30:26.628 INFO 3868 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2016-08-13 19:30:26.632 INFO 3868 --- [ost-startStop-1] .e.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*]
2016-08-13 19:30:26.632 INFO 3868 --- [ost-startStop-1] o.s.b.c.e.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2016-08-13 19:30:27.367 INFO 3868 --- [ost-startStop-1] b.a.s.AuthenticationManagerConfiguration :
Using default security password: f5fc04b8-ea2e-4a37-b3c2-8cc4b439ea9b
2016-08-13 19:30:27.491 INFO 3868 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: Ant [pattern='/css/**'], []
2016-08-13 19:30:27.491 INFO 3868 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: Ant [pattern='/js/**'], []
2016-08-13 19:30:27.492 INFO 3868 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: Ant [pattern='/images/**'], []
2016-08-13 19:30:27.492 INFO 3868 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: Ant [pattern='/**/favicon.ico'], []
2016-08-13 19:30:27.492 INFO 3868 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: Ant [pattern='/error'], []
2016-08-13 19:30:27.653 INFO 3868 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: org.springframework.boot.autoconfigure.security.SpringBootWebSecurityConfiguration$ApplicationNoWebSecurityConfigurerAdapter$1#6a07267e, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#31e38a81, org.springframework.security.web.context.SecurityContextPersistenceFilter#489f333f, org.springframework.security.web.header.HeaderWriterFilter#47e64ac4, org.springframework.security.web.csrf.CsrfFilter#59f36eca, org.springframework.security.web.authentication.logout.LogoutFilter#716af3b4, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#71a82ef, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#3131177c, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#1732285a, org.springframework.security.web.session.SessionManagementFilter#615c6f88, org.springframework.security.web.access.ExceptionTranslationFilter#1a4e3459]
2016-08-13 19:30:28.258 INFO 3868 --- [ main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2016-08-13 19:30:28.289 INFO 3868 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2016-08-13 19:30:28.455 INFO 3868 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {4.3.11.Final}
2016-08-13 19:30:28.458 INFO 3868 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2016-08-13 19:30:28.461 INFO 3868 --- [ main] org.hibernate.cfg.Environment : HHH000021: Bytecode provider name : javassist
2016-08-13 19:30:28.871 INFO 3868 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
2016-08-13 19:30:29.631 ERROR 3868 --- [ main] o.a.tomcat.jdbc.pool.ConnectionPool : Unable to create initial connections of pool.
java.sql.SQLException: Access denied for user 'nunit '#'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:871) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4323) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1267) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2255) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2286) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2085) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_102]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_102]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_102]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_102]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400) ~[mysql-connector-java-5.1.38.jar:5.1.38]
42 more ...
2016-08-13 19:30:29.636 WARN 3868 --- [ main] o.h.e.jdbc.internal.JdbcServicesImpl : HHH000342: Could not obtain connection to query metadata : Access denied for user 'nunit '#'localhost' (using password: YES)
2016-08-13 19:30:29.656 INFO 3868 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
2016-08-13 19:30:29.680 INFO 3868 --- [ main] o.h.e.jdbc.internal.LobCreatorBuilder : HHH000422: Disabling contextual LOB creation as connection was null
2016-08-13 19:30:30.237 INFO 3868 --- [ main] o.h.h.i.ast.ASTQueryTranslatorFactory : HHH000397: Using ASTQueryTranslatorFactory
2016-08-13 19:30:30.500 INFO 3868 --- [ main] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000228: Running hbm2ddl schema update
2016-08-13 19:30:30.500 INFO 3868 --- [ main] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000102: Fetching database metadata
2016-08-13 19:30:30.500 ERROR 3868 --- [ main] o.a.tomcat.jdbc.pool.ConnectionPool : Unable to create initial connections of pool.
java.sql.SQLException: Access denied for user 'nunit '#'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:871) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4323) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1267) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2255) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2286) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2085) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_102]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_102]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_102]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_102]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400) ~[mysql-connector-java-5.1.38.jar:5.1.38]
41 more ...
2016-08-13 19:30:30.516 ERROR 3868 --- [ main] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000319: Could not get database metadata
java.sql.SQLException: Access denied for user 'nunit '#'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:871) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4323) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1267) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2255) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2286) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2085) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_102]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_102]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_102]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_102]
43 more ...
2016-08-13 19:30:30.516 ERROR 3868 --- [ main] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000299: Could not complete schema update
java.sql.SQLException: Access denied for user 'nunit '#'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:871) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4323) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1267) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2255) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2286) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2085) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_102]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_102]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_102]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_102]
43 more ...
2016-08-13 19:30:31.055 INFO 3868 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#140e5a13: startup date [Sat Aug 13 19:30:19 EEST 2016]; root of context hierarchy
2016-08-13 19:30:31.288 INFO 3868 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/services/helloWorld],methods=[POST]}" onto public java.util.List<com.nunit.rest.Message> com.nunit.rest.ServiceController.postHelloWorldMessage()
2016-08-13 19:30:31.291 INFO 3868 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/services/helloWorld]}" onto public java.util.List<com.nunit.rest.Message> com.nunit.rest.ServiceController.getHelloWorldMessage()
2016-08-13 19:30:31.297 INFO 3868 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2016-08-13 19:30:31.298 INFO 3868 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2016-08-13 19:30:31.381 INFO 3868 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-08-13 19:30:31.382 INFO 3868 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-08-13 19:30:31.506 INFO 3868 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-08-13 19:30:32.129 INFO 3868 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2016-08-13 19:30:32.339 INFO 3868 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2016-08-13 19:30:32.352 INFO 3868 --- [ main] com.nunit.NUnitServices : Started NUnitServices in 13.541 seconds (JVM running for 14.527)
It looks like you're writting so many configuration lines, this should be enough to connect to your database . No need to tell Hibernate to use MySql dialect neither to configure Hibernate and JDBC yourself:
spring.datasource.url=jdbc:mysql://localhost:3306/hibernatedb
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.username=nunit
spring.datasource.password=nunit
Then you can try enabling the rest of the settings like SQL logs, database initialization and so on:
spring.jpa.hibernate.ddl-auto=update
spring.jpa.hibernate.show_sql=true
spring.jpa.hibernate.format_sql=true
spring.jpa.show-sql=true
After I've read this post here, I was able to resolve the issue after adding this property entitymanager.packagesToScan and the proper package to scan.
Related
I have configured nginx to fit my code. My code works well on Windows and now I'm trying to deploy it to Ubuntu. I run jar and it fail. Logs:
:: Spring Boot :: (v2.4.2)
2021-03-13 06:52:55.131 INFO 4305 --- [ main] com.social.socialmedia.Application : Starting Application v1.0-SNAPSHOT using Java 1.8.0_282 o
n amber with PID 4305 (/home/kirill/social-media-1.0-SNAPSHOT.jar started by kirill in /home/kirill)
2021-03-13 06:52:55.149 INFO 4305 --- [ main] com.social.socialmedia.Application : No active profile set, falling back to default profiles:
default
2021-03-13 06:53:00.135 INFO 4305 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mod
e.
2021-03-13 06:53:00.515 INFO 4305 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 332 ms. Found
2 JPA repository interfaces.
2021-03-13 06:53:03.824 INFO 4305 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.access.expression.meth
od.DefaultMethodSecurityExpressionHandler#1fb700ee' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is
not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-03-13 06:53:03.861 INFO 4305 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'methodSecurityMetadataSource' of type [org.springfr
amework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not elig
ible for auto-proxying)
2021-03-13 06:53:06.121 INFO 4305 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 80 (http)
2021-03-13 06:53:06.194 INFO 4305 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-03-13 06:53:06.195 INFO 4305 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.41]
2021-03-13 06:53:06.517 INFO 4305 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-03-13 06:53:06.518 INFO 4305 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1
1035 ms
2021-03-13 06:53:08.111 INFO 4305 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2021-03-13 06:53:08.596 INFO 4305 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.27.Final
2021-03-13 06:53:09.579 INFO 4305 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2021-03-13 06:53:10.113 INFO 4305 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2021-03-13 06:53:11.762 INFO 4305 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2021-03-13 06:53:12.004 INFO 4305 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQ
LDialect
2021-03-13 06:53:19.889 INFO 4305 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hiberna
te.engine.transaction.jta.platform.internal.NoJtaPlatform]
2021-03-13 06:53:19.925 INFO 4305 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit
'default'
2021-03-13 06:53:22.331 WARN 4305 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore,
database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2021-03-13 06:53:27.076 INFO 4305 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.securit
y.web.context.request.async.WebAsyncManagerIntegrationFilter#2364305a, org.springframework.security.web.context.SecurityContextPersistenceFilter#72445aba, or
g.springframework.security.web.header.HeaderWriterFilter#7829b776, org.springframework.security.web.csrf.CsrfFilter#4b3c354a, org.springframework.security.we
b.authentication.logout.LogoutFilter#56f6d40b, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#5536379e, org.springframe
work.security.web.savedrequest.RequestCacheAwareFilter#1c80e49b, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#15c25153
, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#470a696f, org.springframework.security.web.session.SessionManagementFilter#5b
64c4b7, org.springframework.security.web.access.ExceptionTranslationFilter#1433046b, org.springframework.security.web.access.intercept.FilterSecurityIntercep
tor#350ec41e]
2021-03-13 06:53:28.106 INFO 4305 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2021-03-13 06:53:30.531 WARN 4305 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - can
celling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springfr
amework.boot.web.server.WebServerException: Unable to start embedded Tomcat server
2021-03-13 06:53:30.543 INFO 4305 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2021-03-13 06:53:30.553 INFO 4305 --- [ main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'de
fault'
2021-03-13 06:53:30.568 INFO 4305 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2021-03-13 06:53:30.612 INFO 4305 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
2021-03-13 06:53:30.622 INFO 4305 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2021-03-13 06:53:30.751 INFO 4305 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-03-13 06:53:30.885 ERROR 4305 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.W
ebServerException: Unable to start embedded Tomcat server
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181) ~[spring-context-5.3.3.jar!/:5.3.3]
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) ~[spring-context-5.3.3.jar!/:5.3.3]
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) ~[spring-context-5.3.3.jar!
/:5.3.3]
at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_282]
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155) ~[spring-context-5.3.3.jar!/:5.3.3]
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123) ~[spring-context-5.3.3.jar!/:5.3.3]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:940) ~[spring-context-5.3.3.jar!/:5.3
.3]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591) ~[spring-context-5.3.3.jar!/:5.3.3]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) ~[spring-boot
-2.4.2.jar!/:2.4.2]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767) [spring-boot-2.4.2.jar!/:2.4.2]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.4.2.jar!/:2.4.2]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) [spring-boot-2.4.2.jar!/:2.4.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) [spring-boot-2.4.2.jar!/:2.4.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1311) [spring-boot-2.4.2.jar!/:2.4.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300) [spring-boot-2.4.2.jar!/:2.4.2]
at com.social.socialmedia.Application.main(Application.java:10) [classes!/:1.0-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_282]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_282]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_282]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_282]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) [social-media-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:107) [social-media-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) [social-media-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) [social-media-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:229) ~[spring-boot-2.4.2.jar!/:2.4.2]
at org.springframework.boot.web.servlet.context.WebServerStartStopLifecycle.start(WebServerStartStopLifecycle.java:43) ~[spring-boot-2.4.2.jar!/:2.4.
2]
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) ~[spring-context-5.3.3.jar!/:5.3.3]
... 23 common frames omitted
Caused by: java.lang.IllegalArgumentException: standardService.connector.startFailed
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:244) ~[tomcat-embed-core-9.0.41.jar!/:9.0.41]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:282) ~[spring-boot-2.4.2.jar!/:2.
4.2]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:213) ~[spring-boot-2.4.2.jar!/:2.4.2]
... 25 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Protocol handler start failed
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1067) ~[tomcat-embed-core-9.0.41.jar!/:9.0.41]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.41.jar!/:9.0.41]
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:240) ~[tomcat-embed-core-9.0.41.jar!/:9.0.41]
... 27 common frames omitted
Caused by: java.net.SocketException: Permission denied
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_282]
at sun.nio.ch.Net.bind(Net.java:461) ~[na:1.8.0_282]
at sun.nio.ch.Net.bind(Net.java:453) ~[na:1.8.0_282]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:222) ~[na:1.8.0_282]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:85) ~[na:1.8.0_282]
at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:228) ~[tomcat-embed-core-9.0.41.jar!/:9.0.41]
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:211) ~[tomcat-embed-core-9.0.41.jar!/:9.0.41]
at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1159) ~[tomcat-embed-core-9.0.41.jar!/:9.0.41]
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1245) ~[tomcat-embed-core-9.0.41.jar!/:9.0.41]
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:603) ~[tomcat-embed-core-9.0.41.jar!/:9.0.41]
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1064) ~[tomcat-embed-core-9.0.41.jar!/:9.0.41]
... 29 common frames comitte
My propeties:
spring.datasource.url=jdbc:postgresql://localhost:5432/socialmedia
spring.datasource.username=postgres
spring.datasource.password=root
spring.jpa.generate-ddl=false
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.jpa.show-sql=false
spring.jpa.hibernate.ddl-auto=validate
spring.flyway.enabled=false
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl
continues code:
upload.path=home/kirill/uploads
#properties for MailSender
#smptps - Not secure connection
spring.mail.host=smtp.yandex.ru
#test
spring.mail.username= HIDED EMAIL
spring.mail.password=password
spring.mail.port=465
spring.mail.protocol=smtps
mail.debug=false
recaptcha.secret=hided secret
spring.session.jdbc.initialize-schema=always
spring.session.jdbc.table-name=SPRING_SESSION
hostname= HIDED HOST
server.port=80
Everywhere I looked for solutions, I did not find anything. I don't understand this error
You are trying to run the application on port 80.
server.port=80
Ports < 1024 are only allowed to run as root.
Either run it as root (not recommended) or use another port.
I can't get to debug these for days.
I've looked through every problem it shows in Stack Overflow but couldn't know what to do.
I'm using Eclipse and Springboot to make online banking project, I've installed MySql benchmark and later installed MySql Server 8.0 too, but couldn't make this work.
What is this connection problem with tomcat and database server I didn't get it.
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.1.RELEASE)
2018-05-15 15:52:10.050 INFO 9160 --- [ main] com.userfront.UserFrontApplication : Starting UserFrontApplication on Anix with PID 9160 (C:\Users\Anix\Documents\eclipse-workspace\UserFront\target\classes started by Anix in C:\Users\Anix\Documents\eclipse-workspace\UserFront)
2018-05-15 15:52:10.052 INFO 9160 --- [ main] com.userfront.UserFrontApplication : No active profile set, falling back to default profiles: default
2018-05-15 15:52:10.230 INFO 9160 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#45b9a632: startup date [Tue May 15 15:52:10 NPT 2018]; root of context hierarchy
2018-05-15 15:52:11.494 INFO 9160 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$d7db709a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-05-15 15:52:11.530 INFO 9160 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [class org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$708938d4] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-05-15 15:52:11.537 INFO 9160 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'objectPostProcessor' of type [class org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-05-15 15:52:11.539 INFO 9160 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler#3fc05ea2' of type [class org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-05-15 15:52:11.543 INFO 9160 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [class org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$955ddb86] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-05-15 15:52:11.550 INFO 9160 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'methodSecurityMetadataSource' of type [class org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-05-15 15:52:11.851 INFO 9160 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2018-05-15 15:52:11.859 INFO 9160 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2018-05-15 15:52:11.860 INFO 9160 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.5
2018-05-15 15:52:11.922 INFO 9160 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2018-05-15 15:52:11.922 INFO 9160 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1695 ms
2018-05-15 15:52:12.091 INFO 9160 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestFilter' to: [/*]
2018-05-15 15:52:12.091 INFO 9160 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-05-15 15:52:12.092 INFO 9160 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-05-15 15:52:12.092 INFO 9160 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-05-15 15:52:12.092 INFO 9160 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2018-05-15 15:52:12.093 INFO 9160 --- [ost-startStop-1] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*]
2018-05-15 15:52:12.093 INFO 9160 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2018-05-15 15:52:12.275 INFO 9160 --- [ main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2018-05-15 15:52:12.284 INFO 9160 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2018-05-15 15:52:12.334 INFO 9160 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.0.11.Final}
2018-05-15 15:52:12.335 INFO 9160 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2018-05-15 15:52:12.336 INFO 9160 --- [ main] org.hibernate.cfg.Environment : HHH000021: Bytecode provider name : javassist
2018-05-15 15:52:12.365 INFO 9160 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2018-05-15 15:52:22.607 ERROR 9160 --- [ main] o.a.tomcat.jdbc.pool.ConnectionPool : Unable to create initial connections of pool.
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_171]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.8.0_171]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.8.0_171]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[na:1.8.0_171]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[mysql-connector-java-5.1.39.jar:5.1.39]
at com.mysql.jdbc.Util.getInstance(Util.java:387) ~[mysql-connector-java-5.1.39.jar:5.1.39]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:917) ~[mysql-connector-java-5.1.39.jar:5.1.39]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:896) ~[mysql-connector-java-5.1.39.jar:5.1.39]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:885) ~[mysql-connector-java-5.1.39.jar:5.1.39]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860) ~[mysql-connector-java-5.1.39.jar:5.1.39]
at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2163) ~[mysql-connector-java-5.1.39.jar:5.1.39]
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2088) ~[mysql-connector-java-5.1.39.jar:5.1.39]
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:806) ~[mysql-connector-java-5.1.39.jar:5.1.39]
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) ~[mysql-connector-java-5.1.39.jar:5.1.39]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_171]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.8.0_171]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.8.0_171]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[na:1.8.0_171]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[mysql-connector-java-5.1.39.jar:5.1.39]
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:410) ~[mysql-connector-java-5.1.39.jar:5.1.39]
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:328) ~[mysql-connector-java-5.1.39.jar:5.1.39]
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:310) ~[tomcat-jdbc-8.5.5.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:203) ~[tomcat-jdbc-8.5.5.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:718) [tomcat-jdbc-8.5.5.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:650) [tomcat-jdbc-8.5.5.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:468) [tomcat-jdbc-8.5.5.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:143) [tomcat-jdbc-8.5.5.jar:na]
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118) [tomcat-jdbc-8.5.5.jar:na]
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107) [tomcat-jdbc-8.5.5.jar:na]
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131) [tomcat-jdbc-8.5.5.jar:na]
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) [hibernate-core-5.0.11.Final.jar:5.0.11.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:180) [hibernate-core-5.0.11.Final.jar:5.0.11.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68) [hibernate-core-5.0.11.Final.jar:5.0.11.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35) [hibernate-core-5.0.11.Final.jar:5.0.11.Final]
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88) [hibernate-core-5.0.11.Final.jar:5.0.11.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:254) [hibernate-core-5.0.11.Final.jar:5.0.11.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:228) [hibernate-core-5.0.11.Final.jar:5.0.11.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:207) [hibernate-core-5.0.11.Final.jar:5.0.11.Final]
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51) [hibernate-core-5.0.11.Final.jar:5.0.11.Final]
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94) [hibernate-core-5.0.11.Final.jar:5.0.11.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237) [hibernate-core-5.0.11.Final.jar:5.0.11.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:207) [hibernate-core-5.0.11.Final.jar:5.0.11.Final]
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352) [hibernate-core-5.0.11.Final.jar:5.0.11.Final]
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111) [hibernate-core-5.0.11.Final.jar:5.0.11.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:847) [hibernate-entitymanager-5.0.11.Final.jar:5.0.11.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:874) [hibernate-entitymanager-5.0.11.Final.jar:5.0.11.Final]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60) [spring-orm-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:353) [spring-orm-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:373) [spring-orm-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:362) [spring-orm-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1642) [spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1579) [spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) [spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) [spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) [spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) [spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1076) [spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:851) [spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) [spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761) [spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371) [spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186) [spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175) [spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at com.userfront.UserFrontApplication.main(UserFrontApplication.java:10) [classes/:na]
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Hope anyone could help me, thank you!!!
I'm trying to start my first spring boot rest application but its failing to start with below exceptions.
I have tried the solutions mentioned in below link but still its not working.
Launching Spring application Address already in use launching spring application
I made sure no application in running in port 8080. Also tried changing the port number by setting server.port = 7090 in application properties file still i'm unsuccessful.
Any thoughts?
C:\Users\krupa>netstat -a -n -o | find "8080"
C:\Users\krupa>netstat -a -n -o | find "7090"
Application.java
package com.example.springrestful.demo.restfulservices;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
#SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
application.properties
server.address=localhost
server.port=7091
POM file:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.springrestful</groupId>
<artifactId>demo.restfulservices</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>demo.restfulservices</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
Console logs:
16:45:18.638 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Included patterns for restart : []
16:45:18.642 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Excluded patterns for restart : [/spring-boot-starter/target/classes/, /spring-boot-autoconfigure/target/classes/, /spring-boot-starter-[\w-]+/, /spring-boot/target/classes/, /spring-boot-actuator/target/classes/, /spring-boot-devtools/target/classes/]
16:45:18.642 [main] DEBUG org.springframework.boot.devtools.restart.ChangeableUrls - Matching URLs for reloading : [file:/E:/Education/spring-microservices/demo.restfulservices/target/classes/]
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.0.BUILD-SNAPSHOT)
2017-12-25 16:45:19.070 INFO 11904 --- [ restartedMain] c.e.s.demo.restfulservices.Application : Starting Application on KIPI with PID 11904 (E:\Education\spring-microservices\demo.restfulservices\target\classes started by ganesh in E:\Education\spring-microservices\demo.restfulservices)
2017-12-25 16:45:19.070 INFO 11904 --- [ restartedMain] c.e.s.demo.restfulservices.Application : No active profile set, falling back to default profiles: default
2017-12-25 16:45:19.195 INFO 11904 --- [ restartedMain] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#104b00ce: startup date [Mon Dec 25 16:45:19 MST 2017]; root of context hierarchy
2017-12-25 16:45:21.729 INFO 11904 --- [pool-1-thread-1] o.h.v.i.engine.ValidatorFactoryImpl : HV000238: Temporal validation tolerance set to 0.
2017-12-25 16:45:22.105 INFO 11904 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 7091 (http)
2017-12-25 16:45:22.121 INFO 11904 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2017-12-25 16:45:22.121 INFO 11904 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.23
2017-12-25 16:45:22.152 INFO 11904 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jre1.8.0_152\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_152/bin/server;C:/Program Files/Java/jre1.8.0_152/bin;C:/Program Files/Java/jre1.8.0_152/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Dev\ojdbc14.jar;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Program Files (x86)\HP SimplePass\x64;C:\Program Files (x86)\HP SimplePass\;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Java\jdk1.8.0_152;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\apache-maven-3.3.9\bin;C:\Program Files\Amazon\AWSCLI\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Skype\Phone\;C:\Users\krupa\AppData\Local\Microsoft\WindowsApps;;C:\Dev\eclipse-jee-oxygen-1a-win32-x86_64\eclipse;;.]
2017-12-25 16:45:22.371 INFO 11904 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2017-12-25 16:45:22.371 INFO 11904 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3176 ms
2017-12-25 16:45:22.644 INFO 11904 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2017-12-25 16:45:22.645 INFO 11904 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'webServlet' to [/h2-console/*]
2017-12-25 16:45:22.645 INFO 11904 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-12-25 16:45:22.645 INFO 11904 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-12-25 16:45:22.645 INFO 11904 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-12-25 16:45:22.645 INFO 11904 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2017-12-25 16:45:22.911 INFO 11904 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : testdb - Starting...
2017-12-25 16:45:23.570 INFO 11904 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : testdb - Start completed.
2017-12-25 16:45:23.729 INFO 11904 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2017-12-25 16:45:23.759 INFO 11904 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2017-12-25 16:45:23.868 INFO 11904 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate Core {5.2.12.Final}
2017-12-25 16:45:23.868 INFO 11904 --- [ restartedMain] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2017-12-25 16:45:23.915 INFO 11904 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2017-12-25 16:45:24.067 INFO 11904 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2017-12-25 16:45:24.332 INFO 11904 --- [ restartedMain] o.h.v.i.engine.ValidatorFactoryImpl : HV000238: Temporal validation tolerance set to 0.
2017-12-25 16:45:24.395 INFO 11904 --- [ restartedMain] o.h.t.schema.internal.SchemaCreatorImpl : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl#21259451'
2017-12-25 16:45:24.395 INFO 11904 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2017-12-25 16:45:24.638 INFO 11904 --- [ restartedMain] o.h.v.i.engine.ValidatorFactoryImpl : HV000238: Temporal validation tolerance set to 0.
2017-12-25 16:45:25.114 INFO 11904 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#104b00ce: startup date [Mon Dec 25 16:45:19 MST 2017]; root of context hierarchy
2017-12-25 16:45:25.187 WARN 11904 --- [ restartedMain] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2017-12-25 16:45:25.281 INFO 11904 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2017-12-25 16:45:25.281 INFO 11904 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-12-25 16:45:25.375 INFO 11904 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-12-25 16:45:25.375 INFO 11904 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-12-25 16:45:25.469 INFO 11904 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-12-25 16:45:25.831 INFO 11904 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2017-12-25 16:45:26.018 INFO 11904 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2017-12-25 16:45:26.018 INFO 11904 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'dataSource' has been autodetected for JMX exposure
2017-12-25 16:45:26.034 INFO 11904 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located MBean 'dataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=dataSource,type=HikariDataSource]
2017-12-25 16:45:47.130 ERROR 11904 --- [ restartedMain] o.a.coyote.http11.Http11NioProtocol : Failed to start end point associated with ProtocolHandler ["http-nio-7091"]
java.io.IOException: Unable to establish loopback connection
at sun.nio.ch.PipeImpl$Initializer.run(Unknown Source) ~[na:1.8.0_152]
at sun.nio.ch.PipeImpl$Initializer.run(Unknown Source) ~[na:1.8.0_152]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_152]
at sun.nio.ch.PipeImpl.<init>(Unknown Source) ~[na:1.8.0_152]
at sun.nio.ch.SelectorProviderImpl.openPipe(Unknown Source) ~[na:1.8.0_152]
at java.nio.channels.Pipe.open(Unknown Source) ~[na:1.8.0_152]
at sun.nio.ch.WindowsSelectorImpl.<init>(Unknown Source) ~[na:1.8.0_152]
at sun.nio.ch.WindowsSelectorProvider.openSelector(Unknown Source) ~[na:1.8.0_152]
at java.nio.channels.Selector.open(Unknown Source) ~[na:1.8.0_152]
at org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector(NioSelectorPool.java:66) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.tomcat.util.net.NioSelectorPool.open(NioSelectorPool.java:130) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:227) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:990) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:635) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1022) [tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:225) [tomcat-embed-core-8.5.23.jar:8.5.23]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:247) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:189) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:298) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:160) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) [spring-context-5.0.2.RELEASE.jar:5.0.2.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:138) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:751) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:387) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1245) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1233) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at com.example.springrestful.demo.restfulservices.Application.main(Application.java:10) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_152]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_152]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_152]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_152]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
Caused by: java.net.ConnectException: Connection timed out: connect
at sun.nio.ch.Net.connect0(Native Method) ~[na:1.8.0_152]
at sun.nio.ch.Net.connect(Unknown Source) ~[na:1.8.0_152]
at sun.nio.ch.Net.connect(Unknown Source) ~[na:1.8.0_152]
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source) ~[na:1.8.0_152]
at java.nio.channels.SocketChannel.open(Unknown Source) ~[na:1.8.0_152]
at sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run(Unknown Source) ~[na:1.8.0_152]
... 34 common frames omitted
2017-12-25 16:45:47.149 ERROR 11904 --- [ restartedMain] o.apache.catalina.core.StandardService : Failed to start connector [Connector[HTTP/1.1-7091]]
org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-7091]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:225) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:247) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:189) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:298) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:160) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) [spring-context-5.0.2.RELEASE.jar:5.0.2.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:138) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:751) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:387) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1245) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1233) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
at com.example.springrestful.demo.restfulservices.Application.main(Application.java:10) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_152]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_152]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_152]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_152]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
Caused by: org.apache.catalina.LifecycleException: service.getName(): "Tomcat"; Protocol handler start failed
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1031) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
... 18 common frames omitted
Caused by: java.io.IOException: Unable to establish loopback connection
at sun.nio.ch.PipeImpl$Initializer.run(Unknown Source) ~[na:1.8.0_152]
at sun.nio.ch.PipeImpl$Initializer.run(Unknown Source) ~[na:1.8.0_152]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_152]
at sun.nio.ch.PipeImpl.<init>(Unknown Source) ~[na:1.8.0_152]
at sun.nio.ch.SelectorProviderImpl.openPipe(Unknown Source) ~[na:1.8.0_152]
at java.nio.channels.Pipe.open(Unknown Source) ~[na:1.8.0_152]
at sun.nio.ch.WindowsSelectorImpl.<init>(Unknown Source) ~[na:1.8.0_152]
at sun.nio.ch.WindowsSelectorProvider.openSelector(Unknown Source) ~[na:1.8.0_152]
at java.nio.channels.Selector.open(Unknown Source) ~[na:1.8.0_152]
at org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector(NioSelectorPool.java:66) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.tomcat.util.net.NioSelectorPool.open(NioSelectorPool.java:130) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:227) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:990) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:635) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1022) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
... 19 common frames omitted
Caused by: java.net.ConnectException: Connection timed out: connect
at sun.nio.ch.Net.connect0(Native Method) ~[na:1.8.0_152]
at sun.nio.ch.Net.connect(Unknown Source) ~[na:1.8.0_152]
at sun.nio.ch.Net.connect(Unknown Source) ~[na:1.8.0_152]
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source) ~[na:1.8.0_152]
at java.nio.channels.SocketChannel.open(Unknown Source) ~[na:1.8.0_152]
at sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run(Unknown Source) ~[na:1.8.0_152]
... 34 common frames omitted
2017-12-25 16:45:47.182 INFO 11904 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2017-12-25 16:45:47.198 INFO 11904 --- [ restartedMain] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2017-12-25 16:45:47.198 ERROR 11904 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
The Tomcat connector configured to listen on port 7091 failed to start. The port may already be in use or the connector may be misconfigured.
Action:
Verify the connector's configuration, identify and stop any process that's listening on port 7091, or configure this application to listen on another port.
2017-12-25 16:45:47.198 INFO 11904 --- [ restartedMain] ConfigServletWebServerApplicationContext : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#104b00ce: startup date [Mon Dec 25 16:45:19 MST 2017]; root of context hierarchy
2017-12-25 16:45:47.198 INFO 11904 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
2017-12-25 16:45:47.198 INFO 11904 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans
2017-12-25 16:45:47.198 INFO 11904 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2017-12-25 16:45:47.198 INFO 11904 --- [ restartedMain] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed drop of schema as part of SessionFactory shut-down'
2017-12-25 16:45:47.214 INFO 11904 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : testdb - Shutdown initiated...
2017-12-25 16:45:47.214 INFO 11904 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : testdb - Shutdown completed.
I'm trying to create a camunda application with springboot, but i need to use Spin Json Node, and when i add the dependencies to the pom.xml it gives me this error when i run project as java application:
org.springframework.context.ApplicationContextException: Unable to
start embedded container; nested exception is
org.springframework.boot.context.embedded.EmbeddedServletContainerException:
Unable to start embedded Tomcat at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137)
~[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
~[spring-context-4.3.11.RELEASE.jar:4.3.11.RELEASE] at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
~[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at
br.com.ntconsult.camundaProject.app.CamundaSpringbootApplication.main(CamundaSpringbootApplication.java:9)
[classes/:na] Caused by:
org.springframework.boot.context.embedded.EmbeddedServletContainerException:
Unable to start embedded Tomcat at
org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:123)
~[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at
org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.(TomcatEmbeddedServletContainer.java:84)
~[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at
org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:554)
~[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at
org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:179)
~[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:164)
~[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134)
~[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] ... 8 common frames
omitted Caused by: org.apache.catalina.LifecycleException: Failed to
start component [StandardServer[-1]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
~[tomcat-embed-core-8.5.20.jar:8.5.20] at
org.apache.catalina.startup.Tomcat.start(Tomcat.java:367)
~[tomcat-embed-core-8.5.20.jar:8.5.20] at
org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:99)
~[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] ... 13 common frames
omitted Caused by: org.apache.catalina.LifecycleException: Failed to
start component [StandardService[Tomcat]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
~[tomcat-embed-core-8.5.20.jar:8.5.20] at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
~[tomcat-embed-core-8.5.20.jar:8.5.20] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
~[tomcat-embed-core-8.5.20.jar:8.5.20] ... 15 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start
component [StandardEngine[Tomcat]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
~[tomcat-embed-core-8.5.20.jar:8.5.20] at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
~[tomcat-embed-core-8.5.20.jar:8.5.20] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
~[tomcat-embed-core-8.5.20.jar:8.5.20] ... 17 common frames omitted
Caused by: org.apache.catalina.LifecycleException: A child container
failed during start at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:947)
~[tomcat-embed-core-8.5.20.jar:8.5.20] at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
~[tomcat-embed-core-8.5.20.jar:8.5.20] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
~[tomcat-embed-core-8.5.20.jar:8.5.20] ... 19 common frames omitted
If i remove the camunda-bom from the dependencyManagement in pom.xml everything works, but i can't use things like spin json node.
I created a simple project with this error in github: https://github.com/jradesenv/camunda-springboot
The project you provided on GitHub works perfectly fine on my end and runs as expected. You cut off part of the stacktrace, so I cannot see the root cause. Something stops Tomcat from starting - probably an already used port?
PS: We released a preview of the upcoming Spring Boot archetype yesterday: https://github.com/camunda/camunda-archetypes/tree/master/camunda-archetype-spring-boot/ - might be a good starting point too.
FYI my console (I just pulled the code and run it):
____ _ ____ ____ __ __
/ ___| __ _ _ __ ___ _ _ _ __ __| | __ _ | __ )| _ \| \/ |
| | / _` | '_ ` _ \| | | | '_ \ / _` |/ _` | | _ \| |_) | |\/| |
| |__| (_| | | | | | | |_| | | | | (_| | (_| | | |_) | __/| | | |
\____/\__,_|_| |_| |_|\__,_|_| |_|\__,_|\__,_| |____/|_| |_| |_|
Spring-Boot: (v1.5.7.RELEASE)
Camunda BPM: (v7.8.0-alpha6)
Camunda BPM Spring Boot Starter: (v2.3.0-alpha1)
2017-11-22 09:12:24.931 INFO 13404 --- [ main] b.c.n.c.a.CamundaSpringbootApplication : Starting CamundaSpringbootApplication on LAPTOP-LFHA6NM6 with PID 13404 (C:\Temp\camunda-springboot-support\target\classes started by ruecker in C:\Temp\camunda-springboot-support)
2017-11-22 09:12:24.954 INFO 13404 --- [ main] b.c.n.c.a.CamundaSpringbootApplication : No active profile set, falling back to default profiles: default
2017-11-22 09:12:25.052 INFO 13404 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#37918c79: startup date [Wed Nov 22 09:12:25 CET 2017]; root of context hierarchy
2017-11-22 09:12:26.624 INFO 13404 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2017-11-22 09:12:27.830 INFO 13404 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2017-11-22 09:12:27.854 INFO 13404 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2017-11-22 09:12:27.856 INFO 13404 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.20
2017-11-22 09:12:28.079 INFO 13404 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2017-11-22 09:12:28.080 INFO 13404 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3033 ms
2017-11-22 09:12:28.522 INFO 13404 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2017-11-22 09:12:28.567 INFO 13404 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-11-22 09:12:28.568 INFO 13404 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-11-22 09:12:28.568 INFO 13404 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-11-22 09:12:28.568 INFO 13404 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2017-11-22 09:12:29.118 INFO 13404 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#37918c79: startup date [Wed Nov 22 09:12:25 CET 2017]; root of context hierarchy
2017-11-22 09:12:29.232 INFO 13404 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2017-11-22 09:12:29.234 INFO 13404 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-11-22 09:12:29.264 INFO 13404 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Root mapping to handler of type [class org.springframework.web.servlet.mvc.ParameterizableViewController]
2017-11-22 09:12:29.287 INFO 13404 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-11-22 09:12:29.288 INFO 13404 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-11-22 09:12:29.288 INFO 13404 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/lib/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-11-22 09:12:29.288 INFO 13404 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/api/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-11-22 09:12:29.289 INFO 13404 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/app/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-11-22 09:12:29.359 INFO 13404 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-11-22 09:12:29.870 INFO 13404 --- [ main] org.camunda.bpm.spring.boot : STARTER-SB040 Setting up jobExecutor with corePoolSize=3, maxPoolSize:10
2017-11-22 09:12:29.891 INFO 13404 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'camundaTaskExecutor'
2017-11-22 09:12:30.101 INFO 13404 --- [ main] org.camunda.bpm.engine.cfg : ENGINE-12003 Plugin 'CompositeProcessEnginePlugin[genericPropertiesConfiguration, camundaProcessEngineConfiguration, camundaDatasourceConfiguration, camundaJobConfiguration, camundaHistoryConfiguration, camundaMetricsConfiguration, camundaAuthorizationConfiguration, camundaDeploymentConfiguration, failedJobConfiguration]' activated on process engine 'default'
2017-11-22 09:12:32.841 INFO 13404 --- [ main] org.camunda.bpm.spring.boot : STARTER-SB021 Auto-Deploying resources: []
2017-11-22 09:12:36.911 INFO 13404 --- [ main] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'engine' with resource 'org/camunda/bpm/engine/db/create/activiti.h2.create.engine.sql'
2017-11-22 09:12:36.965 INFO 13404 --- [ main] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'history' with resource 'org/camunda/bpm/engine/db/create/activiti.h2.create.history.sql'
2017-11-22 09:12:36.993 INFO 13404 --- [ main] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'identity' with resource 'org/camunda/bpm/engine/db/create/activiti.h2.create.identity.sql'
2017-11-22 09:12:37.024 INFO 13404 --- [ main] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'case.engine' with resource 'org/camunda/bpm/engine/db/create/activiti.h2.create.case.engine.sql'
2017-11-22 09:12:37.037 INFO 13404 --- [ main] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'case.history' with resource 'org/camunda/bpm/engine/db/create/activiti.h2.create.case.history.sql'
2017-11-22 09:12:37.045 INFO 13404 --- [ main] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'decision.engine' with resource 'org/camunda/bpm/engine/db/create/activiti.h2.create.decision.engine.sql'
2017-11-22 09:12:37.068 INFO 13404 --- [ main] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'decision.history' with resource 'org/camunda/bpm/engine/db/create/activiti.h2.create.decision.history.sql'
2017-11-22 09:12:37.159 INFO 13404 --- [ main] org.camunda.bpm.engine.persistence : ENGINE-03067 No history level property found in database
2017-11-22 09:12:37.159 INFO 13404 --- [ main] org.camunda.bpm.engine.persistence : ENGINE-03065 Creating historyLevel property in database for level: HistoryLevelFull(name=full, id=3)
2017-11-22 09:12:37.171 INFO 13404 --- [ main] org.camunda.bpm.engine : ENGINE-00001 Process Engine default created.
2017-11-22 09:12:37.370 INFO 13404 --- [ main] o.c.b.s.b.s.w.f.LazyInitRegistration : lazy initialized org.camunda.bpm.spring.boot.starter.webapp.filter.LazyProcessEnginesFilter#4e25e00f
2017-11-22 09:12:37.470 INFO 13404 --- [ main] o.c.b.s.b.s.w.f.LazyInitRegistration : lazy initialized org.camunda.bpm.spring.boot.starter.webapp.filter.LazySecurityFilter#2097d719
2017-11-22 09:12:37.808 INFO 13404 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2017-11-22 09:12:37.934 INFO 13404 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2017-11-22 09:12:37.944 INFO 13404 --- [ main] org.camunda.bpm.engine.jobexecutor : ENGINE-14014 Starting up the JobExecutor[org.camunda.bpm.engine.spring.components.jobexecutor.SpringJobExecutor].
2017-11-22 09:12:37.947 INFO 13404 --- [ main] b.c.n.c.a.CamundaSpringbootApplication : Started CamundaSpringbootApplication in 13.493 seconds (JVM running for 14.344)
2017-11-22 09:12:37.949 INFO 13404 --- [ingJobExecutor]] org.camunda.bpm.engine.jobexecutor : ENGINE-14018 JobExecutor[org.camunda.bpm.engine.spring.components.jobexecutor.SpringJobExecutor] starting to acquire jobs
I have a spring boot app which is basically a soap server and publishing a web service.
When I am running the app on local it's publishing the wsdl at - http://localhost:9999/service/hello-world?wsdl, and as soon as I try to push it on Local Cloudfoundry, it fails at time of starting the app stating the reason:
Caused by: java.net.SocketException: Permission denied
manifest.yml of the app looks like:
---
applications:
- name: soap-server
memory: 1G
random-route: true
path: target/soap-server-0.0.1-SNAPSHOT.jar
And modified SoapServerApplication for Local Cloudfoundry deployment looks like:
#SpringBootApplication
public class SoapServerApplication implements CommandLineRunner {
#Override
public void run(String... args) throws Exception {
Endpoint.publish("http://soap-server.local.pcfdev.io"+ "/service/hello-world", new HelloWorldServiceImpl());
}
public static void main(String[] args) {
SpringApplication.run(SoapServerApplication.class, args);
}
}
Complete logs:
App instance exited with guid 7c476beb-6e16-4a25-bed3-51ce289a8180 payload: {"instance"=>"", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"2 error(s) occurred:\n\n* 2 error(s) occurred:\n\n* Exited with status 1\n* cancelled\n* cancelled", "crash_count"=>5, "crash_timestamp"=>1481326885385909754, "version"=>"dd0fa534-cc5b-4012-acff-3a23c390987c"}
Successfully destroyed container
Creating container
Successfully created container
Starting health monitoring of container
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
. ____ _ __ _ _
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.3.6.RELEASE)
2016-12-09 23:43:49.229 INFO 17 --- [ main] pertySourceApplicationContextInitializer : Adding 'cloud' PropertySource to ApplicationContext
2016-12-09 23:43:49.394 INFO 17 --- [ main] nfigurationApplicationContextInitializer : Adding cloud service auto-reconfiguration to ApplicationContext
2016-12-09 23:43:49.427 INFO 17 --- [ main] c.a.s.server.main.SoapServerApplication : Starting SoapServerApplication on 3le7g13378f with PID 17 (/home/vcap/app started by vcap in /home/vcap/app)
2016-12-09 23:43:49.430 INFO 17 --- [ main] c.a.s.server.main.SoapServerApplication : The following profiles are active: cloud
2016-12-09 23:43:49.541 INFO 17 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#1f17ae12: startup date [Fri Dec 09 23:43:49 UTC 2016]; root of context hierarchy
2016-12-09 23:43:51.384 INFO 17 --- [ main] urceCloudServiceBeanFactoryPostProcessor : Skipping auto-reconfiguring beans of type javax.sql.DataSource
2016-12-09 23:43:51.386 INFO 17 --- [ main] edisCloudServiceBeanFactoryPostProcessor : Skipping auto-reconfiguring beans of type org.springframework.data.redis.connection.RedisConnectionFactory
2016-12-09 23:43:51.385 INFO 17 --- [ main] ongoCloudServiceBeanFactoryPostProcessor : Skipping auto-reconfiguring beans of type org.springframework.data.mongodb.MongoDbFactory
2016-12-09 23:43:51.385 INFO 17 --- [ main] bbitCloudServiceBeanFactoryPostProcessor : Skipping auto-reconfiguring beans of type org.springframework.amqp.rabbit.connection.ConnectionFactory
2016-12-09 23:43:52.179 INFO 17 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2016-12-09 23:43:52.213 INFO 17 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2016-12-09 23:43:52.218 INFO 17 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.0.36
2016-12-09 23:43:52.417 INFO 17 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2016-12-09 23:43:52.419 INFO 17 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2881 ms
2016-12-09 23:43:53.003 INFO 17 --- [ost-startStop-1] o.s.b.c.e.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2016-12-09 23:43:53.013 INFO 17 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2016-12-09 23:43:53.014 INFO 17 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2016-12-09 23:43:53.014 INFO 17 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2016-12-09 23:43:53.015 INFO 17 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2016-12-09 23:43:53.467 INFO 17 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#1f17ae12: startup date [Fri Dec 09 23:43:49 UTC 2016]; root of context hierarchy
2016-12-09 23:43:53.584 INFO 17 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2016-12-09 23:43:53.596 INFO 17 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2016-12-09 23:43:53.649 INFO 17 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-12-09 23:43:53.649 INFO 17 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-12-09 23:43:53.706 INFO 17 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-12-09 23:43:53.886 INFO 17 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2016-12-09 23:43:54.041 INFO 17 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
Container became healthy
at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:771) [spring-boot-1.3.6.RELEASE.jar!/:1.3.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.6.RELEASE.jar!/:1.3.6.RELEASE]
2016-12-09 23:43:54.550 ERROR 17 --- [ main] o.s.boot.SpringApplication : Application startup failed
java.lang.IllegalStateException: Failed to execute CommandLineRunner
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:803) [spring-boot-1.3.6.RELEASE.jar!/:1.3.6.RELEASE]
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:784) [spring-boot-1.3.6.RELEASE.jar!/:1.3.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185) [spring-boot-1.3.6.RELEASE.jar!/:1.3.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174) [spring-boot-1.3.6.RELEASE.jar!/:1.3.6.RELEASE]
at com.arpit.soap.server.main.SoapServerApplication.main(SoapServerApplication.java:24) [app/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54) [app/:na]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:104) [app/:na]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:61) [app/:na]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) [app/:na]
Caused by: com.sun.xml.internal.ws.server.ServerRtException: Server Runtime Error: java.net.SocketException: Permission denied
at com.sun.xml.internal.ws.transport.http.server.ServerMgr.createContext(ServerMgr.java:117) ~[na:1.8.0_91]
at com.sun.xml.internal.ws.transport.http.server.HttpEndpoint.publish(HttpEndpoint.java:64) ~[na:1.8.0_91]
at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:232) ~[na:1.8.0_91]
at com.sun.xml.internal.ws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:126) ~[na:1.8.0_91]
at javax.xml.ws.Endpoint.publish(Endpoint.java:240) ~[na:1.8.0_91]
at com.arpit.soap.server.main.SoapServerApplication.run(SoapServerApplication.java:20) [app/:na]
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:800) [spring-boot-1.3.6.RELEASE.jar!/:1.3.6.RELEASE]
... 14 common frames omitted
Caused by: java.net.SocketException: Permission denied
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_91]
at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_91]
at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_91]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_91]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_91]
at sun.net.httpserver.ServerImpl.<init>(ServerImpl.java:100) ~[na:1.8.0_91]
at sun.net.httpserver.HttpServerImpl.<init>(HttpServerImpl.java:50) ~[na:1.8.0_91]
at sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(DefaultHttpServerProvider.java:35) ~[na:1.8.0_91]
at com.sun.net.httpserver.HttpServer.create(HttpServer.java:130) ~[na:1.8.0_91]
at com.sun.xml.internal.ws.transport.http.server.ServerMgr.createContext(ServerMgr.java:86) ~[na:1.8.0_91]
... 20 common frames omitted
2016-12-09 23:43:54.564 INFO 17 --- [ main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [file:/home/vcap/app/, jar:file:/home/vcap/app/lib/spring-expression-4.2.7.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-webmvc-4.2.7.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-context-4.2.7.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-core-4.2.7.RELEASE.jar!/, jar:file:/home/vcap/app/lib/jboss-logging-3.3.0.Final.jar!/, jar:file:/home/vcap/app/lib/spring-aop-4.2.7.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-boot-1.3.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/jackson-annotations-2.6.7.jar!/, jar:file:/home/vcap/app/lib/spring-boot-starter-web-1.3.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-cloud-spring-service-connector-1.2.3.RELEASE.jar!/, jar:file:/home/vcap/app/lib/tomcat-embed-el-8.0.36.jar!/, jar:file:/home/vcap/app/lib/jul-to-slf4j-1.7.21.jar!/, jar:file:/home/vcap/app/lib/classmate-1.1.0.jar!/, jar:file:/home/vcap/app/lib/spring-web-4.2.7.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-boot-autoconfigure-1.3.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-cloud-core-1.2.3.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-beans-4.2.7.RELEASE.jar!/, jar:file:/home/vcap/app/lib/logback-core-1.1.7.jar!/, jar:file:/home/vcap/app/lib/spring-boot-starter-tomcat-1.3.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/logback-classic-1.1.7.jar!/, jar:file:/home/vcap/app/lib/spring_auto_reconfiguration-1.10.0_RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-boot-starter-logging-1.3.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/validation-api-1.1.0.Final.jar!/, jar:file:/home/vcap/app/lib/snakeyaml-1.16.jar!/, jar:file:/home/vcap/app/lib/log4j-over-slf4j-1.7.21.jar!/, jar:file:/home/vcap/app/lib/jcl-over-slf4j-1.7.21.jar!/, jar:file:/home/vcap/app/lib/tomcat-embed-logging-juli-8.0.36.jar!/, jar:file:/home/vcap/app/lib/jackson-databind-2.6.7.jar!/, jar:file:/home/vcap/app/lib/tomcat-embed-core-8.0.36.jar!/, jar:file:/home/vcap/app/lib/spring-boot-starter-1.3.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/slf4j-api-1.7.21.jar!/, jar:file:/home/vcap/app/lib/jackson-core-2.6.7.jar!/, jar:file:/home/vcap/app/lib/spring-cloud-cloudfoundry-connector-1.2.3.RELEASE.jar!/, jar:file:/home/vcap/app/lib/spring-boot-starter-validation-1.3.6.RELEASE.jar!/, jar:file:/home/vcap/app/lib/aopalliance-1.0.jar!/, jar:file:/home/vcap/app/lib/tomcat-embed-websocket-8.0.36.jar!/, jar:file:/home/vcap/app/lib/hibernate-validator-5.2.4.Final.jar!/]
Error starting ApplicationContext. To display the auto-configuration report enable debug logging (start with --debug)
2016-12-09 23:43:54.571 INFO 17 --- [ main] utoConfigurationReportLoggingInitializer :
2016-12-09 23:43:54.571 INFO 17 --- [ main] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#1f17ae12: startup date [Fri Dec 09 23:43:49 UTC 2016]; root of context hierarchy
2016-12-09 23:43:54.583 INFO 17 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:62)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:61)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:104)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:803)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:784)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)
... 3 more
Caused by: java.lang.IllegalStateException: Failed to execute CommandLineRunner
at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:771)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)
at com.arpit.soap.server.main.SoapServerApplication.main(SoapServerApplication.java:24)
... 8 more
Caused by: com.sun.xml.internal.ws.server.ServerRtException: Server Runtime Error: java.net.SocketException: Permission denied
at com.sun.xml.internal.ws.transport.http.server.ServerMgr.createContext(ServerMgr.java:117)
at com.arpit.soap.server.main.SoapServerApplication.run(SoapServerApplication.java:20)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:800)
at com.sun.xml.internal.ws.transport.http.server.HttpEndpoint.publish(HttpEndpoint.java:64)
at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:232)
at com.sun.xml.internal.ws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:126)
at javax.xml.ws.Endpoint.publish(Endpoint.java:240)
... 14 more
Caused by: java.net.SocketException: Permission denied
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at sun.net.httpserver.ServerImpl.<init>(ServerImpl.java:100)
at sun.net.httpserver.HttpServerImpl.<init>(HttpServerImpl.java:50)
at sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(DefaultHttpServerProvider.java:35)
at com.sun.net.httpserver.HttpServer.create(HttpServer.java:130)
at com.sun.xml.internal.ws.transport.http.server.ServerMgr.createContext(ServerMgr.java:86)
... 20 more
Exit status 1
Exit status 0
Any idea how can I fix it?