cancel
Showing results for 
Search instead for 
Did you mean: 

Problem connecting HCP to SCC

former_member182650
Contributor
0 Kudos

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 😞 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:

SAP HANA Cloud Platform


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://<<myaccount>>trial.hanatrial.ondemand.com/hcpproto/BackendServlet?

HTTP Status 500 - There is no SAP Cloud Connector (SCC) connected for your account or tenant.


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!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Angel,

this exception means that your destination doesn't have the

CloudConnectorVersion = 2 property.

From your screenshots it can be seen the property is there


So maybe there is a cached destination.

Did you by any chance used the command line for creating destinations?

Please try restarting your application.


Regards,

Nace

former_member182650
Contributor
0 Kudos

Thanks!

I've saved a destination with value 1 and modified with value 2 without restarting

Kind regards

Answers (1)

Answers (1)

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Angel,

the exception indicates that CloudConnectorVersion 1 is used. In your configuration though, I can see a value of 2, which would fit. That looks strange. Do you have just updated the config? There is a cache of 5 minuites so that still the old variant is used. Can yoou try again and increase traces for your application so that we have more information, why it is not trying to use the correct runtime.

Best regards,

Markus