Regarding Java Service, getData() method


I have a java service with me that fetches the current user who has logged in to the IS. Now I want to fetch the user data for which I use getData() method, which returns a “Values” object, from there I am trying to fetch data into a string array using the method getStringArray(key).

I dont have any idea what will be the key here. The service is throwing null pointer exception.

The code goes somewhat like this.

InvokeState is = InvokeState.getCurrentState();
User user = is.getCurrentUser();
String strUsername = user.getName();
Values v = new Values();
v = user.getData();
String strData = v.getStringArray(“data”);
IDataCursor idcPipeline = pipeline.getCursor();
idcPipeline.insertAfter(“username”, strUsername);
idcPipeline.insertAfter(“userdata”, strData);

Can anyone please help

Thanks in Advance,