9 Replies Latest reply: Mar 3, 2013 11:19 PM by Chely RSS

    How to find no of docs in a library using RIDC

    Chely
      Hi ,
      I want to generate a report which will give the result like"

      "No of documents uploaded in a particular library for the month of january"

      How can i achieve it using RIDC.

      Thanks,
      Chely
        • 1. Re: How to find no of docs in a library using RIDC
          Chely
          My code is below,
          It is not giving the docs within the "ESD" libray only.sometimes it is showing sockettimeout exception

          public static void main(String[] args)
          {
               try{
               final IdcClientManager idcManager = new IdcClientManager();
               final IdcClient idcClient = idcManager.createClient("http://172.20.90.172:16200/cs/idcplg");
               final IdcContext idcContext = new IdcContext("cbohra001c", "Feb2013#");


               final DataBinder binder = idcClient.createBinder();
               // populate the binder with the parameter
               String vars="ESD";
               

               binder.putLocal ("IdcService", "GET_SEARCH_RESULTS");

          binder.putLocal("QueryText","dSecurityGroup <substring> <qsch>"+vars+"</qsch>");

          binder.putLocal("ResultCount", "10");

                         
               // execute the request
               ServiceResponse response = idcClient.sendRequest (idcContext, binder);
                         
               // get the binder
               DataBinder serverBinder = response.getResponseAsBinder ();
                         
               DataResultSet resultSet = serverBinder.getResultSet ("SearchResults");
                         
               // loop over the results
               for (DataObject dataObject : resultSet.getRows ()) {
                    System.out.println ("Title is: " + dataObject.get ("dDocTitle"));
                    System.out.println ("Author is: " + dataObject.get ("dDocAuthor"));          
                    System.out.println ("SG is: " + dataObject.get ("dSecurityGroup"));
               }

          }
               catch (Exception ex) {
          ex.printStackTrace();}
               }
          }

          Edited by: Chely on Feb 26, 2013 11:53 PM
          • 2. Re: How to find no of docs in a library using RIDC
            Jonathan Hult
            Here are some links to RIDC examples that may be helpful: http://jonathanhult.com/blog/2012/12/ridc-examples/

            Jonathan
            http://jonathanhult.com
            • 3. Re: How to find no of docs in a library using RIDC
              Chely
              My code is working upto 3000 docs, there is some error if i set the ResultCount=5000


              oracle.stellent.ridc.protocol.ProtocolException: java.io.IOException: The parsing error occurred at row 4298. Unable to locate field 3
                   at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:142)
                   at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:107)
                   at New.main(New.java:59)
              Caused by: java.io.IOException: The parsing error occurred at row 4298. Unable to locate field 3
                   at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.parseResultSet(HdaBinderSerializer.java:404)
                   at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.parseBinder(HdaBinderSerializer.java:152)
                   at oracle.stellent.ridc.model.serialize.HdaBinderSerializer.parseBinder(HdaBinderSerializer.java:69)
                   at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:124)
                   ... 2 more

              Please help me
              • 4. Re: How to find no of docs in a library using RIDC
                Chely
                Please reply
                • 6. Re: How to find no of docs in a library using RIDC
                  Jonathan Hult
                  It sounds like it is hitting a content item that has invalid metadata.

                  Try to trace out the name of the Content ID of the previous row and of that row (if possible).

                  Jonathan
                  http://jonathanhult.com
                  • 7. Re: How to find no of docs in a library using RIDC
                    Chely
                    Everytime it is giving error for a new row after 3000, is it related to ResultCount?
                    • 8. Re: How to find no of docs in a library using RIDC
                      Jonathan Hult
                      Did you try tracing out the few rows around where you are receiving the exception? This should give you more information which will help you troubleshoot the issue.

                      Jonathan
                      http://jonathanhult.com
                      • 9. Re: How to find no of docs in a library using RIDC
                        Chely
                        I fetched some rows but i don't find any issues in those records, and evertime i run this code, it gives the same eror for different records.sometimes it worked till 4000+ records and sometimes below it.but evertime i got same error for some record after 3000