Hi folks,
I'm trying to create this demo scenario:
- SAPUI5 app deployed on Hana Cloud Platform accessing GW Demo System throught SAP Cloud Connector.
- GW is this demo system (previously I've been registered Getting started with the SAP Netweaver Gateway Service Consumption System): https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZGWSAMPLE_SRV/?sap-ds-debug=true
I've followed this steps:
1 - Install SAP JVM
2 - Install SAP Cloud Connector
3 - Connect SAP Cloud Connector to hanatrial account:
4 - Create a destination on hanatrial account:
5 - Create a SAPUI5 app with HANA Studio SP7 and deploy to hanatrial account. To verify backend connection I've tried to create this example servlet:
public class BackendServlet extends HttpServlet { private static final long serialVersionUID = 1L; public BackendServlet() { } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse * response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { Context ctx = new InitialContext(); HttpDestination destination = (HttpDestination) ctx.lookup("java:comp/env/gwdemotestdestination"); HttpClient createHttpClient = destination.createHttpClient(); HttpGet get = new HttpGet(""); HttpResponse resp = createHttpClient.execute(get); HttpEntity entity = resp.getEntity(); String respToString = EntityUtils.toString(entity); response.getWriter().println(respToString); } catch (DestinationException e) { throw new RuntimeException(e); } catch (NamingException e) { throw new RuntimeException(e); } } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse * response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } }
6 - Results on call this url https://< > trial.hanatrial.ondemand.com/hcpproto/BackendServlet?
type Exception report
message There is no SAP Cloud Connector (SCC) connected for your account or tenant.
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.io.IOException: There is no SAP Cloud Connector (SCC) connected for your account or tenant. com.sap.core.connectivity.httpdestination.runtime.onpremise.accad.OnPremiseRequestDirectorExtender.checkIsThereConnectedSCC(OnPremiseRequestDirectorExtender.java:75) com.sap.core.connectivity.httpdestination.runtime.onpremise.accad.OnPremiseRequestDirectorExtender.execute(OnPremiseRequestDirectorExtender.java:61) org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820) org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:776) com.sap.core.connectivity.httpdestination.runtime.onpremise.accad.OnPremiseHttpClientDecorator.execute(OnPremiseHttpClientDecorator.java:27) com.sap.core.connectivity.httpdestination.impl.HttpClientWrapper.execute(HttpClientWrapper.java:63) com.stratesys.hcpproto.servlet.BackendServlet.doGet(BackendServlet.java:39) javax.servlet.http.HttpServlet.service(HttpServlet.java:735) javax.servlet.http.HttpServlet.service(HttpServlet.java:848) com.sap.core.communication.server.CertValidatorFilter.doFilter(CertValidatorFilter.java:318)
note The full stack trace of the root cause is available in the SAP logs.
I would to know which step could be missing.
Thanks in advance!