SAP / cloud-security-services-integration-library

Integration libraries and samples for authenticating users and clients bound to XSUAA authentication and authorization service or Identity authentication service.
Apache License 2.0
151 stars 135 forks source link

[migration] NoClassDefFoundError: com/sap/xs2/security/container/SecurityContext #377

Closed chengg-sap closed 4 years ago

chengg-sap commented 4 years ago

Hi,

We are following this guide to remove the com.sap.cloud.security.xsuaa:java-container-security dependecies.

The application fails to start during deployment to SCP with the following error: Error creating bean with name 'entityManagerFactory' defined in class path resource [com/sap/is/retail/csi/collector/config/HibernateCloudDbConfig.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/sap/xs2/security/container/SecurityContext"

Any suggestions on how to fix this issue? Thanks.

The dependency Tree

[INFO] 
[INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) @ TLogCollector ---
[INFO] com.sap.is.retail.csi:TLogCollector:jar:2012.1.0
[INFO] +- org.springframework:spring-web:jar:5.1.13.RELEASE:compile
[INFO] |  +- org.springframework:spring-beans:jar:5.1.13.RELEASE:compile
[INFO] |  \- org.springframework:spring-core:jar:5.1.13.RELEASE:compile
[INFO] |     \- org.springframework:spring-jcl:jar:5.1.13.RELEASE:compile
[INFO] +- javax.inject:javax.inject:jar:1:compile
[INFO] +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.9:compile
[INFO] +- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.9:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-core:jar:2.9.9:compile
[INFO] |  \- com.fasterxml.jackson.core:jackson-databind:jar:2.9.10.2-sap-01:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.1.12.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:2.1.12.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.1.12.RELEASE:compile
[INFO] |  |  |  +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.26:runtime
[INFO] |  +- org.springframework.boot:spring-boot-starter-json:jar:2.1.12.RELEASE:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.9:compile
[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.9:compile
[INFO] |  +- org.hibernate.validator:hibernate-validator:jar:6.0.18.Final:compile
[INFO] |  |  +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] |  |  \- org.jboss.logging:jboss-logging:jar:3.3.3.Final:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:5.1.13.RELEASE:compile
[INFO] |     +- org.springframework:spring-aop:jar:5.1.13.RELEASE:compile
[INFO] |     \- org.springframework:spring-expression:jar:5.1.13.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.1.12.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.1.12.RELEASE:compile
[INFO] |  \- io.micrometer:micrometer-core:jar:1.1.9:compile
[INFO] |     +- org.hdrhistogram:HdrHistogram:jar:2.1.9:compile
[INFO] |     \- org.latencyutils:LatencyUtils:jar:2.0.3:compile
[INFO] +- org.springframework.boot:spring-boot-starter-hateoas:jar:2.1.12.RELEASE:compile
[INFO] |  +- org.springframework.hateoas:spring-hateoas:jar:0.25.2.RELEASE:compile
[INFO] |  \- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] +- org.dom4j:dom4j:jar:2.1.3:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.1.12.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-aop:jar:2.1.12.RELEASE:compile
[INFO] |  |  \- org.aspectj:aspectjweaver:jar:1.9.5:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.1.12.RELEASE:compile
[INFO] |  |  \- com.zaxxer:HikariCP:jar:3.2.0:compile
[INFO] |  +- javax.transaction:javax.transaction-api:jar:1.3:compile
[INFO] |  +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] |  |  \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] |  +- org.hibernate:hibernate-core:jar:5.3.15.Final:compile
[INFO] |  |  +- javax.persistence:javax.persistence-api:jar:2.2:compile
[INFO] |  |  +- org.javassist:javassist:jar:3.23.2-GA:compile
[INFO] |  |  +- antlr:antlr:jar:2.7.7:compile
[INFO] |  |  +- org.jboss:jandex:jar:2.0.5.Final:compile
[INFO] |  |  +- org.hibernate.common:hibernate-commons-annotations:jar:5.0.4.Final:compile
[INFO] |  |  \- org.glassfish.jaxb:jaxb-runtime:jar:2.3.1:compile
[INFO] |  |     +- org.glassfish.jaxb:txw2:jar:2.3.1:compile
[INFO] |  |     +- com.sun.istack:istack-commons-runtime:jar:3.0.7:compile
[INFO] |  |     +- org.jvnet.staxex:stax-ex:jar:1.8:compile
[INFO] |  |     \- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.15:compile
[INFO] |  +- org.springframework.data:spring-data-jpa:jar:2.1.10.RELEASE:compile
[INFO] |  |  +- org.springframework.data:spring-data-commons:jar:2.1.15.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-tx:jar:5.1.13.RELEASE:compile
[INFO] |  \- org.springframework:spring-aspects:jar:5.1.13.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-rest:jar:2.1.12.RELEASE:compile
[INFO] |  \- org.springframework.data:spring-data-rest-webmvc:jar:3.1.15.RELEASE:compile
[INFO] |     \- org.springframework.data:spring-data-rest-core:jar:3.1.15.RELEASE:compile
[INFO] |        \- org.atteo:evo-inflector:jar:1.2.2:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-bus-amqp:jar:2.1.0.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-starter-stream-rabbit:jar:2.1.0.RELEASE:compile
[INFO] |  \- org.springframework.cloud:spring-cloud-bus:jar:2.1.0.RELEASE:compile
[INFO] |     \- org.springframework.cloud:spring-cloud-starter:jar:2.1.0.RELEASE:compile
[INFO] |        +- org.springframework.cloud:spring-cloud-context:jar:2.1.0.RELEASE:compile
[INFO] |        \- org.springframework.security:spring-security-rsa:jar:1.0.7.RELEASE:compile
[INFO] |           \- org.bouncycastle:bcpkix-jdk15on:jar:1.60:compile
[INFO] |              \- org.bouncycastle:bcprov-jdk15on:jar:1.64:compile
[INFO] +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.1.12.RELEASE:provided
[INFO] |  +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.37:provided
[INFO] |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.41:compile
[INFO] |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.37:provided
[INFO] +- com.sap.icd:mt-spring-boot-starter:jar:2.9.1-20190722132705:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.1.12.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.1.12.RELEASE:compile
[INFO] |  +- org.springframework:spring-orm:jar:5.1.13.RELEASE:compile
[INFO] |  +- org.springframework:spring-jdbc:jar:5.1.13.RELEASE:compile
[INFO] |  +- org.springframework.security:spring-security-core:jar:5.1.10.RELEASE:compile
[INFO] |  +- org.apache.tomcat:tomcat-jdbc:jar:8.5.41:compile
[INFO] |  |  \- org.apache.tomcat:tomcat-juli:jar:8.5.41:compile
[INFO] |  \- org.springframework.boot:spring-boot-actuator:jar:2.1.12.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-cloud-connectors:jar:2.1.12.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-heroku-connector:jar:2.0.7.RELEASE:compile
[INFO] |  \- org.springframework.cloud:spring-cloud-localconfig-connector:jar:2.0.7.RELEASE:compile
[INFO] |     \- org.apache.commons:commons-lang3:jar:3.8.1:compile
[INFO] +- org.springframework.cloud:spring-cloud-spring-service-connector:jar:2.0.7.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-connectors-core:jar:2.0.7.RELEASE:compile
[INFO] |  \- org.springframework:spring-context:jar:5.1.13.RELEASE:compile
[INFO] +- org.springframework.cloud:spring-cloud-cloudfoundry-connector:jar:2.0.6.RELEASE-sap-05:compile
[INFO] +- com.h2database:h2:jar:1.4.194:compile
[INFO] +- com.sap.db.jdbc:ngdbc:jar:2.5.49:compile
[INFO] +- com.sap.cloud.security.xsuaa:xsuaa-spring-boot-starter:jar:2.7.7:compile
[INFO] |  +- com.sap.cloud.security.xsuaa:spring-xsuaa:jar:2.7.7:compile
[INFO] |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.11.2:compile
[INFO] |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.11.2:compile
[INFO] |  |  +- com.sap.cloud.security.xsuaa:api:jar:2.7.7:compile
[INFO] |  |  +- com.sap.cloud.security.xsuaa:token-client:jar:2.7.7:compile
[INFO] |  |  |  +- com.sap.cloud.security:java-api:jar:2.7.7:compile
[INFO] |  |  |  |  \- javax.servlet:javax.servlet-api:jar:4.0.1:compile
[INFO] |  |  |  \- org.json:json:jar:20180813:compile
[INFO] |  |  +- com.github.ben-manes.caffeine:caffeine:jar:2.6.2:compile
[INFO] |  |  \- commons-io:commons-io:jar:2.6:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-security:jar:2.1.12.RELEASE:compile
[INFO] |  |  \- org.springframework.security:spring-security-config:jar:5.1.7.RELEASE:compile
[INFO] |  +- org.springframework.security:spring-security-oauth2-jose:jar:5.1.7.RELEASE:compile
[INFO] |  |  +- com.nimbusds:nimbus-jose-jwt:jar:6.0.2:compile
[INFO] |  |  |  \- com.github.stephenc.jcip:jcip-annotations:jar:1.0-1:compile
[INFO] |  |  \- org.springframework.security:spring-security-oauth2-core:jar:5.1.7.RELEASE:compile
[INFO] |  \- org.springframework.security:spring-security-oauth2-resource-server:jar:5.1.7.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.1.12.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test:jar:2.1.12.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.1.12.RELEASE:test
[INFO] |  +- org.assertj:assertj-core:jar:3.11.1:test
[INFO] |  +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] |  +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] |  +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] |  \- org.xmlunit:xmlunit-core:jar:2.6.3:test
[INFO] +- org.springframework.security:spring-security-test:jar:5.1.7.RELEASE:test
[INFO] |  \- org.springframework.security:spring-security-web:jar:5.1.7.RELEASE:compile
[INFO] +- io.rest-assured:rest-assured:jar:3.3.0:test
[INFO] |  +- org.codehaus.groovy:groovy:jar:2.5.9:compile
[INFO] |  +- org.codehaus.groovy:groovy-xml:jar:2.5.9:test
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.5.10:compile
[INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.13:compile
[INFO] |  |  \- commons-codec:commons-codec:jar:1.11:compile
[INFO] |  +- org.apache.httpcomponents:httpmime:jar:4.5.10:test
[INFO] |  +- org.ccil.cowan.tagsoup:tagsoup:jar:1.2.1:test
[INFO] |  \- io.rest-assured:xml-path:jar:3.1.1:test
[INFO] +- io.rest-assured:json-path:jar:3.3.0:compile
[INFO] |  +- org.codehaus.groovy:groovy-json:jar:2.5.9:compile
[INFO] |  \- io.rest-assured:rest-assured-common:jar:3.3.0:compile
[INFO] +- io.rest-assured:json-schema-validator:jar:3.3.0:test
[INFO] |  \- com.github.java-json-tools:json-schema-validator:jar:2.2.10:test
[INFO] |     +- com.github.java-json-tools:json-schema-core:jar:1.2.10:test
[INFO] |     |  +- com.github.java-json-tools:jackson-coreutils:jar:1.9:test
[INFO] |     |  |  \- com.github.fge:msg-simple:jar:1.1:test
[INFO] |     |  |     \- com.github.fge:btf:jar:1.2:test
[INFO] |     |  +- com.github.fge:uri-template:jar:0.9:test
[INFO] |     |  \- org.mozilla:rhino:jar:1.7.7.1:test
[INFO] |     +- javax.mail:mailapi:jar:1.4.3:test
[INFO] |     |  \- javax.activation:activation:jar:1.1:test
[INFO] |     +- joda-time:joda-time:jar:2.10.5:test
[INFO] |     +- com.googlecode.libphonenumber:libphonenumber:jar:8.0.0:test
[INFO] |     +- com.google.code.findbugs:jsr305:jar:3.0.1:compile
[INFO] |     \- net.sf.jopt-simple:jopt-simple:jar:5.0.3:test
[INFO] +- io.rest-assured:spring-mock-mvc:jar:3.3.0:test
[INFO] |  \- io.rest-assured:spring-commons:jar:3.3.0:test
[INFO] +- junit:junit:jar:4.12:test
[INFO] +- org.springframework:spring-test:jar:5.1.13.RELEASE:test
[INFO] +- org.hamcrest:hamcrest-all:jar:1.3:test
[INFO] +- org.mockito:mockito-core:jar:2.23.4:test
[INFO] |  +- net.bytebuddy:byte-buddy:jar:1.9.16:compile
[INFO] |  +- net.bytebuddy:byte-buddy-agent:jar:1.9.16:test
[INFO] |  \- org.objenesis:objenesis:jar:2.6:compile
[INFO] +- org.powermock:powermock-module-junit4:jar:2.0.2:test
[INFO] |  \- org.powermock:powermock-module-junit4-common:jar:2.0.2:test
[INFO] |     +- org.powermock:powermock-reflect:jar:2.0.2:test
[INFO] |     \- org.powermock:powermock-core:jar:2.0.2:test
[INFO] +- org.powermock:powermock-api-mockito2:jar:2.0.2:test
[INFO] |  \- org.powermock:powermock-api-support:jar:2.0.2:test
[INFO] +- org.springframework.cloud:spring-cloud-sleuth-zipkin:jar:2.1.0.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-sleuth-core:jar:2.1.0.RELEASE:compile
[INFO] |  |  +- org.aspectj:aspectjrt:jar:1.9.5:compile
[INFO] |  |  +- io.zipkin.brave:brave:jar:5.6.1:compile
[INFO] |  |  +- io.zipkin.brave:brave-context-log4j2:jar:5.6.1:compile
[INFO] |  |  +- io.zipkin.brave:brave-instrumentation-spring-web:jar:5.6.1:compile
[INFO] |  |  |  \- io.zipkin.brave:brave-instrumentation-http:jar:5.6.1:compile
[INFO] |  |  +- io.zipkin.brave:brave-instrumentation-spring-rabbit:jar:5.6.1:compile
[INFO] |  |  +- io.zipkin.brave:brave-instrumentation-kafka-clients:jar:5.6.1:compile
[INFO] |  |  +- io.zipkin.brave:brave-instrumentation-httpclient:jar:5.6.1:compile
[INFO] |  |  +- io.zipkin.brave:brave-instrumentation-httpasyncclient:jar:5.6.1:compile
[INFO] |  |  +- io.zipkin.brave:brave-instrumentation-spring-webmvc:jar:5.6.1:compile
[INFO] |  |  |  \- io.zipkin.brave:brave-instrumentation-servlet:jar:5.6.1:compile
[INFO] |  |  \- io.zipkin.brave:brave-instrumentation-jms:jar:5.6.1:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-commons:jar:2.1.0.RELEASE:compile
[INFO] |  |  \- org.springframework.security:spring-security-crypto:jar:5.1.10.RELEASE:compile
[INFO] |  +- io.zipkin.zipkin2:zipkin:jar:2.12.0:compile
[INFO] |  +- io.zipkin.reporter2:zipkin-reporter:jar:2.7.14:compile
[INFO] |  +- io.zipkin.reporter2:zipkin-sender-kafka11:jar:2.7.14:compile
[INFO] |  \- io.zipkin.reporter2:zipkin-sender-amqp-client:jar:2.7.14:compile
[INFO] +- org.springframework.cloud:spring-cloud-stream-binder-rabbit:jar:2.1.0.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-stream-binder-rabbit-core:jar:2.1.0.RELEASE:compile
[INFO] |  |  \- com.rabbitmq:http-client:jar:2.1.0.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-stream:jar:2.1.0.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-starter-validation:jar:2.1.12.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-messaging:jar:5.1.13.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-tuple:jar:1.0.0.RELEASE:compile
[INFO] |  |  |  \- com.esotericsoftware:kryo-shaded:jar:3.0.3:compile
[INFO] |  |  |     \- com.esotericsoftware:minlog:jar:1.3.0:compile
[INFO] |  |  +- org.springframework.integration:spring-integration-tuple:jar:1.0.0.RELEASE:compile
[INFO] |  |  +- org.springframework.retry:spring-retry:jar:1.2.5.RELEASE:compile
[INFO] |  |  \- org.springframework.cloud:spring-cloud-function-context:jar:2.0.0.RELEASE:compile
[INFO] |  |     \- org.springframework.cloud:spring-cloud-function-core:jar:2.0.0.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-amqp:jar:2.1.12.RELEASE:compile
[INFO] |  |  \- org.springframework.amqp:spring-rabbit:jar:2.1.8.RELEASE:compile
[INFO] |  |     +- org.springframework.amqp:spring-amqp:jar:2.1.8.RELEASE:compile
[INFO] |  |     \- com.rabbitmq:amqp-client:jar:5.4.3:compile
[INFO] |  +- org.springframework.integration:spring-integration-amqp:jar:5.1.9.RELEASE:compile
[INFO] |  +- org.springframework.integration:spring-integration-core:jar:5.1.9.RELEASE:compile
[INFO] |  |  \- io.projectreactor:reactor-core:jar:3.2.14.RELEASE:compile
[INFO] |  |     \- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO] |  \- org.springframework.integration:spring-integration-jmx:jar:5.1.9.RELEASE:compile
[INFO] +- io.springfox:springfox-swagger2:jar:2.8.0:compile
[INFO] |  +- io.swagger:swagger-annotations:jar:1.5.14:compile
[INFO] |  +- io.swagger:swagger-models:jar:1.5.14:compile
[INFO] |  +- io.springfox:springfox-spi:jar:2.8.0:compile
[INFO] |  |  \- io.springfox:springfox-core:jar:2.8.0:compile
[INFO] |  +- io.springfox:springfox-schema:jar:2.8.0:compile
[INFO] |  +- io.springfox:springfox-swagger-common:jar:2.8.0:compile
[INFO] |  +- io.springfox:springfox-spring-web:jar:2.8.0:compile
[INFO] |  |  \- org.reflections:reflections:jar:0.9.11:compile
[INFO] |  +- com.google.guava:guava:jar:24.1.1-jre:compile
[INFO] |  |  +- org.checkerframework:checker-compat-qual:jar:2.0.0:compile
[INFO] |  |  +- com.google.errorprone:error_prone_annotations:jar:2.1.3:compile
[INFO] |  |  +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
[INFO] |  |  \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
[INFO] |  +- com.fasterxml:classmate:jar:1.4.0:compile
[INFO] |  +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] |  \- org.mapstruct:mapstruct:jar:1.2.0.Final:compile
[INFO] +- io.springfox:springfox-bean-validators:jar:2.8.0:compile
[INFO] +- io.springfox:springfox-swagger-ui:jar:2.8.0:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] +- com.querydsl:querydsl-apt:jar:4.2.2:compile
[INFO] |  \- com.querydsl:querydsl-codegen:jar:4.2.2:compile
[INFO] |     \- com.mysema.codegen:codegen:jar:0.6.8:compile
[INFO] |        \- org.eclipse.jdt.core.compiler:ecj:jar:4.3.1:compile
[INFO] +- com.querydsl:querydsl-jpa:jar:4.2.2:compile
[INFO] |  \- com.querydsl:querydsl-core:jar:4.2.2:compile
[INFO] |     +- com.mysema.commons:mysema-commons-lang:jar:0.2.4:compile
[INFO] |     \- com.infradna.tool:bridge-method-annotation:jar:1.13:compile
[INFO] +- com.sap.hcp.cf.logging:cf-java-logging-support-logback:jar:2.1.5:compile
[INFO] |  \- com.sap.hcp.cf.logging:cf-java-logging-support-core:jar:2.1.5:compile
[INFO] |     \- com.fasterxml.jackson.jr:jackson-jr-objects:jar:2.9.9:compile
[INFO] +- com.sap.hcp.cf.logging:cf-java-logging-support-servlet:jar:2.1.5:compile
[INFO] |  \- com.auth0:java-jwt:jar:3.3.0:compile
[INFO] +- com.sap.xs.auditlog:audit-java-client-api:jar:2.0.6:compile
[INFO] +- com.sap.xs.auditlog:audit-java-client-impl:jar:2.0.6:compile
[INFO] |  +- com.sap.xs.auditlog:auditlog-common:jar:2.0.13:compile
[INFO] |  |  \- commons-validator:commons-validator:jar:1.6:compile
[INFO] |  |     +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
[INFO] |  |     +- commons-digester:commons-digester:jar:1.8.1:compile
[INFO] |  |     +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  |     \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] |  \- com.sap.xs.java:xs-user-holder:jar:0.3.0:compile
[INFO] |     \- com.sap.xs2.security:java-container-security-api:jar:0.20.8:compile
[INFO] +- com.sap.xs.java:xs-env:jar:1.7.2:compile
[INFO] +- com.jayway.jsonpath:json-path:jar:2.4.0:compile
[INFO] |  \- net.minidev:json-smart:jar:2.3:compile
[INFO] |     \- net.minidev:accessors-smart:jar:1.2:compile
[INFO] |        \- org.ow2.asm:asm:jar:5.0.4:compile
[INFO] \- com.sap.is.retail.csi:CSI-Validator:jar:2006.0.1:compile

