on 09-05-2016 10:35 AM
Hello SCN,
I want to access the Document Service in an external Application and i'm following this Tutorial SAP HANA Cloud Platform.
I built the servlet, which should expose the document service to an external app following the exact steps.
I end up with this servlet file
import com.sap.ecm.api.AbstractCmisProxyServlet;
public class CMISProxyServlet extends AbstractCmisProxyServlet {
@Override
protected String getRepositoryUniqueName() {
return "demo.repository.com";
}
@Override
//For productive applications, use a secure location to store the secret key.
protected String getRepositoryKey() {
return "********************";
}
}
When i use eclipse to deploy the servlet on my trial instance i get the following error.
2016 09 05 09:30:26#+00#ERROR#org.eclipse.virgo.web.enterprise.openejb.deployer.VirgoDeployerEjb##anonymous#fs-watcher#na#p1942007883trial#repositoryse#web##Error while deploying application
with real path '/usr/sap/ljs/webapps/Repository_Servlet' and web context path '/Repository_Servlet'org.apache.openejb.OpenEJBException: Unable to load servlet class: com.sap.sapfiledepot.CMISProxyServlet: com.sap.sapfiledepot.CMISProxyServlet
Does anyone have a clue what could haven gone wrong here?
Greetings
Oliver
Looks like your servlet class is not packaged in your war file or its name (including packages) does not match the name specified in your web.xml.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vladimir,
thanks for the idea where the error could come from.
Since I'm a beginner with servlets i didn't correctly map the servlet class in the web.xml.
The code in the tutorial is:
<servlet>
<servlet-name>cmisproxy</servlet-name>
<servlet-class>my.app.CMISProxyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>cmisproxy</servlet-name>
<url-pattern>/cmis/*</url-pattern>
</servlet-mapping>
Since i just added a servlet with out a package line 03 should be:
<servlet-class>CMISProxyServlet</servlet-class>
It works now.
Thanks everyone and happy coding.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.