Hi. Сould you please help with my problem.It doesn’t work right for me camunda webapp and REST.I’m configuring my app, start. Camunda writes some data to the database and I can see it, but when I try to go to welcom page (localhost:8080/api) I get 404, REST doesn’t work either.
My Gradle build
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVer}")
}
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
repositories {
mavenCentral()
}
group "com.chicago.services"
version "0.0.1-SNAPSHOT"
bootJar.enabled = true
jar.enabled = true
dependencies {
implementation "mysql:mysql-connector-java:${mySqlDriverVer}"
implementation "org.springframework.cloud:spring-cloud-starter-netflix-eureka-client"
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation "org.springframework.boot:spring-boot-starter-parent:${springBootVer}"
implementation "io.springfox:springfox-boot-starter:${springfoxVer}"
implementation "org.glassfish.jersey.bundles.repackaged:jersey-guava:${jerseyGuavaVer}"
implementation "org.glassfish.jersey.media:jersey-media-json-jackson:${jerseyVer}"
implementation ("org.crazycake:shiro-redis:${shiroRedisVer}"){
exclude group: 'com.google.collections'
}
compileOnly "org.projectlombok:lombok:${lombokVer}"
annotationProcessor "org.projectlombok:lombok:${lombokVer}"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jacksonVer}"
implementation "javax.websocket:javax.websocket-api:${websockVer}"
implementation "io.jsonwebtoken:jjwt:${jjwtVer}"
implementation project(":chicago-model")
implementation (project(":chicago-ext")) {
exclude group: 'com.google.collections'
}
implementation(project(":chicago-event"))
implementation project(":chicago-common")
implementation "junit:junit:${junitVer}"
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
implementation group: 'org.camunda.bpm.springboot', name: 'camunda-bpm-spring-boot-starter-webapp', version: '7.14.0'
implementation group: 'org.camunda.bpm.springboot', name: 'camunda-bpm-spring-boot-starter-rest', version: '7.14.0'
implementation group: 'org.camunda.bpm.springboot', name: 'camunda-bpm-spring-boot-starter', version: '7.14.0'
// implementation group: 'org.camunda.spin', name: 'camunda-spin-dataformat-json-jackson', version: '1.10.1'
implementation group: 'org.camunda.bpm', name: 'camunda-engine-spring', version: '7.14.0'
testImplementation group: 'com.h2database', name: 'h2', version: '1.4.200'
implementation group: 'org.camunda.bpm', name: 'camunda-engine-plugin-spin', version: '7.14.0'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-jdbc', version: '2.4.4'
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVer}"
}
}
gradle.properties
junitVer=4.13.2
mockitoVer=3.3.3
javaxRsVer=2.1.1
websockVer=1.1
jerseyVer=2.29
jerseyHk2Ver=2.32
jerseyGuavaVer=2.26-b03
slf4jVer=1.7.25
shiroVer=1.7.0
shiroRedisVer=3.3.1
kafkaVer=2.4.0
hk2Ver=2.5.0-b61
commonsCliVer=1.4
akkaVer=2.5.13
httpcoreVer=4.4.9
logbackVer=1.1.7
commonsVer=2.5
commonsLoggingVer=1.2
lombokVer=1.18.16
mySqlDriverVer=8.0.22
amazonawsVer=1.11.924
embeddedMysqlVer=2.4.0
flywayVer=7.6.0
dbpoolVer=2.8.0
gsonVer=2.8.6
jjwtVer=0.7.0
jaxbVer=2.3.1
guavaVer=30.1-jre
jacksonVer=2.12.0
poiVer=3.15
commTextVer=1.9
common_path=project(':chicago-common').projectDir.absolutePath
springCloudVer = 2020.0.0
springBootVer = 2.4.1
springfoxVer=3.0.0
mavenUser=nexus
mavenPassword=password
application.properties
server.servlet.context-path=/api
server.port=8080
eureka.client.enabled=false
spring.application.name=chicago-ws
eureka.client.service-url.defaultZone=http://localhost:8010/eureka/
spring.devtools.restart.enabled=true
eureka.client.fetch-registry=true
spring.devtools.livereload.enabled=false
eureka.renewalPercentThreshold=0.85
shiro.loginUrl = /api/login
camunda.bpm.admin-user.id=demo
camunda.bpm.admin-user.password=demo
spring.datasource.url=jdbc:mysql://localhost:3306/schema?serverTimezone=UTC&characterEncoding=utf8&user=user&password=password
in the logs
____ _ ____ ____ __ __
/ ___| __ _ _ __ ___ _ _ _ __ __| | __ _ | __ )| _ \| \/ |
| | / _` | '_ ` _ \| | | | '_ \ / _` |/ _` | | _ \| |_) | |\/| |
| |__| (_| | | | | | | |_| | | | | (_| | (_| | | |_) | __/| | | |
\____/\__,_|_| |_| |_|\__,_|_| |_|\__,_|\__,_| |____/|_| |_| |_|
Spring-Boot: (v2.4.1)
Camunda BPM: (v7.14.0)
Camunda BPM Spring Boot Starter: (v7.14.0)
2021-04-11 13:54:35.027 [background-preinit] INFO o.h.validator.internal.util.Version - HV000001: Hibernate Validator 6.1.6.Final
2021-04-11 13:54:35.032 [main] INFO com.chicago.services.Application - Starting Application using Java 11.0.9 on LAPTOP-EQ6545IB with PID 5188 (C:\Users\79643\IdeaProjects\chicago-adapt-next\chicago-rest\build\classes\java\main started by artak in C:\Users\79643\IdeaProjects\chicago-adapt-next)
2021-04-11 13:54:35.034 [main] INFO com.chicago.services.Application - No active profile set, falling back to default profiles: default
2021-04-11 13:54:36.741 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data MongoDB repositories in DEFAULT mode.
2021-04-11 13:54:36.765 [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 17 ms. Found 0 MongoDB repository interfaces.
2021-04-11 13:54:37.070 [main] INFO o.s.cloud.context.scope.GenericScope - BeanFactory id=bcf1c092-177a-3f63-ba76-1f06fc6e37bf
2021-04-11 13:54:37.092 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.apache.shiro.spring.boot.autoconfigure.ShiroBeanAutoConfiguration' of type [org.apache.shiro.spring.boot.autoconfigure.ShiroBeanAutoConfiguration$$EnhancerBySpringCGLIB$$c49db801] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-04-11 13:54:37.129 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.apache.shiro.spring.boot.autoconfigure.ShiroAnnotationProcessorAutoConfiguration' of type [org.apache.shiro.spring.boot.autoconfigure.ShiroAnnotationProcessorAutoConfiguration$$EnhancerBySpringCGLIB$$c730f6a6] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-04-11 13:54:37.164 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'shiroConfig' of type [com.chicago.services.configuration.ShiroConfig$$EnhancerBySpringCGLIB$$1347adb2] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-04-11 13:54:37.234 [main] INFO o.f.c.i.license.VersionPrinter - Flyway Community Edition 7.1.1 by Redgate
2021-04-11 13:54:37.549 [main] INFO o.f.c.i.database.base.DatabaseType - Database: jdbc:mysql://localhost:3306/adapt (MySQL 8.0)
2021-04-11 13:54:37.605 [main] INFO o.f.c.i.s.JdbcTableSchemaHistory - Repair of failed migration in Schema History table `adapt`.`flyway_schema_history` not necessary. No failed migration detected.
2021-04-11 13:54:37.674 [main] INFO o.f.core.internal.command.DbRepair - Successfully repaired schema history table `adapt`.`flyway_schema_history` (execution time 00:00.091s).
2021-04-11 13:54:37.678 [main] INFO o.f.c.i.license.VersionPrinter - Flyway Community Edition 7.1.1 by Redgate
2021-04-11 13:54:37.741 [main] INFO o.f.core.internal.command.DbValidate - Successfully validated 85 migrations (execution time 00:00.050s)
2021-04-11 13:54:37.755 [main] INFO o.f.core.internal.command.DbMigrate - Current version of schema `adapt`: 49
2021-04-11 13:54:37.756 [main] INFO o.f.core.internal.command.DbMigrate - Schema `adapt` is up to date. No migration necessary.
2021-04-11 13:54:37.759 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'mySqlConnector' of type [com.chicago.ext.dal.mysql.MySqlConnector] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-04-11 13:54:37.783 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'userDalImpl' of type [com.chicago.ext.dal.mysql.UserDalImpl] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-04-11 13:54:37.785 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'permissionDalImpl' of type [com.chicago.ext.dal.mysql.PermissionDalImpl] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-04-11 13:54:38.138 [main] INFO com.chicago.ext.faceid.AmazonFaceId - Get all collections
2021-04-11 13:54:39.405 [main] INFO com.chicago.ext.faceid.AmazonFaceId - AlekseyTest
2021-04-11 13:54:39.406 [main] INFO com.chicago.ext.faceid.AmazonFaceId - BldDocsProdCollection
2021-04-11 13:54:39.406 [main] INFO com.chicago.ext.faceid.AmazonFaceId - GascarTestCollection
2021-04-11 13:54:39.406 [main] INFO com.chicago.ext.faceid.AmazonFaceId - MyCollection
2021-04-11 13:54:39.406 [main] INFO com.chicago.ext.faceid.AmazonFaceId - TestCollection
2021-04-11 13:54:39.406 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'amazonFaceId' of type [com.chicago.ext.faceid.AmazonFaceId] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-04-11 13:54:39.792 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'emailSender' of type [com.chicago.ext.notifications.EmailSender] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-04-11 13:54:39.795 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'userBllImpl' of type [com.chicago.ext.bll.UserBllImpl] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-04-11 13:54:39.797 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'mySqlRealm' of type [com.chicago.services.realms.MySqlRealm] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-04-11 13:54:39.836 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'securityManager' of type [org.apache.shiro.web.mgt.DefaultWebSecurityManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-04-11 13:54:39.845 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'authorizationAttributeSourceAdvisor' of type [org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-04-11 13:54:39.886 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'shiroFilterChainDefinition' of type [org.apache.shiro.spring.web.config.DefaultShiroFilterChainDefinition] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-04-11 13:54:39.902 [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'eventBus' of type [org.apache.shiro.event.support.DefaultEventBus] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-04-11 13:54:40.186 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8080 (http)
2021-04-11 13:54:40.198 [main] INFO o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8080"]
2021-04-11 13:54:40.199 [main] INFO o.a.catalina.core.StandardService - Starting service [Tomcat]
2021-04-11 13:54:40.199 [main] INFO o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.41]
2021-04-11 13:54:40.277 [main] INFO o.a.c.c.C.[.[localhost].[/api] - Initializing Spring embedded WebApplicationContext
2021-04-11 13:54:40.277 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 5191 ms
2021-04-11 13:54:40.312 [main] INFO o.c.b.s.b.s.r.CamundaJerseyResourceConfig - Configuring camunda rest api.
2021-04-11 13:54:40.333 [main] INFO o.c.b.s.b.s.r.CamundaJerseyResourceConfig - Finished configuring camunda rest api.
2021-04-11 13:54:40.819 [main] INFO org.camunda.bpm.spring.boot - STARTER-SB040 Setting up jobExecutor with corePoolSize=3, maxPoolSize:10
2021-04-11 13:54:40.822 [main] INFO o.s.s.c.ThreadPoolTaskExecutor - Initializing ExecutorService 'camundaTaskExecutor'
2021-04-11 13:54:40.937 [main] INFO org.camunda.bpm.engine.cfg - ENGINE-12003 Plugin 'CompositeProcessEnginePlugin[genericPropertiesConfiguration, camundaProcessEngineConfiguration, camundaDatasourceConfiguration, camundaJobConfiguration, camundaHistoryConfiguration, camundaMetricsConfiguration, camundaAuthorizationConfiguration, camundaDeploymentConfiguration, CreateAdminUserConfiguration[adminUser=AdminUserProperty[id=demo, firstName=Demo, lastName=Demo, email=demo@localhost, password=******]], failedJobConfiguration, eventPublisherPlugin, SpringBootSpinProcessEnginePlugin]' activated on process engine 'default'
2021-04-11 13:54:41.130 [main] INFO org.camunda.bpm.spring.boot - STARTER-SB021 Auto-Deploying resources: [file [C:\Users\79643\IdeaProjects\chicago-adapt-next\chicago-rest\build\resources\main\process.bpmn]]
2021-04-11 13:54:41.137 [main] INFO o.c.b.s.b.s.e.EventPublisherPlugin - EVENTING-001: Initialized Camunda Spring Boot Eventing Engine Plugin.
2021-04-11 13:54:41.137 [main] INFO o.c.b.s.b.s.e.EventPublisherPlugin - EVENTING-003: Task events will be published as Spring Events.
2021-04-11 13:54:41.137 [main] INFO o.c.b.s.b.s.e.EventPublisherPlugin - EVENTING-005: Execution events will be published as Spring Events.
2021-04-11 13:54:41.141 [main] INFO o.c.b.s.b.s.e.EventPublisherPlugin - EVENTING-007: History events will be published as Spring events.
2021-04-11 13:54:41.270 [main] INFO org.camunda.bpm.dmn.feel.scala - FEEL/SCALA-01001 Spin value mapper detected
2021-04-11 13:54:41.450 [main] INFO org.camunda.feel.FeelEngine - Engine created. [value-mapper: CompositeValueMapper(List(org.camunda.feel.impl.JavaValueMapper@17e66aed, org.camunda.spin.plugin.impl.feel.integration.SpinValueMapper@65dd2191)), function-provider: org.camunda.bpm.dmn.feel.impl.scala.function.CustomFunctionTransformer@6dde913e, clock: SystemClock, configuration: Configuration(false)]
2021-04-11 13:54:41.593 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
2021-04-11 13:54:41.629 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
2021-04-11 13:54:45.661 [main] INFO org.camunda.bpm.connect - CNCT-01004 Discovered provider for connector id 'http-connector' and class 'org.camunda.connect.httpclient.impl.HttpConnectorImpl': 'org.camunda.connect.httpclient.impl.HttpConnectorProviderImpl'
2021-04-11 13:54:45.666 [main] INFO org.camunda.bpm.connect - CNCT-01004 Discovered provider for connector id 'soap-http-connector' and class 'org.camunda.connect.httpclient.soap.impl.SoapHttpConnectorImpl': 'org.camunda.connect.httpclient.soap.impl.SoapHttpConnectorProviderImpl'
2021-04-11 13:54:45.827 [main] INFO org.camunda.bpm.engine - ENGINE-00001 Process Engine default created.
2021-04-11 13:54:45.868 [main] INFO org.camunda.bpm.spring.boot - STARTER-SB011 skip creating initial Admin User, user does exist: UserEntity[id=demo, revision=1, firstName=Demo, lastName=Demo, email=demo@localhost, password={SHA-512}JCKc9U0ygrARFHKfvFd3vBUlPoRoHM2PgSaSIGHuFmu0sXuhIoUBfw9SDIUMm+aRBxHqUJ4ST06V+smXEPdEwg==, salt=RD+Njyy7pvNEj2IxIMak7Q==, lockExpirationTime=null, attempts=0]
завелся процес
2021-04-11 13:54:47.626 [main] INFO o.c.b.s.b.s.w.f.LazyInitRegistration - lazy initialized org.camunda.bpm.spring.boot.starter.webapp.filter.LazyProcessEnginesFilter@c6c58ce
2021-04-11 13:54:47.636 [main] INFO o.c.b.s.b.s.w.f.LazyInitRegistration - lazy initialized org.camunda.bpm.spring.boot.starter.webapp.filter.LazySecurityFilter@15a8bbe5
2021-04-11 13:54:47.792 [main] INFO org.mongodb.driver.cluster - Cluster created with settings {hosts=[localhost:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'}
2021-04-11 13:54:47.891 [cluster-rtt-ClusterId{value='6072d5772ad3dc09e632f19c', description='null'}-localhost:27017] INFO org.mongodb.driver.connection - Opened connection [connectionId{localValue:2, serverValue:108}] to localhost:27017
2021-04-11 13:54:47.891 [cluster-ClusterId{value='6072d5772ad3dc09e632f19c', description='null'}-localhost:27017] INFO org.mongodb.driver.connection - Opened connection [connectionId{localValue:1, serverValue:109}] to localhost:27017
2021-04-11 13:54:47.892 [cluster-ClusterId{value='6072d5772ad3dc09e632f19c', description='null'}-localhost:27017] INFO org.mongodb.driver.cluster - Monitor thread successfully connected to server with description ServerDescription{address=localhost:27017, type=STANDALONE, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=9, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=35382300}
2021-04-11 13:54:47.982 [main] WARN o.s.data.convert.CustomConversions - Registering converter from class java.time.LocalDateTime to class org.joda.time.LocalDateTime as reading converter although it doesn't convert from a store-supported type! You might want to check your annotation setup at the converter implementation.
2021-04-11 13:54:48.042 [main] WARN o.s.data.convert.CustomConversions - Registering converter from class java.time.LocalDateTime to class org.joda.time.LocalDateTime as reading converter although it doesn't convert from a store-supported type! You might want to check your annotation setup at the converter implementation.
2021-04-11 13:54:48.381 [main] INFO o.f.c.i.license.VersionPrinter - Flyway Community Edition 7.1.1 by Redgate
2021-04-11 13:54:48.386 [main] INFO o.f.c.i.database.base.DatabaseType - Database: jdbc:mysql://localhost:3306/adapt (MySQL 8.0)
2021-04-11 13:54:48.470 [main] INFO o.f.core.internal.command.DbValidate - Successfully validated 85 migrations (execution time 00:00.074s)
2021-04-11 13:54:48.482 [main] INFO o.f.core.internal.command.DbMigrate - Current version of schema `adapt`: 49
2021-04-11 13:54:48.483 [main] INFO o.f.core.internal.command.DbMigrate - Schema `adapt` is up to date. No migration necessary.
2021-04-11 13:54:48.660 [main] INFO o.s.c.n.e.c.DiscoveryClientOptionalArgsConfiguration - Eureka HTTP Client uses RestTemplate.
2021-04-11 13:54:48.722 [main] WARN o.s.c.l.c.LoadBalancerCacheAutoConfiguration$LoadBalancerCaffeineWarnLogger - Spring Cloud LoadBalancer is currently working with the default cache. You can switch to using Caffeine cache, by adding it to the classpath.
2021-04-11 13:54:48.841 [main] INFO o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8080"]
2021-04-11 13:54:48.867 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port(s): 8080 (http) with context path '/api'
2021-04-11 13:54:49.722 [main] INFO com.chicago.services.Application - Started Application in 15.434 seconds (JVM running for 16.261)
2021-04-11 13:54:49.725 [main] INFO org.camunda.bpm.engine.jobexecutor - ENGINE-14014 Starting up the JobExecutor[org.camunda.bpm.engine.spring.components.jobexecutor.SpringJobExecutor].
2021-04-11 13:54:49.727 [JobExecutor[org.camunda.bpm.engine.spring.components.jobexecutor.SpringJobExecutor]] INFO org.camunda.bpm.engine.jobexecutor - ENGINE-14018 JobExecutor[org.camunda.bpm.engine.spring.components.jobexecutor.SpringJobExecutor] starting to acquire jobs
2021-04-11 13:55:18.898 [http-nio-8080-exec-1] INFO o.a.c.c.C.[.[localhost].[/api] - Initializing Spring DispatcherServlet 'dispatcherServlet'
2021-04-11 13:55:18.899 [http-nio-8080-exec-1] INFO o.s.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
2021-04-11 13:55:18.901 [http-nio-8080-exec-1] INFO o.s.web.servlet.DispatcherServlet - Completed initialization in 2 ms
2021-04-11 13:55:18.927 [http-nio-8080-exec-1] INFO o.a.s.s.m.AbstractValidatingSessionManager - Enabling session validation scheduler...
2021-04-11 13:55:18.958 [http-nio-8080-exec-1] WARN o.s.web.servlet.PageNotFound - No mapping for GET /api/