The full log: collector-service-2020-09-29 17_35_39.129+0000.txt

nenaraab commented 4 years ago

Hi @chengg-sap

it should be explained here: https://github.com/SAP/cloud-security-xsuaa-integration/blob/master/spring-xsuaa/Migration_JavaContainerSecurityProjects.md#fetch-data-from-token

Best regards, Nena

chengg-sap commented 4 years ago

@nenaraab Thank you so much for the quick reply. The UserInfo related code has been replaced and there isn't anywhere we make use of com.sap.xs2.security.container.

Any other suggestions?

nenaraab commented 4 years ago

Yeah @chengg-sap

look at this dependency:

com.sap.xs.java:xs-user-holder:jar:0.3.0:compile
[INFO] |     \- com.sap.xs2.security:java-container-security-api:jar:0.20.8:compile

pls. replace this mvn dependency with xs-user-holder version 1.17.5

<groupId>com.sap.cloud.sjb</groupId>
<artifactId>xs-user-holder</artifactId>
<version>1.17.5</version>

Best regards, Nena

chengg-sap commented 4 years ago

Thanks for the suggestion @nenaraab . com.sap.xs.java:xs-user-holder does not have a version 1.17.5, but com.sap.cloud.sjb:xs-user-holder does. After adding the suggested dependency and excluding the one from com.sap.xs2.security. We are still having the same error during deployment.

