简体   繁体   中英

Problem running project from s4sdk archtypes with artifact id: scp-cf-spring

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.

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM