Worklight Version 6.2
The adapters are deployed, and server is up.
I'm using the below code to invoke a SQL procedure:
DataAccessService service = WorklightBundles.getInstance().getDataAccessService();
ProcedureQName procedureQname = new ProcedureQName("EAttendanceSQLAdapter", "checkDomain");
String paramArray = "['"+userName+"']";
System.out.println("paramArray : "+ paramArray);
logger.info(">>>>>>>>>>>after procedureQname>>>>>>>>>>>>>>>>>>>>>");
InvocationResult result = service.invokeProcedure(procedureQname,paramArray);
com.ibm.json.java.JSONObject resultJsonObject = result.toJSON();
Its throwing me
java.lang.NullPointerException at this line " DataAccessService service = WorklightBundles.getInstance().getDataAccessService();"
Kindly advice. But the same set of code has worked for me in a different project.
Thanks