问:
Spring Boot : An attempt was made to call a method that does not exist
I am trying to upgrade Spring dependency jars without upgrading the Spring Boot version in my project to fix some of CVE's reported.

So i am trying to upgrade the Spring dependencies to v5.3.24 . While the build seems to be fine, when i run the application, Spring Boot fails with below error.

I know i could only adjust Spring dependencie's version, but not spring boot. Appreciate any help to fix this.

```<code>***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration.resourceHandlerMapping(WebMvcAutoConfiguration.java:377)

The following method did not exist:

    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration.resourceHandlerMapping(Lorg/springframework/web/util/UrlPathHelper;Lorg/springframework/util/PathMatcher;Lorg/springframework/web/accept/ContentNegotiationManager;Lorg/springframework/format/support/FormattingConversionService;Lorg/springframework/web/servlet/resource/ResourceUrlProvider;)Lorg/springframework/web/servlet/HandlerMapping;

The method's class, org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration, is available from the following locations:

    jar:file:/Users/fazshaik/.gradle/caches/modules-2/files-2.1/org.springframework/spring-webmvc/5.3.24/33d2187c2bf1cb2c222bd1cc18b618736babcf3d/spring-webmvc-5.3.24.jar!/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class

It was loaded from the following location:

    file:/Users/fazshaik/.gradle/caches/modules-2/files-2.1/org.springframework/spring-webmvc/5.3.24/33d2187c2bf1cb2c222bd1cc18b618736babcf3d/spring-webmvc-5.3.24.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration
</code>```

Below is my build.gradle file.

```<code>buildscript {
    ext {
        springBootVersion = '2.2.13.RELEASE'
        junitVersion = "5.3.1"
        axonVersion='4.1'
    }
    repositories {
        mavenCentral()
        mavenLocal()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2"
        classpath "org.junit.platform:junit-platform-gradle-plugin:1.2.0"
        classpath "org.owasp:dependency-check-gradle:$owaspVersion"
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.sonarqube'
apply plugin: 'org.junit.platform.gradle.plugin'
apply plugin: "org.owasp.dependencycheck"

apply from: "${rootDir}/build-support/packaging.gradle"
apply from: "${rootDir}/contracts/build.gradle"

group = 'com.testproj.relateditems'
sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
    mavenCentral()
    mavenLocal()
    maven {
        name "testprojdoc-public"
        url "https://artifacthub-phx.oci.mytesthostcorp.com/testprojdoc-public"
    }
}

dependencies {

    compile ('org.axonframework:axon-spring-boot-starter:4.1.1'){
        exclude group: 'org.axonframework', module: 'axon-server-connector'
    }

    compile group: 'com.testproj', name: 'shared-secrets-implementation', version: '2.0.404'

    compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.9.2'
    compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.10.0'
    compile group: 'org.postgresql', name: 'postgresql', version: '42.5.0'
    compile('org.springframework.boot:spring-boot-starter-data-jpa:2.2.13.RELEASE')
    compile group: 'org.yaml', name: 'snakeyaml', version: '1.27'
    compile group: 'com.testproj.linkingservice', name: 'dtos', version: '0.2.1'
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: '2.2.13.RELEASE'
    compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-joda', version: '2.9.9'
    compile group: 'com.testproj', name: 'secrets-management-vault-spring', version:'1.5.133'
    compile group: 'com.testproj', name: 'secrets-management-simple', version: '1.5.133'
    compile group: 'com.testproj', name: 'secrets-management-tls-common', version: '1.5.133'
    compile group: 'com.testproj', name: 'spring-pcp-monitoring', version: '0.3.3'
    compile group: 'net.bull.javamelody', name: 'javamelody-spring-boot-starter', version: '1.79.0'
    compile group: 'com.testproj', name: 'testapp-private-api-client-common', version: '0.884'
    compile group: 'org.apache.httpcomponents', name:'httpclient', version: '4.5.13'
    compile group: 'com.testproj', name: 'trusted-api-client', version: '1.1.57'
    compile group: 'org.jolokia', name: 'jolokia-core', version: '1.6.1'
    compile group: 'org.jolokia', name: 'jolokia-spring', version: '1.6.1'
    compile group: 'org.springframework', name: 'spring-core', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-web', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-webmvc', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-context', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-context-support', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-expression', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-beans', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-aop', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-test', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-jcl', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-orm', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-jdbc', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-aspects', version: '5.3.24'

    implementation('org.springframework.boot:spring-boot-starter-web')
    implementation 'org.springframework.boot:spring-boot-starter-security'
    compile group: 'org.projectlombok', name: 'lombok', version: '1.18.6'
    annotationProcessor 'org.projectlombok:lombok:1.18.6'

    compile group: 'com.mikesamuel', name: 'json-sanitizer', version: '1.2.2'
    compile group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.4.19'
    compile group: 'com.google.guava', name: 'guava', version: '30.0-jre'
    compile group: 'org.reflections', name: 'reflections', version: '0.9.11'
    compile group: 'org.apache.logging.log4j', name: 'log4j-to-slf4j', version: '2.17.1'
    compile group: 'org.apache.commons', name: 'commons-configuration2', version: '2.8.0'
    compile group: 'commons-beanutils', name: 'commons-beanutils', version: '1.9.4'
    compile group: 'org.dom4j', name: 'dom4j', version: '2.1.3'
    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.1'
    compile group: 'org.apache.tomcat.embed', name: 'tomcat-embed-websocket', version: '9.0.55'
    compile group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: '9.0.55'
    compile group: 'org.apache.tomcat', name: 'tomcat-annotations-api', version: '9.0.55'
    compile group: 'org.apache.tomcat.embed', name: 'tomcat-embed-el', version: '9.0.55'
    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.17.1'
    compile group: 'org.apache.logging.log4j', name: 'log4j-1.2-api', version: '2.17.1'

    compile group: 'org.springframework.security', name: 'spring-security-config', version: '5.7.5'
    compile group: 'org.springframework.security', name: 'spring-security-core', version: '5.7.5'
    compile group: 'org.springframework.security', name: 'spring-security-test', version: '5.7.5'
    compile group: 'org.springframework.security', name: 'spring-security-web', version: '5.7.5'
    compile group: 'org.springframework.security', name: 'spring-security-crypto', version: '5.7.5'

    implementation group: 'org.springframework', name: 'spring-tx', version: '5.3.24'
    implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.2.9'

    compile group: 'io.pcp.parfait', name: 'dxm', version: '0.5.1'
    compile group: 'io.pcp.parfait', name: 'parfait-core', version: '0.5.1'
    compile group: 'io.pcp.parfait', name: 'parfait-jdbc', version: '0.5.1'
    compile group: 'io.pcp.parfait', name: 'parfait-jmx', version: '0.5.1'
    compile group: 'io.pcp.parfait', name: 'parfait-pcp', version: '0.5.1'

    runtime('com.h2database:h2:2.0.206')
    runtime('com.testproj:testapp-contracts:+') {
        exclude group: 'org.apache.logging.log4j', module: 'log4j-core'
        exclude group: 'org.apache.logging.log4j', module: 'log4j-1.2-api'
    }
    runtime group: 'com.testproj.linkingservice', name: 'linking-service-contract', version: '+', changing: true

    testCompile group: 'org.axonframework', name: 'axon-test', version: '4.1.1'
    implementation group: 'net.minidev', name: 'json-smart', version: '2.4.8'
    testImplementation('org.junit.jupiter:junit-jupiter-api:5.3.1')
    testCompile('org.junit.jupiter:junit-jupiter-params:5.3.1')
    testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine:5.3.1')
    testImplementation 'org.mockito:mockito-core:2.13.0'
    // https://mvnrepository.com/artifact/com.h2database/h2
    testImplementation group: 'com.h2database', name: 'h2', version: '2.0.206'
    testCompile('org.mockito:mockito-junit-jupiter:2.18.3')
    testImplementation('org.springframework.boot:spring-boot-starter-test') {
        exclude group: 'junit', module: 'junit'
        exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
    }
    testImplementation 'org.springframework.security:spring-security-test'
    configurations {
        implementation {
            exclude group: 'com.google.j2objc', module:'j2objc-annotations'
            exclude group: 'com.google.code.findbugs', module:'jsr305'
            exclude group: 'com.google.errorprone', module:'error_prone_annotations'
            exclude group: 'org.checkerframework', module:'checker-qual'
            exclude group: 'org.codehaus.mojo', module:'animal-sniffer-annotations'
        }
    }
}

sonarqube {
    properties {
        property "sonar.host.url", "http://build.engr.doc:9000/sonar"
    }
}

dependencyCheck {
    format = 'ALL'
    suppressionFile = "${rootDir}/owasp/suppressions.xml"
    failBuildOnCVSS = 0
}

task gruntStage(type: Exec) {
    println 'Task :gruntStage: Executing build.sh to build ui(webapp-src).'
    commandLine 'sh', './build.sh'

}

task buildui(type: Copy) {
    dependsOn gruntStage
    println 'Task :buildui: Copying static resources to public'
    from('webapp-src/stage/rsrc')
    into('src/main/resources/public')

}

springBoot {
    buildInfo {
        properties {
            additional = [
                    'srcVersion' : "${  buildInformation.tag}"
            ]
        }
    }
}

processResources.dependsOn buildui
</code>```

