I have a problem since I export and import a spring project, and it is that now it takes more than 70 seconds to start. Get stuck in Triggering deferred initialization of Spring Data repositories ...
This is the log of the console:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.3.4.RELEASE)
2021-01-19 21:00:48.994 INFO 15368 --- [ restartedMain] com.practica.PracticaFinalApplication : Starting PracticaFinalApplication on DESKTOP-BG6SBT4 with PID 15368 (D:\workspace-spring-tool-suite-4-4.8.0.RELEASE\PRACTICA_FINAL\target\classes started by dani_ in D:\workspace-spring-tool-suite-4-4.8.0.RELEASE\PRACTICA_FINAL)
2021-01-19 21:00:48.998 INFO 15368 --- [ restartedMain] com.practica.PracticaFinalApplication : No active profile set, falling back to default profiles: default
2021-01-19 21:00:49.051 INFO 15368 --- [ restartedMain] o.s.b.devtools.restart.ChangeableUrls : The Class-Path manifest attribute in C:\Users\dani_\.m2\repository\com\oracle\database\jdbc\ojdbc8\19.3.0.0\ojdbc8-19.3.0.0.jar referenced one or more files that do not exist: file:/C:/Users/dani_/.m2/repository/com/oracle/database/jdbc/ojdbc8/19.3.0.0/oraclepki.jar
2021-01-19 21:00:49.051 INFO 15368 --- [ restartedMain] o.s.b.devtools.restart.ChangeableUrls : The Class-Path manifest attribute in C:\Users\dani_\.m2\repository\com\oracle\database\security\oraclepki\19.3.0.0\oraclepki-19.3.0.0.jar referenced one or more files that do not exist: file:/C:/Users/dani_/.m2/repository/com/oracle/database/security/oraclepki/19.3.0.0/osdt_core.jar,file:/C:/Users/dani_/.m2/repository/com/oracle/database/security/oraclepki/19.3.0.0/osdt_cert.jar,file:/C:/Users/dani_/.m2/repository/com/oracle/database/security/oraclepki/oracle.osdt/osdt_core.jar,file:/C:/Users/dani_/.m2/repository/com/oracle/database/security/oraclepki/oracle.osdt/osdt_cert.jar
2021-01-19 21:00:49.052 INFO 15368 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2021-01-19 21:00:49.052 INFO 15368 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2021-01-19 21:00:49.767 INFO 15368 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
2021-01-19 21:00:49.848 INFO 15368 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 75ms. Found 6 JPA repository interfaces.
2021-01-19 21:00:50.143 INFO 15368 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.ws.config.annotation.DelegatingWsConfiguration' of type [org.springframework.ws.config.annotation.DelegatingWsConfiguration$$EnhancerBySpringCGLIB$$5974c00c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-01-19 21:00:50.203 INFO 15368 --- [ restartedMain] .w.s.a.s.AnnotationActionEndpointMapping : Supporting [WS-Addressing August 2004, WS-Addressing 1.0]
2021-01-19 21:00:50.575 INFO 15368 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8085 (http)
2021-01-19 21:00:50.586 INFO 15368 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-01-19 21:00:50.587 INFO 15368 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.38]
2021-01-19 21:00:50.709 INFO 15368 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-01-19 21:00:50.710 INFO 15368 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1658 ms
2021-01-19 21:00:50.967 INFO 15368 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2021-01-19 21:00:51.007 INFO 15368 --- [ task-1] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2021-01-19 21:00:51.055 INFO 15368 --- [ task-1] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.21.Final
2021-01-19 21:00:51.101 WARN 15368 --- [ restartedMain] 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-01-19 21:00:51.160 INFO 15368 --- [ task-1] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2021-01-19 21:00:51.267 INFO 15368 --- [ task-1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2021-01-19 21:00:51.313 INFO 15368 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#5548d944, org.springframework.security.web.context.SecurityContextPersistenceFilter#52db2e9a, org.springframework.security.web.header.HeaderWriterFilter#2682a673, org.springframework.security.web.csrf.CsrfFilter#384244c7, org.springframework.security.web.authentication.logout.LogoutFilter#60a9bf00, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#14f3c976, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#14a70864, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#9aabdd5, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#61618c62, org.springframework.security.web.session.SessionManagementFilter#1e6efa12, org.springframework.security.web.access.ExceptionTranslationFilter#72c01891, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#43f59fcf]
2021-01-19 21:00:51.534 INFO 15368 --- [ task-1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2021-01-19 21:00:51.551 INFO 15368 --- [ task-1] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.Oracle12cDialect
2021-01-19 21:00:51.756 INFO 15368 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2021-01-19 21:00:51.825 INFO 15368 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8085 (http) with context path ''
2021-01-19 21:00:51.828 INFO 15368 --- [ restartedMain] DeferredRepositoryInitializationListener : Triggering deferred initialization of Spring Data repositories…
2021-01-19 21:02:03.729 WARN 15368 --- [ task-1] o.h.b.i.InFlightMetadataCollectorImpl : HHH000069: Duplicate generator name sequence
2021-01-19 21:02:03.741 WARN 15368 --- [ task-1] o.h.b.i.InFlightMetadataCollectorImpl : HHH000069: Duplicate generator name sequence
2021-01-19 21:02:03.744 WARN 15368 --- [ task-1] o.h.b.i.InFlightMetadataCollectorImpl : HHH000069: Duplicate generator name sequence
2021-01-19 21:02:04.203 INFO 15368 --- [ task-1] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2021-01-19 21:02:04.211 INFO 15368 --- [ task-1] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-01-19 21:02:04.639 INFO 15368 --- [ restartedMain] DeferredRepositoryInitializationListener : Spring Data repositories initialized!
2021-01-19 21:02:04.647 INFO 15368 --- [ restartedMain] com.practica.PracticaFinalApplication : Started PracticaFinalApplication in 76.038 seconds (JVM running for 77.006)
And this is the pom.xml
4.0.0
org.springframework.boot
spring-boot-starter-parent
2.3.4.RELEASE
com.practica
PRACTICA_FINAL
0.0.1-SNAPSHOT
war
PRACTICA_FINAL
Practica
<properties>
<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-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.librepdf</groupId>
<artifactId>openpdf</artifactId>
<version>1.3.24</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
In case it works for someone, I found the solution. I just had to add these two lines in my properties file and I went from starting in 70 seconds to starting in 4 seconds
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false
spring.jpa.properties.hibernate.dialect =org.hibernate.dialect.Oracle12cDialect
Related
Spring Boot 3.0.0 application, after filling out the form and submitting it, the input field is cleared, but saving to the corresponding database table does not occur. There are no errors in the log.
Model
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
#Entity
public class Message {
#Id
#GeneratedValue(strategy= GenerationType.AUTO)
private Integer id;
private String text;
public Message() {
}
public Message(String text) {
this.text = text;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
}
Repository
import kz.onlineshelter.helppet.model.Message;
import org.springframework.data.repository.CrudRepository;
public interface MessageRepository extends CrudRepository<Message, Long> {}
Controller
import kz.onlineshelter.helppet.model.Message;
import kz.onlineshelter.helppet.repository.MessageRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
#Controller
#RequestMapping(method={RequestMethod.POST,RequestMethod.GET})
public class AppController {
private final MessageRepository messageRepository;
#Autowired
public AppController(MessageRepository messageRepository) {
this.messageRepository = messageRepository;
}
#GetMapping("/message")
public String message(Map<String, Object> model) {
Iterable<Message> messages = messageRepository.findAll();
model.put("messages", messages);
return "message";
}
#PostMapping
public String add(#RequestParam String text, Map<String, Object> model) {
Message message = new Message(text);
messageRepository.save(message);
Iterable<Message> messages = messageRepository.findAll();
model.put("messages", messages);
return "message";
}
}
Application
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
#SpringBootApplication
public class HelppetApplication {
public static void main(String[] args) {
SpringApplication.run(HelppetApplication.class, args);
}
}
resources/templates/message.mustache
<html>
<body>
<div>
<form method="post">
<input type="text" name="text" placeholder="Enter your text" /><br>
<button type="submit">Add</button>
</form>
</div>
<div>List of messages</div>
{{#messages}}
<div>
<span>{{text}}</span>
</div>
{{/messages}}
</body>
</html>
application.properties
spring.datasource.url=jdbc:postgresql://localhost:5432/***
spring.datasource.username=***
spring.datasource.password=***
spring.jpa.generate-ddl=true
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>***</groupId>
<artifactId>helppet</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>***</name>
<description>***</description>
<properties>
<java.version>17</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-mustache</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>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</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>
</project>
log file
"C:\Program Files\BellSoft\LibericaJDK-17\bin\java.exe" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.2\lib\idea_rt.jar=63010:C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.2\bin" -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dfile.encoding=UTF-8 -classpath "C:\java projects\helppet\target\classes;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-data-jpa\3.0.0\spring-boot-starter-data-jpa-3.0.0.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-aop\3.0.0\spring-boot-starter-aop-3.0.0.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-aop\6.0.2\spring-aop-6.0.2.jar;C:\Users\Admin\.m2\repository\org\aspectj\aspectjweaver\1.9.9.1\aspectjweaver-1.9.9.1.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-jdbc\3.0.0\spring-boot-starter-jdbc-3.0.0.jar;C:\Users\Admin\.m2\repository\com\zaxxer\HikariCP\5.0.1\HikariCP-5.0.1.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-jdbc\6.0.2\spring-jdbc-6.0.2.jar;C:\Users\Admin\.m2\repository\org\hibernate\orm\hibernate-core\6.1.5.Final\hibernate-core-6.1.5.Final.jar;C:\Users\Admin\.m2\repository\jakarta\persistence\jakarta.persistence-api\3.1.0\jakarta.persistence-api-3.1.0.jar;C:\Users\Admin\.m2\repository\jakarta\transaction\jakarta.transaction-api\2.0.1\jakarta.transaction-api-2.0.1.jar;C:\Users\Admin\.m2\repository\org\jboss\logging\jboss-logging\3.5.0.Final\jboss-logging-3.5.0.Final.jar;C:\Users\Admin\.m2\repository\org\hibernate\common\hibernate-commons-annotations\6.0.2.Final\hibernate-commons-annotations-6.0.2.Final.jar;C:\Users\Admin\.m2\repository\org\jboss\jandex\2.4.2.Final\jandex-2.4.2.Final.jar;C:\Users\Admin\.m2\repository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;C:\Users\Admin\.m2\repository\net\bytebuddy\byte-buddy\1.12.19\byte-buddy-1.12.19.jar;C:\Users\Admin\.m2\repository\org\glassfish\jaxb\jaxb-runtime\4.0.1\jaxb-runtime-4.0.1.jar;C:\Users\Admin\.m2\repository\org\glassfish\jaxb\jaxb-core\4.0.1\jaxb-core-4.0.1.jar;C:\Users\Admin\.m2\repository\org\eclipse\angus\angus-activation\1.0.0\angus-activation-1.0.0.jar;C:\Users\Admin\.m2\repository\org\glassfish\jaxb\txw2\4.0.1\txw2-4.0.1.jar;C:\Users\Admin\.m2\repository\com\sun\istack\istack-commons-runtime\4.1.1\istack-commons-runtime-4.1.1.jar;C:\Users\Admin\.m2\repository\jakarta\inject\jakarta.inject-api\2.0.0\jakarta.inject-api-2.0.0.jar;C:\Users\Admin\.m2\repository\org\antlr\antlr4-runtime\4.10.1\antlr4-runtime-4.10.1.jar;C:\Users\Admin\.m2\repository\org\springframework\data\spring-data-jpa\3.0.0\spring-data-jpa-3.0.0.jar;C:\Users\Admin\.m2\repository\org\springframework\data\spring-data-commons\3.0.0\spring-data-commons-3.0.0.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-orm\6.0.2\spring-orm-6.0.2.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-context\6.0.2\spring-context-6.0.2.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-tx\6.0.2\spring-tx-6.0.2.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-beans\6.0.2\spring-beans-6.0.2.jar;C:\Users\Admin\.m2\repository\org\slf4j\slf4j-api\2.0.4\slf4j-api-2.0.4.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-aspects\6.0.2\spring-aspects-6.0.2.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-mustache\3.0.0\spring-boot-starter-mustache-3.0.0.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter\3.0.0\spring-boot-starter-3.0.0.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-logging\3.0.0\spring-boot-starter-logging-3.0.0.jar;C:\Users\Admin\.m2\repository\ch\qos\logback\logback-classic\1.4.5\logback-classic-1.4.5.jar;C:\Users\Admin\.m2\repository\ch\qos\logback\logback-core\1.4.5\logback-core-1.4.5.jar;C:\Users\Admin\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.19.0\log4j-to-slf4j-2.19.0.jar;C:\Users\Admin\.m2\repository\org\apache\logging\log4j\log4j-api\2.19.0\log4j-api-2.19.0.jar;C:\Users\Admin\.m2\repository\org\slf4j\jul-to-slf4j\2.0.4\jul-to-slf4j-2.0.4.jar;C:\Users\Admin\.m2\repository\org\yaml\snakeyaml\1.33\snakeyaml-1.33.jar;C:\Users\Admin\.m2\repository\com\samskivert\jmustache\1.15\jmustache-1.15.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-web\3.0.0\spring-boot-starter-web-3.0.0.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-json\3.0.0\spring-boot-starter-json-3.0.0.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.14.1\jackson-databind-2.14.1.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.14.1\jackson-annotations-2.14.1.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.14.1\jackson-core-2.14.1.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.14.1\jackson-datatype-jdk8-2.14.1.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.14.1\jackson-datatype-jsr310-2.14.1.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.14.1\jackson-module-parameter-names-2.14.1.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-web\6.0.2\spring-web-6.0.2.jar;C:\Users\Admin\.m2\repository\io\micrometer\micrometer-observation\1.10.2\micrometer-observation-1.10.2.jar;C:\Users\Admin\.m2\repository\io\micrometer\micrometer-commons\1.10.2\micrometer-commons-1.10.2.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-webmvc\6.0.2\spring-webmvc-6.0.2.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-expression\6.0.2\spring-expression-6.0.2.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-devtools\3.0.0\spring-boot-devtools-3.0.0.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot\3.0.0\spring-boot-3.0.0.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\3.0.0\spring-boot-autoconfigure-3.0.0.jar;C:\Users\Admin\.m2\repository\org\postgresql\postgresql\42.5.1\postgresql-42.5.1.jar;C:\Users\Admin\.m2\repository\org\checkerframework\checker-qual\3.5.0\checker-qual-3.5.0.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\3.0.0\spring-boot-starter-tomcat-3.0.0.jar;C:\Users\Admin\.m2\repository\jakarta\annotation\jakarta.annotation-api\2.1.1\jakarta.annotation-api-2.1.1.jar;C:\Users\Admin\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\10.1.1\tomcat-embed-core-10.1.1.jar;C:\Users\Admin\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\10.1.1\tomcat-embed-el-10.1.1.jar;C:\Users\Admin\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\10.1.1\tomcat-embed-websocket-10.1.1.jar;C:\Users\Admin\.m2\repository\jakarta\xml\bind\jakarta.xml.bind-api\4.0.0\jakarta.xml.bind-api-4.0.0.jar;C:\Users\Admin\.m2\repository\jakarta\activation\jakarta.activation-api\2.1.0\jakarta.activation-api-2.1.0.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-core\6.0.2\spring-core-6.0.2.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-jcl\6.0.2\spring-jcl-6.0.2.jar" kz.onlineshelter.helppet.HelppetApplication
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.0.0)
2022-12-22T10:18:07.901+03:00 INFO 8316 --- [ restartedMain] k.o.***.***Application : Starting ***Application using Java 17.0.4.1 with PID 8316 (*:\***\***\target\classes started by Admin in *:\***\***)
2022-12-22T10:18:07.903+03:00 INFO 8316 --- [ restartedMain] k.o.***.***Application : No active profile set, falling back to 1 default profile: "default"
2022-12-22T10:18:07.944+03:00 INFO 8316 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2022-12-22T10:18:07.944+03:00 INFO 8316 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2022-12-22T10:18:08.400+03:00 INFO 8316 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-12-22T10:18:08.435+03:00 INFO 8316 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 30 ms. Found 1 JPA repository interfaces.
2022-12-22T10:18:08.807+03:00 INFO 8316 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-12-22T10:18:08.815+03:00 INFO 8316 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-12-22T10:18:08.815+03:00 INFO 8316 --- [ restartedMain] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.1]
2022-12-22T10:18:08.861+03:00 INFO 8316 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-12-22T10:18:08.861+03:00 INFO 8316 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 917 ms
2022-12-22T10:18:08.950+03:00 INFO 8316 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2022-12-22T10:18:09.038+03:00 INFO 8316 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection#54ef2cef
2022-12-22T10:18:09.039+03:00 INFO 8316 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2022-12-22T10:18:09.070+03:00 INFO 8316 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2022-12-22T10:18:09.110+03:00 INFO 8316 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.1.5.Final
2022-12-22T10:18:09.232+03:00 WARN 8316 --- [ restartedMain] org.hibernate.orm.deprecation : HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode], use [jakarta.persistence.sharedCache.mode] instead
2022-12-22T10:18:09.344+03:00 INFO 8316 --- [ restartedMain] SQL dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
2022-12-22T10:18:09.824+03:00 INFO 8316 --- [ restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2022-12-22T10:18:09.830+03:00 INFO 8316 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2022-12-22T10:18:10.004+03:00 WARN 8316 --- [ restartedMain] 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
2022-12-22T10:18:10.234+03:00 INFO 8316 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2022-12-22T10:18:10.256+03:00 INFO 8316 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2022-12-22T10:18:10.265+03:00 INFO 8316 --- [ restartedMain] k.o.helppet.HelppetApplication : Started HelppetApplication in 2.768 seconds (process running for 4.113)
2022-12-22T10:18:13.951+03:00 INFO 8316 --- [nio-8080-exec-5] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2022-12-22T10:18:13.952+03:00 INFO 8316 --- [nio-8080-exec-5] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2022-12-22T10:18:13.954+03:00 INFO 8316 --- [nio-8080-exec-5] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms
After starting the application, the corresponding table in the database is successfully created
I added an annotation #Repository into Repository, added an annotation #Transactional into Controller in add method, into the signature of the same method added an anotation #ResponseBody but that didn't solve the issue.
I'm following a tutorial about Eureka to start up a sample eureka server ,I followed exactly the same steps but i get a whitelabel insteed of eureka dashbord, I will share with you all the configuration that I made
the POM.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com..discovery.service</groupId>
<artifactId>descoveryservice</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>descoveryservice</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
<spring-cloud.version>Finchley.SR1</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
</repository>
</repositories>
application.properties :
server.port=8010
spring.application.name=discoveryservice
eureka.client.registerWithEureka=false
eureka.client.fetchRegistry=false
eureka.client.serviceUrl.defaultZone = http://localhost:8010/eureka
and the finally the console :
2020-05-07 16:15:59.358 INFO 21060 --- [ main] o.s.core.annotation.AnnotationUtils : Failed to introspect annotations on class org.springframework.cloud.netflix.eureka.config.EurekaDiscoveryClientConfigServiceBootstrapConfiguration: java.lang.IllegalStateException: Could not obtain annotation attribute value for public abstract java.lang.Class[] org.springframework.boot.autoconfigure.condition.ConditionalOnClass.value()
2020-05-07 16:15:59.679 INFO 21060 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$97f8ff4f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.3.RELEASE)
2020-05-07 16:16:01.722 INFO 21060 --- [ main] c.d.s.d.DescoveryserviceApplication : No active profile set, falling back to default profiles: default
2020-05-07 16:16:02.829 WARN 21060 --- [ main] o.s.boot.actuate.endpoint.EndpointId : Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format.
2020-05-07 16:16:03.242 INFO 21060 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=889ab658-056e-3973-ba9c-f9fdd0f82c43
2020-05-07 16:16:03.378 INFO 21060 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$97f8ff4f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-07 16:16:04.447 INFO 21060 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8010 (http)
2020-05-07 16:16:04.491 INFO 21060 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-05-07 16:16:04.491 INFO 21060 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.16]
2020-05-07 16:16:04.509 INFO 21060 --- [ main] 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\jdk-11.0.6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jdk-11.0.6/bin/server;C:/Program Files/Java/jdk-11.0.6/bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Git\cmd;;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\novatim\AppData\Local\Microsoft\WindowsApps;C:\Users\novatim\Desktop\apache-maven-3.6.3-bin\apache-maven-3.6.3\bin;C:\Program Files\Java\jdk-11.0.6\bin;;C:\Users\novatim\Desktop\eclipse-jee-2019-12-R-win32-x86_64\eclipse;;.]
2020-05-07 16:16:04.768 INFO 21060 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-05-07 16:16:04.768 INFO 21060 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2996 ms
2020-05-07 16:16:04.935 WARN 21060 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2020-05-07 16:16:04.936 INFO 21060 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2020-05-07 16:16:04.962 INFO 21060 --- [ main] c.netflix.config.DynamicPropertyFactory : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration#13ed066e
2020-05-07 16:16:06.652 INFO 21060 --- [ main] o.s.cloud.commons.util.InetUtils : Cannot determine local hostname
2020-05-07 16:16:08.337 INFO 21060 --- [ main] o.s.cloud.commons.util.InetUtils : Cannot determine local hostname
2020-05-07 16:16:08.963 WARN 21060 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2020-05-07 16:16:08.964 INFO 21060 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2020-05-07 16:16:09.222 INFO 21060 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-05-07 16:16:10.021 INFO 21060 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator'
2020-05-07 16:16:10.174 INFO 21060 --- [ main] o.s.c.n.eureka.InstanceInfoFactory : Setting initial instance status as: STARTING
2020-05-07 16:16:10.226 INFO 21060 --- [ main] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1
2020-05-07 16:16:10.229 INFO 21060 --- [ main] com.netflix.discovery.DiscoveryClient : Client configured to neither register nor query for data.
2020-05-07 16:16:10.243 INFO 21060 --- [ main] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1588860970242 with initial instances count: 0
2020-05-07 16:16:10.250 INFO 21060 --- [ main] o.s.c.n.e.s.EurekaServiceRegistry : Registering application discoveryservice with eureka with status UP
2020-05-07 16:16:10.326 INFO 21060 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8010 (http) with context path ''
2020-05-07 16:16:10.333 INFO 21060 --- [ main] c.d.s.d.DescoveryserviceApplication : Started DescoveryserviceApplication in 13.391 seconds (JVM running for 14.094)
2020-05-07 16:16:17.202 INFO 21060 --- [nio-8010-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-05-07 16:16:17.204 INFO 21060 --- [nio-8010-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2020-05-07 16:16:17.223 INFO 21060 --- [nio-8010-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 19 ms
I do not know where the problem is it has been several hours that I am looking for a solution, if you have ideas do not hesitate to share them,
Thanks .
I guess you didn't add #EnableEurekaServer annotation to your main app
It should be like this
#SpringBootApplication
#EnableEurekaServer
public class DiscoveryServerApplication {
…
}
I have packaged my spring boot rest backend with mvn package.
When I run the jar on the server with java -jar ... the application starts and gets killed after a few seconds.
I also see that on the linux top view, that the java process goes over 300% CPU. Is that maybe the reason the process gets killed? And if yes, what can I do?
My spring boot application is not very big. Actually its almost empty.
Logs:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.2.RELEASE)
2020-01-26 07:40:36.423 INFO 8144 --- [ main] d.c.c.CarorderprocessApplication : Starting CarorderprocessApplication v0.0.1-SNA
PSHOT on dedi1055.your-server.de with PID 8144 (/usr/www/users/waqfek/software_backend/carorderprocess-0.0.1-SNAPSHOT.jar started by waqfek in /us
r/www/users/waqfek/software_backend)
2020-01-26 07:40:36.426 INFO 8144 --- [ main] d.c.c.CarorderprocessApplication : No active profile set, falling back to default
profiles: default
2020-01-26 07:40:36.487 INFO 8144 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servle
t.context.AnnotationConfigServletWebServerApplicationContext#5cbc508c: startup date [Sun Jan 26 07:40:36 CET 2020]; root of context hierarchy
2020-01-26 07:40:37.614 INFO 8144 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotati
on.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerB
ySpringCGLIB$$d289c8bd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-01-26 07:40:37.915 INFO 8144 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8081 (http)
2020-01-26 07:40:37.939 INFO 8144 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-01-26 07:40:37.940 INFO 8144 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.31
2020-01-26 07:40:37.949 INFO 8144 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library whi
ch allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib/x86_64-lin
ux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib]
2020-01-26 07:40:38.014 INFO 8144 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationCon
text
2020-01-26 07:40:38.014 INFO 8144 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization com
pleted in 1530 ms
2020-01-26 07:40:38.159 INFO 8144 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to:
[/*]
2020-01-26 07:40:38.159 INFO 8144 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [
/*]
2020-01-26 07:40:38.159 INFO 8144 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to:
[/*]
2020-01-26 07:40:38.159 INFO 8144 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*
]
2020-01-26 07:40:38.160 INFO 8144 --- [ost-startStop-1] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to
: [/*]
2020-01-26 07:40:38.160 INFO 8144 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2020-01-26 07:40:38.302 INFO 8144 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2020-01-26 07:40:38.306 WARN 8144 --- [ main] com.zaxxer.hikari.util.DriverDataSource : Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2020-01-26 07:40:38.491 INFO 8144 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2020-01-26 07:40:38.534 INFO 8144 --- [ main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2020-01-26 07:40:38.548 INFO 8144 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2020-01-26 07:40:38.625 INFO 8144 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.2.17.Final}
2020-01-26 07:40:38.627 INFO 8144 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2020-01-26 07:40:38.661 INFO 8144 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2020-01-26 07:40:38.824 INFO 8144 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2020-01-26 07:40:39.086 INFO 8144 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2020-01-26 07:40:39.172 INFO 8144 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2020-01-26 07:40:39.406 INFO 8144 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#5cbc508c: startup date [Sun Jan 26 07:40:36 CET 2020]; root of context hierarchy
2020-01-26 07:40:39.444 WARN 8144 --- [ main] 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
2020-01-26 07:40:39.492 INFO 8144 --- [ 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.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2020-01-26 07:40:39.494 INFO 8144 --- [ 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.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2020-01-26 07:40:39.526 INFO 8144 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2020-01-26 07:40:39.526 INFO 8144 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2020-01-26 07:40:39.867 INFO 8144 --- [ main] .s.s.UserDetailsServiceAutoConfiguration :
Using generated security password: 8167df1e-24d1-4ebf-bb03-53e2385a1229
2020-01-26 07:40:40.030 INFO 8144 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher#1, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#d2de489, org.springframework.security.web.context.SecurityContextPersistenceFilter#28cda624, org.springframework.security.web.header.HeaderWriterFilter#5340477f, org.springframework.security.web.csrf.CsrfFilter#6f15d60e, org.springframework.security.web.authentication.logout.LogoutFilter#71687585, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#66ea810, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter#5276d6ee, org.springframework.security.web.authentication.www.BasicAuthenticationFilter#2f953efd, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#7eecb5b8, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#475c9c31, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#14bdbc74, org.springframework.security.web.session.SessionManagementFilter#7139992f, org.springframework.security.web.access.ExceptionTranslationFilter#446a1e84, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#169bb4dd]
2020-01-26 07:40:40.112 INFO 8144 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2020-01-26 07:40:40.113 INFO 8144 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'dataSource' has been autodetected for JMX exposure
2020-01-26 07:40:40.118 INFO 8144 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located MBean 'dataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=dataSource,type=HikariDataSource]
2020-01-26 07:40:40.142 INFO 8144 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8081 (http) with context path ''
2020-01-26 07:40:40.145 INFO 8144 --- [ main] d.c.c.CarorderprocessApplication : Started CarorderprocessApplication in 4.002 seconds (JVM running for 4.521)
Killed
...
top - 08:51:43 up 137 days, 11:30, 2 users, load average: 0.86, 0.39, 0.30
Tasks: 4 total, 1 running, 3 sleeping, 0 stopped, 0 zombie
%Cpu(s): 30.7 us, 0.9 sy, 0.0 ni, 68.1 id, 0.2 wa, 0.0 hi, 0.1 si, 0.0 st
KiB Mem : 16119112 total, 4416660 free, 7332300 used, 4370152 buff/cache
KiB Swap: 4194300 total, 3625572 free, 568728 used. 8221460 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
20338 waqfek 20 0 7069792 299952 16808 S 247.5 1.9 0:07.45 java
16765 waqfek 20 0 38960 3032 2704 R 0.0 0.0 0:00.57 top
27373 waqfek 20 0 14092 3600 3048 S 0.0 0.0 0:00.16 bash
28746 waqfek 20 0 14072 3524 2988 S 0.0 0.0 0:00.00 bash
I only have three files in my project:
1.:
package ...
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
#SpringBootApplication
public class CarorderprocessApplication {
public static void main(String[] args) {
SpringApplication.run(CarorderprocessApplication.class, args);
}
}
Then I have application.properties file with information for database connection and port.
pom.xml:
https://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
org.springframework.boot
spring-boot-starter-parent
2.0.2.RELEASE
de.countandcare
carorderprocess
0.0.1-SNAPSHOT
carorderprocess
Demo project for Spring Boot
<dependencyManagement>
<dependencies>
</dependencies>
</dependencyManagement>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<version>2.2.1.RELEASE</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.17</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.5.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Some ideas to check:
Try to run as detached: java -jar yourapp.jar &
Try ( just once ) to run under root
Check logs: journalctl -ex for details of who exactly has killed your application.
Depends on results, can plan next steps - typically which settings to adjust.
My Spring Boot Application connects to a PostgreSQL database but it didn't create the tables which i have implemented as entities. That's why I set up the tables by myself with test data.
When I use dataRepository.findAll() to access the data, it returns an empty list.
So as far as I understood, I think it connects to my database, because I get no errors, but it looks like the schemas don't work properly.
I'm pretty sure this is a "configuration" problem, but I was not able to figure out what it is.
PS: I have another project with quite the same settings and code(just another database on the same server) which works perfectly fine.
My gradle.build file:
plugins {
id 'org.springframework.boot' version '2.1.6.RELEASE'
id 'java'
}
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'
group = 'de.dari'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '8'
repositories {
mavenCentral()
maven { url "http://htmlunit.sourceforge.net" }
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
//implementation 'org.springframework.boot:spring-boot-starter-data-rest'
compile("net.sourceforge.htmlunit:htmlunit:2.35.0")
compileOnly 'org.projectlombok:lombok:1.18.8'
annotationProcessor 'org.projectlombok:lombok:1.18.8'
runtimeOnly 'org.postgresql:postgresql'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
My application.properties file:
spring.datasource.url=jdbc:postgresql://webaddress.com:5432/b-one
spring.datasource.username=username
spring.datasource.password=secretPassword
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
An Example Entity:
#Entity
public class Data {
#Id
#GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
#NotNull
private String value;
/*
* Blank Constructor + Getters and Setters down here
*/
}
Simple CRUD-Repository:
public interface DataRepository extends CrudRepository<Data, Long> {
}
Controller:
#Autowired
DataRepository dataRepository;
#GetMapping("/test")
public String test() {
return dataRepository.findAll().toString();
}
Yeah so I don't get any error messages and the logs weren't helpful for me but maybe you want to get a glimpse on them.
Console-Output:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.6.RELEASE)
2019-08-26 16:23:53.225 INFO 10220 --- [ main] de.dari.bone.REST.Application : Starting Application on GamingPC with PID 10220 (started by Deniz Cuhadari in C:\Users\Deniz Cuhadari\OneDrive - inc\Projects\b-one\b-one.REST)
2019-08-26 16:23:53.230 INFO 10220 --- [ main] de.dari.bone.REST.Application : No active profile set, falling back to default profiles: default
2019-08-26 16:23:54.083 INFO 10220 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
2019-08-26 16:23:54.202 INFO 10220 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 110ms. Found 6 repository interfaces.
2019-08-26 16:23:54.568 INFO 10220 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$24d7df9e] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-08-26 16:23:54.878 INFO 10220 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2019-08-26 16:23:54.907 INFO 10220 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-08-26 16:23:54.908 INFO 10220 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.21]
2019-08-26 16:23:55.057 INFO 10220 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2019-08-26 16:23:55.057 INFO 10220 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1757 ms
2019-08-26 16:23:55.226 INFO 10220 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2019-08-26 16:23:55.650 INFO 10220 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2019-08-26 16:23:55.711 INFO 10220 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2019-08-26 16:23:55.793 INFO 10220 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.3.10.Final}
2019-08-26 16:23:55.795 INFO 10220 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2019-08-26 16:23:55.947 INFO 10220 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
2019-08-26 16:23:56.098 INFO 10220 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
2019-08-26 16:24:02.271 INFO 10220 --- [ main] o.h.e.j.e.i.LobCreatorBuilderImpl : HHH000421: Disabling contextual LOB creation as hibernate.jdbc.lob.non_contextual_creation is true
2019-08-26 16:24:02.278 INFO 10220 --- [ main] org.hibernate.type.BasicTypeRegistry : HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType#7e49ded
2019-08-26 16:24:03.329 INFO 10220 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2019-08-26 16:24:03.946 INFO 10220 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2019-08-26 16:24:03.987 WARN 10220 --- [ main] 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
2019-08-26 16:24:04.051 INFO 10220 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
2019-08-26 16:24:04.162 INFO 10220 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2019-08-26 16:24:04.165 INFO 10220 --- [ main] de.dari.bone.REST.Application : Started Application in 11.503 seconds (JVM running for 12.75)
2019-08-26 16:24:09.762 INFO 10220 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2019-08-26 16:24:09.762 INFO 10220 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2019-08-26 16:24:09.769 INFO 10220 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 7 ms
2019-08-26 16:24:09.905 INFO 10220 --- [nio-8080-exec-1] o.h.h.i.QueryTranslatorFactoryInitiator : HHH000397: Using ASTQueryTranslatorFactory
I have a spring-boot war application that runs perfectly in windows and ios, then I tried to run it in linux. It did run and build normally but when I tried to open it via browser it returns invalid http responses in chrome and some undeciphered codes in Firefox. I used this pc to run another spring-boot projects and they work just fine. I'm using Maven 3.3.9 and Ubuntu 16.04.
Here's what my pom.xml looks like
<?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</groupId>
<artifactId>hris</artifactId>
<version>0.1</version>
<packaging>war</packaging>
<name>hris</name>
<description>sso template for hris</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.4.1212.jre7</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity4</artifactId>
<version>3.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-java8time</artifactId>
<version>2.1.0.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/nz.net.ultraq.thymeleaf/thymeleaf-layout-dialect -->
<dependency>
<groupId>nz.net.ultraq.thymeleaf</groupId>
<artifactId>thymeleaf-layout-dialect</artifactId>
<version>2.2.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.thymeleaf/thymeleaf -->
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
<version>3.0.6.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.thymeleaf/thymeleaf-spring4 -->
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring4</artifactId>
<version>3.0.6.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.18</version>
<scope>provided</scope>
</dependency>
<!-- CAS Integration -->
<dependency>
<groupId>com.kakawait</groupId>
<artifactId>cas-security-spring-boot-starter</artifactId>
<version>0.6.0</version>
</dependency>
<dependency>
<groupId>com.github.dandelion</groupId>
<artifactId>datatables-core</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>22.0</version>
</dependency>
</dependencies>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.8</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.5</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgument>${compilerArgument}</compilerArgument>
</configuration>
</plugin>
</plugins>
</build>
</project>
And here's what's written out when I run the app
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building dapil 0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.5.9.RELEASE:run (default-cli) > test-compile # hris >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # hris ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 953 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # hris ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # hris ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /******/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # hris ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:1.5.9.RELEASE:run (default-cli) < test-compile # hris <<<
[INFO]
[INFO] --- spring-boot-maven-plugin:1.5.9.RELEASE:run (default-cli) # hris ---
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.9.RELEASE)
2018-04-12 12:49:22.096 INFO 30740 --- [ main] c.example.hris.HRISApplication : Starting HRISApplication on Lenovo-G40-70 with PID 30740 (/*******/target/classes started by ****** in **********)
2018-04-12 12:49:22.101 INFO 30740 --- [ main] c.example.hris.HRISApplication : No active profile set, falling back to default profiles: default
2018-04-12 12:49:22.632 INFO 30740 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#9e79a00: startup date [Thu Apr 12 12:49:22 WIB 2018]; root of context hierarchy
2018-04-12 12:49:24.064 WARN 30740 --- [ main] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.example.hris]' package. Please check your configuration.
2018-04-12 12:49:25.583 INFO 30740 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 12000 (https)
2018-04-12 12:49:25.611 INFO 30740 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2018-04-12 12:49:25.613 INFO 30740 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.23
2018-04-12 12:49:25.766 INFO 30740 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2018-04-12 12:49:25.767 INFO 30740 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3141 ms
2018-04-12 12:49:26.053 INFO 30740 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-04-12 12:49:26.054 INFO 30740 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-04-12 12:49:26.054 INFO 30740 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-04-12 12:49:26.055 INFO 30740 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2018-04-12 12:49:26.056 INFO 30740 --- [ost-startStop-1] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*]
2018-04-12 12:49:26.057 INFO 30740 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2018-04-12 12:49:28.032 INFO 30740 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#9e79a00: startup date [Thu Apr 12 12:49:22 WIB 2018]; root of context hierarchy
2018-04-12 12:49:28.050 INFO 30740 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Detected #ModelAttribute methods in siteController
2018-04-12 12:49:28.175 INFO 30740 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/auth/edit/{id}],methods=[POST]}" onto public java.lang.String com.example.hris.controller.AuthController.postAuthEdit(com.example.hris.dto.form.cmd.AuthItemCmd,org.springframework.validation.BindingResult,org.springframework.web.servlet.mvc.support.RedirectAttributes)
2018-04-12 12:49:28.176 INFO 30740 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/auth/create],methods=[GET]}" onto public java.lang.String com.example.hris.controller.AuthController.getAuthAdd(org.springframework.ui.Model)
2018-04-12 12:49:28.177 INFO 30740 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/auth/create],methods=[POST]}" onto public java.lang.String com.example.hris.controller.AuthController.postAuthAdd(com.example.hris.dto.form.cmd.AuthItemChildCmd,org.springframework.validation.BindingResult,org.springframework.web.servlet.mvc.support.RedirectAttributes)
2018-04-12 12:49:28.177 INFO 30740 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/auth/update/{id}],methods=[GET]}" onto public java.lang.String com.example.hris.controller.AuthController.getAuthEdit(java.lang.Long,org.springframework.ui.Model,org.springframework.web.servlet.mvc.support.RedirectAttributes)
2018-04-12 12:49:28.178 INFO 30740 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/auth/delete],methods=[POST]}" onto public boolean com.example.hris.controller.AuthController.postUserDeactivate(java.lang.String)
2018-04-12 12:49:28.178 INFO 30740 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/auth/manage],methods=[GET]}" onto public java.lang.String com.example.hris.controller.AuthController.indexGet(com.example.hris.dto.form.search.AuthItemSearchForm,org.springframework.validation.BindingResult,org.springframework.ui.Model)
2018-04-12 12:49:28.179 INFO 30740 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/auth/table],methods=[POST]}" onto public com.github.dandelion.datatables.core.ajax.DatatablesResponse<com.example.hris.dto.table.AuthItemItem> com.example.hris.controller.AuthController.postTableSearch(com.example.hris.dto.form.search.AuthItemSearchForm,javax.servlet.http.HttpServletRequest)
2018-04-12 12:49:28.181 INFO 30740 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/signin],methods=[GET]}" onto public java.lang.String com.example.hris.controller.SiteController.login()
2018-04-12 12:49:28.181 INFO 30740 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/],methods=[GET]}" onto public java.lang.String com.example.hris.controller.SiteController.index()
2018-04-12 12:49:28.185 INFO 30740 --- [ 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)
2018-04-12 12:49:28.186 INFO 30740 --- [ 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)
2018-04-12 12:49:28.250 INFO 30740 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-04-12 12:49:28.251 INFO 30740 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-04-12 12:49:28.337 INFO 30740 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-04-12 12:49:29.686 INFO 30740 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: OrRequestMatcher [requestMatchers=[Ant [pattern='/css/**'], Ant [pattern='/js/**'], Ant [pattern='/images/**'], Ant [pattern='/webjars/**'], Ant [pattern='/**/favicon.ico'], Ant [pattern='/error']]], []
2018-04-12 12:49:29.830 INFO 30740 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: OrRequestMatcher [requestMatchers=[Ant [pattern='/**']]], [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#551f663f, org.springframework.security.web.context.SecurityContextPersistenceFilter#223b66, org.springframework.security.web.header.HeaderWriterFilter#37dc0139, org.jasig.cas.client.session.SingleSignOutFilter#4b658c91, org.springframework.security.web.authentication.logout.LogoutFilter#274ccf4f, org.springframework.security.web.authentication.www.BasicAuthenticationFilter#13f8799a, org.springframework.security.cas.web.CasAuthenticationFilter#764ed709, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#422b1740, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#6e1eddc, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#7886ebc0, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#58ce6961, org.springframework.security.web.session.SessionManagementFilter#48408088, org.springframework.security.web.access.ExceptionTranslationFilter#4fa73638, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#46775723]
2018-04-12 12:49:29.853 INFO 30740 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: OrRequestMatcher [requestMatchers=[Ant [pattern='/**']]], [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#2ff438ee, org.springframework.security.web.context.SecurityContextPersistenceFilter#d3ea90c, org.springframework.security.web.header.HeaderWriterFilter#41ef1e45, org.springframework.security.web.authentication.logout.LogoutFilter#4e1c5a6a, org.springframework.security.web.authentication.www.BasicAuthenticationFilter#3657e01, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#381dbdc1, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#1b991b1, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#4dd194c2, org.springframework.security.web.session.SessionManagementFilter#3b7b329e, org.springframework.security.web.access.ExceptionTranslationFilter#7f495bf9, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#ad57ac4]
2018-04-12 12:49:30.176 INFO 30740 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-04-12 12:49:31.983 INFO 30740 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 12000 (https)
2018-04-12 12:49:31.991 INFO 30740 --- [ main] c.example.hris.HRISApplication : Started HRISApplication in 10.454 seconds (JVM running for 16.918)
2018-04-12 12:49:48.922 INFO 30740 --- [ Thread-4] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#9e79a00: startup date [Thu Apr 12 12:49:22 WIB 2018]; root of context hierarchy
2018-04-12 12:49:48.928 INFO 30740 --- [ Thread-4] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
I tried this on Ubuntu 17.10 but the same thing happened. Is there anything I can do to fix it? Thanks in advance
EDIT: I'm have openjdk8 in both version of ubuntu and windows. I'm not sure about the ios since its my friend's.
Here's how they look like when I tried to build it
in chromium & in firefox
I had this problem with spring-boot version 1.4.0.RELEASE and got resolved when switched to version 2.1.8.RELEASE