You are unable to fetch all libraries from context root using Content API as follows:
List lis= conroot.getLibraries();
The call to ContentService.getContentRoot(loginContext).getLibraries() to create the List of libraries returns a zero (0), because it returns a datagraph that only includes the node requested and its attributes.
Resolving the problem
To get the libraries list, use the information from that node and do a getChildren, for example:
public DataContainer getChildrenByID(LoginContext loginContext,
This method returns a list of children that can be filtered, paginated and ordered. The list is always guaranteed to be a flat list since depth is not an option and the object represented by the path will not be returned.
Some information on this Content API has been removed in version 6.1 (pdm library and its usage of cmapi). Lotus Quickr and the supported REST APIs are the preferred content solution going forward.