Please let us know if you have any other recommendations. Thanks!

New Dependency Tree:

[INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) @ TLogCollector ---
[INFO] com.sap.is.retail.csi:TLogCollector:jar:2012.1.0
[INFO] +- org.springframework:spring-web:jar:5.1.13.RELEASE:compile
[INFO] |  +- org.springframework:spring-beans:jar:5.1.13.RELEASE:compile
[INFO] |  \- org.springframework:spring-core:jar:5.1.13.RELEASE:compile
[INFO] |     \- org.springframework:spring-jcl:jar:5.1.13.RELEASE:compile
[INFO] +- javax.inject:javax.inject:jar:1:compile
[INFO] +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.9:compile
[INFO] +- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.9:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-core:jar:2.9.9:compile
[INFO] |  \- com.fasterxml.jackson.core:jackson-databind:jar:2.9.10.2-sap-01:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.1.12.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:2.1.12.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.1.12.RELEASE:compile
[INFO] |  |  |  +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.26:runtime
[INFO] |  +- org.springframework.boot:spring-boot-starter-json:jar:2.1.12.RELEASE:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.9:compile
[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.9:compile
[INFO] |  +- org.hibernate.validator:hibernate-validator:jar:6.0.18.Final:compile
[INFO] |  |  +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] |  |  \- org.jboss.logging:jboss-logging:jar:3.3.3.Final:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:5.1.13.RELEASE:compile
[INFO] |     +- org.springframework:spring-aop:jar:5.1.13.RELEASE:compile
[INFO] |     \- org.springframework:spring-expression:jar:5.1.13.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.1.12.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.1.12.RELEASE:compile
[INFO] |  \- io.micrometer:micrometer-core:jar:1.1.9:compile
[INFO] |     +- org.hdrhistogram:HdrHistogram:jar:2.1.9:compile
[INFO] |     \- org.latencyutils:LatencyUtils:jar:2.0.3:compile
[INFO] +- org.springframework.boot:spring-boot-starter-hateoas:jar:2.1.12.RELEASE:compile
[INFO] |  +- org.springframework.hateoas:spring-hateoas:jar:0.25.2.RELEASE:compile
[INFO] |  \- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] +- org.dom4j:dom4j:jar:2.1.3:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.1.12.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-aop:jar:2.1.12.RELEASE:compile
[INFO] |  |  \- org.aspectj:aspectjweaver:jar:1.9.5:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.1.12.RELEASE:compile
[INFO] |  |  \- com.zaxxer:HikariCP:jar:3.2.0:compile
[INFO] |  +- javax.transaction:javax.transaction-api:jar:1.3:compile
[INFO] |  +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] |  |  \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] |  +- org.hibernate:hibernate-core:jar:5.3.15.Final:compile
[INFO] |  |  +- javax.persistence:javax.persistence-api:jar:2.2:compile
[INFO] |  |  +- org.javassist:javassist:jar:3.23.2-GA:compile
[INFO] |  |  +- antlr:antlr:jar:2.7.7:compile
[INFO] |  |  +- org.jboss:jandex:jar:2.0.5.Final:compile
[INFO] |  |  +- org.hibernate.common:hibernate-commons-annotations:jar:5.0.4.Final:compile
[INFO] |  |  \- org.glassfish.jaxb:jaxb-runtime:jar:2.3.1:compile
[INFO] |  |     +- org.glassfish.jaxb:txw2:jar:2.3.1:compile
[INFO] |  |     +- com.sun.istack:istack-commons-runtime:jar:3.0.7:compile
[INFO] |  |     +- org.jvnet.staxex:stax-ex:jar:1.8:compile
[INFO] |  |     \- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.15:compile
[INFO] |  +- org.springframework.data:spring-data-jpa:jar:2.1.10.RELEASE:compile
[INFO] |  |  +- org.springframework.data:spring-data-commons:jar:2.1.15.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-tx:jar:5.1.13.RELEASE:compile
[INFO] |  \- org.springframework:spring-aspects:jar:5.1.13.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-rest:jar:2.1.12.RELEASE:compile
[INFO] |  \- org.springframework.data:spring-data-rest-webmvc:jar:3.1.15.RELEASE:compile
[INFO] |     \- org.springframework.data:spring-data-rest-core:jar:3.1.15.RELEASE:compile
[INFO] |        \- org.atteo:evo-inflector:jar:1.2.2:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-bus-amqp:jar:2.1.0.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-starter-stream-rabbit:jar:2.1.0.RELEASE:compile
[INFO] |  \- org.springframework.cloud:spring-cloud-bus:jar:2.1.0.RELEASE:compile
[INFO] |     \- org.springframework.cloud:spring-cloud-starter:jar:2.1.0.RELEASE:compile
[INFO] |        +- org.springframework.cloud:spring-cloud-context:jar:2.1.0.RELEASE:compile
[INFO] |        \- org.springframework.security:spring-security-rsa:jar:1.0.7.RELEASE:compile
[INFO] |           \- org.bouncycastle:bcpkix-jdk15on:jar:1.60:compile
[INFO] |              \- org.bouncycastle:bcprov-jdk15on:jar:1.64:compile
[INFO] +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.1.12.RELEASE:provided
[INFO] |  +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.37:provided
[INFO] |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.41:compile
[INFO] |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.37:provided
[INFO] +- com.sap.icd:mt-spring-boot-starter:jar:2.9.1-20190722132705:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.1.12.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.1.12.RELEASE:compile
[INFO] |  +- org.springframework:spring-orm:jar:5.1.13.RELEASE:compile
[INFO] |  +- org.springframework:spring-jdbc:jar:5.1.13.RELEASE:compile
[INFO] |  +- org.springframework.security:spring-security-core:jar:5.1.10.RELEASE:compile
[INFO] |  +- org.apache.tomcat:tomcat-jdbc:jar:8.5.41:compile
[INFO] |  |  \- org.apache.tomcat:tomcat-juli:jar:8.5.41:compile
[INFO] |  \- org.springframework.boot:spring-boot-actuator:jar:2.1.12.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-cloud-connectors:jar:2.1.12.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-heroku-connector:jar:2.0.7.RELEASE:compile
[INFO] |  \- org.springframework.cloud:spring-cloud-localconfig-connector:jar:2.0.7.RELEASE:compile
[INFO] |     \- org.apache.commons:commons-lang3:jar:3.8.1:compile
[INFO] +- org.springframework.cloud:spring-cloud-spring-service-connector:jar:2.0.7.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-connectors-core:jar:2.0.7.RELEASE:compile
[INFO] |  \- org.springframework:spring-context:jar:5.1.13.RELEASE:compile
[INFO] +- org.springframework.cloud:spring-cloud-cloudfoundry-connector:jar:2.0.6.RELEASE-sap-05:compile
[INFO] +- com.h2database:h2:jar:1.4.194:compile
[INFO] +- com.sap.db.jdbc:ngdbc:jar:2.5.49:compile
[INFO] +- com.sap.cloud.security.xsuaa:xsuaa-spring-boot-starter:jar:2.7.7:compile
[INFO] |  +- com.sap.cloud.security.xsuaa:spring-xsuaa:jar:2.7.7:compile
[INFO] |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.11.2:compile
[INFO] |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.11.2:compile
[INFO] |  |  +- com.sap.cloud.security.xsuaa:token-client:jar:2.7.7:compile
[INFO] |  |  |  +- com.sap.cloud.security:java-api:jar:2.7.7:compile
[INFO] |  |  |  |  \- javax.servlet:javax.servlet-api:jar:4.0.1:compile
[INFO] |  |  |  \- org.json:json:jar:20180813:compile
[INFO] |  |  +- com.github.ben-manes.caffeine:caffeine:jar:2.6.2:compile
[INFO] |  |  \- commons-io:commons-io:jar:2.6:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-security:jar:2.1.12.RELEASE:compile
[INFO] |  |  \- org.springframework.security:spring-security-config:jar:5.1.7.RELEASE:compile
[INFO] |  +- org.springframework.security:spring-security-oauth2-jose:jar:5.1.7.RELEASE:compile
[INFO] |  |  +- com.nimbusds:nimbus-jose-jwt:jar:6.0.2:compile
[INFO] |  |  |  \- com.github.stephenc.jcip:jcip-annotations:jar:1.0-1:compile
[INFO] |  |  \- org.springframework.security:spring-security-oauth2-core:jar:5.1.7.RELEASE:compile
[INFO] |  \- org.springframework.security:spring-security-oauth2-resource-server:jar:5.1.7.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.1.12.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test:jar:2.1.12.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.1.12.RELEASE:test
[INFO] |  +- org.assertj:assertj-core:jar:3.11.1:test
[INFO] |  +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] |  +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] |  +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] |  \- org.xmlunit:xmlunit-core:jar:2.6.3:test
[INFO] +- org.springframework.security:spring-security-test:jar:5.1.7.RELEASE:test
[INFO] |  \- org.springframework.security:spring-security-web:jar:5.1.7.RELEASE:compile
[INFO] +- io.rest-assured:rest-assured:jar:3.3.0:test
[INFO] |  +- org.codehaus.groovy:groovy:jar:2.5.9:compile
[INFO] |  +- org.codehaus.groovy:groovy-xml:jar:2.5.9:test
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.5.10:compile
[INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.13:compile
[INFO] |  |  \- commons-codec:commons-codec:jar:1.11:compile
[INFO] |  +- org.apache.httpcomponents:httpmime:jar:4.5.10:test
[INFO] |  +- org.ccil.cowan.tagsoup:tagsoup:jar:1.2.1:test
[INFO] |  \- io.rest-assured:xml-path:jar:3.1.1:test
[INFO] +- io.rest-assured:json-path:jar:3.3.0:compile
[INFO] |  +- org.codehaus.groovy:groovy-json:jar:2.5.9:compile
[INFO] |  \- io.rest-assured:rest-assured-common:jar:3.3.0:compile
[INFO] +- io.rest-assured:json-schema-validator:jar:3.3.0:test
[INFO] |  \- com.github.java-json-tools:json-schema-validator:jar:2.2.10:test
[INFO] |     +- com.github.java-json-tools:json-schema-core:jar:1.2.10:test
[INFO] |     |  +- com.github.java-json-tools:jackson-coreutils:jar:1.9:test
[INFO] |     |  |  \- com.github.fge:msg-simple:jar:1.1:test
[INFO] |     |  |     \- com.github.fge:btf:jar:1.2:test
[INFO] |     |  +- com.github.fge:uri-template:jar:0.9:test
[INFO] |     |  \- org.mozilla:rhino:jar:1.7.7.1:test
[INFO] |     +- javax.mail:mailapi:jar:1.4.3:test
[INFO] |     |  \- javax.activation:activation:jar:1.1:test
[INFO] |     +- joda-time:joda-time:jar:2.10.5:test
[INFO] |     +- com.googlecode.libphonenumber:libphonenumber:jar:8.0.0:test
[INFO] |     +- com.google.code.findbugs:jsr305:jar:3.0.1:compile
[INFO] |     \- net.sf.jopt-simple:jopt-simple:jar:5.0.3:test
[INFO] +- io.rest-assured:spring-mock-mvc:jar:3.3.0:test
[INFO] |  \- io.rest-assured:spring-commons:jar:3.3.0:test
[INFO] +- junit:junit:jar:4.12:test
[INFO] +- org.springframework:spring-test:jar:5.1.13.RELEASE:test
[INFO] +- org.hamcrest:hamcrest-all:jar:1.3:test
[INFO] +- org.mockito:mockito-core:jar:2.23.4:test
[INFO] |  +- net.bytebuddy:byte-buddy:jar:1.9.16:compile
[INFO] |  +- net.bytebuddy:byte-buddy-agent:jar:1.9.16:test
[INFO] |  \- org.objenesis:objenesis:jar:2.6:compile
[INFO] +- org.powermock:powermock-module-junit4:jar:2.0.2:test
[INFO] |  \- org.powermock:powermock-module-junit4-common:jar:2.0.2:test
[INFO] |     +- org.powermock:powermock-reflect:jar:2.0.2:test
[INFO] |     \- org.powermock:powermock-core:jar:2.0.2:test
[INFO] +- org.powermock:powermock-api-mockito2:jar:2.0.2:test
[INFO] |  \- org.powermock:powermock-api-support:jar:2.0.2:test
[INFO] +- org.springframework.cloud:spring-cloud-sleuth-zipkin:jar:2.1.0.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-sleuth-core:jar:2.1.0.RELEASE:compile
[INFO] |  |  +- org.aspectj:aspectjrt:jar:1.9.5:compile
[INFO] |  |  +- io.zipkin.brave:brave:jar:5.6.1:compile
[INFO] |  |  +- io.zipkin.brave:brave-context-log4j2:jar:5.6.1:compile
[INFO] |  |  +- io.zipkin.brave:brave-instrumentation-spring-web:jar:5.6.1:compile
[INFO] |  |  |  \- io.zipkin.brave:brave-instrumentation-http:jar:5.6.1:compile
[INFO] |  |  +- io.zipkin.brave:brave-instrumentation-spring-rabbit:jar:5.6.1:compile
[INFO] |  |  +- io.zipkin.brave:brave-instrumentation-kafka-clients:jar:5.6.1:compile
[INFO] |  |  +- io.zipkin.brave:brave-instrumentation-httpclient:jar:5.6.1:compile
[INFO] |  |  +- io.zipkin.brave:brave-instrumentation-httpasyncclient:jar:5.6.1:compile
[INFO] |  |  +- io.zipkin.brave:brave-instrumentation-spring-webmvc:jar:5.6.1:compile
[INFO] |  |  |  \- io.zipkin.brave:brave-instrumentation-servlet:jar:5.6.1:compile
[INFO] |  |  \- io.zipkin.brave:brave-instrumentation-jms:jar:5.6.1:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-commons:jar:2.1.0.RELEASE:compile
[INFO] |  |  \- org.springframework.security:spring-security-crypto:jar:5.1.10.RELEASE:compile
[INFO] |  +- io.zipkin.zipkin2:zipkin:jar:2.12.0:compile
[INFO] |  +- io.zipkin.reporter2:zipkin-reporter:jar:2.7.14:compile
[INFO] |  +- io.zipkin.reporter2:zipkin-sender-kafka11:jar:2.7.14:compile
[INFO] |  \- io.zipkin.reporter2:zipkin-sender-amqp-client:jar:2.7.14:compile
[INFO] +- org.springframework.cloud:spring-cloud-stream-binder-rabbit:jar:2.1.0.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-stream-binder-rabbit-core:jar:2.1.0.RELEASE:compile
[INFO] |  |  \- com.rabbitmq:http-client:jar:2.1.0.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-stream:jar:2.1.0.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-starter-validation:jar:2.1.12.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-messaging:jar:5.1.13.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-tuple:jar:1.0.0.RELEASE:compile
[INFO] |  |  |  \- com.esotericsoftware:kryo-shaded:jar:3.0.3:compile
[INFO] |  |  |     \- com.esotericsoftware:minlog:jar:1.3.0:compile
[INFO] |  |  +- org.springframework.integration:spring-integration-tuple:jar:1.0.0.RELEASE:compile
[INFO] |  |  +- org.springframework.retry:spring-retry:jar:1.2.5.RELEASE:compile
[INFO] |  |  \- org.springframework.cloud:spring-cloud-function-context:jar:2.0.0.RELEASE:compile
[INFO] |  |     \- org.springframework.cloud:spring-cloud-function-core:jar:2.0.0.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-amqp:jar:2.1.12.RELEASE:compile
[INFO] |  |  \- org.springframework.amqp:spring-rabbit:jar:2.1.8.RELEASE:compile
[INFO] |  |     +- org.springframework.amqp:spring-amqp:jar:2.1.8.RELEASE:compile
[INFO] |  |     \- com.rabbitmq:amqp-client:jar:5.4.3:compile
[INFO] |  +- org.springframework.integration:spring-integration-amqp:jar:5.1.9.RELEASE:compile
[INFO] |  +- org.springframework.integration:spring-integration-core:jar:5.1.9.RELEASE:compile
[INFO] |  |  \- io.projectreactor:reactor-core:jar:3.2.14.RELEASE:compile
[INFO] |  |     \- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO] |  \- org.springframework.integration:spring-integration-jmx:jar:5.1.9.RELEASE:compile
[INFO] +- io.springfox:springfox-swagger2:jar:2.8.0:compile
[INFO] |  +- io.swagger:swagger-annotations:jar:1.5.14:compile
[INFO] |  +- io.swagger:swagger-models:jar:1.5.14:compile
[INFO] |  +- io.springfox:springfox-spi:jar:2.8.0:compile
[INFO] |  |  \- io.springfox:springfox-core:jar:2.8.0:compile
[INFO] |  +- io.springfox:springfox-schema:jar:2.8.0:compile
[INFO] |  +- io.springfox:springfox-swagger-common:jar:2.8.0:compile
[INFO] |  +- io.springfox:springfox-spring-web:jar:2.8.0:compile
[INFO] |  |  \- org.reflections:reflections:jar:0.9.11:compile
[INFO] |  +- com.google.guava:guava:jar:24.1.1-jre:compile
[INFO] |  |  +- org.checkerframework:checker-compat-qual:jar:2.0.0:compile
[INFO] |  |  +- com.google.errorprone:error_prone_annotations:jar:2.1.3:compile
[INFO] |  |  +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
[INFO] |  |  \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
[INFO] |  +- com.fasterxml:classmate:jar:1.4.0:compile
[INFO] |  +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] |  \- org.mapstruct:mapstruct:jar:1.2.0.Final:compile
[INFO] +- io.springfox:springfox-bean-validators:jar:2.8.0:compile
[INFO] +- io.springfox:springfox-swagger-ui:jar:2.8.0:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] +- com.querydsl:querydsl-apt:jar:4.2.2:compile
[INFO] |  \- com.querydsl:querydsl-codegen:jar:4.2.2:compile
[INFO] |     \- com.mysema.codegen:codegen:jar:0.6.8:compile
[INFO] |        \- org.eclipse.jdt.core.compiler:ecj:jar:4.3.1:compile
[INFO] +- com.querydsl:querydsl-jpa:jar:4.2.2:compile
[INFO] |  \- com.querydsl:querydsl-core:jar:4.2.2:compile
[INFO] |     +- com.mysema.commons:mysema-commons-lang:jar:0.2.4:compile
[INFO] |     \- com.infradna.tool:bridge-method-annotation:jar:1.13:compile
[INFO] +- com.sap.hcp.cf.logging:cf-java-logging-support-logback:jar:2.1.5:compile
[INFO] |  \- com.sap.hcp.cf.logging:cf-java-logging-support-core:jar:2.1.5:compile
[INFO] |     \- com.fasterxml.jackson.jr:jackson-jr-objects:jar:2.9.9:compile
[INFO] +- com.sap.hcp.cf.logging:cf-java-logging-support-servlet:jar:2.1.5:compile
[INFO] |  \- com.auth0:java-jwt:jar:3.3.0:compile
[INFO] +- com.sap.xs.auditlog:audit-java-client-api:jar:2.0.6:compile
[INFO] +- com.sap.cloud.sjb:xs-user-holder:jar:1.17.5:compile
[INFO] |  \- com.sap.cloud.security.xsuaa:api:jar:2.7.6:compile
[INFO] +- com.sap.xs.auditlog:audit-java-client-impl:jar:2.0.6:compile
[INFO] |  \- com.sap.xs.auditlog:auditlog-common:jar:2.0.13:compile
[INFO] |     \- commons-validator:commons-validator:jar:1.6:compile
[INFO] |        +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
[INFO] |        +- commons-digester:commons-digester:jar:1.8.1:compile
[INFO] |        +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |        \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] +- com.sap.xs.java:xs-env:jar:1.7.2:compile
[INFO] +- com.jayway.jsonpath:json-path:jar:2.4.0:compile
[INFO] |  \- net.minidev:json-smart:jar:2.3:compile
[INFO] |     \- net.minidev:accessors-smart:jar:1.2:compile
[INFO] |        \- org.ow2.asm:asm:jar:5.0.4:compile
[INFO] \- com.sap.is.retail.csi:CSI-Validator:jar:2006.0.1:compile
nenaraab commented 4 years ago

