2

Motivated by this blog entry, I tried to implement multitenancy for our existing application on the classic SAP Neo SCP.

I added the dependency

<dependency>
    <groupId>com.sap.cloud.s4hana.cloudplatform</groupId>
    <artifactId>tenant-scp-neo</artifactId>
    <version>1.9.5</version>
</dependency>

to my POM and accessed the tenant in a test program via

String tenantId = TenantAccessor.getCurrentTenant().getTenantId();

Then, I got this error

java.lang.NoClassDefFoundError: com/google/common/collect/Multiset
    at com.sap.cloud.sdk.cloudplatform.monitoring.ExceptionMonitor.<init>(ExceptionMonitor.java:30) ~[core-1.9.5.jar:na]
    at com.sap.cloud.sdk.cloudplatform.monitoring.ExceptionMonitor.<clinit>(ExceptionMonitor.java:28) ~[core-1.9.5.jar:na]
    at com.sap.cloud.sdk.cloudplatform.logging.CloudLoggerFactory$CloudLogger.<init>(CloudLoggerFactory.java:67) ~[core-1.9.5.jar:na]
    at com.sap.cloud.sdk.cloudplatform.logging.CloudLoggerFactory$CloudLogger.<init>(CloudLoggerFactory.java:47) ~[core-1.9.5.jar:na]
    at com.sap.cloud.sdk.cloudplatform.logging.CloudLoggerFactory.getLogger(CloudLoggerFactory.java:19) ~[core-1.9.5.jar:na]
    at com.sap.cloud.sdk.cloudplatform.tenant.ScpNeoTenantFacade.<clinit>(ScpNeoTenantFacade.java:21) ~[tenant-scp-neo-1.9.5.jar:na]

How can I solve this issue?

Gustavo Straube
  • 3,744
  • 6
  • 39
  • 62
gigi.com
  • 23
  • 1
  • 4

1 Answers1

0

After some investigation, it seems that the issue was a corrupt guava jar file in the Maven repository (within the .m2 folder). Deleting the respective folders and having Maven download them again fixed the issue.

Sander Wozniak
  • 650
  • 8
  • 27
  • Hello [gigi.com](https://stackoverflow.com/users/9606786/gigi-com), if this answer solved your problem, please mark the answer as "accepted". Thanks. – Florian Wilhelm Apr 10 '18 at 07:29