Below is the dependency tree info for Spring-webmvc dependency.

```<code>gradle -q dependencies | grep spring-webmvc
|    +--- org.springframework:spring-webmvc:4.3.11.RELEASE -> 5.2.12.RELEASE
|    \--- org.springframework:spring-webmvc:5.2.12.RELEASE
|    +--- org.springframework:spring-webmvc:4.3.11.RELEASE -> 5.3.24
|    \--- org.springframework:spring-webmvc:5.2.12.RELEASE -> 5.3.24 (*)
+--- org.springframework:spring-webmvc:5.3.24 (*)
|    +--- org.springframework:spring-webmvc:4.3.11.RELEASE -> 5.3.24
+--- org.springframework:spring-webmvc:5.3.24 (*)
|    +--- org.springframework:spring-webmvc:4.3.11.RELEASE -> 5.3.24
|    \--- org.springframework:spring-webmvc:5.2.12.RELEASE -> 5.3.24 (*)
+--- org.springframework:spring-webmvc:5.3.24 (*)
|    +--- org.springframework:spring-webmvc:4.3.11.RELEASE -> 5.2.12.RELEASE
|    \--- org.springframework:spring-webmvc:5.2.12.RELEASE
|    +--- org.springframework:spring-webmvc:4.3.11.RELEASE -> 5.3.24
+--- org.springframework:spring-webmvc:5.3.24 (*)
|    +--- org.springframework:spring-webmvc:4.3.11.RELEASE -> 5.3.24
|    \--- org.springframework:spring-webmvc:5.2.12.RELEASE -> 5.3.24 (*)
+--- org.springframework:spring-webmvc:5.3.24 (*)
</code>```

Body:
I am trying to upgrade Spring dependency jars without upgrading the Spring Boot version in my project to fix some of CVE's reported.

So i am trying to upgrade the Spring dependencies to v5.3.24 . While the build seems to be fine, when i run the application, Spring Boot fails with below error.

I know i could only adjust Spring dependencie's version, but not spring boot. Appreciate any help to fix this.

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration.resourceHandlerMapping(WebMvcAutoConfiguration.java:377)

The following method did not exist:

    org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration.resourceHandlerMapping(Lorg/springframework/web/util/UrlPathHelper;Lorg/springframework/util/PathMatcher;Lorg/springframework/web/accept/ContentNegotiationManager;Lorg/springframework/format/support/FormattingConversionService;Lorg/springframework/web/servlet/resource/ResourceUrlProvider;)Lorg/springframework/web/servlet/HandlerMapping;

The method's class, org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration, is available from the following locations:

    jar:file:/Users/fazshaik/.gradle/caches/modules-2/files-2.1/org.springframework/spring-webmvc/5.3.24/33d2187c2bf1cb2c222bd1cc18b618736babcf3d/spring-webmvc-5.3.24.jar!/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class

It was loaded from the following location:

    file:/Users/fazshaik/.gradle/caches/modules-2/files-2.1/org.springframework/spring-webmvc/5.3.24/33d2187c2bf1cb2c222bd1cc18b618736babcf3d/spring-webmvc-5.3.24.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration

Below is my build.gradle file.