Hi @chengg-sap

I guess its an issue with com/sap/is/retail/csi/collector/config/HibernateCloudDbConfig configuration class, this or another bean, that is references here, can't be created.

I've checked your GitHub Repo and I guess you face issues with TenantAwareDataSource and TenantIdDeterminer which may be provided with com.sap.icd:mt-spring-boot-starter.

Please check whether this dependency requires a dependency to java-container-security?

Thanks and best regards, Nena

nenaraab commented 4 years ago

hi @chengg-sap furthermore, in case you run your app not in an XSA environment but on CF you can also use this audit log dependencies:

<groupId>com.sap.cp.auditlog</groupId>
<artifactId>audit-java-client-impl</artifactId>
<version>2.0.16</version>
<groupId>com.sap.cp.auditlog</groupId>
<artifactId>audit-java-client-api</artifactId>
<version>2.0.16</version>

Best regards, Nena

chengg-sap commented 4 years ago

Hey @nenaraab ,

Thank you for all your help. You are right, the issue is coming from HibernateCloudDbConfig, and a bean that requires the java-security-container cannot be created.

Please check whether this dependency requires a dependency to java-container-security?

It does make uses: com.sap.xs2.security.container.SecurityContext.

Do you think we should migrate from com.sap.icd:mt-spring-boot-starter to com.sap.cloud.spring.boot:spring-boot-starter-multi-tenancy by following this guide? Or is there anything else that we could try?

