I am testing OData, for that I followed the steps given in this tutorial:
It wasn't working as it should, so to understand it better, I created a new project with Stock table only.
Manually entered all it's properties and then deploy it.
Issue1: when I create a JDBC connection to connect with derby database, The driver field has maximum limit and whole driver string is not copied. Attached is the screen shot.
Where as I need to enter: org.apache.derby.jdbc.ClientDriver.
Issue 2: I can't test the connection from here, weather it's working fine or not ?
When I deploy the project and test the result, I get the Stock Service, But when I try to run this, I get nullpointer exception.
<?xml version="1.0" encoding="utf-8"?> <service xml:base="http://localhost:8080/gateway/odata/sap/WSTest1;v=1/" xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom"> <workspace> <atom:title>Default</atom:title> <collection href="StockSet"> <atom:title>StockSet</atom:title> </collection> </workspace> </service>
Now I need to run StockSet, so next url to access the stock list,
to get stocks:
Now I get the following response:
<?xml version="1.0" ?>
<message xml:lang="en">java.lang.NullPointerException: while trying to invoke the method java.lang.Object.hashCode() of a null object loaded from local variable 'k'</message>
I am not able to figure out, why I am getting this error and how to fix it.
All I want is to create a ODAta on ESPM_STOCK sample table given in example.
Looking forward to hear from you.