buildscript {
    ext {
        springBootVersion = '2.2.13.RELEASE'
        junitVersion = "5.3.1"
        axonVersion='4.1'
    }
    repositories {
        mavenCentral()
        mavenLocal()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2"
        classpath "org.junit.platform:junit-platform-gradle-plugin:1.2.0"
        classpath "org.owasp:dependency-check-gradle:$owaspVersion"
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.sonarqube'
apply plugin: 'org.junit.platform.gradle.plugin'
apply plugin: "org.owasp.dependencycheck"

apply from: "${rootDir}/build-support/packaging.gradle"
apply from: "${rootDir}/contracts/build.gradle"

group = 'com.testproj.relateditems'
sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
    mavenCentral()
    mavenLocal()
    maven {
        name "testprojdoc-public"
        url "https://artifacthub-phx.oci.mytesthostcorp.com/testprojdoc-public"
    }
}

dependencies {

    compile ('org.axonframework:axon-spring-boot-starter:4.1.1'){
        exclude group: 'org.axonframework', module: 'axon-server-connector'
    }

    compile group: 'com.testproj', name: 'shared-secrets-implementation', version: '2.0.404'

    compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.9.2'
    compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.10.0'
    compile group: 'org.postgresql', name: 'postgresql', version: '42.5.0'
    compile('org.springframework.boot:spring-boot-starter-data-jpa:2.2.13.RELEASE')
    compile group: 'org.yaml', name: 'snakeyaml', version: '1.27'
    compile group: 'com.testproj.linkingservice', name: 'dtos', version: '0.2.1'
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: '2.2.13.RELEASE'
    compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-joda', version: '2.9.9'
    compile group: 'com.testproj', name: 'secrets-management-vault-spring', version:'1.5.133'
    compile group: 'com.testproj', name: 'secrets-management-simple', version: '1.5.133'
    compile group: 'com.testproj', name: 'secrets-management-tls-common', version: '1.5.133'
    compile group: 'com.testproj', name: 'spring-pcp-monitoring', version: '0.3.3'
    compile group: 'net.bull.javamelody', name: 'javamelody-spring-boot-starter', version: '1.79.0'
    compile group: 'com.testproj', name: 'testapp-private-api-client-common', version: '0.884'
    compile group: 'org.apache.httpcomponents', name:'httpclient', version: '4.5.13'
    compile group: 'com.testproj', name: 'trusted-api-client', version: '1.1.57'
    compile group: 'org.jolokia', name: 'jolokia-core', version: '1.6.1'
    compile group: 'org.jolokia', name: 'jolokia-spring', version: '1.6.1'
    compile group: 'org.springframework', name: 'spring-core', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-web', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-webmvc', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-context', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-context-support', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-expression', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-beans', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-aop', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-test', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-jcl', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-orm', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-jdbc', version: '5.3.24'
    runtime group: 'org.springframework', name: 'spring-aspects', version: '5.3.24'

    implementation('org.springframework.boot:spring-boot-starter-web')
    implementation 'org.springframework.boot:spring-boot-starter-security'
    compile group: 'org.projectlombok', name: 'lombok', version: '1.18.6'
    annotationProcessor 'org.projectlombok:lombok:1.18.6'

    compile group: 'com.mikesamuel', name: 'json-sanitizer', version: '1.2.2'
    compile group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.4.19'
    compile group: 'com.google.guava', name: 'guava', version: '30.0-jre'
    compile group: 'org.reflections', name: 'reflections', version: '0.9.11'
    compile group: 'org.apache.logging.log4j', name: 'log4j-to-slf4j', version: '2.17.1'
    compile group: 'org.apache.commons', name: 'commons-configuration2', version: '2.8.0'
    compile group: 'commons-beanutils', name: 'commons-beanutils', version: '1.9.4'
    compile group: 'org.dom4j', name: 'dom4j', version: '2.1.3'
    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.1'
    compile group: 'org.apache.tomcat.embed', name: 'tomcat-embed-websocket', version: '9.0.55'
    compile group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: '9.0.55'
    compile group: 'org.apache.tomcat', name: 'tomcat-annotations-api', version: '9.0.55'
    compile group: 'org.apache.tomcat.embed', name: 'tomcat-embed-el', version: '9.0.55'
    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.17.1'
    compile group: 'org.apache.logging.log4j', name: 'log4j-1.2-api', version: '2.17.1'

    compile group: 'org.springframework.security', name: 'spring-security-config', version: '5.7.5'
    compile group: 'org.springframework.security', name: 'spring-security-core', version: '5.7.5'
    compile group: 'org.springframework.security', name: 'spring-security-test', version: '5.7.5'
    compile group: 'org.springframework.security', name: 'spring-security-web', version: '5.7.5'
    compile group: 'org.springframework.security', name: 'spring-security-crypto', version: '5.7.5'

    implementation group: 'org.springframework', name: 'spring-tx', version: '5.3.24'
    implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.2.9'

    compile group: 'io.pcp.parfait', name: 'dxm', version: '0.5.1'
    compile group: 'io.pcp.parfait', name: 'parfait-core', version: '0.5.1'
    compile group: 'io.pcp.parfait', name: 'parfait-jdbc', version: '0.5.1'
    compile group: 'io.pcp.parfait', name: 'parfait-jmx', version: '0.5.1'
    compile group: 'io.pcp.parfait', name: 'parfait-pcp', version: '0.5.1'

    runtime('com.h2database:h2:2.0.206')
    runtime('com.testproj:testapp-contracts:+') {
        exclude group: 'org.apache.logging.log4j', module: 'log4j-core'
        exclude group: 'org.apache.logging.log4j', module: 'log4j-1.2-api'
    }
    runtime group: 'com.testproj.linkingservice', name: 'linking-service-contract', version: '+', changing: true

    testCompile group: 'org.axonframework', name: 'axon-test', version: '4.1.1'
    implementation group: 'net.minidev', name: 'json-smart', version: '2.4.8'
    testImplementation('org.junit.jupiter:junit-jupiter-api:5.3.1')
    testCompile('org.junit.jupiter:junit-jupiter-params:5.3.1')
    testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine:5.3.1')
    testImplementation 'org.mockito:mockito-core:2.13.0'
    // https://mvnrepository.com/artifact/com.h2database/h2
    testImplementation group: 'com.h2database', name: 'h2', version: '2.0.206'
    testCompile('org.mockito:mockito-junit-jupiter:2.18.3')
    testImplementation('org.springframework.boot:spring-boot-starter-test') {
        exclude group: 'junit', module: 'junit'
        exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
    }
    testImplementation 'org.springframework.security:spring-security-test'
    configurations {
        implementation {
            exclude group: 'com.google.j2objc', module:'j2objc-annotations'
            exclude group: 'com.google.code.findbugs', module:'jsr305'
            exclude group: 'com.google.errorprone', module:'error_prone_annotations'
            exclude group: 'org.checkerframework', module:'checker-qual'
            exclude group: 'org.codehaus.mojo', module:'animal-sniffer-annotations'
        }
    }
}

sonarqube {
    properties {
        property "sonar.host.url", "http://build.engr.doc:9000/sonar"
    }
}

dependencyCheck {
    format = 'ALL'
    suppressionFile = "${rootDir}/owasp/suppressions.xml"
    failBuildOnCVSS = 0
}

task gruntStage(type: Exec) {
    println 'Task :gruntStage: Executing build.sh to build ui(webapp-src).'
    commandLine 'sh', './build.sh'

}

task buildui(type: Copy) {
    dependsOn gruntStage
    println 'Task :buildui: Copying static resources to public'
    from('webapp-src/stage/rsrc')
    into('src/main/resources/public')

}

springBoot {
    buildInfo {
        properties {
            additional = [
                    'srcVersion' : "${  buildInformation.tag}"
            ]
        }
    }
}

processResources.dependsOn buildui

Below is the dependency tree info for Spring-webmvc dependency.

gradle -q dependencies | grep spring-webmvc
|    +--- org.springframework:spring-webmvc:4.3.11.RELEASE -> 5.2.12.RELEASE
|    \--- org.springframework:spring-webmvc:5.2.12.RELEASE
|    +--- org.springframework:spring-webmvc:4.3.11.RELEASE -> 5.3.24
|    \--- org.springframework:spring-webmvc:5.2.12.RELEASE -> 5.3.24 (*)
+--- org.springframework:spring-webmvc:5.3.24 (*)
|    +--- org.springframework:spring-webmvc:4.3.11.RELEASE -> 5.3.24
+--- org.springframework:spring-webmvc:5.3.24 (*)
|    +--- org.springframework:spring-webmvc:4.3.11.RELEASE -> 5.3.24
|    \--- org.springframework:spring-webmvc:5.2.12.RELEASE -> 5.3.24 (*)
+--- org.springframework:spring-webmvc:5.3.24 (*)
|    +--- org.springframework:spring-webmvc:4.3.11.RELEASE -> 5.2.12.RELEASE
|    \--- org.springframework:spring-webmvc:5.2.12.RELEASE
|    +--- org.springframework:spring-webmvc:4.3.11.RELEASE -> 5.3.24
+--- org.springframework:spring-webmvc:5.3.24 (*)
|    +--- org.springframework:spring-webmvc:4.3.11.RELEASE -> 5.3.24
|    \--- org.springframework:spring-webmvc:5.2.12.RELEASE -> 5.3.24 (*)
+--- org.springframework:spring-webmvc:5.3.24 (*)


来源: stackexchange

问:
this erorr in release version only how fixed this in flutter?
Unhandled Exception: SocketException: Failed to create server socket (OS Error: Operation not permitted, errno = 1),

```<code>    var server = await HttpServer.bind(InternetAddress.loopbackIPv4, 2022);

</code>```

error in this line but work in all version except release

ContentLicense: CC BY-SA 4.0

Body:
Unhandled Exception: SocketException: Failed to create server socket (OS Error: Operation not permitted, errno = 1),

    var server = await HttpServer.bind(InternetAddress.loopbackIPv4, 2022);

error in this line but work in all version except release


问:
How would I filter an Ant Design table date by a field that is not a column
I am listing some data in a table and a field represents the Enabled status. I want to filter the record by this status using a select box outside the table but at the same time not show the status in a column.
How would I do this without actually filtering the fetched data in a state?

I tried using the filtered property on a column but the ant design example has the buttons inside the table and it's not that easy to get to them if you don't know the layout.


问:
Updating a list of dictionaries inside a loop
I find that when I attempt to update values in a dictionary for items from another list, then only the last item in that last will be used to update the value. For example:

```<code>a=[{'a':1},{'a':2},{'a':3},{'a':4},{'a':5}]
b=[9, 8, 7, 6, 5]
changed = []
for items in a:
    for values in b:
        items.update({'a':values})
        changed.append(items)
print(changed)
</code>```
```<code>[{'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}]
</code>```

I expected each value to replace each value in place of those in the dictionary.

Body:
I find that when I attempt to update values in a dictionary for items from another list, then only the last item in that last will be used to update the value. For example:

a=[{'a':1},{'a':2},{'a':3},{'a':4},{'a':5}]
b=[9, 8, 7, 6, 5]
changed = []
for items in a:
    for values in b:
        items.update({'a':values})
        changed.append(items)
print(changed)

[{'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}, {'a': 5}]

I expected each value to replace each value in place of those in the dictionary.


问:
Can't read table from a pdf file using matplotlib.pyplot - Python
I have a python script which is called from a loop via ansible. The idea is to create a table (in the first iteration) using matplotlib library and modify the same table at each iteration.
I want to modify the same table at each loop, so at the first loop creation_of_table is true, after the first iteration, creation_of_table is set to false. When creation_of_table is set to False, I don't know how to read the created table in a pdf from the first loop, so I can always modify the same table. Can someone help me with this . I would really appreciate it

I have the script.py that looks like this :

`

```<code># -*- coding: utf-8 -*-
import sys
import matplotlib.pyplot as plt

val1 = ["ABC", "DEC", "IFG", "HTI", "CBF", "JSF", "FHYU", "FJu", "JSF", "JSF", "JSF", "JSF", "SMQ1", "SMQ2", "JSF", "JSF", "SMU", "PYTHON", "JAVA", "TDS", "JFSF", "F", "HUN", "R"]
val2 = ["ROOM", "OIT", "", "", "", "", "", "", "", "", "", "","", "", "", "", "", "", "", "", "", "", "", ""]
val3 = [["" for c in range(24)] for r in range(24)]

def cration_tableau():
    creation_of_table = True
    fig, ax = plt.subplots()
    ax.set_axis_off()
    table = ax.table(
        cellText = val3,
        rowLabels = val2,
        colLabels = val1,
        rowColours = ["palegreen"] * 24,
        colColours = ["palegreen"] * 24,
        cellColours = [["grey"] * 24] * 24,
        cellLoc ='center',
        loc ='upper left')
    ax.set_title('TBAL', fontweight ="bold")
    return table

def color_table(table, color, number_cell):
    number_cell = int(number_cell)
    table[(number_cell, 14)].set_facecolor(color)

def pdf_conversion():
    plt.show()
    plt.savefig('test.pdf')

def main(color, number_cell, creation_of_table):
    if creation_of_table is True:
        table = cration_tableau()
    else:
       #Don't know how to read the created pdf

    color_table(table, color, number_cell)
    pdf_conversion()

if __name__ == '__main__':
    color = sys.argv[1]
    number_cell = sys.argv[2]
    creation_of_table = sys.argv[3]
    main(color, number_cell, creation_of_table)

</code>```

`

The ansible task that is called within a loop:

```<code>- name: Execution of the script
   ansible.builtin.command: python3.6 script.py "black" "{{ number_cell }}" "{{ creation_of_table }}"
</code>```

Body:
I have a python script which is called from a loop via ansible. The idea is to create a table (in the first iteration) using matplotlib library and modify the same table at each iteration.
I want to modify the same table at each loop, so at the first loop creation_of_table is true, after the first iteration, creation_of_table is set to false. When creation_of_table is set to False, I don't know how to read the created table in a pdf from the first loop, so I can always modify the same table. Can someone help me with this . I would really appreciate it

I have the script.py that looks like this :

`

# -*- coding: utf-8 -*-
import sys
import matplotlib.pyplot as plt

val1 = ["ABC", "DEC", "IFG", "HTI", "CBF", "JSF", "FHYU", "FJu", "JSF", "JSF", "JSF", "JSF", "SMQ1", "SMQ2", "JSF", "JSF", "SMU", "PYTHON", "JAVA", "TDS", "JFSF", "F", "HUN", "R"]
val2 = ["ROOM", "OIT", "", "", "", "", "", "", "", "", "", "","", "", "", "", "", "", "", "", "", "", "", ""]
val3 = [["" for c in range(24)] for r in range(24)]

def cration_tableau():
    creation_of_table = True
    fig, ax = plt.subplots()
    ax.set_axis_off()
    table = ax.table(
        cellText = val3,
        rowLabels = val2,
        colLabels = val1,
        rowColours = ["palegreen"] * 24,
        colColours = ["palegreen"] * 24,
        cellColours = [["grey"] * 24] * 24,
        cellLoc ='center',
        loc ='upper left')
    ax.set_title('TBAL', fontweight ="bold")
    return table

def color_table(table, color, number_cell):
    number_cell = int(number_cell)
    table[(number_cell, 14)].set_facecolor(color)

def pdf_conversion():
    plt.show()
    plt.savefig('test.pdf')

def main(color, number_cell, creation_of_table):
    if creation_of_table is True:
        table = cration_tableau()
    else:
       #Don't know how to read the created pdf

    color_table(table, color, number_cell)
    pdf_conversion()

if __name__ == '__main__':
    color = sys.argv[1]
    number_cell = sys.argv[2]
    creation_of_table = sys.argv[3]
    main(color, number_cell, creation_of_table)

`

The ansible task that is called within a loop:

- name: Execution of the script
   ansible.builtin.command: python3.6 script.py "black" "{{ number_cell }}" "{{ creation_of_table }}"


问:
SpringMvc No converter fo * with persent Content-Type 'null'
I tried to write an SSM project, but when I used the Controller to return my custom object, it gave me a No converter for [class cn.pickle.entiry.Student] with preset Content-Type 'null']

error message

```<code>19-Dec-2022 17:43:13.011 警告 [http-nio-8080-exec-6] org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.logException Resolved [org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class cn.pickle.entiry.Student] with preset Content-Type 'null']
</code>```

returned object

@Getter
@Setter
public class Student {
    private int age;
    private String name;
}
```
<p>mycontroller</p>
<pre class="lang-java prettyprint-override"><code>
@RestController
@RequestMapping(value = "/demo")
public class demo {
    @GetMapping(value = "/demo2",produces = {MediaType.APPLICATION_JSON_VALUE})
    public Student demo2(){
        final Student student = new Student();
        student.setAge(11);
        student.setName("pickle");
        return student;
    }
}
</code>```

partial pom.xml

<dependencies>
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.18.24</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>5.3.20</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>5.3.20</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>5.3.20</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>5.3.20</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.14.0</version>
    </dependency>
</dependencies>
```
<p>I use</p>
```<mvc:annotation-driven/>
```
<p>in springmvc-config.xml, but it doesn't work;</p>
```How can I return the Object directly from the controller
```

Body:
I tried to write an SSM project, but when I used the Controller to return my custom object, it gave me a No converter for [class cn.pickle.entiry.Student] with preset Content-Type 'null']

error message

19-Dec-2022 17:43:13.011 警告 [http-nio-8080-exec-6] org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.logException Resolved [org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class cn.pickle.entiry.Student] with preset Content-Type 'null']

returned object

@Getter
@Setter
public class Student {
    private int age;
    private String name;
}

mycontroller

@RestController
@RequestMapping(value = "/demo")
public class demo {
    @GetMapping(value = "/demo2",produces = {MediaType.APPLICATION_JSON_VALUE})
    public Student demo2(){
        final Student student = new Student();
        student.setAge(11);
        student.setName("pickle");
        return student;
    }
}

partial pom.xml

<dependencies>
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.18.24</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>5.3.20</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>5.3.20</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>5.3.20</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>5.3.20</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.14.0</version>
    </dependency>
</dependencies>

I use

<mvc:annotation-driven/>

in springmvc-config.xml, but it doesn't work;

How can I return the Object directly from the controller


问:
How to create dummy based on elements of a list created with str_split()?
I am fairly new to R and don't really know how to deal with lists. It is also my first question posted on this forum, so apologies if something is not clear or if I am not providing the right elements. I am working with survey data on Survey CTO, so I have several select_multiple questions that are in the form of characters with several numbers inside, and I am using str_split to separate those numbers a list.

I am creating a dataframe containing b8 which represents my variable in the raw form, and then b8_split is the transformation in a list.

```<code>b8 <- c("", "2","2 3 4", "4 5 16", "8", "10 9", "<NA>")
b8 <- data.frame(b8)

b8 <- b8 %>% mutate(b8_split = str_split(b8, " "))
</code>```

b8_split now contains either single elements or more than one character elements (which I think are appearing in vector form as c("2", "3", "4) for example for the second row. I would like to create a dummy variable based on the values of b8_split, for example dummy =1 if any element of the list b8_splits contains 2 and 4, dummy=0 if the list contains any other number and dummy=NA if the list is empty ("") or NA ("").

I have been trying for like one hour, trying to use the function map (see below), but without success.

```<code>b8 <- b8 %>%  mutate(b8_infra = ifelse(map(b8_split,  ~ .x[.x %in% c("2","4")]),T,F))
</code>```

Any help will be really appreciated!!

I have been trying for like one hour, trying to use the function map (see below), but without success - I keep getting a dummy variable with only NAs...

```<code>b8 <- b8 %>%  mutate(b8_infra = ifelse(map(b8_split,  ~ .x[.x %in% c("2","4")]),T,F))
</code>```

Any help will be really appreciated!!

Body:
I am fairly new to R and don't really know how to deal with lists. It is also my first question posted on this forum, so apologies if something is not clear or if I am not providing the right elements. I am working with survey data on Survey CTO, so I have several select_multiple questions that are in the form of characters with several numbers inside, and I am using str_split to separate those numbers a list.

I am creating a dataframe containing b8 which represents my variable in the raw form, and then b8_split is the transformation in a list.

b8 <- c("", "2","2 3 4", "4 5 16", "8", "10 9", "<NA>")
b8 <- data.frame(b8)

b8 <- b8 %>% mutate(b8_split = str_split(b8, " "))

b8_split now contains either single elements or more than one character elements (which I think are appearing in vector form as c("2", "3", "4) for example for the second row. I would like to create a dummy variable based on the values of b8_split, for example dummy =1 if any element of the list b8_splits contains 2 and 4, dummy=0 if the list contains any other number and dummy=NA if the list is empty ("") or NA ("").

I have been trying for like one hour, trying to use the function map (see below), but without success.

b8 <- b8 %>%  mutate(b8_infra = ifelse(map(b8_split,  ~ .x[.x %in% c("2","4")]),T,F))

Any help will be really appreciated!!

I have been trying for like one hour, trying to use the function map (see below), but without success - I keep getting a dummy variable with only NAs...

b8 <- b8 %>%  mutate(b8_infra = ifelse(map(b8_split,  ~ .x[.x %in% c("2","4")]),T,F))

Any help will be really appreciated!!


问:
Is countDocuments() speed in DocumentDB depends on document size?
I found that countDocuments() take different time in different copy of the same db. The case is next:

counts documents same (about 70k)

structure documents the same

instance the same 4vcpu і 32 ram.

Slower db stats:

Faster db stats:

As you can see slower db has bigger "avgObjSize" more than 10 times. And "countDocuments({filter})" with the same filter runs 10 times longer.

Еhere is some dependence on the  avgObjSize(storageSize) and counting documents? Or how I can speed up counting?


问:
Leak Canary SemClipboardManager - android
My device is samsung VERSION.SDK_INT: 24 and get me bellow leak, How can I resolve this?

```<code>GC Root: Global variable in native code
com.samsung.android.content.clipboard.SemClipboardManager$2 instance
Leaking: UNKNOWN
Retaining 208.0 kB in 4362 objects
Anonymous subclass of android.sec.clipboard.IClipboardDataPasteEvent$Stub↓ SemClipboardManager$2.this$0

com.samsung.android.content.clipboard.SemClipboardManager instance
Leaking: UNKNOWN
Retaining 207.9 kB in 4361 objects
mContext instance of languageteaching.presentation.ui.activities.login_activity.LoginActivity with mDestroyed = true
↓ SemClipboardManager.mContext

languageteaching.presentation.ui.activities.login_activity.LoginActivity instance
   Leaking: YES (ObjectWatcher was watching this because languageteaching.presentation.ui.activities.
   login_activity.LoginActivity received Activity#onDestroy() callback and Activity#mDestroyed is true)
   Retaining 206.4 kB in 4317 objects
   key = 5590d23e-1734-44c9-b110-0e5aad313ce8
   watchDurationMillis = 21515
   retainedDurationMillis = 16508
   mApplication instance of languageteaching.presentation.App
   mBase instance of androidx.appcompat.view.ContextThemeWrapper

METADATA
Build.VERSION.SDK_INT: 24
Build.MANUFACTURER: samsung
LeakCanary version: 2.10
App process name: languageteaching
Class count: 8088
Instance count: 128060
Primitive array count: 92866
Object array count: 17064
Thread count: 31
Heap total bytes: 40483905
Bitmap count: 101
Bitmap total bytes: 3232
Large bitmap count: 0
Large bitmap total bytes: 0
Db 1: open /data/user/0/languageteaching/no_backup/androidx.work.workdb
Stats: LruCache[maxSize=3000,hits=29404,misses=77780,hitRate=27%]
RandomAccess[bytes=4305061,reads=77780,travel=19803435655,range=19034452,size=47397431]
Analysis duration: 9860 ms
</code>```

And here is my source code:

```<code>@BuildCompat.PrereleaseSdkCheck
@AndroidEntryPoint
class LoginActivity : AppCompatActivity() {

    @Inject
    lateinit var networkAvailable: NetworkAvailable

    @Inject
    lateinit var getLoginUseCase: GetLoginUseCase

    @Inject
    lateinit var dataStoreUseCases: DataStoreUseCases

    private lateinit var binding: ActivityLoginBinding
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityLoginBinding.inflate(layoutInflater)
        setContentView(binding.root)
Glide.with(this@LoginActivity).load(R.drawable.back_ground).fitCenter()
            .into(binding.imgBackgroundLogin)
        binding.btnSignIn.setOnClickListener {

            if (binding.edtEMail.text.isNullOrBlank() || binding.edtEMail.text.isNullOrEmpty()) {
                binding.txtInputUserName.error = getString(R.string.error_user_name)
                if (!binding.edtPasswords.text.isNullOrBlank() && !binding.edtPasswords.text.isNullOrEmpty()) {
                    binding.txtInputPassword.error = null
                }
            } else if (binding.edtPasswords.text.isNullOrBlank() || binding.edtPasswords.text.isNullOrEmpty()) {
                binding.txtInputPassword.error = getString(R.string.error_user_password)
                if (!binding.edtEMail.text.isNullOrBlank() && !binding.edtEMail.text.isNullOrEmpty()) {
                    binding.txtInputUserName.error = null
                }
            } else if (
                !binding.edtEMail.text.isNullOrBlank() &&
                !binding.edtEMail.text.isNullOrEmpty() &&
                !binding.edtPasswords.text.isNullOrBlank() &&
                !binding.edtPasswords.text.isNullOrEmpty()
            ) {
                hideBtnSignIn()
                callAPI(binding.edtEMail.text.toString(), binding.edtPasswords.text.toString())
            }
        }
    }

    private fun callAPI(userName: String, password: String) {
        val factory = object : ViewModelProvider.Factory {
            override fun <T : ViewModel> create(modelClass: Class<T>): T {
                @Suppress("UNCHECKED_CAST")
                return LoginViewModel(
                    networkAvailable,
                    application,
                    getLoginUseCase,
                    dataStoreUseCases
                ) as T
            }
        }

        val loginViewModel =
            ViewModelProvider(this@LoginActivity, factory)[LoginViewModel::class.java]
        val responseLiveData = loginViewModel.loginValues(userName, password)
        responseLiveData.observe(this@LoginActivity, Observer {
            when (it) {
                is Resource.Success -> {
                    it.data?.let { dta ->
                        disableBtnSignIn()
                        lifecycleScope.launch {
                            loginViewModel.saveTokensLogged(
                                TokensDataStore(
                                    dta.token!!,
                                    dta.privatetoken!!
                                )
                            )

                        }
                        val responseLiveDataUserId =
                            loginViewModel.loginGetUserid(dta.token ?: "NULL", userName)
                        callLoginUserId(responseLiveDataUserId, loginViewModel)
                    }
                }
                is Resource.Error -> {
                    hideProgressBar()
                    showBtnSignIn()
                    it.message?.let { dtb ->
                        when (dtb) {
                            getString(R.string.invalid_login) -> {
                                Toast.makeText(
                                    this@LoginActivity,
                                    R.string.error_user_pass,
                                    Toast.LENGTH_LONG
                                )
                                    .show()
                            }
                            getString(R.string.service_not_available) -> {
                                Toast.makeText(
                                    this@LoginActivity,
                                    R.string.error_service_not_available,
                                    Toast.LENGTH_LONG
                                )
                                    .show()
                            }
                            else -> {
                                Toast.makeText(this@LoginActivity, dtb, Toast.LENGTH_LONG)
                                    .show()
                            }
                        }
                    }
                }
                is Resource.Loading -> {
                    hideBtnSignIn()
                    showProgressBar()
                }

            }
        })
    }

    private fun callLoginUserId(
        responseLiveDataUserId: LiveData<Resource<ArrayList<LoginGetUserIdEntityItem>>>,
        loginViewModel: LoginViewModel
    ) {
        responseLiveDataUserId.observe(this@LoginActivity, Observer {
            when (it) {
                is Resource.Success -> {
                    hideProgressBar()
                    showBtnSignIn()
                    it.data?.let { dtc ->
                        lifecycleScope.launch {

                            loginViewModel.saveUserId(
                                UserIdDataStore(
                                    dtc[0].id!!
                                )
                            )

                        }
                        val intent = Intent(this@LoginActivity, MainActivity::class.java)
                        startActivity(intent)
                        finish()
                    }
                }
                is Resource.Error -> {
                    hideProgressBar()
                    showBtnSignIn()
                    it.message?.let { dtd ->
                        when (dtd) {
                            getString(R.string.invalid_login) -> {
                                Toast.makeText(
                                    this@LoginActivity,
                                    R.string.error_user_pass,
                                    Toast.LENGTH_LONG
                                )
                                    .show()
                            }
                            getString(R.string.service_not_available) -> {
                                Toast.makeText(
                                    this@LoginActivity,
                                    R.string.error_service_not_available,
                                    Toast.LENGTH_LONG
                                )
                                    .show()
                            }
                            else -> {
                                Toast.makeText(this@LoginActivity, dtd, Toast.LENGTH_LONG)
                                    .show()
                            }
                        }
                    }
                }
                is Resource.Loading -> {
                    hideBtnSignIn()
                    showProgressBar()
                }
            }
        })
    }

    private fun showProgressBar() {
        binding.prLogin.visibility = View.VISIBLE
    }

    private fun hideProgressBar() {
        binding.prLogin.visibility = View.INVISIBLE
    }

    private fun showBtnSignIn() {
        binding.btnSignIn.visibility = View.VISIBLE
    }

    private fun hideBtnSignIn() {
        binding.btnSignIn.visibility = View.INVISIBLE
    }

    private fun disableBtnSignIn() {
        binding.btnSignIn.isEnabled = false
    }

    override fun onDestroy() {
        super.onDestroy()
        try {
            fixInputMethod(this@LoginActivity)
        } catch (e: Exception) {

        }
    }

    private fun fixInputMethod(context: Context?) {
        if (context == null) {
            return
        }
        var inputMethodManager: InputMethodManager? = null
        try {
            inputMethodManager =
                context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
        } catch (th: Throwable) {
            th.printStackTrace()
        }
        if (inputMethodManager == null) {
            return
        }
        val declaredFields = inputMethodManager.javaClass.declaredFields
        for (declaredField in declaredFields) {
            try {
                if (!declaredField.isAccessible) {
                    declaredField.isAccessible = true
                }
                val obj = declaredField.get(inputMethodManager)
                if (obj == null || obj !is View) {
                    continue
                }
                val view: View = obj as View
                if (view.context === context) {
                    declaredField.set(inputMethodManager, null)
                } else {
                    return
                }
            } catch (th: Throwable) {
                th.printStackTrace()
            }
        }
    }
}
</code>```

Body:
My device is samsung VERSION.SDK_INT: 24 and get me bellow leak, How can I resolve this?

GC Root: Global variable in native code
com.samsung.android.content.clipboard.SemClipboardManager$2 instance
Leaking: UNKNOWN
Retaining 208.0 kB in 4362 objects
Anonymous subclass of android.sec.clipboard.IClipboardDataPasteEvent$Stub↓ SemClipboardManager$2.this$0

com.samsung.android.content.clipboard.SemClipboardManager instance
Leaking: UNKNOWN
Retaining 207.9 kB in 4361 objects
mContext instance of languageteaching.presentation.ui.activities.login_activity.LoginActivity with mDestroyed = true
↓ SemClipboardManager.mContext

languageteaching.presentation.ui.activities.login_activity.LoginActivity instance
   Leaking: YES (ObjectWatcher was watching this because languageteaching.presentation.ui.activities.
   login_activity.LoginActivity received Activity#onDestroy() callback and Activity#mDestroyed is true)
   Retaining 206.4 kB in 4317 objects
   key = 5590d23e-1734-44c9-b110-0e5aad313ce8
   watchDurationMillis = 21515
   retainedDurationMillis = 16508
   mApplication instance of languageteaching.presentation.App
   mBase instance of androidx.appcompat.view.ContextThemeWrapper

METADATA
Build.VERSION.SDK_INT: 24
Build.MANUFACTURER: samsung
LeakCanary version: 2.10
App process name: languageteaching
Class count: 8088
Instance count: 128060
Primitive array count: 92866
Object array count: 17064
Thread count: 31
Heap total bytes: 40483905
Bitmap count: 101
Bitmap total bytes: 3232
Large bitmap count: 0
Large bitmap total bytes: 0
Db 1: open /data/user/0/languageteaching/no_backup/androidx.work.workdb
Stats: LruCache[maxSize=3000,hits=29404,misses=77780,hitRate=27%]
RandomAccess[bytes=4305061,reads=77780,travel=19803435655,range=19034452,size=47397431]
Analysis duration: 9860 ms

And here is my source code:

@BuildCompat.PrereleaseSdkCheck
@AndroidEntryPoint
class LoginActivity : AppCompatActivity() {

    @Inject
    lateinit var networkAvailable: NetworkAvailable

    @Inject
    lateinit var getLoginUseCase: GetLoginUseCase

    @Inject
    lateinit var dataStoreUseCases: DataStoreUseCases

    private lateinit var binding: ActivityLoginBinding
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityLoginBinding.inflate(layoutInflater)
        setContentView(binding.root)
Glide.with(this@LoginActivity).load(R.drawable.back_ground).fitCenter()
            .into(binding.imgBackgroundLogin)
        binding.btnSignIn.setOnClickListener {

            if (binding.edtEMail.text.isNullOrBlank() || binding.edtEMail.text.isNullOrEmpty()) {
                binding.txtInputUserName.error = getString(R.string.error_user_name)
                if (!binding.edtPasswords.text.isNullOrBlank() && !binding.edtPasswords.text.isNullOrEmpty()) {
                    binding.txtInputPassword.error = null
                }
            } else if (binding.edtPasswords.text.isNullOrBlank() || binding.edtPasswords.text.isNullOrEmpty()) {
                binding.txtInputPassword.error = getString(R.string.error_user_password)
                if (!binding.edtEMail.text.isNullOrBlank() && !binding.edtEMail.text.isNullOrEmpty()) {
                    binding.txtInputUserName.error = null
                }
            } else if (
                !binding.edtEMail.text.isNullOrBlank() &&
                !binding.edtEMail.text.isNullOrEmpty() &&
                !binding.edtPasswords.text.isNullOrBlank() &&
                !binding.edtPasswords.text.isNullOrEmpty()
            ) {
                hideBtnSignIn()
                callAPI(binding.edtEMail.text.toString(), binding.edtPasswords.text.toString())
            }
        }
    }

    private fun callAPI(userName: String, password: String) {
        val factory = object : ViewModelProvider.Factory {
            override fun <T : ViewModel> create(modelClass: Class<T>): T {
                @Suppress("UNCHECKED_CAST")
                return LoginViewModel(
                    networkAvailable,
                    application,
                    getLoginUseCase,
                    dataStoreUseCases
                ) as T
            }
        }

        val loginViewModel =
            ViewModelProvider(this@LoginActivity, factory)[LoginViewModel::class.java]
        val responseLiveData = loginViewModel.loginValues(userName, password)
        responseLiveData.observe(this@LoginActivity, Observer {
            when (it) {
                is Resource.Success -> {
                    it.data?.let { dta ->
                        disableBtnSignIn()
                        lifecycleScope.launch {
                            loginViewModel.saveTokensLogged(
                                TokensDataStore(
                                    dta.token!!,
                                    dta.privatetoken!!
                                )
                            )

                        }
                        val responseLiveDataUserId =
                            loginViewModel.loginGetUserid(dta.token ?: "NULL", userName)
                        callLoginUserId(responseLiveDataUserId, loginViewModel)
                    }
                }
                is Resource.Error -> {
                    hideProgressBar()
                    showBtnSignIn()
                    it.message?.let { dtb ->
                        when (dtb) {
                            getString(R.string.invalid_login) -> {
                                Toast.makeText(
                                    this@LoginActivity,
                                    R.string.error_user_pass,
                                    Toast.LENGTH_LONG
                                )
                                    .show()
                            }
                            getString(R.string.service_not_available) -> {
                                Toast.makeText(
                                    this@LoginActivity,
                                    R.string.error_service_not_available,
                                    Toast.LENGTH_LONG
                                )
                                    .show()
                            }
                            else -> {
                                Toast.makeText(this@LoginActivity, dtb, Toast.LENGTH_LONG)
                                    .show()
                            }
                        }
                    }
                }
                is Resource.Loading -> {
                    hideBtnSignIn()
                    showProgressBar()
                }

            }
        })
    }

    private fun callLoginUserId(
        responseLiveDataUserId: LiveData<Resource<ArrayList<LoginGetUserIdEntityItem>>>,
        loginViewModel: LoginViewModel
    ) {
        responseLiveDataUserId.observe(this@LoginActivity, Observer {
            when (it) {
                is Resource.Success -> {
                    hideProgressBar()
                    showBtnSignIn()
                    it.data?.let { dtc ->
                        lifecycleScope.launch {

                            loginViewModel.saveUserId(
                                UserIdDataStore(
                                    dtc[0].id!!
                                )
                            )

                        }
                        val intent = Intent(this@LoginActivity, MainActivity::class.java)
                        startActivity(intent)
                        finish()
                    }
                }
                is Resource.Error -> {
                    hideProgressBar()
                    showBtnSignIn()
                    it.message?.let { dtd ->
                        when (dtd) {
                            getString(R.string.invalid_login) -> {
                                Toast.makeText(
                                    this@LoginActivity,
                                    R.string.error_user_pass,
                                    Toast.LENGTH_LONG
                                )
                                    .show()
                            }
                            getString(R.string.service_not_available) -> {
                                Toast.makeText(
                                    this@LoginActivity,
                                    R.string.error_service_not_available,
                                    Toast.LENGTH_LONG
                                )
                                    .show()
                            }
                            else -> {
                                Toast.makeText(this@LoginActivity, dtd, Toast.LENGTH_LONG)
                                    .show()
                            }
                        }
                    }
                }
                is Resource.Loading -> {
                    hideBtnSignIn()
                    showProgressBar()
                }
            }
        })
    }

    private fun showProgressBar() {
        binding.prLogin.visibility = View.VISIBLE
    }

    private fun hideProgressBar() {
        binding.prLogin.visibility = View.INVISIBLE
    }

    private fun showBtnSignIn() {
        binding.btnSignIn.visibility = View.VISIBLE
    }

    private fun hideBtnSignIn() {
        binding.btnSignIn.visibility = View.INVISIBLE
    }

    private fun disableBtnSignIn() {
        binding.btnSignIn.isEnabled = false
    }

    override fun onDestroy() {
        super.onDestroy()
        try {
            fixInputMethod(this@LoginActivity)
        } catch (e: Exception) {

        }
    }

    private fun fixInputMethod(context: Context?) {
        if (context == null) {
            return
        }
        var inputMethodManager: InputMethodManager? = null
        try {
            inputMethodManager =
                context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
        } catch (th: Throwable) {
            th.printStackTrace()
        }
        if (inputMethodManager == null) {
            return
        }
        val declaredFields = inputMethodManager.javaClass.declaredFields
        for (declaredField in declaredFields) {
            try {
                if (!declaredField.isAccessible) {
                    declaredField.isAccessible = true
                }
                val obj = declaredField.get(inputMethodManager)
                if (obj == null || obj !is View) {
                    continue
                }
                val view: View = obj as View
                if (view.context === context) {
                    declaredField.set(inputMethodManager, null)
                } else {
                    return
                }
            } catch (th: Throwable) {
                th.printStackTrace()
            }
        }
    }
}


问:
Checkmarx waring for beforeEach method: Use of Deprecated or Obsolete Functions
I have generated checkmarx report for React application.

Error: Use of Deprecated or Obsolete Functions.

Description:

Method beforeEach in GetPrefix.test.js, calls an obsolete API, CxAssociativeArray_6e1319b2. This has been deprecated, and should not be used in a modern codebase.

Code:

```<code>    beforeEach(() => {
        jest.resetModules() // CLear the cache
        process.env = { ...OLD_ENV } // Make copy of old/empty environment
        delete process.env.NODE_ENV
    })

</code>```

How to resolve this checkmarx issue ?

Body:
I have generated checkmarx report for React application.

Error: Use of Deprecated or Obsolete Functions.

Description:

Method beforeEach in GetPrefix.test.js, calls an obsolete API, CxAssociativeArray_6e1319b2. This has been deprecated, and should not be used in a modern codebase.

Code:

    beforeEach(() => {
        jest.resetModules() // CLear the cache
        process.env = { ...OLD_ENV } // Make copy of old/empty environment
        delete process.env.NODE_ENV
    })

How to resolve this checkmarx issue ?


问:
Parallax, not able to provide the same effect to all the pages
So i've basically tried to create a parallax effect using scrollmagic, and I was able to showcase it in one result but unable to do it on multiple pages, what am I supposed to do get the effect on all the pages.

So like I was able to do the code on one page but when I tried to do the same for the other pages, I was unable to do, when I copy pasted the same code for different pages with different classes, I didn't receive the same output as the first page, what should I do? Would be great if you could provide me with a structure of the code too as an example


问:
UTF-8 same code for two different symbols in Javascript CSV export and Excel
I'm writing a table to CSV that will often include currency symbols. I'm using UTF-8 however whenever I open the file in Excel I get my pound signs displaying as ¬£ rather than just £.

I've checked a decoder and the UTF-8 code for both symbols is the same \xC2\xAC which is where, presumably, the problem lies.

I'm inlcuding the BOM as follows

```<code>let BOM = encoder.encode('\uFEFF')
var csvString = BOM + 'SEP=' + separator + "\n";
</code>```

csvString then get's the data added and I then write it as

```<code>href: 'data:text/csv; charset=utf-8,' + csvString,
</code>```

It's possibly worth noting that the console logs the first line of my csvString as

239,187,191SEP=;

And if I uriEncode it it logs

239%2C187%2C191SEP%3D%3B%0A

Opening the exported file anywhere but Excel manages to format the £ sign correctly - including google sheets. I can even leave off the BOM header. But I want it to be formatted properly for Excel as well. Any insight will be greatly appreciated.

Body:
I'm writing a table to CSV that will often include currency symbols. I'm using UTF-8 however whenever I open the file in Excel I get my pound signs displaying as ¬£ rather than just £.

I've checked a decoder and the UTF-8 code for both symbols is the same \xC2\xAC which is where, presumably, the problem lies.

I'm inlcuding the BOM as follows

let BOM = encoder.encode('\uFEFF')
var csvString = BOM + 'SEP=' + separator + "\n";

csvString then get's the data added and I then write it as

href: 'data:text/csv; charset=utf-8,' + csvString,

It's possibly worth noting that the console logs the first line of my csvString as

239,187,191SEP=;

And if I uriEncode it it logs

239%2C187%2C191SEP%3D%3B%0A

Opening the exported file anywhere but Excel manages to format the £ sign correctly - including google sheets. I can even leave off the BOM header. But I want it to be formatted properly for Excel as well. Any insight will be greatly appreciated.


问:
Css classes are not applying if imported like import ./styles
I have a file in which i imported my css files as

```<code>import ./styles.modules.css
</code>```

my webpack css-loader config looks something like

```<code>      {
    test: /\.css$/,
    use: [
      'style-loader',
      {
        loader: 'css-loader',
        options: {
          modules: {
            localIdentName: '[name]__[local]--[hash:base64:5]',
            localIdentContext: path.resolve(__dirname, 'src'),
          },
        },
      },
    ],
  },
</code>```

I am using localIdentName because i want to preserve css classnames.
sending css-loader without any options object works fine but it changes the classnames.

How can this be resolved ?? Thanks in advance.

Body:
I have a file in which i imported my css files as

import ./styles.modules.css

my webpack css-loader config looks something like

      {
    test: /\.css$/,
    use: [
      'style-loader',
      {
        loader: 'css-loader',
        options: {
          modules: {
            localIdentName: '[name]__[local]--[hash:base64:5]',
            localIdentContext: path.resolve(__dirname, 'src'),
          },
        },
      },
    ],
  },

I am using localIdentName because i want to preserve css classnames.
sending css-loader without any options object works fine but it changes the classnames.

How can this be resolved ?? Thanks in advance.


问:
Istio sidecar for Pod with hostNetwork enabled
In my k8s cluster there is a Pod (prometheus/node-exporter) that uses hostNetwork to collect metrics from a node. The same Pod sends collected data to Prometheus, which is a part of Istio service mesh. The service mesh requires all traffic to be secured by mTLS (we do not want to make any excuses).

Since the node-exporter uses hostNetwork it does not have a sidecar and it can not take advantage of Istio mTLS.

I am wondering if I can enforce sidecar injection to node-exporter, so the traffic towards Istio service mesh is secured by mTLS without disrupting host network ?


问:
how to save data from API whenever it updates (django)
There is an API that comes from a device. This device updates its sampling variables every 2 minutes, maybe the results change or may not(because of some conditions). I want to store this API exactly whenever the device updates itself.

I have tried using background tasks with 2 minutes intervals but for example, the latest result doesn't match the API at the moment, because of the delay which is convincing.
I am just curious to know if is it possible to store the data as soon as the device updates itself.


问:
Jetpack Compose Canvas Scratch Card with Composable as Background
I am trying to implement a Scratch Card in Jetpack Compose.

I tried using the following example: https://github.com/V9vek/ScratchCardEffect/
but the background that gets visible when you scratch the Card has to be a composable and not an Image.

I also tried to draw with a transparent color on to the canvas, but this somehow also "erases" the composable that is behind the Canvas.

I would be glad if someone can help me with this.


问:
CloseableHttpAsyncClient a strange timeout issue
In the RequestConfig,
socketTimeout 3500ms
connectionRequestTimeout 5000ms
connectimeTimeout 3500ms
There is a log where the http request gets response. There are some strange requests, when timeout occurs, this log shows these requests cost so long time, such as 13000ms.(Maybe some domains occur more times...)
I open the debug log, but CPool don't have any overstock.

I have try to optimize maxTotal maxPerRoute, but it's unuseful.
I want to know why...and how to fix this long timeout issue


问:
How to query Notion-API database with people filter?
I read Notion-API documentation hundred times and I still can't understand how to query database by page_id or at least I think it should be a page_id.
I have two databases, let's say that db1 is events and db2 is persons.
Events database has a relation to Persons database and when I do a query I am getting this array of relationship ids:

```<code>"Team Member": {
        "id": "AAdX",
        "type": "relation",
        "relation": [
                {
                        "id": "8dc807b1-4584-4063-8ccd-142c75277c66"
                },
                {
                        "id": "33e321e0-8d11-4439-8dc7-887329bc2b96"
                }
        ],
        "has_more": false
}
</code>```

Now when I try to make a second API call to retrieve details about Persons I don't know how to shape the query.

I tried making a POST request to https://api.notion.com/v1/databases/:id/query with following HTTP body:

```<code>{
    "filter": {
        "property": "people",
        "people": {
            "contains": "8dc807b1-4584-4063-8ccd-142c75277c66"
        }

    }
}
</code>```

But I am getting following error:

```<code>{
    "object": "error",
    "status": 400,
    "code": "validation_error",
    "message": "Could not find property with name or id: people"
}
</code>```

Does anybody have some advice how to overcome this? I find their API documentation horrible because they are missing examples that would solve my confusion.

Body:
I read Notion-API documentation hundred times and I still can't understand how to query database by page_id or at least I think it should be a page_id.
I have two databases, let's say that db1 is events and db2 is persons.
Events database has a relation to Persons database and when I do a query I am getting this array of relationship ids:

"Team Member": {
        "id": "AAdX",
        "type": "relation",
        "relation": [
                {
                        "id": "8dc807b1-4584-4063-8ccd-142c75277c66"
                },
                {
                        "id": "33e321e0-8d11-4439-8dc7-887329bc2b96"
                }
        ],
        "has_more": false
}

Now when I try to make a second API call to retrieve details about Persons I don't know how to shape the query.

I tried making a POST request to https://api.notion.com/v1/databases/:id/query with following HTTP body:

{
    "filter": {
        "property": "people",
        "people": {
            "contains": "8dc807b1-4584-4063-8ccd-142c75277c66"
        }

    }
}

But I am getting following error:

{
    "object": "error",
    "status": 400,
    "code": "validation_error",
    "message": "Could not find property with name or id: people"
}

Does anybody have some advice how to overcome this? I find their API documentation horrible because they are missing examples that would solve my confusion.


问:
Widget overflow test in widget testing
I am trying to implement widget tests in my project. In real world, the app has some overflows like text cut for smaller screen devices, for example. Usually, I don't see them sometimes because the devices I have is usually big.

Before sending it to testing I want to make sure widgets don't overflow or cut. How can I implement this behaviour in widget testing?

Title: Widget overflow test in widget testing


问:
During the usage of tradingview, I wrote my own jsapi, everything seems to work fine, until I use onHistorycallback and pass in my data, it prompts me
Cannot read properties of undefined (reading 'toLowerCase')

I tried to parse the error code but I failed, the first time I used it.the direction of the attempt may need to be reminded


问:
R doesn't see odbc.ini files
I'm trying to run Shiny on a docker container with external PostgreSQL connection. When I do it with all hardcoded data like below, it works, but when I want to move to use DSN and etc/odbc.ini file it doesn't and I got an error (Error: nanodbc/nanodbc.cpp:1021: 00000: could not connect to server: No such file or directory). Both files odbc/odbcinst are configured properly. I think there is some missing connection/link to that file from R session, but I'm not sure. Any hints what to check?

Works

```<code>dbicon <-  DBI::dbConnect(
               odbc::odbc(),
               driver = "PostgreSQL Driver",
               database = "mydb",
               server = "server",
               port = "port",
               uid = "uid",
               pwd = "pwd")
</code>```

Doesn't work

```<code>dbicon <-  DBI::dbConnect(odbc::odbc(), "PostgreSQL")
</code>```

Title: R doesn't see odbc.ini files

Body:
I'm trying to run Shiny on a docker container with external PostgreSQL connection. When I do it with all hardcoded data like below, it works, but when I want to move to use DSN and etc/odbc.ini file it doesn't and I got an error (Error: nanodbc/nanodbc.cpp:1021: 00000: could not connect to server: No such file or directory). Both files odbc/odbcinst are configured properly. I think there is some missing connection/link to that file from R session, but I'm not sure. Any hints what to check?

Works

dbicon <-  DBI::dbConnect(
               odbc::odbc(),
               driver = "PostgreSQL Driver",
               database = "mydb",
               server = "server",
               port = "port",
               uid = "uid",
               pwd = "pwd")

Doesn't work

dbicon <-  DBI::dbConnect(odbc::odbc(), "PostgreSQL")


问:
What is the AccessToken not found error when deploying via Maven to Wso2 Micro Integrator?
Currently I have a server that's used to do remote deployments to a micro integrator server via a maven deploy command. I have this working in a Test environment but for some reason am getting this error when moving to the next environment:

```<code>Dec 19 11:55:47 [INFO] Installing /home/ssm-user/PipelineTest/PipelineTestCompositeExporter/pom.xml to /root/.m2/repository/com/example/PipelineTestCompositeExporter/1.0.0/PipelineTestCompositeExporter-1.0.0.pom
Dec 19 11:55:47 [INFO] Installing /home/ssm-user/PipelineTest/PipelineTestCompositeExporter/target/PipelineTestCompositeExporter_1.0.0.car to /root/.m2/repository/com/example/PipelineTestCompositeExporter/1.0.0/PipelineTestCompositeExporter-1.0.0.car
Dec 19 11:55:47 [INFO]
Dec 19 11:55:47 [INFO] --- maven-car-deploy-plugin:5.2.38:deploy-car (default-deploy-car) @ PipelineTestCompositeExporter ---
Dec 19 11:55:47 [INFO] Deploying to Server...
Dec 19 11:55:47 [INFO] TSPath=/opt/wso2ei-7.1.0/micro-integrator/repository/resources/security/wso2carbon.jks
Dec 19 11:55:47 [INFO] TSType=JKS
Dec 19 11:55:47 [INFO] Server URL=https://micro-integrator.com:9164
Dec 19 11:55:47 [INFO] Operation=deploy
Dec 19 11:55:47 [INFO] ServerType=mi
Dec 19 11:55:48 [INFO] Authentication to https://micro-integrator.com:9164 successful.
Dec 19 11:55:48 [ERROR] Uploading PipelineTestCompositeExporter_1.0.0.car to https://micro-integrator.com:9164 Failed.
Dec 19 11:55:48 org.json.JSONException: JSONObject["AccessToken"] not found.
Dec 19 11:55:48 at org.json.JSONObject.get (JSONObject.java:473)
Dec 19 11:55:48 at org.json.JSONObject.getString (JSONObject.java:654)
Dec 19 11:55:48 at org.wso2.maven.car.artifact.MICAppHandler.deployCApp (MICAppHandler.java:51)
Dec 19 11:55:48 at org.wso2.maven.car.artifact.DeployCarMojo.process (DeployCarMojo.java:272)
Dec 19 11:55:48 at org.wso2.maven.car.artifact.DeployCarMojo.execute (DeployCarMojo.java:224)
Dec 19 11:55:48 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
Dec 19 11:55:48 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
Dec 19 11:55:48 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
Dec 19 11:55:48 at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
Dec 19 11:55:48 at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
Dec 19 11:55:48 at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
Dec 19 11:55:48 at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
Dec 19 11:55:48 at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
Dec 19 11:55:48 at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
Dec 19 11:55:48 at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
Dec 19 11:55:48 at java.lang.reflect.Method.invoke (Method.java:498)
Dec 19 11:55:48 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
Dec 19 11:55:48 at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
Dec 19 11:55:48 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
Dec 19 11:55:48 at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Dec 19 11:55:48 [INFO] ------------------------------------------------------------------------
Dec 19 11:55:48 [INFO] Reactor Summary for PipelineTest 1.0.0:
Dec 19 11:55:48 [INFO]
Dec 19 11:55:48 [INFO] PipelineTest ....................................... SUCCESS [  6.137 s]
Dec 19 11:55:48 [INFO] PipelineTestConfigs ................................ SUCCESS [01:32 min]
Dec 19 11:55:48 [INFO] PipelineTestCompositeExporter ...................... FAILURE [ 36.305 s]
Dec 19 11:55:48 [INFO] ------------------------------------------------------------------------
Dec 19 11:55:48 [INFO] BUILD FAILURE
Dec 19 11:55:48 [INFO] ------------------------------------------------------------------------
Dec 19 11:55:48 [INFO] Total time:  03:18 min
Dec 19 11:55:48 [INFO] Finished at: 2022-12-19T11:55:48+02:00
Dec 19 11:55:48 [INFO] ------------------------------------------------------------------------
Dec 19 11:55:48 [ERROR] Failed to execute goal org.wso2.maven:maven-car-deploy-plugin:5.2.38:deploy-car (default-deploy-car) on project PipelineTestCompositeExporter: Deploying PipelineTestCompositeExporter_1.0.0.car to https://micro-integrator.com:9164 Failed.: JSONObject["AccessToken"] not found. -> [Help 1]
Dec 19 11:55:48 [ERROR]
Dec 19 11:55:48 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
Dec 19 11:55:48 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
Dec 19 11:55:48 [ERROR]
Dec 19 11:55:48 [ERROR] For more information about the errors and possible solutions, please read the following articles:
Dec 19 11:55:48 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Dec 19 11:55:48 [ERROR]
Dec 19 11:55:48 [ERROR] After correcting the problems, you can resume the build with the command
Dec 19 11:55:48 [ERROR]   mvn <args> -rf :PipelineTestCompositeExporter
</code>```

This is the command I am running:  /opt/apache-maven-3.6.3/bin/mvn clean deploy -Dmaven.deploy.skip=true -Dmaven.car.deploy.skip=false

As far as I know there is no token management involved here as its using a JKS alongside basic auth to authenticate and connect which I have working perfectly in one environment but not the other.

Not sure what I have missed between these environments. Any suggestions would be great?

Body:
Currently I have a server that's used to do remote deployments to a micro integrator server via a maven deploy command. I have this working in a Test environment but for some reason am getting this error when moving to the next environment:

Dec 19 11:55:47 [INFO] Installing /home/ssm-user/PipelineTest/PipelineTestCompositeExporter/pom.xml to /root/.m2/repository/com/example/PipelineTestCompositeExporter/1.0.0/PipelineTestCompositeExporter-1.0.0.pom
Dec 19 11:55:47 [INFO] Installing /home/ssm-user/PipelineTest/PipelineTestCompositeExporter/target/PipelineTestCompositeExporter_1.0.0.car to /root/.m2/repository/com/example/PipelineTestCompositeExporter/1.0.0/PipelineTestCompositeExporter-1.0.0.car
Dec 19 11:55:47 [INFO]
Dec 19 11:55:47 [INFO] --- maven-car-deploy-plugin:5.2.38:deploy-car (default-deploy-car) @ PipelineTestCompositeExporter ---
Dec 19 11:55:47 [INFO] Deploying to Server...
Dec 19 11:55:47 [INFO] TSPath=/opt/wso2ei-7.1.0/micro-integrator/repository/resources/security/wso2carbon.jks
Dec 19 11:55:47 [INFO] TSType=JKS
Dec 19 11:55:47 [INFO] Server URL=https://micro-integrator.com:9164
Dec 19 11:55:47 [INFO] Operation=deploy
Dec 19 11:55:47 [INFO] ServerType=mi
Dec 19 11:55:48 [INFO] Authentication to https://micro-integrator.com:9164 successful.
Dec 19 11:55:48 [ERROR] Uploading PipelineTestCompositeExporter_1.0.0.car to https://micro-integrator.com:9164 Failed.
Dec 19 11:55:48 org.json.JSONException: JSONObject["AccessToken"] not found.
Dec 19 11:55:48 at org.json.JSONObject.get (JSONObject.java:473)
Dec 19 11:55:48 at org.json.JSONObject.getString (JSONObject.java:654)
Dec 19 11:55:48 at org.wso2.maven.car.artifact.MICAppHandler.deployCApp (MICAppHandler.java:51)
Dec 19 11:55:48 at org.wso2.maven.car.artifact.DeployCarMojo.process (DeployCarMojo.java:272)
Dec 19 11:55:48 at org.wso2.maven.car.artifact.DeployCarMojo.execute (DeployCarMojo.java:224)
Dec 19 11:55:48 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
Dec 19 11:55:48 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
Dec 19 11:55:48 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
Dec 19 11:55:48 at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
Dec 19 11:55:48 at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
Dec 19 11:55:48 at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
Dec 19 11:55:48 at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
Dec 19 11:55:48 at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
Dec 19 11:55:48 at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
Dec 19 11:55:48 at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
Dec 19 11:55:48 at java.lang.reflect.Method.invoke (Method.java:498)
Dec 19 11:55:48 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
Dec 19 11:55:48 at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
Dec 19 11:55:48 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
Dec 19 11:55:48 at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Dec 19 11:55:48 [INFO] ------------------------------------------------------------------------
Dec 19 11:55:48 [INFO] Reactor Summary for PipelineTest 1.0.0:
Dec 19 11:55:48 [INFO]
Dec 19 11:55:48 [INFO] PipelineTest ....................................... SUCCESS [  6.137 s]
Dec 19 11:55:48 [INFO] PipelineTestConfigs ................................ SUCCESS [01:32 min]
Dec 19 11:55:48 [INFO] PipelineTestCompositeExporter ...................... FAILURE [ 36.305 s]
Dec 19 11:55:48 [INFO] ------------------------------------------------------------------------
Dec 19 11:55:48 [INFO] BUILD FAILURE
Dec 19 11:55:48 [INFO] ------------------------------------------------------------------------
Dec 19 11:55:48 [INFO] Total time:  03:18 min
Dec 19 11:55:48 [INFO] Finished at: 2022-12-19T11:55:48+02:00
Dec 19 11:55:48 [INFO] ------------------------------------------------------------------------
Dec 19 11:55:48 [ERROR] Failed to execute goal org.wso2.maven:maven-car-deploy-plugin:5.2.38:deploy-car (default-deploy-car) on project PipelineTestCompositeExporter: Deploying PipelineTestCompositeExporter_1.0.0.car to https://micro-integrator.com:9164 Failed.: JSONObject["AccessToken"] not found. -> [Help 1]
Dec 19 11:55:48 [ERROR]
Dec 19 11:55:48 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
Dec 19 11:55:48 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
Dec 19 11:55:48 [ERROR]
Dec 19 11:55:48 [ERROR] For more information about the errors and possible solutions, please read the following articles:
Dec 19 11:55:48 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Dec 19 11:55:48 [ERROR]
Dec 19 11:55:48 [ERROR] After correcting the problems, you can resume the build with the command
Dec 19 11:55:48 [ERROR]   mvn <args> -rf :PipelineTestCompositeExporter

This is the command I am running:  /opt/apache-maven-3.6.3/bin/mvn clean deploy -Dmaven.deploy.skip=true -Dmaven.car.deploy.skip=false

As far as I know there is no token management involved here as its using a JKS alongside basic auth to authenticate and connect which I have working perfectly in one environment but not the other.

Not sure what I have missed between these environments. Any suggestions would be great?