0

I'm getting issues in running hello world project when I created it from below command:

mvn archetype:generate -DarchetypeGroupId=com.sap.cloud.s4hana.archetypes -DarchetypeArtifactId=scp-cf-spring -DarchetypeVersion=LATEST

The project gets created fine but when I'm running the application I get an error in creating beans, the error looks something like this:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.sap.cloud.sdk.cloudplatform.cache.CacheMonitor': Cannot create inner bean '(inner bean)#630d4350' of type [com.sap.cloud.sdk.cloudplatform.cache.CacheMonitor] while setting bean property 'listener'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.sap.cloud.sdk.cloudplatform.cache.CacheMonitor] for bean with name '(inner bean)#630d4350' defined in URL [jar:file:/Users/setup/.m2/repository/com/sap/cloud/s4hana/cloudplatform/caching/2.4.2-SNAPSHOT/caching-2.4.2-SNAPSHOT.jar!/com/sap/cloud/sdk/cloudplatform/cache/CacheMonitor.class]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: com/sap/cloud/sdk/cloudplatform/monitoring/JmxMonitor . . .

Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.sap.cloud.sdk.cloudplatform.cache.CacheMonitor] for bean with name '(inner bean)#630d4350' defined in URL [jar:file:/Users/setup/.m2/repository/com/sap/cloud/s4hana/cloudplatform/caching/2.4.2-SNAPSHOT/caching-2.4.2-SNAPSHOT.jar!/com/sap/cloud/sdk/cloudplatform/cache/CacheMonitor.class]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: com/sap/cloud/sdk/cloudplatform/monitoring/JmxMonitor . . .

Caused by: java.lang.ClassNotFoundException: com.sap.cloud.sdk.cloudplatform.monitoring.JmxMonitor

Please let me know if I should furnish more details.

4

1 回答 1

1

解决方法是:我生成了版本为 2.3.1 的项目,它现在工作正常。:

mvn archetype:generate -DarchetypeGroupId=com.sap.cloud.s4hana.archetypes -DarchetypeArtifactId=scp-cf-spring -DarchetypeVersion=2.3.1
于 2018-09-08T09:03:12.963 回答