Skip to Content
Author's profile photo Former Member

SAP Web IDE Ninja #4: Develop Full-Stack To-Do app in SAP Web IDE – Part 2 – Server Side

This blog post is part 2 of a series of blogs on how to develop full-stack To-Do application in SAP Web IDE Full-Stack.

Prerequisites

Before reading this blog please make sure that you have read, understood and implemented part 0 and part 1 of this series.

 

Let’s Get Started!

Create your Java Module

The Java module is responsible for:

  1. OData provisioning of the database module
  2. Custom business logic

In our app we will use it for the OData provisioning.

To create the Java module, follow these steps:

  • In SAP Web IDE, select the todo project folder
  • Right-click it and select New -> Java Module
  • Select OData V4 Service Using SAP Cloud Platform SDK template and then click on Next.
  • Enter service as the module name and click Next.
  • Enter Group ID, artifact ID and package or just use the default values.
    Make sure that Enable SAP HANA Database support checkbox is checked! It’s needed to allow connectivity from the Java service to the HANA database module. Finally, click Finish.
  • SAP Web IDE creates a new service folder under your todo project folder. In addition, the mta.yaml file is updated and now contains the service java module in addition to the db module.
    Specifically notice the ‘provides’ and ‘requires’ sections in the mta.yaml file. The db and java modules both require HANA and provides a service_api which will be used by the UI module (that we will create in part 3 of this series).
  • Next, select the service folder which is located under service > src > main > java >
    {your_package_path} > service
  • Right-click it and select New > Java Class to create a new Java class
  • Enter ToDoService in the Name field, click Next and Finish
  • SAP Web IDE creates the ToDoService.java file in the service folder
  • Open the ToDoService.java file in the code editor
  • Copy the code below and paste it under the first line in the file (under the package {your_package_name} )
    import java.sql.Connection;
    
    import java.util.List;
    
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    
    
    import com.sap.cloud.sdk.hana.connectivity.cds.CDSQuery;
    import com.sap.cloud.sdk.hana.connectivity.cds.CDSSelectQueryBuilder;
    import com.sap.cloud.sdk.hana.connectivity.cds.CDSSelectQueryResult;  
    
    import com.sap.cloud.sdk.hana.connectivity.handler.CDSDataSourceHandler;
    import com.sap.cloud.sdk.hana.connectivity.handler.DataSourceHandlerFactory;
    
    
    import com.sap.cloud.sdk.service.prov.api.EntityData;       
    import com.sap.cloud.sdk.service.prov.api.operations.Query;
    import com.sap.cloud.sdk.service.prov.api.operations.Read;       
    import com.sap.cloud.sdk.service.prov.api.request.QueryRequest;
    import com.sap.cloud.sdk.service.prov.api.request.ReadRequest;       
    import com.sap.cloud.sdk.service.prov.api.response.QueryResponse;
    import com.sap.cloud.sdk.service.prov.api.response.ReadResponse; 
    
    /**
     *
     * @author I059508
     */
    public class ToDoService {
    	
    	private static Logger logger = LoggerFactory.getLogger(ToDoService.class);
    	
    	@Query(entity = "Task", serviceName = "todo")
    	public QueryResponse findTasks(QueryRequest request) {
    		try {
    			QueryResponse res = QueryResponse.setSuccess().setEntityData(getEntitySet(request)).response();
    			return res;
    		} catch (Exception e) {
    			return null;
    		}
    	}
    	
    	@Read(entity = "Task", serviceName = "todo")
    	public ReadResponse getProposedBooks(ReadRequest readRequest){
    		try {
    			ReadResponse readResponse = ReadResponse.setSuccess().setData(readEntity(readRequest)).response();
    			return readResponse;
    		} catch (Exception e) {
    	       	return null;
    	    }
    	}	
    	
    	private List<EntityData> getEntitySet(QueryRequest queryRequest) {
    		String fullQualifiedName = queryRequest.getEntityMetadata().getNamespace() + "." + queryRequest.getEntityMetadata().getName();			
    		CDSDataSourceHandler dsHandler = DataSourceHandlerFactory.getInstance().getCDSHandler(getConnection(), queryRequest.getEntityMetadata().getNamespace());
    		try {
    			CDSQuery cdsQuery = new CDSSelectQueryBuilder(fullQualifiedName).build();   		
    			CDSSelectQueryResult cdsSelectQueryResult = dsHandler.executeQuery(cdsQuery);			
    			return cdsSelectQueryResult.getResult();
    		} catch (Exception e) {
    			logger.error("==> Eexception while fetching query data from CDS: " + e.getMessage());
    			e.printStackTrace();
    		}
    		return null;
    	}
    	
    	private EntityData readEntity(ReadRequest readRequest) throws Exception {
    		CDSDataSourceHandler dsHandler = DataSourceHandlerFactory.getInstance().getCDSHandler(getConnection(), readRequest.getEntityMetadata().getNamespace());
    		EntityData ed = dsHandler.executeRead(readRequest.getEntityMetadata().getName(), readRequest.getKeys(), readRequest.getEntityMetadata().getElementNames());
    		return ed;
    	}	
    	
    	private static Connection getConnection(){
    		Connection conn = null;
    		Context ctx;
    		try {
    			ctx = new InitialContext();
    			conn = ((DataSource) ctx.lookup("java:comp/env/jdbc/java-hdi-container")).getConnection();
    			System.out.println("conn = " + conn);
    		} catch (Exception e) {
    			e.printStackTrace();
    		}
    		return conn;
    	}
    }​

     

  • The java code that you just added is doing the following:
    • Connects to the SAP HANA database – see the getConnection() method
    • Uses the @Read and @Query annotations to expose a task and a list of tasks in OData. This is done using the SAP Cloud Java SDK which is added automatically by SAP Web IDE as a Maven dependency in the module (to understand more, review the pom.xml).

      Notice: This java code handles only the Task entity’s ‘query’ and ‘read’ operations.
      Handling the SubTask entity or any other CUD (create, update, delete) operations can be done in the same way (using the same SDK with similar code).

 

  • Now let’s create the EDMX file for our OData V4 service metadata.
    Select the edmx folder (which is located under the resources folder), right-click it and select New > File
  • Enter todo_v4_default.xml as the File Name and click OK
  • Open the new file and paste the following content into it:
    <?xml version='1.0' encoding='UTF-8'?>
    <edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
    	<edmx:DataServices>
    		<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="todo">
    			<EntityType Name="Task">
    				<Key>
    					<PropertyRef Name="id"/>
    				</Key>
    				<Property Name="id" Type="Edm.String" Nullable="false" MaxLength="10"/>
    				<Property Name="title" Type="Edm.String" Nullable="false" MaxLength="100"/>
    				<Property Name="note" Type="Edm.String" MaxLength="250"/>
    				<Property Name="status" Type="Edm.Int16"/>
    			</EntityType>
    			<EntityType Name="SubTask">
    				<Key>
    					<PropertyRef Name="id"/>
    				</Key>
    				<Property Name="id" Type="Edm.String" Nullable="false" MaxLength="10"/>
            <Property Name="taskId" Type="Edm.String" Nullable="false" MaxLength="10"/>
    				<Property Name="content" Type="Edm.String" Nullable="false" MaxLength="250"/>
    				<Property Name="status" Type="Edm.Int16"/>
    			</EntityType>      
    			<EntityContainer Name="EntityContainer_16ED33654DD94D7FA71D8CBCD0F62216">
    				<EntitySet Name="Task" EntityType="todo.Task"></EntitySet>
            <EntitySet Name="SubTask" EntityType="todo.SubTask"></EntitySet>
    			</EntityContainer>
    		</Schema>
    	</edmx:DataServices>
    </edmx:Edmx>​

    Notice – in the future this file will be automatically generated by SAP Web IDE and so this step will not be required anymore.
    Moreover, the EDMX file must be OData V4 complaint and must contain the same entities, properties and associations that we have in the HDBCDS file that was created in part 1 of this series. For the purpose of this blog it’s sufficient to just copy and paste it into your project.

