Skip to Content
0
Apr 14, 2019 at 02:52 AM

Cloud Application Programming - odata fails- " No Runtime Providers present"

260 Views

Hi experts,

I am following the cloud programming model where I have a java service layer. I have deployed the artifacts in an XSA environment. When I hit the metadata, I am getting Service unavailable. The logs show this:

#com.sap.cloud.sdk.service.prov.v2.rt.cdx.CDXRuntimeDelegate########http-nio-127.0.0.1-50222-exec-1#PLAIN##
                                        No Runtime Providers present for the URL and languageOdata

#com.sap.cloud.sdk.service.prov.v2.rt.core.CloudSDKODataErrorCallback########http-nio-127.0.0.1-50222-exec-1#PLAIN##
                                        Request URL: /odata/v2/Odata/$metadata
                                        StatusCode:500
                                        org.apache.olingo.odata2.api.exception.ODataInternalServerErrorException: Service unavailable.
                                                at org.apache.olingo.odata2.core.servlet.ODataServlet.createServiceUnavailableResponse(ODataServlet.java:373)
                                                at org.apache.olingo.odata2.core.servlet.ODataServlet.handleRequest(ODataServlet.java:210)
                                                at org.apache.olingo.odata2.core.servlet.ODataServlet.handle(ODataServlet.java:115)
                                                at org.apache.olingo.odata2.core.servlet.ODataServlet.service(ODataServlet.java:85)
                                                at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
                                                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
                                                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                                                at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
                                                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
                                                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                                                at com.sap.cloud.sdk.cloudplatform.servlet.RequestContextServletFilter.lambda$doFilter$0(RequestContextServletFilter.java:171)
                                                at com.sap.cloud.sdk.cloudplatform.servlet.RequestContextCallable.call(RequestContextCallable.java:131)
                                                at com.sap.cloud.sdk.cloudplatform.servlet.RequestContextServletFilter.doFilter(RequestContextServletFilter.java:173)
                                                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
                                                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                                                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
                                                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
                                                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
                                                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
                                                at com.sap.xs.java.valves.ErrorReportValve.invoke(ErrorReportValve.java:66)
                                                at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
                                                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
                                                at com.sap.xs.jdbc.datasource.valve.JDBCValve.invoke(JDBCValve.java:62)
                                                at com.sap.xs.security.UserInfoValve.invoke(UserInfoValve.java:19)
                                                at com.sap.xs.statistics.tomcat.valve.RequestTracingValve.invoke(RequestTracingValve.java:43)
                                                at com.sap.xs.logging.catalina.RuntimeInfoValve.invoke(RuntimeInfoValve.java:40)
                                                at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:679)
                                                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
                                                at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
                                                at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
                                                at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
                                                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
                                                at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
                                                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
                                                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
                                                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                                                at java.lang.Thread.run(Thread.java:836)

My pom looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.sap.cloud.servicesdk.prov</groupId>
    <artifactId>projects-parent-odatav2</artifactId>
    <version>1.27.0</version>
  </parent> 
  <artifactId>CustomerAtRiskCAP-srv</artifactId>
  <groupId>sap</groupId>
  <packaging>war</packaging>
  <name>CustomerAtRiskCAP-srv</name>
  <properties>

<sap.gateway.version>1.13.1</sap.gateway.version>
<sap.cloud.sdk.version>3.76.12</sap.cloud.sdk.version>
</properties>
  <build>
    <finalName>CustomerAtRiskCAP-srv</finalName>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.6.0</version>
        <configuration>
          <executable>npm</executable>
          <workingDirectory>${project.basedir}/../</workingDirectory>
        </configuration>
        <executions>
          <execution>
            <id>npm install</id>
            <goals>
              <goal>exec</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <arguments>
                <argument>install</argument>
              </arguments>
            </configuration>
          </execution>
          <execution>
            <id>npm run build</id>
            <goals>
              <goal>exec</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <arguments>
                <argument>run</argument>
                <argument>build</argument>
              </arguments>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <activation>
        <property>
          <name>devmode</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <version>3.0.0</version>
            <configuration>
              <webResources combine.children="append">
                <resource>
                  <directory>${project.build.sourceDirectory}</directory>
                  <targetPath>sources</targetPath>
                </resource>
              </webResources>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
<profile>
<id>buildCDS</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>npm install cds</id>
<goals>
<goal>exec</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<!-- assuming npm is in the $PATH -->
<executable>npm</executable>
<workingDirectory>${project.basedir}/../</workingDirectory>
<arguments>
<argument>install</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>npm run build cds</id>
<goals>
<goal>exec</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<!-- assuming npm is in the $PATH -->
<executable>npm</executable>
<workingDirectory>${project.basedir}/../</workingDirectory>
<arguments>
<argument>run</argument>
<argument>build</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
  </profiles>
</project>

Could anyone please help me?

Thanks!

Narayani