I have followed some links to create multi-tenancy in my JHipster application,but its not working.
https://docs.jboss.org/hibernate/orm/current/userguide/html_single/Hibernate_User_Guide.html#multitenacy
https://www.baeldung.com/hibernate-5-multitenancy
https://github.com/jgasmi/jhipster-mt/
I did following:
Added following in my application-dev.yml:
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:mysql://localhost:3306/myApp?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&createDatabaseIfNotExist=true
username: root
password: root
serverName: localhost
hikari:
poolName: Hikari
auto-commit: false
data-source-properties:
cachePrepStmts: true
prepStmtCacheSize: 250
prepStmtCacheSqlLimit: 2048
useServerPrepStmts: true
jpa:
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
database: MYSQL
show-sql: true
properties:
hibernate.id.new_generator_mappings: true
hibernate.cache.use_query_cache: false
hibernate.generate_statistics: true
hibernate.cache.use_minimal_puts: true
hibernate.cache.hazelcast.use_lite_member: true
hibernate.tenant_identifier_resolver : com.mycompany.myapp.multitenancy.TenantIdentifierResolver
hibernate.multi_tenant_connection_provider : com.mycompany.myapp.multitenancy.SchemaMultiTenantConnectionProviderImpl
hibernate.multiTenancy : SCHEMA
My TenantIdentifierResolver class:
public class TenantIdentifierResolver implements CurrentTenantIdentifierResolver {
#Override
public String resolveCurrentTenantIdentifier() {
return "myapp2";
}
#Override
public boolean validateExistingCurrentSessions() {
return true;
}
}
And my class SchemaMultiTenantConnectionProviderImpl looks as follows:
public class SchemaMultiTenantConnectionProviderImpl implements MultiTenantConnectionProvider, ServiceRegistryAwareService
{
private final Logger log = LoggerFactory.getLogger(SchemaMultiTenantConnectionProviderImpl.class);
DataSource dataSource;
#Override
public Connection getAnyConnection() throws SQLException {
return this.dataSource.getConnection();
}
#Override
public void releaseAnyConnection(Connection connection) throws SQLException {
try {
connection.createStatement().execute("USE myapp2;");
}
catch (SQLException e) {
throw new HibernateException("Could not alter JDBC connection to specified schema [public]", e);
}
connection.close();
}
#Override
public Connection getConnection(String tenantIdentifier) throws SQLException {
log.warn("Get Connection for Tenatd is:"+tenantIdentifier);
final Connection connection = getAnyConnection();
/*
* try { connection.setCatalog(tenantIdentifier); //
* connection.createStatement().execute("USE " + tenantIdentifier + ";"); //
* connection.setCatalog(tenantIdentifier); //
* connection.setSchema(tenantIdentifier); } catch (SQLException e) { throw new
* HibernateException("Could not alter JDBC connection to specified schema [" +
* tenantIdentifier + "]", e); }
*/
return connection;
}
#Override
public void releaseConnection(String tenantIdentifier, Connection connection) throws SQLException {
// try {
// connection.createStatement().execute("USE "+tenantIdentifier+";");
// }
// catch (SQLException e) {
// throw new HibernateException("Could not alter JDBC connection to specified schema [public]", e);
// }
connection.close();
}
#Override
public boolean supportsAggressiveRelease() {
return false;
}
#Override
public boolean isUnwrappableAs(Class unwrapType) {
return false;
}
#Override
public <T> T unwrap(Class<T> unwrapType) {
return null;
}
#Override
public void injectServices(ServiceRegistryImplementor serviceRegistry) {
Map lSettings = serviceRegistry.getService(ConfigurationService.class).getSettings();
DataSource localDs = (DataSource) lSettings.get("hibernate.connection.datasource");
dataSource = localDs;
}
}
I am just trying to see first that it should work, and then I can change it to be based on tenant logic, schema tenancy logic or database tenancy logic.
When I run the application following is the logs:
D:\java-project\jhipsterptest-eclipse-workspace\sample\multitennnacy>mvnw -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< com.myapp:my-app >--------------------------
[INFO] Building My App 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:2.4.7:run (default-cli) > test-compile # my-app >>>
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:copy-resources (default-resources) # my-app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 4 resources
[INFO] Copying 19 resources
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) # my-app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 4 resources
[INFO] Copying 19 resources
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-versions) # my-app ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-dependencyConvergence) # my-app ---
[WARNING]
Dependency convergence error for net.java.dev.jna:jna:5.2.0 paths to dependency are:
+-com.myapp:my-app:0.0.1-SNAPSHOT
+-org.testcontainers:mysql:1.15.3
+-org.testcontainers:jdbc:1.15.3
+-org.testcontainers:database-commons:1.15.3
+-org.testcontainers:testcontainers:1.15.3
+-org.rnorth.visible-assertions:visible-assertions:2.1.2
+-net.java.dev.jna:jna:5.2.0
and
+-com.myapp:my-app:0.0.1-SNAPSHOT
+-org.testcontainers:mysql:1.15.3
+-org.testcontainers:jdbc:1.15.3
+-org.testcontainers:database-commons:1.15.3
+-org.testcontainers:testcontainers:1.15.3
+-com.github.docker-java:docker-java-transport-zerodep:3.2.8
+-net.java.dev.jna:jna:5.8.0
[WARNING]
Dependency convergence error for org.wildfly.common:wildfly-common:1.5.2.Final paths to dependency are:
+-com.myapp:my-app:0.0.1-SNAPSHOT
+-org.springframework.boot:spring-boot-starter-undertow:2.4.7
+-io.undertow:undertow-core:2.2.8.Final
+-org.jboss.xnio:xnio-api:3.8.0.Final
+-org.wildfly.common:wildfly-common:1.5.2.Final
and
+-com.myapp:my-app:0.0.1-SNAPSHOT
+-org.springframework.boot:spring-boot-starter-undertow:2.4.7
+-io.undertow:undertow-core:2.2.8.Final
+-org.jboss.xnio:xnio-api:3.8.0.Final
+-org.wildfly.client:wildfly-client-config:1.0.1.Final
+-org.wildfly.common:wildfly-common:1.2.0.Final
[WARNING]
Dependency convergence error for org.apiguardian:apiguardian-api:1.1.0 paths to dependency are:
+-com.myapp:my-app:0.0.1-SNAPSHOT
+-org.springframework.boot:spring-boot-starter-test:2.4.7
+-org.junit.jupiter:junit-jupiter:5.7.2
+-org.junit.jupiter:junit-jupiter-api:5.7.2
+-org.apiguardian:apiguardian-api:1.1.0
and
+-com.myapp:my-app:0.0.1-SNAPSHOT
+-org.springframework.boot:spring-boot-starter-test:2.4.7
+-org.junit.jupiter:junit-jupiter:5.7.2
+-org.junit.jupiter:junit-jupiter-api:5.7.2
+-org.junit.platform:junit-platform-commons:1.7.2
+-org.apiguardian:apiguardian-api:1.1.0
and
+-com.myapp:my-app:0.0.1-SNAPSHOT
+-org.springframework.boot:spring-boot-starter-test:2.4.7
+-org.junit.jupiter:junit-jupiter:5.7.2
+-org.junit.jupiter:junit-jupiter-params:5.7.2
+-org.apiguardian:apiguardian-api:1.1.0
and
+-com.myapp:my-app:0.0.1-SNAPSHOT
+-org.springframework.boot:spring-boot-starter-test:2.4.7
+-org.junit.jupiter:junit-jupiter:5.7.2
+-org.junit.jupiter:junit-jupiter-engine:5.7.2
+-org.apiguardian:apiguardian-api:1.1.0
and
+-com.myapp:my-app:0.0.1-SNAPSHOT
+-com.tngtech.archunit:archunit-junit5-engine:0.19.0
+-com.tngtech.archunit:archunit-junit5-engine-api:0.19.0
+-org.junit.platform:junit-platform-engine:1.7.2
+-org.apiguardian:apiguardian-api:1.1.0
and
+-com.myapp:my-app:0.0.1-SNAPSHOT
+-org.zalando:problem-spring-web:0.26.2
+-org.zalando:problem-violations:0.26.2
+-org.apiguardian:apiguardian-api:1.1.0
and
+-com.myapp:my-app:0.0.1-SNAPSHOT
+-org.zalando:problem-spring-web:0.26.2
+-org.zalando:problem-spring-common:0.26.2
+-org.apiguardian:apiguardian-api:1.1.0
and
+-com.myapp:my-app:0.0.1-SNAPSHOT
+-org.zalando:problem-spring-web:0.26.2
+-org.apiguardian:apiguardian-api:1.1.0
and
+-com.myapp:my-app:0.0.1-SNAPSHOT
+-org.zalando:problem-spring-web:0.26.2
+-org.zalando:faux-pas:0.8.0
+-org.apiguardian:apiguardian-api:1.0.0
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message:
Failed while enforcing releasability. See above detailed error message.
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.7:prepare-agent (pre-unit-tests) # my-app ---
[INFO] argLine set to -javaagent:C:\\Users\\sachin\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.7\\org.jacoco.agent-0.8.7-runtime.jar=destfile=D:\\java-project\\jhipsterptest-eclipse-workspace\\sample\\multitennnacy\\target\\jacoco.exec -Djava.security.egd=file:/dev/./urandom -Xmx256m
[INFO]
[INFO] --- properties-maven-plugin:1.0.0:read-project-properties (default) # my-app ---
[INFO]
[INFO] --- checksum-maven-plugin:1.10:files (default) # my-app ---
[INFO]
[INFO] --- maven-antrun-plugin:3.0.0:run (eval-frontend-checksum) # my-app ---
[INFO] Executing tasks
[INFO] [copy] Copying 1 file to D:\java-project\jhipsterptest-eclipse-workspace\sample\multitennnacy\target
[INFO] Executed tasks
[INFO]
[INFO] --- frontend-maven-plugin:1.12.0:install-node-and-npm (install-node-and-npm) # my-app ---
[INFO] Node v14.17.1 is already installed.
[INFO] NPM 7.18.1 is already installed.
[INFO]
[INFO] --- frontend-maven-plugin:1.12.0:npm (npm install) # my-app ---
[INFO] Skipping execution.
[INFO]
[INFO] --- frontend-maven-plugin:1.12.0:npm (webapp build dev) # my-app ---
[INFO] Skipping execution.
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # my-app ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 81 source files to D:\java-project\jhipsterptest-eclipse-workspace\sample\multitennnacy\target\classes
[INFO] /D:/java-project/jhipsterptest-eclipse-workspace/sample/multitennnacy/src/main/java/com/mycompany/myapp/multitenancy/ConnectionProviderFactory.java: D:\java-project\jhipsterptest-eclipse-workspace\sample\multitennnacy\src\main\java\com\mycompany\myapp\multitenancy\ConnectionProviderFactory.java uses unchecked or unsafe operations.
[INFO] /D:/java-project/jhipsterptest-eclipse-workspace/sample/multitennnacy/src/main/java/com/mycompany/myapp/multitenancy/ConnectionProviderFactory.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) # my-app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) # my-app ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 29 source files to D:\java-project\jhipsterptest-eclipse-workspace\sample\multitennnacy\target\test-classes
[INFO] /D:/java-project/jhipsterptest-eclipse-workspace/sample/multitennnacy/src/test/java/com/myapp/service/MailServiceIT.java: D:\java-project\jhipsterptest-eclipse-workspace\sample\multitennnacy\src\test\java\com\myapp\service\MailServiceIT.java uses or overrides a deprecated API.
[INFO] /D:/java-project/jhipsterptest-eclipse-workspace/sample/multitennnacy/src/test/java/com/myapp/service/MailServiceIT.java: Recompile with -Xlint:deprecation for details.
[INFO]
[INFO] <<< spring-boot-maven-plugin:2.4.7:run (default-cli) < test-compile # my-app <<<
[INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:2.4.7:run (default-cli) # my-app ---
[INFO] Attaching agents: []
??? ??? ??? ????????? ???????? ??????? ????????? ????????? ????????
??? ??? ??? ????????? ????????? ???????? ????????? ????????? ?????????
??? ????????? ??? ????????? ??????? ??? ??????? ?????????
??? ??? ????????? ??? ???????? ??????? ??? ??????? ????????
????????? ??? ??? ????????? ??? ???????? ??? ????????? ??? ????
??????? ??? ??? ????????? ??? ??????? ??? ????????? ??? ???
:: JHipster ? :: Running Spring Boot 2.4.7 ::
:: https://www.jhipster.tech ::
2021-07-14 10:46:05.956 DEBUG 24976 --- [kground-preinit] org.jboss.logging : Logging Provider: org.jboss.logging.Log4j2LoggerProvider
2021-07-14 10:46:05.988 INFO 24976 --- [ restartedMain] com.myapp.MyApp : Starting MyApp using Java 11.0.11 on SACHIN-MSI with PID 24976 (D:\java-project\jhipsterptest-eclipse-workspace\sample\multitennnacy\target\classes started by sachin in D:\java-project\jhipsterptest-eclipse-workspace\sample\multitennnacy)
2021-07-14 10:46:05.989 DEBUG 24976 --- [ restartedMain] com.myapp.MyApp : Running with Spring Boot v2.4.7, Spring v5.3.8
2021-07-14 10:46:05.989 INFO 24976 --- [ restartedMain] com.myapp.MyApp : The following profiles are active: dev,api-docs
2021-07-14 10:46:09.018 DEBUG 24976 --- [ restartedMain] i.m.c.u.i.logging.InternalLoggerFactory : Using SLF4J as the default logging framework
2021-07-14 10:46:09.217 DEBUG 24976 --- [ restartedMain] com.myapp.config.WebConfigurer : Registering CORS filter
2021-07-14 10:46:09.283 INFO 24976 --- [ restartedMain] com.myapp.config.WebConfigurer : Web application configuration, using profiles: dev
2021-07-14 10:46:09.283 INFO 24976 --- [ restartedMain] com.myapp.config.WebConfigurer : Web application fully configured
2021-07-14 10:46:09.570 DEBUG 24976 --- [ restartedMain] c.ehcache.core.Ehcache-usersByLogin : Initialize successful.
2021-07-14 10:46:09.592 DEBUG 24976 --- [ restartedMain] c.ehcache.core.Ehcache-usersByEmail : Initialize successful.
2021-07-14 10:46:09.595 DEBUG 24976 --- [ restartedMain] c.e.core.Ehcache-com.myapp.domain.User : Initialize successful.
2021-07-14 10:46:09.599 DEBUG 24976 --- [ restartedMain] c.e.c.E.myapp.domain.Authority : Initialize successful.
2021-07-14 10:46:09.602 DEBUG 24976 --- [ restartedMain] c.e.c.E.myapp.domain.User.authorities : Initialize successful.
2021-07-14 10:46:09.605 DEBUG 24976 --- [ restartedMain] c.e.c.Ehcache-com.myapp.domain.Tenant : Initialize successful.
2021-07-14 10:46:09.608 DEBUG 24976 --- [ restartedMain] c.e.c.Ehcache-com.myapp.domain.DbType : Initialize successful.
2021-07-14 10:46:09.622 DEBUG 24976 --- [ restartedMain] com.myapp.config.AsyncConfiguration : Creating Async Task Executor
2021-07-14 10:46:09.692 DEBUG 24976 --- [ restartedMain] com.myapp.config.LiquibaseConfiguration : Configuring Liquibase
2021-07-14 10:46:09.829 WARN 24976 --- [ my-app-task-1] t.j.c.liquibase.AsyncSpringLiquibase : Starting Liquibase asynchronously, your database might not be ready at startup!
2021-07-14 10:46:11.299 DEBUG 24976 --- [ restartedMain] com.myapp.security.jwt.TokenProvider : Using a Base64-encoded JWT secret key
2021-07-14 10:46:12.920 DEBUG 24976 --- [ restartedMain] t.j.c.apidoc.SpringfoxAutoConfiguration : Starting OpenAPI docs
2021-07-14 10:46:12.927 DEBUG 24976 --- [ restartedMain] t.j.c.apidoc.SpringfoxAutoConfiguration : Started OpenAPI docs in 5 ms
2021-07-14 10:46:13.623 INFO 24976 --- [ restartedMain] org.jboss.threads : JBoss Threads version 3.1.0.Final
2021-07-14 10:46:14.116 INFO 24976 --- [ restartedMain] com.myapp.MyApp : Started MyApp in 8.783 seconds (JVM running for 9.535)
2021-07-14 10:46:14.124 INFO 24976 --- [ restartedMain] com.myapp.MyApp :
----------------------------------------------------------
Application 'myApp' is running! Access URLs:
Local: http://localhost:8080/
External: http://192.168.43.1:8080/
Profile(s): [dev, api-docs]
----------------------------------------------------------
There are no error logs, but browser shows this.
Seems like I am missing something small, but not ablw to find it out.
I generated a monolithic application using jhipster. After creation tried to access http://localhost:8080/. But getting error Your request cannot be processed
I am using JWT authentication (stateless, with a token). Using below command to run applicaiton
./mvnw
I have enable debug logging as below
<logger name="io.undertow" level="DEBUG"/>
<logger name="io.undertow.websockets.jsr" level="DEBUG"/>
Below is what I observed in logs
:: JHipster 🤓 :: Running Spring Boot 2.2.7.RELEASE ::
:: https://www.jhipster.tech ::
2020-08-28 14:19:30.606 WARN 3822 --- [ restartedMain] o.s.boot.StartupInfoLogger : InetAddress.getLocalHost().getHostName() took 5006 milliseconds to respond. Please verify your network configuration (macOS machines may need to add entries to /etc/hosts).
2020-08-28 14:19:35.620 INFO 3822 --- [ restartedMain] com.cj.microservices.MonolithicApp : Starting MonolithicApp on Maheshs-MacBook-Pro.local with PID 3822
2020-08-28 14:19:35.621 DEBUG 3822 --- [ restartedMain] com.cj.microservices.MonolithicApp : Running with Spring Boot v2.2.7.RELEASE, Spring v5.2.6.RELEASE
2020-08-28 14:19:35.621 INFO 3822 --- [ restartedMain] com.cj.microservices.MonolithicApp : The following profiles are active: dev,swagger
2020-08-28 14:19:37.545 WARN 3822 --- [ restartedMain] io.undertow.websockets.jsr : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
2020-08-28 14:19:37.558 DEBUG 3822 --- [ restartedMain] io.undertow.session : Setting default session timeout to 1800
2020-08-28 14:19:37.567 INFO 3822 --- [ restartedMain] io.undertow.servlet : Initializing Spring embedded WebApplicationContext
2020-08-28 14:19:37.567 DEBUG 3822 --- [ restartedMain] o.s.web.context.ContextLoader : Published root WebApplicationContext as ServletContext attribute with name [org.springframework.web.context.WebApplicationContext.ROOT]
2020-08-28 14:19:37.567 INFO 3822 --- [ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1909 ms
2020-08-28 14:19:37.666 DEBUG 3822 --- [ restartedMain] i.m.c.u.i.logging.InternalLoggerFactory : Using SLF4J as the default logging framework
2020-08-28 14:19:38.003 DEBUG 3822 --- [ restartedMain] c.cj.microservices.config.WebConfigurer : Registering CORS filter
2020-08-28 14:19:38.036 INFO 3822 --- [ restartedMain] c.cj.microservices.config.WebConfigurer : Web application configuration, using profiles: dev
2020-08-28 14:19:38.036 INFO 3822 --- [ restartedMain] c.cj.microservices.config.WebConfigurer : Web application fully configured
2020-08-28 14:19:38.040 DEBUG 3822 --- [ restartedMain] io.undertow.session : Registered session listener io.undertow.servlet.core.SessionListenerBridge#57176fb8
2020-08-28 14:19:38.067 DEBUG 3822 --- [ restartedMain] io.undertow.session : Setting default session timeout to 1800
2020-08-28 14:19:38.227 DEBUG 3822 --- [ restartedMain] c.ehcache.core.Ehcache-usersByLogin : Initialize successful.
2020-08-28 14:19:38.245 DEBUG 3822 --- [ restartedMain] c.ehcache.core.Ehcache-usersByEmail : Initialize successful.
2020-08-28 14:19:38.248 DEBUG 3822 --- [ restartedMain] c.e.c.E.cj.microservices.domain.User : Initialize successful.
2020-08-28 14:19:38.251 DEBUG 3822 --- [ restartedMain] c.e.c.E.c.m.domain.Authority : Initialize successful.
2020-08-28 14:19:38.254 DEBUG 3822 --- [ restartedMain] c.e.c.E.c.m.domain.User.authorities : Initialize successful.
2020-08-28 14:19:38.269 DEBUG 3822 --- [ restartedMain] c.c.m.config.AsyncConfiguration : Creating Async Task Executor
2020-08-28 14:19:38.283 DEBUG 3822 --- [ restartedMain] c.c.m.config.LiquibaseConfiguration : Configuring Liquibase
2020-08-28 14:19:38.419 WARN 3822 --- [nolithic-task-1] i.g.j.c.liquibase.AsyncSpringLiquibase : Starting Liquibase asynchronously, your database might not be ready at startup!
2020-08-28 14:19:39.834 DEBUG 3822 --- [ restartedMain] c.c.m.security.jwt.TokenProvider : Using a Base64-encoded JWT secret key
2020-08-28 14:19:40.083 DEBUG 3822 --- [ restartedMain] .m.m.a.ExceptionHandlerExceptionResolver : ControllerAdvice beans: 1 #ExceptionHandler, 1 ResponseBodyAdvice
2020-08-28 14:19:40.692 DEBUG 3822 --- [ restartedMain] .PrePostAnnotationSecurityMetadataSource : #org.springframework.security.access.prepost.PreAuthorize(value=hasAuthority("ROLE_ADMIN")) found on specific method: public java.util.List com.cj.microservices.web.rest.UserResource.getAuthorities()
2020-08-28 14:19:40.694 DEBUG 3822 --- [ restartedMain] m.DelegatingMethodSecurityMetadataSource : Caching method [CacheKey[com.cj.microservices.web.rest.UserResource; public java.util.List com.cj.microservices.web.rest.UserResource.getAuthorities()]] with attributes [[authorize: 'hasAuthority("ROLE_ADMIN")', filter: 'null', filterTarget: 'null']]
2020-08-28 14:19:40.705 DEBUG 3822 --- [ restartedMain] o.s.s.a.i.a.MethodSecurityInterceptor : Validated configuration attributes
2020-08-28 14:19:40.707 DEBUG 3822 --- [ restartedMain] .PrePostAnnotationSecurityMetadataSource : #org.springframework.security.access.prepost.PreAuthorize(value=hasAuthority("ROLE_ADMIN")) found on specific method: public org.springframework.http.ResponseEntity com.cj.microservices.web.rest.UserResource.createUser(com.cj.microservices.service.dto.UserDTO) throws java.net.URISyntaxException
2020-08-28 14:19:40.707 DEBUG 3822 --- [ restartedMain] m.DelegatingMethodSecurityMetadataSource : Caching method [CacheKey[com.cj.microservices.web.rest.UserResource; public org.springframework.http.ResponseEntity com.cj.microservices.web.rest.UserResource.createUser(com.cj.microservices.service.dto.UserDTO) throws java.net.URISyntaxException]] with attributes [[authorize: 'hasAuthority("ROLE_ADMIN")', filter: 'null', filterTarget: 'null']]
2020-08-28 14:19:40.707 DEBUG 3822 --- [ restartedMain] .PrePostAnnotationSecurityMetadataSource : #org.springframework.security.access.prepost.PreAuthorize(value=hasAuthority("ROLE_ADMIN")) found on specific method: public org.springframework.http.ResponseEntity com.cj.microservices.web.rest.UserResource.updateUser(com.cj.microservices.service.dto.UserDTO)
2020-08-28 14:19:40.707 DEBUG 3822 --- [ restartedMain] m.DelegatingMethodSecurityMetadataSource : Caching method [CacheKey[com.cj.microservices.web.rest.UserResource; public org.springframework.http.ResponseEntity com.cj.microservices.web.rest.UserResource.updateUser(com.cj.microservices.service.dto.UserDTO)]] with attributes [[authorize: 'hasAuthority("ROLE_ADMIN")', filter: 'null', filterTarget: 'null']]
2020-08-28 14:19:40.708 DEBUG 3822 --- [ restartedMain] .PrePostAnnotationSecurityMetadataSource : #org.springframework.security.access.prepost.PreAuthorize(value=hasAuthority("ROLE_ADMIN")) found on specific method: public org.springframework.http.ResponseEntity com.cj.microservices.web.rest.UserResource.deleteUser(java.lang.String)
2020-08-28 14:19:40.708 DEBUG 3822 --- [ restartedMain] m.DelegatingMethodSecurityMetadataSource : Caching method [CacheKey[com.cj.microservices.web.rest.UserResource; public org.springframework.http.ResponseEntity com.cj.microservices.web.rest.UserResource.deleteUser(java.lang.String)]] with attributes [[authorize: 'hasAuthority("ROLE_ADMIN")', filter: 'null', filterTarget: 'null']]
2020-08-28 14:19:41.386 DEBUG 3822 --- [nolithic-task-1] i.g.j.c.liquibase.AsyncSpringLiquibase : Liquibase has updated your database in 2966 ms
2020-08-28 14:19:41.519 DEBUG 3822 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : 23 mappings in 'requestMappingHandlerMapping'
2020-08-28 14:19:41.735 DEBUG 3822 --- [ restartedMain] eGlobalAuthenticationAutowiredConfigurer : Eagerly initializing {securityConfiguration=com.cj.microservices.config.SecurityConfiguration$$EnhancerBySpringCGLIB$$c9b9cb10#5078c229}
2020-08-28 14:19:41.783 INFO 3822 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: Ant [pattern='/**', OPTIONS], []
2020-08-28 14:19:41.783 INFO 3822 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: Ant [pattern='/swagger-ui/index.html'], []
2020-08-28 14:19:41.783 INFO 3822 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: Ant [pattern='/test/**'], []
2020-08-28 14:19:41.826 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'permitAll', for Ant [pattern='/api/authenticate']
2020-08-28 14:19:41.828 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'permitAll', for Ant [pattern='/api/register']
2020-08-28 14:19:41.828 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'permitAll', for Ant [pattern='/api/activate']
2020-08-28 14:19:41.828 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'permitAll', for Ant [pattern='/api/account/reset-password/init']
2020-08-28 14:19:41.828 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'permitAll', for Ant [pattern='/api/account/reset-password/finish']
2020-08-28 14:19:41.828 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'authenticated', for Ant [pattern='/api/**']
2020-08-28 14:19:41.829 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'permitAll', for Ant [pattern='/management/health']
2020-08-28 14:19:41.829 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'permitAll', for Ant [pattern='/management/info']
2020-08-28 14:19:41.829 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'permitAll', for Ant [pattern='/management/prometheus']
2020-08-28 14:19:41.829 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'hasAuthority('ROLE_ADMIN')', for Ant [pattern='/management/**']
2020-08-28 14:19:41.832 DEBUG 3822 --- [ restartedMain] o.s.s.w.a.i.FilterSecurityInterceptor : Validated configuration attributes
2020-08-28 14:19:41.832 DEBUG 3822 --- [ restartedMain] o.s.s.w.a.i.FilterSecurityInterceptor : Validated configuration attributes
2020-08-28 14:19:41.842 INFO 3822 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#6edb1674, org.springframework.security.web.context.SecurityContextPersistenceFilter#7380c01e, org.springframework.security.web.header.HeaderWriterFilter#4077fd58, org.springframework.security.web.authentication.logout.LogoutFilter#37034f72, org.springframework.web.filter.CorsFilter#705407b6, com.cj.microservices.security.jwt.JWTFilter#9cd8d0b, org.springframework.security.web.authentication.www.BasicAuthenticationFilter#3119b323, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#40a22f8a, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#19c12ba1, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#75b1b7ba, org.springframework.security.web.session.SessionManagementFilter#53397be6, org.springframework.security.web.access.ExceptionTranslationFilter#4baec252, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#3e63cd6d]
2020-08-28 14:19:42.098 DEBUG 3822 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerAdapter : ControllerAdvice beans: 0 #ModelAttribute, 0 #InitBinder, 1 RequestBodyAdvice, 1 ResponseBodyAdvice
2020-08-28 14:19:42.156 DEBUG 3822 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Patterns [/webjars/**, /**] in 'resourceHandlerMapping'
2020-08-28 14:19:42.242 DEBUG 3822 --- [ restartedMain] i.g.j.c.apidoc.SwaggerAutoConfiguration : Starting Swagger
2020-08-28 14:19:42.250 DEBUG 3822 --- [ restartedMain] i.g.j.c.apidoc.SwaggerAutoConfiguration : Started Swagger in 6 ms
2020-08-28 14:19:42.802 DEBUG 3822 --- [ restartedMain] o.springframework.web.filter.CorsFilter : Filter 'corsFilter' configured for use
2020-08-28 14:19:42.804 INFO 3822 --- [ restartedMain] io.undertow : starting server: Undertow - 2.0.30.Final
2020-08-28 14:19:42.842 DEBUG 3822 --- [ restartedMain] io.undertow : Configuring listener with protocol HTTP for interface 0.0.0.0 and port 8080
2020-08-28 14:19:42.880 INFO 3822 --- [ restartedMain] com.cj.microservices.MonolithicApp : Started MonolithicApp in 27.954 seconds (JVM running for 28.489)
2020-08-28 14:19:47.891 INFO 3822 --- [ restartedMain] com.cj.microservices.MonolithicApp :
----------------------------------------------------------
Application 'monolithic' is running! Access URLs:
Local: http://localhost:8080/
External: http://192.168.1.11:8080/
Profile(s): [dev, swagger]
----------------------------------------------------------
2020-08-28 14:19:51.830 DEBUG 3822 --- [ XNIO-1 task-1] io.undertow.request.security : Attempting to authenticate /, authentication required: false
2020-08-28 14:19:51.832 DEBUG 3822 --- [ XNIO-1 task-1] io.undertow.request.security : Authentication outcome was NOT_ATTEMPTED with method io.undertow.security.impl.CachedAuthenticatedSessionMechanism#28928814 for /
2020-08-28 14:19:51.832 DEBUG 3822 --- [ XNIO-1 task-1] io.undertow.request.security : Authentication result was ATTEMPTED for /
2020-08-28 14:19:51.835 INFO 3822 --- [ XNIO-1 task-1] io.undertow.servlet : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-08-28 14:19:51.835 INFO 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2020-08-28 14:19:51.835 DEBUG 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : Detected StandardServletMultipartResolver
2020-08-28 14:19:51.835 DEBUG 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : Detected AngularCookieLocaleResolver
2020-08-28 14:19:51.847 DEBUG 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : enableLoggingRequestDetails='false': request parameters and headers will be masked to prevent unsafe logging of potentially sensitive data
2020-08-28 14:19:51.847 INFO 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 12 ms
2020-08-28 14:19:51.858 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /' doesn't match 'OPTIONS /**'
2020-08-28 14:19:51.859 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/swagger-ui/index.html'
2020-08-28 14:19:51.859 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/test/**'
2020-08-28 14:19:51.860 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 1 of 13 in additional filter chain; firing Filter: 'WebAsyncManagerIntegrationFilter'
2020-08-28 14:19:51.861 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 2 of 13 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
2020-08-28 14:19:51.863 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 3 of 13 in additional filter chain; firing Filter: 'HeaderWriterFilter'
2020-08-28 14:19:51.864 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 4 of 13 in additional filter chain; firing Filter: 'LogoutFilter'
2020-08-28 14:19:51.864 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/logout', GET]
2020-08-28 14:19:51.864 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/logout'
2020-08-28 14:19:51.864 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/logout', POST]
2020-08-28 14:19:51.864 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /' doesn't match 'POST /logout'
2020-08-28 14:19:51.864 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/logout', PUT]
2020-08-28 14:19:51.865 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /' doesn't match 'PUT /logout'
2020-08-28 14:19:51.865 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/logout', DELETE]
2020-08-28 14:19:51.865 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /' doesn't match 'DELETE /logout'
2020-08-28 14:19:51.865 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : No matches found
2020-08-28 14:19:51.865 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 5 of 13 in additional filter chain; firing Filter: 'CorsFilter'
2020-08-28 14:19:51.866 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 6 of 13 in additional filter chain; firing Filter: 'JWTFilter'
2020-08-28 14:19:51.867 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 7 of 13 in additional filter chain; firing Filter: 'BasicAuthenticationFilter'
2020-08-28 14:19:51.867 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 8 of 13 in additional filter chain; firing Filter: 'RequestCacheAwareFilter'
2020-08-28 14:19:51.867 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 9 of 13 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
2020-08-28 14:19:51.869 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 10 of 13 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
2020-08-28 14:19:51.870 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.a.AnonymousAuthenticationFilter : Populated SecurityContextHolder with anonymous token: 'org.springframework.security.authentication.AnonymousAuthenticationToken#3d9ea918: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails#b364: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: null; Granted Authorities: ROLE_ANONYMOUS'
2020-08-28 14:19:51.871 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 11 of 13 in additional filter chain; firing Filter: 'SessionManagementFilter'
2020-08-28 14:19:51.871 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 12 of 13 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
2020-08-28 14:19:51.871 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 13 of 13 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
2020-08-28 14:19:51.871 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/api/authenticate'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/api/register'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/api/activate'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/api/account/reset-password/init'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/api/account/reset-password/finish'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/api/**'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/management/health'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/management/info'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/management/prometheus'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/management/**'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.a.i.FilterSecurityInterceptor : Public object - authentication not attempted
2020-08-28 14:19:51.873 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / reached end of additional filter chain; proceeding with original chain
2020-08-28 14:19:51.875 DEBUG 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : GET "/", parameters={}
2020-08-28 14:19:51.882 DEBUG 3822 --- [ XNIO-1 task-1] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped to ResourceHttpRequestHandler ["classpath:/META-INF/resources/", "classpath:/resources/", "classpath:/static/", "classpath:/public/", "/"]
2020-08-28 14:19:51.885 DEBUG 3822 --- [ XNIO-1 task-1] o.s.w.s.r.ResourceHttpRequestHandler : Resource not found
2020-08-28 14:19:51.885 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.header.writers.HstsHeaderWriter : Not injecting HSTS header since it did not match the requestMatcher org.springframework.security.web.header.writers.HstsHeaderWriter$SecureRequestMatcher#7d053c15
2020-08-28 14:19:51.887 DEBUG 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : Completed 404 NOT_FOUND
2020-08-28 14:19:51.888 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.a.ExceptionTranslationFilter : Chain processed normally
2020-08-28 14:19:51.888 DEBUG 3822 --- [ XNIO-1 task-1] s.s.w.c.SecurityContextPersistenceFilter : SecurityContextHolder now cleared, as request processing completed
2020-08-28 14:19:51.892 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /error' doesn't match 'OPTIONS /**'
2020-08-28 14:19:51.892 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/error'; against '/swagger-ui/index.html'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/error'; against '/test/**'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 1 of 13 in additional filter chain; firing Filter: 'WebAsyncManagerIntegrationFilter'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 2 of 13 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 3 of 13 in additional filter chain; firing Filter: 'HeaderWriterFilter'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 4 of 13 in additional filter chain; firing Filter: 'LogoutFilter'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/logout', GET]
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/error'; against '/logout'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/logout', POST]
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /error' doesn't match 'POST /logout'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/logout', PUT]
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /error' doesn't match 'PUT /logout'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/logout', DELETE]
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /error' doesn't match 'DELETE /logout'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : No matches found
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 5 of 13 in additional filter chain; firing Filter: 'CorsFilter'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 6 of 13 in additional filter chain; firing Filter: 'JWTFilter'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 7 of 13 in additional filter chain; firing Filter: 'BasicAuthenticationFilter'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 8 of 13 in additional filter chain; firing Filter: 'RequestCacheAwareFilter'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 9 of 13 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 10 of 13 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.a.AnonymousAuthenticationFilter : Populated SecurityContextHolder with anonymous token: 'org.springframework.security.authentication.AnonymousAuthenticationToken#3d9ea918: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails#b364: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: null; Granted Authorities: ROLE_ANONYMOUS'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 11 of 13 in additional filter chain; firing Filter: 'SessionManagementFilter'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 12 of 13 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 13 of 13 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error reached end of additional filter chain; proceeding with original chain
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : "ERROR" dispatch for GET "/error", parameters={}
2020-08-28 14:19:51.897 DEBUG 3822 --- [ XNIO-1 task-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController#errorHtml(HttpServletRequest, HttpServletResponse)
2020-08-28 14:19:51.926 DEBUG 3822 --- [ XNIO-1 task-1] o.s.w.s.v.ContentNegotiatingViewResolver : Selected 'text/html' given [text/html, text/html;q=0.8]
2020-08-28 14:19:52.191 DEBUG 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : Exiting from "ERROR" dispatch, status 404
2020-08-28 14:19:52.192 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.a.ExceptionTranslationFilter : Chain processed normally
2020-08-28 14:19:52.192 DEBUG 3822 --- [ XNIO-1 task-1] s.s.w.c.SecurityContextPersistenceFilter : SecurityContextHolder now cleared, as request processing completed
Please help
You generated a server with client code using --skip-client, so what did you expect when accessing http://localhost:8080/? Of course, there's no index.html to serve, if you want to do a test you should call the API on http://localhost:8080/api/<something>
You don't have swagger-ui because you skipped client, so you should try only a GET in browser or use curl or Postman.
Can I have a job with just the slaves and no master and listen to a rabbitmq queue? I want to listen to a queue and process the messages in chunk oriented manner using spring batch and spring integration in a spring boot app.
I want to use the chunkProcessorChunkHandler configuration explained in the RemoteChunking example for Spring batch by Michael Minella (https://www.youtube.com/watch?v=30Tdp1mfR0g), but without a master configuration.
Below is my configuration for the job.
#Configuration
#EnableIntegration
public class QueueIntegrationConfiguration {
#Autowired
private CassandraItemWriter cassandraItemWriter;
#Autowired
private VendorProcessor vendorProcessor;
#Autowired
ConnectionFactory connectionFactory;
#Bean
public AmqpInboundChannelAdapter inboundChannelAdapter(
SimpleMessageListenerContainer listenerContainer) {
AmqpInboundChannelAdapter adapter = new AmqpInboundChannelAdapter(listenerContainer);
adapter.setOutputChannel(inboundQueueChannel());
adapter.setAutoStartup(true);
return adapter;
}
#Bean
public SimpleMessageListenerContainer listenerContainer(ConnectionFactory connectionFactory, MessageConverter jsonMessageConverter) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(
connectionFactory);
container.setQueueNames("ProductStore_Partial");
container.setAutoStartup(true);
container.setMessageConverter(jsonMessageConverter);
return container;
}
#Bean
#ServiceActivator(inputChannel = "ProductStore_Partial")
public ChunkProcessorChunkHandler chunkProcessorChunkHandler()
throws Exception {
SimpleChunkProcessor chunkProcessor = new SimpleChunkProcessor(vendorProcessor,
cassandraItemWriter);
chunkProcessor.afterPropertiesSet();
ChunkProcessorChunkHandler<Vendor> chunkHandler = new ChunkProcessorChunkHandler<>();
chunkHandler.setChunkProcessor(chunkProcessor);
chunkHandler.afterPropertiesSet();
return chunkHandler;
}
#Bean
public QueueChannel inboundQueueChannel() {
return new QueueChannel().;
}
}
Below is my Application.java class for spring boot.
#SpringBootApplication
#EnableBatchProcessing
public class BulkImportProductApplication {
public static void main(String[] args) {
SpringApplication app = new SpringApplication(BulkImportProductApplication.class);
app.setWebEnvironment(false);
app.run(args).close();
}
}
From what I understand from spring integration, I have an AmqpInboundChannelAdapter for listening to messages from the queue. A ServiceActivator, an inboundQueueChannel, autowired ItemProcessor and ItemWriter. I am not sure what am I missing here.
The batch job starts, consumes one message from the queue and get a cancelOk and my job terminates without processing the message.
I am also sharing my debug logging if that would help.
2017-12-04 09:58:49.679 INFO 7450 --- [ main] c.a.s.p.b.BulkImportProductApplication : Started BulkImportProductApplication in 9.412 seconds (JVM running for 10.39)
2017-12-04 09:58:49.679 INFO 7450 --- [ main] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext#31c88ec8: startup date [Mon Dec 04 09:58:40 PST 2017]; root of context hierarchy
2017-12-04 09:58:49.679 DEBUG 7450 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'org.springframework.integration.config.IdGeneratorConfigurer#0'
2017-12-04 09:58:49.680 DEBUG 7450 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'inboundChannelAdapter'
2017-12-04 09:58:49.680 DEBUG 7450 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'listenerContainer'
2017-12-04 09:58:49.680 DEBUG 7450 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'integrationHeaderChannelRegistry'
2017-12-04 09:58:49.680 DEBUG 7450 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'org.springframework.amqp.rabbit.config.internalRabbitListenerEndpointRegistry'
2017-12-04 09:58:49.680 DEBUG 7450 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean '_org.springframework.integration.errorLogger'
2017-12-04 09:58:49.680 DEBUG 7450 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'queueIntegrationConfiguration.chunkProcessorChunkHandler.serviceActivator.handler'
2017-12-04 09:58:49.680 DEBUG 7450 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'queueIntegrationConfiguration.chunkProcessorChunkHandler.serviceActivator'
2017-12-04 09:58:49.680 DEBUG 7450 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'lifecycleProcessor'
2017-12-04 09:58:49.680 INFO 7450 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 2147483647
2017-12-04 09:58:49.680 DEBUG 7450 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Asking bean 'inboundChannelAdapter' of type [class org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter] to stop
2017-12-04 09:58:49.680 DEBUG 7450 --- [ main] o.s.a.r.l.SimpleMessageListenerContainer : Shutting down Rabbit listener container
2017-12-04 09:58:49.814 DEBUG 7450 --- [pool-1-thread-5] o.s.a.r.listener.BlockingQueueConsumer : Storing delivery for Consumer#7c52fc81: tags=[{}], channel=Cached Rabbit Channel: AMQChannel(amqp://admin#xxxx:5672/,2), conn: Proxy#26f1249d Shared Rabbit Connection: SimpleConnection#680bddf5 [delegate=amqp://admin#xxxx:5672/, localPort= 65035], acknowledgeMode=AUTO local queue size=0
2017-12-04 09:58:49.814 DEBUG 7450 --- [enerContainer-1] o.s.a.r.listener.BlockingQueueConsumer : Received message: (Body:'[B#358a5358(byte[618])' MessageProperties [headers={__TypeId__=com.art.service.product.bulkimportproduct.data.model.Vendor}, timestamp=null, messageId=null, userId=null, receivedUserId=null, appId=null, clusterId=null, type=null, correlationId=null, correlationIdString=null, replyTo=null, contentType=json, contentEncoding=UTF-8, contentLength=0, deliveryMode=null, receivedDeliveryMode=NON_PERSISTENT, expiration=null, priority=0, redelivered=false, receivedExchange=ProductStore, receivedRoutingKey=, receivedDelay=null, deliveryTag=2, messageCount=0, consumerTag=amq.ctag-nWGbRxjFiaeTEoZylv6Hrg, consumerQueue=null])
2017-12-04 09:58:49.815 DEBUG 7450 --- [enerContainer-1] s.i.m.AbstractHeaderMapper$HeaderMatcher : headerName=[amqp_receivedDeliveryMode] WILL be mapped, matched pattern=*
2017-12-04 09:58:49.815 DEBUG 7450 --- [enerContainer-1] s.i.m.AbstractHeaderMapper$HeaderMatcher : headerName=[amqp_contentEncoding] WILL be mapped, matched pattern=*
2017-12-04 09:58:49.815 DEBUG 7450 --- [enerContainer-1] s.i.m.AbstractHeaderMapper$HeaderMatcher : headerName=[amqp_receivedExchange] WILL be mapped, matched pattern=*
2017-12-04 09:58:49.815 DEBUG 7450 --- [enerContainer-1] s.i.m.AbstractHeaderMapper$HeaderMatcher : headerName=[amqp_deliveryTag] WILL be mapped, matched pattern=*
2017-12-04 09:58:49.815 DEBUG 7450 --- [enerContainer-1] s.i.m.AbstractHeaderMapper$HeaderMatcher : headerName=[json__TypeId__] WILL be mapped, matched pattern=*
2017-12-04 09:58:49.815 DEBUG 7450 --- [enerContainer-1] s.i.m.AbstractHeaderMapper$HeaderMatcher : headerName=[amqp_redelivered] WILL be mapped, matched pattern=*
2017-12-04 09:58:49.815 DEBUG 7450 --- [enerContainer-1] s.i.m.AbstractHeaderMapper$HeaderMatcher : headerName=[contentType] WILL be mapped, matched pattern=*
2017-12-04 09:58:49.815 DEBUG 7450 --- [enerContainer-1] s.i.m.AbstractHeaderMapper$HeaderMatcher : headerName=[__TypeId__] WILL be mapped, matched pattern=*
2017-12-04 09:58:49.815 DEBUG 7450 --- [enerContainer-1] o.s.integration.channel.QueueChannel : preSend on channel 'inboundQueueChannel', message: GenericMessage [payload=byte[618], headers={amqp_receivedDeliveryMode=NON_PERSISTENT, amqp_contentEncoding=UTF-8, amqp_receivedExchange=ProductStore, amqp_deliveryTag=2, json__TypeId__=com.art.service.product.bulkimportproduct.data.model.Vendor, amqp_redelivered=false, id=a4868670-240f-ddf2-8a8c-ac4b8d234cdd, amqp_consumerTag=amq.ctag-nWGbRxjFiaeTEoZylv6Hrg, contentType=json, __TypeId__=com.art.service.product.bulkimportproduct.data.model.Vendor, timestamp=1512410329815}]
2017-12-04 09:58:49.815 DEBUG 7450 --- [enerContainer-1] o.s.integration.channel.QueueChannel : postSend (sent=true) on channel 'inboundQueueChannel', message: GenericMessage [payload=byte[618], headers={amqp_receivedDeliveryMode=NON_PERSISTENT, amqp_contentEncoding=UTF-8, amqp_receivedExchange=ProductStore, amqp_deliveryTag=2, json__TypeId__=com.art.service.product.bulkimportproduct.data.model.Vendor, amqp_redelivered=false, id=a4868670-240f-ddf2-8a8c-ac4b8d234cdd, amqp_consumerTag=amq.ctag-nWGbRxjFiaeTEoZylv6Hrg, contentType=json, __TypeId__=com.art.service.product.bulkimportproduct.data.model.Vendor, timestamp=1512410329815}]
2017-12-04 09:58:49.853 INFO 7450 --- [ main] o.s.a.r.l.SimpleMessageListenerContainer : Waiting for workers to finish.
2017-12-04 09:58:49.853 DEBUG 7450 --- [pool-1-thread-6] o.s.a.r.listener.BlockingQueueConsumer : Received cancelOk for tag amq.ctag-nWGbRxjFiaeTEoZylv6Hrg (null); Consumer#7c52fc81: tags=[{}], channel=Cached Rabbit Channel: AMQChannel(amqp://admin#xxxx:5672/,2), conn: Proxy#26f1249d Shared Rabbit Connection: SimpleConnection#680bddf5 [delegate=amqp://admin#xxxx:5672/, localPort= 65035], acknowledgeMode=AUTO local queue size=0
2017-12-04 09:58:49.853 DEBUG 7450 --- [enerContainer-1] o.s.a.r.l.SimpleMessageListenerContainer : Cancelling Consumer#7c52fc81: tags=[{}], channel=Cached Rabbit Channel: AMQChannel(amqp://admin#xxxx:5672/,2), conn: Proxy#26f1249d Shared Rabbit Connection: SimpleConnection#680bddf5 [delegate=amqp://admin#xxxx:5672/, localPort= 65035], acknowledgeMode=AUTO local queue size=0
2017-12-04 09:58:49.853 DEBUG 7450 --- [enerContainer-1] o.s.a.r.listener.BlockingQueueConsumer : Closing Rabbit Channel: Cached Rabbit Channel: AMQChannel(amqp://admin#xxxx:5672/,2), conn: Proxy#26f1249d Shared Rabbit Connection: SimpleConnection#680bddf5 [delegate=amqp://admin#xxxx:5672/, localPort= 65035]
2017-12-04 09:58:49.853 DEBUG 7450 --- [enerContainer-1] o.s.a.r.c.CachingConnectionFactory : Closing cached Channel: AMQChannel(amqp://admin#xxxx:5672/,2)
2017-12-04 09:58:50.027 INFO 7450 --- [ main] o.s.a.r.l.SimpleMessageListenerContainer : Successfully waited for workers to finish.
2017-12-04 09:58:50.027 DEBUG 7450 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Bean 'inboundChannelAdapter' completed its stop procedure
What am I missing here? Why is my message getting processed? Please correct me if I'm missing out something here? Also feel free to ask any other configuration that you feel would help analyze the situation here.
EDIT: After removing the code that closes the application context manually( app.run(args).close() ), I was able to receive the messages, but looks like they are lost after a successful retrieve. sharing the debug log for this behavior.
2017-12-04 14:39:11.297 DEBUG 1498 --- [pool-1-thread-5] o.s.a.r.listener.BlockingQueueConsumer : Storing delivery for Consumer#7219ac49: tags=[{amq.ctag-Z8siptJMdxGU6sXdOHkVCA=ProductStore_Partial}], channel=Cached Rabbit Channel: AMQChannel(amqp://admin#xxxx:5672/,2), conn: Proxy#6df20ade Shared Rabbit Connection: SimpleConnection#7ba63fe5 [delegate=amqp://admin#xxxx:5672/, localPort= 51172], acknowledgeMode=AUTO local queue size=0
2017-12-04 14:39:11.297 DEBUG 1498 --- [enerContainer-1] o.s.a.r.listener.BlockingQueueConsumer : Received message: (Body:'[B#347c8f87(byte[624])' MessageProperties [headers={__TypeId__=com.art.service.product.bulkimportproduct.data.model.Vendor}, timestamp=null, messageId=null, userId=null, receivedUserId=null, appId=null, clusterId=null, type=null, correlationId=null, correlationIdString=null, replyTo=null, contentType=json, contentEncoding=UTF-8, contentLength=0, deliveryMode=null, receivedDeliveryMode=NON_PERSISTENT, expiration=null, priority=0, redelivered=false, receivedExchange=ProductStore, receivedRoutingKey=, receivedDelay=null, deliveryTag=2, messageCount=0, consumerTag=amq.ctag-Z8siptJMdxGU6sXdOHkVCA, consumerQueue=ProductStore_Partial])
2017-12-04 14:39:11.297 DEBUG 1498 --- [enerContainer-1] s.i.m.AbstractHeaderMapper$HeaderMatcher : headerName=[amqp_receivedDeliveryMode] WILL be mapped, matched pattern=*
2017-12-04 14:39:11.297 DEBUG 1498 --- [enerContainer-1] s.i.m.AbstractHeaderMapper$HeaderMatcher : headerName=[amqp_contentEncoding] WILL be mapped, matched pattern=*
2017-12-04 14:39:11.297 DEBUG 1498 --- [enerContainer-1] s.i.m.AbstractHeaderMapper$HeaderMatcher : headerName=[amqp_receivedExchange] WILL be mapped, matched pattern=*
2017-12-04 14:39:11.297 DEBUG 1498 --- [enerContainer-1] s.i.m.AbstractHeaderMapper$HeaderMatcher : headerName=[amqp_deliveryTag] WILL be mapped, matched pattern=*
2017-12-04 14:39:11.297 DEBUG 1498 --- [enerContainer-1] s.i.m.AbstractHeaderMapper$HeaderMatcher : headerName=[json__TypeId__] WILL be mapped, matched pattern=*
2017-12-04 14:39:11.297 DEBUG 1498 --- [enerContainer-1] s.i.m.AbstractHeaderMapper$HeaderMatcher : headerName=[amqp_redelivered] WILL be mapped, matched pattern=*
2017-12-04 14:39:11.297 DEBUG 1498 --- [enerContainer-1] s.i.m.AbstractHeaderMapper$HeaderMatcher : headerName=[contentType] WILL be mapped, matched pattern=*
2017-12-04 14:39:11.297 DEBUG 1498 --- [enerContainer-1] s.i.m.AbstractHeaderMapper$HeaderMatcher : headerName=[__TypeId__] WILL be mapped, matched pattern=*
2017-12-04 14:39:11.297 DEBUG 1498 --- [enerContainer-1] o.s.integration.channel.QueueChannel : preSend on channel 'inboundQueueChannel', message: GenericMessage [payload=byte[624], headers={amqp_receivedDeliveryMode=NON_PERSISTENT, amqp_contentEncoding=UTF-8, amqp_receivedExchange=ProductStore, amqp_deliveryTag=2, json__TypeId__=com.art.service.product.bulkimportproduct.data.model.Vendor, amqp_consumerQueue=ProductStore_Partial, amqp_redelivered=false, id=540399a5-62a6-7178-2524-e274bad4ed13, amqp_consumerTag=amq.ctag-Z8siptJMdxGU6sXdOHkVCA, contentType=json, __TypeId__=com.art.service.product.bulkimportproduct.data.model.Vendor, timestamp=1512427151297}]
2017-12-04 14:39:11.297 DEBUG 1498 --- [enerContainer-1] o.s.integration.channel.QueueChannel : postSend (sent=true) on channel 'inboundQueueChannel', message: GenericMessage [payload=byte[624], headers={amqp_receivedDeliveryMode=NON_PERSISTENT, amqp_contentEncoding=UTF-8, amqp_receivedExchange=ProductStore, amqp_deliveryTag=2, json__TypeId__=com.art.service.product.bulkimportproduct.data.model.Vendor, amqp_consumerQueue=ProductStore_Partial, amqp_redelivered=false, id=540399a5-62a6-7178-2524-e274bad4ed13, amqp_consumerTag=amq.ctag-Z8siptJMdxGU6sXdOHkVCA, contentType=json, __TypeId__=com.art.service.product.bulkimportproduct.data.model.Vendor, timestamp=1512427151297}]
2017-12-04 14:39:11.297 DEBUG 1498 --- [enerContainer-1] o.s.a.r.listener.BlockingQueueConsumer : Retrieving delivery for Consumer#7219ac49: tags=[{amq.ctag-Z8siptJMdxGU6sXdOHkVCA=ProductStore_Partial}], channel=Cached Rabbit Channel: AMQChannel(amqp://admin#xxxx:5672/,2), conn: Proxy#6df20ade Shared Rabbit Connection: SimpleConnection#7ba63fe5 [delegate=amqp://admin#xxxx:5672/, localPort= 51172], acknowledgeMode=AUTO local queue size=0
This goes on repeating and new messages are consumed, but the messages are not getting processed and written to the data-store using the itemWriter provided. Now come to think of it, since I have not provided the tasklet/step bean reference anywhere in this code, is that something I am missing out here?
app.run(args).close();
You are explicitly closing the application context, which shuts everything down.
Closing org.springframework.context.annotation.AnnotationConfigApplicationContext.
I'm new in jhipster, I cloned the sample generated Angular 4 application :
https://github.com/jhipster/jhipster-sample-app-ng2.git
I run the project with eclipse, but the application is not working in the browser !!!
I did't make any change in the source, this is my console :
The Class-Path manifest attribute in C:\Users\HATIME\.m2\repository\org\liquibase\liquibase-core\3.5.3\liquibase-core-3.5.3.jar referenced one or more files that do not exist: C:\Users\HATIME\.m2\repository\org\liquibase\liquibase-core\3.5.3\lib\snakeyaml-1.13.jar
20:25:21.854 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Included patterns for restart : []
20:25:21.860 [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/]
20:25:21.861 [main] DEBUG org.springframework.boot.devtools.restart.ChangeableUrls - Matching URLs for reloading : [file:/D:/Work/workspace/jhipster-sample-app-ng2/target/classes/]
██╗ ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗
██║ ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
██║ ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝
██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║
╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗
╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝
:: JHipster 🤓 :: Running Spring Boot 1.5.7.RELEASE ::
:: http://www.jhipster.tech ::
2017-10-26 20:25:25.190 INFO 4916 --- [ restartedMain] i.g.j.s.JhipsterSampleApplicationNg2App : Starting JhipsterSampleApplicationNg2App on HATIME-PC with PID 4916 (D:\Work\workspace\jhipster-sample-app-ng2\target\classes started by HATIME in D:\Work\workspace\jhipster-sample-app-ng2)
2017-10-26 20:25:25.192 DEBUG 4916 --- [ restartedMain] i.g.j.s.JhipsterSampleApplicationNg2App : Running with Spring Boot v1.5.7.RELEASE, Spring v4.3.11.RELEASE
2017-10-26 20:25:25.193 INFO 4916 --- [ restartedMain] i.g.j.s.JhipsterSampleApplicationNg2App : The following profiles are active: swagger,dev
2017-10-26 20:25:25.620 DEBUG 4916 --- [kground-preinit] org.jboss.logging : Logging Provider: org.jboss.logging.Slf4jLoggerProvider found via system property
2017-10-26 20:25:31.188 DEBUG 4916 --- [ restartedMain] i.g.j.sample.config.AsyncConfiguration : Creating Async Task Executor
2017-10-26 20:25:32.757 DEBUG 4916 --- [ restartedMain] class org.ehcache.core.Ehcache-users : Initialize successful.
2017-10-26 20:25:32.792 DEBUG 4916 --- [ restartedMain] c.e.c.E.g.jhipster.sample.domain.User : Initialize successful.
2017-10-26 20:25:32.800 DEBUG 4916 --- [ restartedMain] c.e.c.E.g.j.sample.domain.Authority : Initialize successful.
2017-10-26 20:25:32.805 DEBUG 4916 --- [ restartedMain] c.e.c.E.g.j.s.domain.User.authorities : Initialize successful.
2017-10-26 20:25:32.811 DEBUG 4916 --- [ restartedMain] c.e.c.E.g.j.sample.domain.BankAccount : Initialize successful.
2017-10-26 20:25:32.816 DEBUG 4916 --- [ restartedMain] c.e.c.E.g.j.s.d.BankAccount.operations : Initialize successful.
2017-10-26 20:25:32.822 DEBUG 4916 --- [ restartedMain] c.e.c.E.g.jhipster.sample.domain.Label : Initialize successful.
2017-10-26 20:25:32.831 DEBUG 4916 --- [ restartedMain] c.e.c.E.g.j.s.domain.Label.operations : Initialize successful.
2017-10-26 20:25:32.836 DEBUG 4916 --- [ restartedMain] c.e.c.E.g.j.sample.domain.Operation : Initialize successful.
2017-10-26 20:25:32.844 DEBUG 4916 --- [ restartedMain] c.e.c.E.g.j.s.domain.Operation.labels : Initialize successful.
2017-10-26 20:25:33.326 DEBUG 4916 --- [ restartedMain] i.g.j.s.config.MetricsConfiguration : Registering JVM gauges
2017-10-26 20:25:33.360 DEBUG 4916 --- [ restartedMain] i.g.j.s.config.MetricsConfiguration : Monitoring the datasource
2017-10-26 20:25:33.361 DEBUG 4916 --- [ restartedMain] i.g.j.s.config.MetricsConfiguration : Initializing Metrics JMX reporting
2017-10-26 20:25:35.101 DEBUG 4916 --- [ restartedMain] i.g.j.sample.config.WebConfigurer : Registering CORS filter
2017-10-26 20:25:35.421 INFO 4916 --- [ restartedMain] i.g.j.sample.config.WebConfigurer : Web application configuration, using profiles: swagger
2017-10-26 20:25:35.422 DEBUG 4916 --- [ restartedMain] i.g.j.sample.config.WebConfigurer : Initializing Metrics registries
2017-10-26 20:25:35.428 DEBUG 4916 --- [ restartedMain] i.g.j.sample.config.WebConfigurer : Registering Metrics Filter
2017-10-26 20:25:35.429 DEBUG 4916 --- [ restartedMain] i.g.j.sample.config.WebConfigurer : Registering Metrics Servlet
2017-10-26 20:25:35.435 DEBUG 4916 --- [ restartedMain] i.g.j.sample.config.WebConfigurer : Initialize H2 console
2017-10-26 20:25:35.436 INFO 4916 --- [ restartedMain] i.g.j.sample.config.WebConfigurer : Web application fully configured
2017-10-26 20:25:36.046 DEBUG 4916 --- [ restartedMain] i.g.j.s.config.DatabaseConfiguration : Configuring Liquibase
2017-10-26 20:25:36.071 WARN 4916 --- [ng-2-Executor-1] i.g.j.c.liquibase.AsyncSpringLiquibase : Starting Liquibase asynchronously, your database might not be ready at startup!
2017-10-26 20:25:38.669 DEBUG 4916 --- [ng-2-Executor-1] i.g.j.c.liquibase.AsyncSpringLiquibase : Liquibase has updated your database in 2596 ms
2017-10-26 20:25:51.678 DEBUG 4916 --- [ restartedMain] i.g.j.c.apidoc.SwaggerConfiguration : Starting Swagger
2017-10-26 20:25:51.690 DEBUG 4916 --- [ restartedMain] i.g.j.c.apidoc.SwaggerConfiguration : Started Swagger in 12 ms
2017-10-26 20:25:54.999 INFO 4916 --- [ restartedMain] i.g.j.s.JhipsterSampleApplicationNg2App : Started JhipsterSampleApplicationNg2App in 33.101 seconds (JVM running for 34.175)
2017-10-26 20:25:55.000 INFO 4916 --- [ restartedMain] i.g.j.s.JhipsterSampleApplicationNg2App :
----------------------------------------------------------
Application 'jhipsterSampleApplicationNG2' is running! Access URLs:
Local: http://localhost:8080
External: http://*.*.*.*:8080
Profile(s): [swagger, dev]
----------------------------------------------------------
Did you launch yarn install to get the node_modules folder, and compile the front ?
Try:
yarn install
yarn run webpack:build
yarn start
My jhipster-registry stopped working a couple of hours ago.
I followd these steps:
removed node_modules/ folder
npm install
./mvnw
When the registry is up and running again I get an error page with the following text:
??error.title_en??
And in the logs find:
2017-08-04 22:58:53.729 DEBUG 3203 --- [kground-preinit] org.jboss.logging : Logging Provider: org.jboss.logging.Slf4jLoggerProvider found via system property
██╗ ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗
██║ ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
██║ ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝
██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║
╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗
╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝
:: JHipster Registry :: Running Spring Boot 1.5.4.RELEASE ::
:: http://jhipster.github.io ::
2017-08-04 22:58:56.117 INFO 3203 --- [ restartedMain] i.g.j.registry.JHipsterRegistryApp : The following profiles are active: dev,native
2017-08-04 22:58:59.313 DEBUG 3203 --- [ restartedMain] i.g.j.r.config.AsyncConfiguration : Creating Async Task Executor
2017-08-04 22:58:59.994 DEBUG 3203 --- [ restartedMain] i.g.j.r.config.MetricsConfiguration : Registering JVM gauges
2017-08-04 22:59:00.274 DEBUG 3203 --- [ restartedMain] i.g.j.r.config.MetricsConfiguration : Initializing Metrics JMX reporting
2017-08-04 22:59:03.135 DEBUG 3203 --- [ restartedMain] i.g.j.registry.config.WebConfigurer : Registering CORS filter
2017-08-04 22:59:03.327 WARN 3203 --- [ restartedMain] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2017-08-04 22:59:04.102 INFO 3203 --- [ restartedMain] i.g.j.registry.config.WebConfigurer : Web application configuration, using profiles: dev
2017-08-04 22:59:04.103 DEBUG 3203 --- [ restartedMain] i.g.j.registry.config.WebConfigurer : Initializing Metrics registries
2017-08-04 22:59:04.107 DEBUG 3203 --- [ restartedMain] i.g.j.registry.config.WebConfigurer : Registering Metrics Filter
2017-08-04 22:59:04.107 DEBUG 3203 --- [ restartedMain] i.g.j.registry.config.WebConfigurer : Registering Metrics Servlet
2017-08-04 22:59:04.113 INFO 3203 --- [ restartedMain] i.g.j.registry.config.WebConfigurer : Web application fully configured
2017-08-04 22:59:12.109 WARN 3203 --- [ restartedMain] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2017-08-04 22:59:12.551 INFO 3203 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1
2017-08-04 22:59:12.551 INFO 3203 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Client configured to neither register nor query for data.
2017-08-04 22:59:12.571 INFO 3203 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1501880352571 with initial instances count: 0
2017-08-04 22:59:12.941 INFO 3203 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
2017-08-04 22:59:12.941 INFO 3203 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
2017-08-04 22:59:12.942 INFO 3203 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
2017-08-04 22:59:12.942 INFO 3203 --- [ restartedMain] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
2017-08-04 22:59:13.809 WARN 3203 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with key 'zuulEndpoint' has been registered as an MBean but has no exposed attributes or operations
2017-08-04 22:59:14.606 DEBUG 3203 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect : Enter: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with argument[s] = []
2017-08-04 22:59:14.614 DEBUG 3203 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect : Exit: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with result = null
2017-08-04 22:59:14.740 INFO 3203 --- [ restartedMain] i.g.j.registry.JHipsterRegistryApp : Started JHipsterRegistryApp in 22.799 seconds (JVM running for 23.886)
2017-08-04 22:59:14.741 INFO 3203 --- [ restartedMain] i.g.j.registry.JHipsterRegistryApp :
----------------------------------------------------------
Application 'jhipster-registry' is running! Access URLs:
Local: http://localhost:8761
External: http://xxx.xxx.x.xxx:8761
Profile(s): [dev, native]
----------------------------------------------------------
2017-08-04 22:59:19.615 DEBUG 3203 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect : Enter: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with argument[s] = []
2017-08-04 22:59:19.616 DEBUG 3203 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect : Exit: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with result = null
2017-08-04 22:59:24.621 DEBUG 3203 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect : Enter: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with argument[s] = []
2017-08-04 22:59:24.622 DEBUG 3203 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect : Exit: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with result = null
2017-08-04 22:59:27.234 WARN 3203 --- [ XNIO-2 task-1] o.s.c.n.zuul.web.ZuulHandlerMapping : No routes found from RouteLocator
2017-08-04 22:59:27.438 DEBUG 3203 --- [ XNIO-2 task-1] freemarker.cache : Couldn't find template in cache for "error.ftl"("en", UTF-8, parsed); will try to load it.
2017-08-04 22:59:27.441 DEBUG 3203 --- [ XNIO-2 task-1] freemarker.cache : TemplateLoader.findTemplateSource("error_en.ftl"): Not found
2017-08-04 22:59:27.444 DEBUG 3203 --- [ XNIO-2 task-1] freemarker.cache : TemplateLoader.findTemplateSource("error.ftl"): Not found
2017-08-04 22:59:29.623 DEBUG 3203 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect : Enter: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with argument[s] = []
2017-08-04 22:59:29.623 DEBUG 3203 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect : Exit: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes()
I don't know where all this come from.
Edit-----------------------------------
The problem may be when I run npm install and it's postinstall script "postinstall": "yarn run webpack:build" an ERROR is thrown:
ERROR in ./~/css-loader!./~/postcss-loader!./~/sass-loader/lib/loader.js!./src/main/webapp/content/scss/vendor.scss
Module build failed: TypeError: Invalid PostCSS Plugin found: [0]
at /Users/xxxxxxx/dev/projects/registrytest/node_modules/postcss-load-plugins/lib/plugins.js:32:17
at Array.forEach (native)
at plugins (/Users/xxxxxxx/dev/projects/registrytest/node_modules/postcss-load-plugins/lib/plugins.js:21:15)
at /Users/xxxxxxx/dev/projects/registrytest/node_modules/postcss-load-config/index.js:64:18
at <anonymous>
# ./src/main/webapp/content/scss/vendor.scss 4:14-194
# ./src/main/webapp/app/vendor.ts
# dll vendor
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jhipster-registry#3.1.0 postinstall: `yarn run webpack:build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jhipster-registry#3.1.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/xxxxxx/.npm/_logs/2017-08-05T07_44_08_129Z-debug.log
I run:
OS X 10.11.6
node: 8.2.1
npm: 5.3.0
It was a dependency issue. The solution for me was:
Downgrade node.js from version 8 to 6.11 because node-sass didn't support node.js 8. Then I upgraded sass-loader, node-sass and postcss-loader to latest versions.
I don't know if this is the way to go but it work for me.