Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Classloader issue prevents me from accessing the HCP Document Service

Hi!

I'm trying to access the HANA Cloud Document Service. When I follow the instructions in the documentation I encounter the following error after the JNDI lookup of the EcmService resource:

Cannot cast class com.sap.ecm.impl.EcmServiceImpl to interface com.sap.ecm.api.EcmService (found matching interface com.sap.ecm.api.EcmService loaded by org.apache.catalina.loader.StandardClassLoader [id=8787,parents=System@6590], but needed loader WebappClassLoader

This is the code snippet causing the error:

InitialContext ctx = new InitialContext();

String lookupName = "java:comp/env/EcmService";

EcmService ecmSvc = (EcmService) ctx.lookup(lookupName); // This is where the exeption occurs

I'm using the latest HANA Cloud Tomcat 7 runtime (2.34.8) in the Factory landscape and made sure that the neo-java-web-api has the maven scope "provided".

Any ideas?

Thanks!

Former Member
Not what you were looking for? View more on this topic or Ask a question