Thank you so much for your time.

Best regards, Cheng

nenaraab commented 4 years ago

Hi @chengg-sap

Maybe you can reach out the author of this guide - as I'm not the expert here... I think this is the lib that is used as part of CAP.

Is it okay, if i close the ticket?

Best regards, Nena

chengg-sap commented 4 years ago

@nenaraab Thank you so much for your help. I will reach out to the colleague from the MT guide.

chengg-sap commented 4 years ago

Hi @nenaraab I've contacted the colleague from MT Library. The original issue has been solved, but a new error is occurred during deployment.

org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)","Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is java.lang.NullPointerException: while trying to invoke the method com.sap.cloud.security.xsuaa.XsuaaServiceConfiguration.getAppId() of a null object loaded from local variable 'xsuaaServiceConfiguration'","tat 

It is similar to the following issue, but adding the ComponentScan didn't fix the issue.

The solution from this common issue did not work either.

Our branch can be found here.

Do you have any suggestions on how to fix this error? Thank you!

Best regards, Cheng

nenaraab commented 4 years ago

Hi @chengg-sap do you have any XsuaaServiceConfiguration.getAppId()? I can't find it in your Github repo. So my assumption is, that it the error occurs in one of your dependencies. Please check.

Best regards, Nena

chengg-sap commented 4 years ago

Hello @nenaraab ,

Thank you so much for the quick reply! You are right, we don't have any XsuaaServiceConfiguration.getAppId() This call is coming from com.sap.cloud.security.xsuaa.XsuaaServiceConfiguration.getAppId().

The full log could be found here: collector-service-green-2020-10-01 16_08_49.524+0000.txt

Are we missing anything from the spring-xsuaa library?

Best regards, Cheng

nenaraab commented 4 years ago

Sorry, I have never seen such an issue... but I've seen that issue:

e8a225a09509","container_id":"10.0.138.199","type":"log","logger":"org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor","thread":"main","level":"INFO","categories":[],"msg":"Autowired annotation is not supported on static fields: private static com.sap.cloud.security.xsuaa.XsuaaServiceConfiguration com.sap.is.retail.csi.collector.config.WebSecurityConfig.xsuaaServiceConfiguration" }
nenaraab commented 4 years ago

see also here #370

chengg-sap commented 4 years ago

see also here #370

Thank you @nenaraab. I will try it out!

chengg-sap commented 4 years ago

The application now can be deployed successfully. However, when a request is sent, a 401 Unauthorized response is always returned.

From the following log, it looks like some instance is trying to access security/oauth2/jwt/NimbusJwtDecoder.

"Caused by: java.lang.NoClassDefFoundError: org/springframework/security/oauth2/jwt/NimbusJwtDecoder","tat com.sap.cloud.security.xsuaa.token.authentication.XsuaaJwtDecoder.getDecoder(XsuaaJwtDecoder.java:161)"

The full log could be found here: collector-service-green-2020-10-01 22_59_12.472+0000.txt

@nenaraab Since the original issue has been solved, should I create a new ticket for the new issue?

Thanks again for your help!

Best regards, Cheng

nenaraab commented 4 years ago

Hi @chengg-sap

NimbusJwtDecoder comes with this dependency: https://mvnrepository.com/artifact/org.springframework.security/spring-security-oauth2-jose

And "YES": please open for new issues a new "ticket". Thanks!

Best regards, Nena