Build and test your Java module

Now that we created all the relevant resources for our java module, its time to build it.
The build operation will execute a Maven build that will download all the dependencies and check that our java module is runnable.

 

  • Right-click the service folder (which is located under the todo folder) and click Build
  • Logs and info about the build status can be found in SAP Web IDE console (can be opened via the View menu bar).
  • The message Build of /todo/service completed successfully indicates that your project has been built successfully.
  • Now we can run the service!
    Right-click the service folder and select Run > Run Java Application
    (Notice this operation can take several minutes)
  • Finally, SAP Web IDE presents the service URL of your OData service in the Run Console
  • In order to view the content of the OData service, open your browser and enter the URL together with /odata/v4/todo appended to it.
    This should present the OData service document.
  • In order to access to the service metadata add /odata/v4/todo/$metadata
  • In order to access to the list of tasks add /odata/v4/todo/Task

 

That’s it 🙂

In part 3, we will show how to create the UI module that will consume this OData service.
Our app will consume the service and show the lists of tasks in a Master section, and the task details in a Details section.

 

 

 

 

Assigned tags

      32 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Chaitanya Rayabharam
      Chaitanya Rayabharam

      Getting a error when i try to paste the code in the java class. Error says "import com.sap cannot be resolved". This is happening will all com.sap import packages in the code. Can you suggest if I am missing something here

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi, can you please try to build the module and see if it works? It may be related to our syntax validation feature .

       

      Author's profile photo Hanno Suijten
      Hanno Suijten

      Hi Ran, When creating the Java Module (step 1of this blog), I only have the following templates available

      It is not showing OData V4 Service Using SAP Cloud Platform SDK. How can I get this template?

      Author's profile photo Michal Keidar
      Michal Keidar

      Hi,

      Have you enabled all the features that were specified in part 0?
      Make sure that Tools for Java Development and the SAP S/4HANA Extension Tools features are enabled.

      Regards,
      Michal.

      Author's profile photo Tri Le
      Tri Le

      Hi Ran,

      Thanks for wonderful blogs.

      I have one question. It may be out of scope here.

      I see that when I choose new template, there is one option SAP S/4HANA Service Extension. How is this template different from MTA or Full stack application for CF?

      I’ve been trying to google document about it but found nothing.

      Do you have any resources regarding to this template?

      Thanks in advance.

      Tri

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Tri,

      My blogs explain how to create full stack app from scratch using our current programming model. The template that you asked about is for extending S/4 services (with code). I think Boris Tsirulnik can provide more info about it.

       

      Ran.

      Author's profile photo Former Member
      Former Member

      Hi Ran,

       

      In a java module for an MTA project I need a library which is not part of the maven repository.

      I can find this library (com.sap.xs2.security.java-container-security) inside Nexus repository: http://nexus.wdf.sap.corp:8081/nexus/content/groups/build.milestones.

      I added a settings.xml file in the Java module with the nexus repository but still no success.

      In the documentation I've read that there is a default settings.xml file which is overwritten when you create your own settings file. See here: https://help.sap.com/viewer/DRAFT/4505d0bdaf4948449b7f7379d24d0f0d/2.0.01/en-US/e19ece95516c4dd9b7a2d081395efef0.html

      Could you tell me where can I find this default settings.xml file? Do I need to set any proxy for the nexus repository? Have any idea what I can do to solve my issue?

      Thank you!

      Andreea

       

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Former Member as much as i know currently you cannot add custom maven repo and all your dependencies must be available on the maven central repository. I think Boris Tsirulnik can provide more details about it.

      Thanks,

      Ran. 

      Author's profile photo Former Member
      Former Member

      Hi Ran,

      Thanks for your answer. I will contact Boris.

      Andreea

      Author's profile photo Former Member
      Former Member

      Hi Guys,

      nice blog and detailed to the best extent.

      i am trying out the same whereas when I run the service i dont get data in the response.

      the url that i hit is .- https://p19xxxxxxx-unl2mvmp7i27nwr2-bookstore-service.cfapps.eu10.hana.ondemand.com/odata/v4/store/Book

      and response i get is - {"@odata.context":"$metadata#Book","value":[]} , ideally i should get the array of data from table.

      when i check logs i find that there is an java exception in line -conn = ((DataSource)
      ctx.lookup("java:comp/env/jdbc/java-hdi-container")).getConnection();

      "javax.naming.NamingException: The url cannot be null
      at org.apache.naming.NamingContext.lookup(NamingContext.java:856)"

      looks like it is not able to fetch the HDI containername or somethinng like that , i have no clue what this line of code means.

      might be i am missing on a ny steps of some setting to be done in full stack webide.

      any help here is highly appreciated.

       

      Regards

      SK

       

       

       

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi, this blog shows how to create ToDo app and your URL points to the Book entity so i wanted to know if you are trying to create a different app?

      Author's profile photo Former Member
      Former Member

      Yes I am trying to create it based on the hand-son i received at SAP Teched, everything is same except the Database name and Entity.

      Author's profile photo Vishnu Vardhan Tanguturu
      Vishnu Vardhan Tanguturu

      Hi, I have implemented the same example ToDo app. I dont see the resuls of the entity. Please help.

      Author's profile photo Jayakrishnan Chandramohan
      Jayakrishnan Chandramohan

      have you resolved this issue? if yes , can you help me?

      Author's profile photo Vishnu Vardhan Tanguturu
      Vishnu Vardhan Tanguturu

      This can be fixed by concatenating the query string with

      "todo.db::todo.Task"

       

      String fullQualifiedName = "todo.db::" + queryRequest.getEntityMetadata().getNamespace() + "." + queryRequest.getEntityMetadata().getName();

       

      As the SQL console forms the select statement as follows

      SELECT TOP 1000
      "id",
      "title",
      "note",
      "status",
      "FromTaskToSubTask.taskId"
      FROM "TODO_HDI_DB_XX"."todo.db::todo.Task";

       

       

      Author's profile photo Jayakrishnan Chandramohan
      Jayakrishnan Chandramohan

      Hi,

      I am facing issue like "Method Not Implemented". my metadata loads perfectly, but unable to see the data if i choose the entity set. any help?

      Thank you,

      Regards,

      JK

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi , sorry for the delay in my response.

      I think this is related to the Java class. Can you please share your Java class (the ToDoService.java)?

       

      thanks,

      ran.

      Author's profile photo Jayakrishnan Chandramohan
      Jayakrishnan Chandramohan

      Yes, there was a problem with respect to the namesapce. i resolved it, it is working as expected.

       

      Author's profile photo Prajakta Sambre
      Prajakta Sambre

      When I try to run Java Application, getting following error-

      Running module todo/service failed. Cannot read property "Report" of undefined.

       

      With oData service, getting metadata correctly. But when I try to read data using Task entity, it returns empty data-

      {"@odata.context":"$metadata#Task","value":[]}
      
      Can someone please help? 
      Also, I am putting breakpoints in Java App, but they never seem to get hit. Any particular way to run the app in debug mode?
      Thanks..
      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi, Did you tried to check if you get any issue in the database explorer? Please make sure this feature is enabled before doing it

      Author's profile photo Gloria Mendoza
      Gloria Mendoza

      Thank you for your blog. I have been following along with this tutorial, and I find that I am not able to run the service because I have already exceeded the memory quota. Please note that I am running this on the Cloud Foundry trial in SCP. The builder I installed within the project already took up all the available memory on the quota so it is not possible for me to adjust anything within SCP. Isn't there anything I can do to free up memory? The logs are below.

      java.lang.Throwable: com.sap.di.hcp.cf.runner.CfRunnerPlatform$CfDeployException: Failed to deploy application
      Caused by: java.lang.Throwable: Failed to deploy application
      	at com.sap.di.hcp.cf.runner.CfRunnerPlatform.pushApplication(CfRunnerPlatform.java:241)
      	at com.sap.di.runner.ApplicationServerBase.runApplication(ApplicationServerBase.java:253)
      	at com.sap.di.runner.ApplicationServerBase.handleRun(ApplicationServerBase.java:215)
      	at com.sap.di.runner.ApplicationServerBase.deploy(ApplicationServerBase.java:95)
      	at com.sap.xs.java.runner.cp.JavaRunner.newApplicationProcess(JavaRunner.java:67)
      	at org.eclipse.che.api.runner.internal.Runner$3.run(Runner.java:317)
      	at org.eclipse.che.commons.lang.concurrent.CopyThreadLocalRunnable.run(CopyThreadLocalRunnable.java:28)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:808)
      Caused by: java.lang.Throwable: Failed to push and start application iZ4zIVAJTw2dcxoR-todo-service
      	at com.sap.di.hcp.cf.runner.CfRunnerPlatform.pushApplication(CfRunnerPlatform.java:225)
      	... 11 more
      Caused by: java.lang.Throwable: CF-AppMemoryQuotaExceeded(100005): You have exceeded your organization's memory limit: app requested more memory than available
      	at org.cloudfoundry.reactor.util.ErrorPayloadMapper.lambda$null$0(ErrorPayloadMapper.java:46)
      	at org.cloudfoundry.reactor.util.ErrorPayloadMapper.lambda$null$9(ErrorPayloadMapper.java:98)
      	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:118)
      	at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:67)
      	at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:108)
      	at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:115)
      	at reactor.core.publisher.FluxUsing$UsingFuseableSubscriber.onNext(FluxUsing.java:345)
      	at reactor.core.publisher.FluxFilterFuseable$FilterFuseableSubscriber.onNext(FluxFilterFuseable.java:104)
      	at reactor.core.publisher.FluxPeekFuseable$PeekFuseableConditionalSubscriber.onNext(FluxPeekFuseable.java:469)
      	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1085)
      	at reactor.core.publisher.MonoReduceSeed$ReduceSeedSubscriber.onComplete(MonoReduceSeed.java:150)
      	at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:130)
      	at reactor.ipc.netty.channel.FluxReceive.terminateReceiver(FluxReceive.java:376)
      	at reactor.ipc.netty.channel.FluxReceive.drainReceiver(FluxReceive.java:198)
      	at reactor.ipc.netty.channel.FluxReceive.onInboundComplete(FluxReceive.java:338)
      	at reactor.ipc.netty.channel.ChannelOperations.onInboundComplete(ChannelOperations.java:341)
      	at reactor.ipc.netty.http.client.HttpClientOperations.onInboundComplete(HttpClientOperations.java:265)
      	at reactor.ipc.netty.channel.ChannelOperations.onHandlerTerminate(ChannelOperations.java:417)
      	at reactor.ipc.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:575)
      	at reactor.ipc.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:129)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
      	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1336)
      	at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1127)
      	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1162)
      	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
      	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
      	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.handler.proxy.ProxyHandler.channelRead(ProxyHandler.java:255)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
      	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:255)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935)
      	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
      	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
      	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
      	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
      	... 1 more
      	Suppressed: java.lang.Throwable: 
      Assembly trace from producer [reactor.core.publisher.MonoPeek] :
      	reactor.core.publisher.Mono.checkpoint(Mono.java:1295)
      	reactor.core.publisher.Mono.checkpoint(Mono.java:1245)
      	org.cloudfoundry.reactor.client.v2.applications.ReactorApplicationsV2.update(ReactorApplicationsV2.java:210)
      	org.cloudfoundry.operations.applications.DefaultApplications.requestUpdateApplication(DefaultApplications.java:1438)
      	org.cloudfoundry.operations.applications.DefaultApplications.requestUpdateApplicationState(DefaultApplications.java:1465)
      	org.cloudfoundry.operations.applications.DefaultApplications.startApplicationAndWait(DefaultApplications.java:1504)
      	org.cloudfoundry.operations.applications.DefaultApplications.lambda$start$46(DefaultApplications.java:520)
      	org.cloudfoundry.util.tuple.TupleUtils.lambda$function$7(TupleUtils.java:151)
      	reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:118)
      	reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1085)
      	reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:241)
      	reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1085)
      	reactor.core.publisher.MonoZip$ZipCoordinator.signal(MonoZip.java:258)
      	reactor.core.publisher.MonoZip$ZipInner.onNext(MonoZip.java:329)
      	reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:108)
      	reactor.core.publisher.FluxFilter$FilterSubscriber.onNext(FluxFilter.java:97)
      	reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:73)
      	reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1085)
      	reactor.core.publisher.MonoSingle$SingleSubscriber.onComplete(MonoSingle.java:170)
      	reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:130)
      	reactor.core.publisher.FluxFlatMap$FlatMapMain.checkTerminated(FluxFlatMap.java:771)
      	reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:541)
      	reactor.core.publisher.FluxFlatMap$FlatMapMain.drain(FluxFlatMap.java:521)
      	reactor.core.publisher.FluxFlatMap$FlatMapMain.onComplete(FluxFlatMap.java:407)
      	reactor.core.publisher.MonoFlatMapMany$FlatMapManyInner.onComplete(MonoFlatMapMany.java:248)
      	reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.drainAsync(FluxFlattenIterable.java:321)
      	reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.drain(FluxFlattenIterable.java:633)
      	reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.onComplete(FluxFlattenIterable.java:255)
      	reactor.core.publisher.FluxBuffer$BufferExactSubscriber.onComplete(FluxBuffer.java:179)
      	reactor.core.publisher.FluxConcatArray$ConcatArraySubscriber.onComplete(FluxConcatArray.java:184)
      	reactor.core.publisher.FluxConcatArray.subscribe(FluxConcatArray.java:80)
      	reactor.core.publisher.FluxBuffer.subscribe(FluxBuffer.java:72)
      	reactor.core.publisher.FluxFlattenIterable.subscribe(FluxFlattenIterable.java:107)
      	reactor.core.publisher.Flux.subscribe(Flux.java:6447)
      	reactor.core.publisher.MonoFlatMapMany$FlatMapManyMain.onNext(MonoFlatMapMany.java:184)
      	reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:185)
      	reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:76)
      	reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:108)
      	reactor.core.publisher.MonoFlatMapMany$FlatMapManyInner.onNext(MonoFlatMapMany.java:238)
      	reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:108)
      	reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:108)
      	reactor.ipc.netty.channel.FluxReceive.drainReceiver(FluxReceive.java:207)
      	reactor.ipc.netty.channel.FluxReceive.onInboundNext(FluxReceive.java:322)
      	reactor.ipc.netty.channel.ChannelOperations.onInboundNext(ChannelOperations.java:314)
      	reactor.ipc.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:590)
      	reactor.ipc.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:129)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
      	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	reactor.ipc.netty.http.HttpOperations.lambda$static$3(HttpOperations.java:298)
      	reactor.ipc.netty.ReactorNetty$ExtractorHandler.channelRead(ReactorNetty.java:328)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
      	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1336)
      	io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1127)
      	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1162)
      	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
      	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
      	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	io.netty.handler.proxy.ProxyHandler.channelRead(ProxyHandler.java:255)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
      	io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:255)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935)
      	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
      	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
      	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
      	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
      	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
      	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
      
      	Suppressed: java.lang.Throwable
      		at reactor.core.publisher.MonoOnAssembly.<init>(MonoOnAssembly.java:62)
      		at reactor.core.publisher.Mono.checkpoint(Mono.java:1295)
      		at reactor.core.publisher.Mono.checkpoint(Mono.java:1245)
      		at org.cloudfoundry.operations.applications.DefaultApplications.start(DefaultApplications.java:523)
      		at com.sap.di.hcp.cf.util.CfClientUtils.startApplication(CfClientUtils.java:40)
      		at com.sap.di.hcp.cf.runner.CfRunnerPlatform.pushApplication(CfRunnerPlatform.java:207)
      		at com.sap.di.runner.ApplicationServerBase.runApplication(ApplicationServerBase.java:253)
      		at com.sap.di.runner.ApplicationServerBase.handleRun(ApplicationServerBase.java:215)
      		at com.sap.di.runner.ApplicationServerBase.deploy(ApplicationServerBase.java:95)
      		at com.sap.xs.java.runner.cp.JavaRunner.newApplicationProcess(JavaRunner.java:67)
      		at org.eclipse.che.api.runner.internal.Runner$3.run(Runner.java:317)
      		at org.eclipse.che.commons.lang.concurrent.CopyThreadLocalRunnable.run(CopyThreadLocalRunnable.java:28)
      		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      		... 1 more
      	Suppressed: java.lang.Throwable: #block terminated with an error
      		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:89)
      		at reactor.core.publisher.Mono.block(Mono.java:1161)
      		at com.sap.di.hcp.cf.runner.CfRunnerPlatform.pushApplication(CfRunnerPlatform.java:207)
      		at com.sap.di.runner.ApplicationServerBase.runApplication(ApplicationServerBase.java:253)
      		at com.sap.di.runner.ApplicationServerBase.handleRun(ApplicationServerBase.java:215)
      		at com.sap.di.runner.ApplicationServerBase.deploy(ApplicationServerBase.java:95)
      		at com.sap.xs.java.runner.cp.JavaRunner.newApplicationProcess(JavaRunner.java:67)
      		at org.eclipse.che.api.runner.internal.Runner$3.run(Runner.java:317)
      		at org.eclipse.che.commons.lang.concurrent.CopyThreadLocalRunnable.run(CopyThreadLocalRunnable.java:28)
      		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      		... 1 more
      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi , sorry for the delay in my response..

      you can go to your cloud foundry cockpit and stop some applications there which consume memory. You need to make sure that you have at least 1024MB FREE before running it again.

       

      Ran.

      Author's profile photo Tejas S. Gargeya Sastry
      Tejas S. Gargeya Sastry

      Hi,

      were you able to solve this? How did you solve it? I get the exact same error.

      Author's profile photo Oliver Merk
      Oliver Merk

      Hello Ran,

      Thanks a lot for the well-written blog!

      Is there a possibility to debug the Java-Application from WebIDE?

      I would also like to know if there is a possibility to restart the java-application a bit faster in case I have changed something in the java-code after the app is already running.

      Kind regards
      Oliver

      Author's profile photo Christian Späh
      Christian Späh

      Hello Oliver,

      in case you did not find it by yourself: You can open the run configuration for your java application and enable "Run in debug mode".

      Best regards,

      Christian.

      Author's profile photo Christian Späh
      Christian Späh

      Hello,

      thanks for this great tutorial! I am getting an java error when I try to call /odata/v4/todo/Task

      I could nail it to

      (DataSource) ctx.lookup("java:comp/env/jdbc/java-hdi-container");

      The stacktrace looks like this:

      "{ "written_at":"2018-08-08T14:19:29.424Z","written_ts":511463059062548,"component_id":"15fa5176-db66-4004-99e2-d9f17cfb8d0a","component_name":"245Dsgqv7Lu8sRSD-todo-service","DCComponent":"","organization_name":"-","component_type":"application","space_name":"dev","component_instance":"0","organization_id":"-","correlation_id":"-","CSNComponent":"","ResourceBundle":"/todo/Task#/odata/v4/todo/Task#","space_id":"eef31c80-c6a6-45d2-bbd6-b5dffac3ea26","Application":"245Dsgqv7Lu8sRSD-todo-service","container_id":"10.0.73.162","type":"log","logger":"org.apache.tomcat.jdbc.pool.ConnectionPool","thread":"http-nio-0.0.0.0-3000-exec-2","level":"ERROR","categories":[],"msg":"Unable to create initial connections of pool.","stacktrace":["java.sql.SQLException: The url cannot be null","\tat java.sql.DriverManager.getConnection(DriverManager.java:649)","\tat java.sql.DriverManager.getConnection(DriverManager.java:208)","\tat org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:308)","\tat org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:203)","\tat org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:735)","\tat org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:667)","\tat org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:482)","\tat org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154)","\tat org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)","\tat org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)","\tat org.apache.tomcat.jdbc.pool.DataSourceFactory.createDataSource(DataSourceFactory.java:560)","\tat org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:244)","\tat com.sap.xs.jdbc.datasource.tomcat.TomcatDataSourceFactory.createContainerDataSource(TomcatDataSourceFactory.java:79)","\tat com.sap.xs.jdbc.datasource.tomcat.TomcatDataSourceFactory.getDataSourceInstance(TomcatDataSourceFactory.java:59)","\tat com.sap.xs.jdbc.datasource.tomcat.TomcatDataSourceFactory.getObjectInstance(TomcatDataSourceFactory.java:47)","\tat org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java:94)","\tat javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)","\tat org.apache.naming.NamingContext.lookup(NamingContext.java:840)","\tat org.apache.naming.NamingContext.lookup(NamingContext.java:159)","\tat org.apache.naming.NamingContext.lookup(NamingContext.java:827)","\tat org.apache.naming.NamingContext.lookup(NamingContext.java:159)","\tat org.apache.naming.NamingContext.lookup(NamingContext.java:827)","\tat org.apache.naming.NamingContext.lookup(NamingContext.java:159)","\tat org.apache.naming.NamingContext.lookup(NamingContext.java:827)","\tat org.apache.naming.NamingContext.lookup(NamingContext.java:173)","\tat org.apache.naming.SelectorContext.lookup(SelectorContext.java:163)","\tat javax.naming.InitialContext.lookup(InitialContext.java:417)","\tat nxpcm.sample.todo.service.ToDoService.getConnection(ToDoService.java:88)","\tat nxpcm.sample.todo.service.ToDoService.getEntitySet(ToDoService.java:62)","\tat nxpcm.sample.todo.service.ToDoService.findTasks(ToDoService.java:40)","\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)","\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)","\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)","\tat java.lang.reflect.Method.invoke(Method.java:498)","\tat com.sap.cloud.sdk.service.prov.v4.util.ProcessorHelper.invokeMethod(ProcessorHelper.java:154)","\tat com.sap.cloud.sdk.service.prov.v4.util.ProcessorHelper.invokeOperation(ProcessorHelper.java:99)","\tat com.sap.cloud.sdk.service.prov.v4.custom.dataprovider.CustomDataProvider.getEntityCollectionForQuery(CustomDataProvider.java:381)","\tat com.sap.cloud.sdk.service.prov.v4.custom.dataprovider.CustomDataProvider.readEntityCollection(CustomDataProvider.java:331)","\tat com.sap.cloud.sdk.service.prov.v4.rt.core.GenericODataProcessor.readEntityCollection(GenericODataProcessor.java:351)","\tat org.apache.olingo.server.core.ODataDispatcher.handleEntityCollectionDispatching(ODataDispatcher.java:512)","\tat org.apache.olingo.server.core.ODataDispatcher.handleEntityDispatching(ODataDispatcher.java:495)","\tat org.apache.olingo.server.core.ODataDispatcher.handleResourceDispatching(ODataDispatcher.java:147)","\tat org.apache.olingo.server.core.ODataDispatcher.dispatch(ODataDispatcher.java:113)","\tat org.apache.olingo.server.core.ODataHandlerImpl.processInternal(ODataHandlerImpl.java:160)","\tat org.apache.olingo.server.core.ODataHandlerImpl.process(ODataHandlerImpl.java:85)","\tat org.apache.olingo.server.core.ODataHttpHandlerImpl.process(ODataHttpHandlerImpl.java:74)","\tat org.apache.olingo.server.core.ODataHttpHandlerImpl.process(ODataHttpHandlerImpl.java:88)","\tat com.sap.cloud.sdk.service.prov.v4.rt.core.web.ODataServlet.service(ODataServlet.java:116)","\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:742)","\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)","\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)","\tat org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)","\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)","\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)","\tat com.sap.cloud.sdk.cloudplatform.servlet.RequestContextServletFilter$1.execute(RequestContextServletFilter.java:219)","\tat com.sap.cloud.sdk.cloudplatform.servlet.Executable.call(Executable.java:23)","\tat com.sap.cloud.sdk.cloudplatform.servlet.Executable.call(Executable.java:13)","\tat com.sap.cloud.sdk.cloudplatform.servlet.RequestContextCallable.call(RequestContextCallable.java:82)","\tat com.sap.cloud.sdk.cloudplatform.servlet.RequestContextServletFilter.doFilter(RequestContextServletFilter.java:221)","\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)","\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)","\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)","\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)","\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)","\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)","\tat com.sap.xs.java.valves.ErrorReportValve.invoke(ErrorReportValve.java:66)","\tat ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:191)","\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)","\tat com.sap.xs.jdbc.datasource.valve.JDBCValve.invoke(JDBCValve.java:62)","\tat com.sap.xs.statistics.tomcat.valve.RequestTracingValve.invoke(RequestTracingValve.java:43)","\tat com.sap.xs.logging.catalina.RuntimeInfoValve.invoke(RuntimeInfoValve.java:40)","\tat org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:677)","\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)","\tat org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)","\tat org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)","\tat org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)","\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)","\tat org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)","\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)","\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)","\tat org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)","\tat java.lang.Thread.run(Thread.java:808)"] }"

      It seems like the java-db-connector can not be found. Can anybody help?

      Thanks in advance und best regards,

      Christian.

      Author's profile photo Venu Ravipati
      Venu Ravipati

      i am getting the same error when calling /odata/v4/todo/Task

      are you able to resolve the error?

      Thank you,

      Venu

       

      Author's profile photo Christian Späh
      Christian Späh

      Unfortunately, no

      Best regards,

      Christian.

      Author's profile photo Lance Deguerre
      Lance Deguerre

      Hello ,

      I have followed your tutorial and everything is working fine. Now I want my edmx file to be generated automatically can you tell me how to do this please ?

      Thank you,

      Best Regards

      Lancelot

      Author's profile photo Ankit Gupta
      Ankit Gupta

      Hi All,

      its an excellent blog. I really enjoyed it while reading.

      one problem i am facing that i am able to access the task table from the URL but when i try to access the SubTask table then it is giving error like

      {"error":{"code":"NOT_IMPLEMENTED","message":"Query is not implemented."}}
      
      
      can youplease help me what i am missing here.
      
      it should work like the task URL.
      
      Regards,
      Ankit
      Author's profile photo Ankit Gupta
      Ankit Gupta

      Got it 🙂

       

      need to define the same code for the SubTask entity.

       

      Author's profile photo Carlos Alberto Valentini
      Carlos Alberto Valentini

      Great post.
      Excellent explanation