Forum Stats

  • 3,770,689 Users
  • 2,253,154 Discussions
  • 7,875,542 Comments

Discussions

Unable to execute service CHECKIN_NEW_SUB and function makeNewRevClass. Invalid date format '2018-06

Ravistar
Ravistar Member Posts: 125 Blue Ribbon
edited Jul 5, 2018 12:39AM in WebCenter Content

Hi All,

I am trying to check in new document into WCC by using RIDC CHECKIN_UNIVERSAL service.

For our custom requirement I have to set dCreationDate, the below is the code that i have written.

    String fileName = "C:\\demo.pdf";

    fileStream = new FileInputStream(fileName);

    DataBinder myRequestDataBinder = new DataBinderImpl();

    myRequestDataBinder.putLocal("IdcService", "CHECKIN_UNIVERSAL");

    myRequestDataBinder.putLocal("dDocName", "test04");

    myRequestDataBinder.putLocal("dDocType", "Application");

    myRequestDataBinder.putLocal("dDocTitle", "test04");

    myRequestDataBinder.putLocal("dDocAuthor", "sysadmin");

    myRequestDataBinder.putLocal("UserDateFormat", "iso8601");

    myRequestDataBinder.putLocal("UserTimeZone", "UTC")

   String dCreateDate = DataObjectEncodingUtils.encodeDate(new Date(2017, 12, 12));

    myRequestDataBinder.putLocal("dCreateDate" , dCreateDate);

    myRequestDataBinder.putLocal("dSecurityGroup", "Public");

    myRequestDataBinder.putLocal("dDocAccount", "");

    myRequestDataBinder.putLocal("dFormat", "text/pdf");

    myRequestDataBinder.addFile("primaryFile", new TransferFile(fileStream, fileName, fileLength, "text/pdf"));

    final ServiceResponse serviceResponse = intradocClient.sendRequest(new IdcContext(SYSADMIN), myRequestDataBinder);

     DataBinder responseBinder = serviceResponse.getResponseAsBinder();

    String responseAsString = serviceResponse.getResponseAsString();

    System.out.println("Uploaded file details: \n");

    System.out.println("File uploaded successfully");

     ...

When I execute this code I am getting below error

Event generated by user 'sysadmin' at host 'CIS'. Unable to execute service CHECKIN_NEW_SUB and function makeNewRevClass.

Invalid date format '2018-06-22 11:57:57'. Unable to parse date '2018-06-22 11:57:57'. Failed to find text '/' in its proper location. [ Details ]

An error has occurred. The stack trace below shows more information.

!csUserEventMessage,sysadmin,CIS!$!csServiceDataException,CHECKIN_NEW_SUB,makeNewRevClass!$!csDateParseError,2018-06-22 11:57:57!syUnableToParseDate,2018-06-22 11:57:57!syUnableToFindText,/

intradoc.common.ServiceException: !csServiceDataException,CHECKIN_NEW_SUB,makeNewRevClass!$

*ScriptStack CHECKIN_NEW_SUB

