0

I´m developing an aplication to allow users to do multiple upload on a client application. I´m doing it with Java in a Eclipse environment. The problem starts when I execute the checkin_new service to do de uploads. It shows that error:

Event generated by user 'weblogic' at host 'myhost.com'. Content item '123456' was not successfully checked in. The content ID is not unique. [ Details ] An error has occurred. The stack trace below shows more information.

!csUserEventMessage,weblogic,myhost.com!$!csUnableToCheckIn,093621!csCheckinIDNotUnique intradoc.common.ServiceException: !csUnableToCheckIn,123456!csCheckinIDNotUnique *ScriptStack CHECKIN_NEW_SUB 3:doScriptableAction,dID=107636,dDocName=123456:doSubService,dID=107636,dDocName=123456CHECKIN_NEW_SUB,dID=107636,dDocName=1234563:makeNewRevClass,dID=107636,dDocName=123456 at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2176) at intradoc.server.Service.buildServiceException(Service.java:2424) at intradoc.server.Service.createServiceExceptionEx(Service.java:2418) at intradoc.server.Service.createServiceException(Service.java:2413) at intradoc.server.DocServiceHandler.makeNewRevClass(DocServiceHandler.java:602) at sun.reflect.GeneratedMethodAccessor319.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) ...........................................

I have the autogeneration of the dID enabled so I don´t have to pass it as a parameter, and I used the same service in other applications and I´d never had that problem. The checkin method is the following:

public void checkinNew(String dDocTitle, String dDocType, String dSecurityGroup, String docAccount,
        String dDocAuthor, String localPath, String wccPath) throws IdcClientException, IOException {

    HdaBinderSerializer serializer = new HdaBinderSerializer("UTF-8", idcClient.getDataFactory());
    DataBinder binder = idcClient.createBinder();


    binder.putLocal("dDocTitle", dDocTitle);
    binder.putLocal("dDocType", dDocType);
    binder.putLocal("dSecurityGroup", dSecurityGroup);
    binder.addFile("primaryFile", new File(localPath));
    binder.putLocal("doFileCopy", "true");
    binder.putLocal("dDocAuthor", dDocAuthor);
    binder.putLocal("dDocAccount", docAccount);
    binder.putLocal("IdcService", "CHECKIN_NEW");
    binder.putLocal("fParentPath", wccPath);

    serializer.serializeBinder(System.out, binder);
    ServiceResponse response = idcClient.sendRequest(userPasswordContext, binder);
    DataBinder responseData = response.getResponseAsBinder();

    ServiceResponse myServiceResponse = null;

    myServiceResponse = idcClient.sendRequest(userPasswordContext, responseData);

    InputStream myInputStream = myServiceResponse.getResponseStream();

    String myResponseString = myServiceResponse.getResponseAsString();

    // serializer.serializeBinder(System.out, responseData);

}

I have searched on internet to find a solution but, I didn´t find anything that helped me. I finded some information about a database error, but my database seems to be ok, so any help, would be appreciated.

Cheers.

Dom
  • 1
  • It's trying to check in the new item with `123456` as the content id. It sounds like an item with that content id already exists in the system. – hmatt1 May 15 '17 at 20:51
  • That is true but, to avoid that, we have enabled the autogeneration of the ID by the system, which doesn´t fail with the standard checkin and other applications we have made with VB6 using the same services (Checkin new, checkin universal). – Dom May 16 '17 at 07:04

0 Answers0