3:doScriptableAction,dDocName=test033:determineCheckin,dDocName=test03CHECKIN_NEW_SUB,dDocName=test033:makeNewRevClass,dDocName=test03

        at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2115)

        at intradoc.server.Service.buildServiceException(Service.java:2326)

        at intradoc.server.Service.createServiceExceptionEx(Service.java:2320)

        at intradoc.server.Service.createServiceException(Service.java:2315)

        at intradoc.server.ServiceRequestImplementor.handleActionException(ServiceRequestImplementor.java:1766)

        at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1716)

        at intradoc.server.Service.doAction(Service.java:547)

        at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1458)

        at intradoc.server.Service.doActions(Service.java:542)

        at intradoc.server.ServiceRequestImplementor.executeSubServiceCode(ServiceRequestImplementor.java:1322)

        at intradoc.server.Service.executeSubServiceCode(Service.java:4023)

        at intradoc.server.ServiceRequestImplementor.executeServiceEx(ServiceRequestImplementor.java:1200)

        at intradoc.server.Service.executeServiceEx(Service.java:4018)

        at intradoc.server.Service.executeService(Service.java:4002)

        at intradoc.server.ArchiveCheckinHandler.determineCheckin(ArchiveCheckinHandler.java:168)

        at sun.reflect.GeneratedMethodAccessor433.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at intradoc.common.IdcMethodHolder.invokeMethod(IdcMethodHolder.java:86)

        at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:324)

        at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:79)

        at intradoc.server.Service.doCodeEx(Service.java:603)

        at intradoc.server.Service.doCode(Service.java:575)

        at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1643)

        at intradoc.server.Service.doAction(Service.java:547)

        at intradoc.server.Service.doScriptableAction(Service.java:3964)

        at sun.reflect.GeneratedMethodAccessor432.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at intradoc.common.IdcMethodHolder.invokeMethod(IdcMethodHolder.java:86)

        at intradoc.common.ClassHelperUtils.executeMethodEx(ClassHelperUtils.java:310)

        at intradoc.common.ClassHelperUtils.executeMethod(ClassHelperUtils.java:295)

        at intradoc.server.Service.doCodeEx(Service.java:620)

        at intradoc.server.Service.doCode(Service.java:575)

        at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1643)

        at intradoc.server.Service.doAction(Service.java:547)

        at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1458)

        at intradoc.server.Service.doActions(Service.java:542)

        at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1391)

        at intradoc.server.Service.executeActions(Service.java:528)

        at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:737)

        at intradoc.server.Service.doRequest(Service.java:1956)

        at intradoc.server.ServiceManager.processCommand(ServiceManager.java:437)

        at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)

        at intradoc.server.IdcServerThread.run(IdcServerThread.java:160)

        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)

        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)

        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

Caused by: intradoc.data.DataException: !csDateParseError,2018-06-22 11:57:57

        at intradoc.data.QueryUtils.appendParam(QueryUtils.java:457)

        at intradoc.jdbc.JdbcQueryUtils.buildQuery(JdbcQueryUtils.java:179)

        at intradoc.jdbc.JdbcWorkspace.buildQuery(JdbcWorkspace.java:735)

        at intradoc.jdbc.JdbcWorkspace.execute(JdbcWorkspace.java:562)

        at intradoc.server.DocServiceHandler.addRevClassesEntry(DocServiceHandler.java:676)

        at intradoc.server.DocServiceHandler.makeNewRevClass(DocServiceHandler.java:632)

        at sun.reflect.GeneratedMethodAccessor446.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at intradoc.common.IdcMethodHolder.invokeMethod(IdcMethodHolder.java:87)

        at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:324)

        at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:79)

        at intradoc.server.Service.doCodeEx(Service.java:603)

        at intradoc.server.Service.doCode(Service.java:576)

        at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1643)

        at intradoc.server.Service.doAction(Service.java:547)

        at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1458)

        at intradoc.server.Service.doActions(Service.java:543)

        at intradoc.server.ServiceRequestImplementor.executeSubServiceCode(ServiceRequestImplementor.java:1323)

        at intradoc.server.Service.executeSubServiceCode(Service.java:4024)

        at intradoc.server.ServiceRequestImplementor.executeServiceEx(ServiceRequestImplementor.java:1200)

        at intradoc.server.Service.executeServiceEx(Service.java:4019)

        at intradoc.server.Service.executeService(Service.java:4003)

        ... 34 more

Caused by: intradoc.common.ServiceException: !syUnableToParseDate,2018-06-22 11:57:57!syUnableToFindText,/

        at intradoc.common.LocaleResources.parseDateEx(LocaleResources.java:2678)

        at intradoc.common.LocaleResources.parseDate(LocaleResources.java:2645)

        at intradoc.data.QueryUtils.appendParam(QueryUtils.java:444)

        ... 56 more

Error

When comment/remove below two lines of code from above code, document is successfully checked into wcc server.

   String dCreateDate = DataObjectEncodingUtils.encodeDate(new Date(2017, 12, 12));

    myRequestDataBinder.putLocal("dCreateDate" , dCreateDate);

Can anybody help me to resolve the above Error please?

Thanks in Advance,

Ravi.

Tagged:

Answers

  • ManojC
    ManojC Member Posts: 538
    edited Jul 5, 2018 12:39AM

    Hey Ravi,

    The reason why your document check-in is failing because the content server is not getting the date format in the binder. Refer the following note on how to set the date value in the binder.

    How To Set Date Type Field Value As Query Condition When Calling GET_SEARCH_RESULTS Via RIDC (Doc ID 2283447.1)

    Thanks,

    Manoj

This discussion has been closed.