Building Collaborative Document Solutions with Connections Docs 2.0

Connections Docs (formerly IBM Docs) is soon to release its next major update, Connections Docs 2.0.  And with it, the IBM team adds a new, significant capability: integration with third party document repositories.  For independent software vendors who are already storing, organizing, or sharing documents, you can now easily add document-centric collaboration with your existing offering.  Let’s get started.

Docs 2.0

Overview

The general idea is fairly basic.  Connections Docs will take care of all the real-time co-editing, commenting, tracking changes, conversion of file formats, etc.  You just need to supply the document to Connections Docs via a programmatic interface.  Your interface will be responsible for both retrieving and storing the document as well as returning some information about the document.  Connections Docs 2.0 supports two formats: CMIS and REST.  I’ll focus on the latter because with REST you’ll be able to code in Java, node.js – anything really – and communicate with any document repository.

Installation

Connections Docs 2.0 installs into a WebSphere Application Server cluster.  The process to do a WebSphere install is not covered here.  But I’ve linked to a few external posts on the major steps.

  1. Install WebSphere 8.5.
  2. Create a single node cluster.  (This link shows a custom profile.  You can just select Cell in the Environment Selection screen.)
  3. Add a web server to the cluster.  (This link is really good, but it’s specific to Portal. You don’t need to add the rewrite rules, and there will be no wp_profile.)

With the above pre-conditions, you can install Connections Docs.  All steps are as screenshots in the file Connections Docs 2.0 Install.  A couple of points as you go through the steps:

  • Install Packages
    • Ensure the “Other content management systems” package is used.  This is the option for third party ISVs.
    • I have not selected the Extension packages.  These are only used with IBM Connections.  Presumably, you will not be installing Connections Docs alongside IBM Connections.
  • Node Identification
    • I used the defaults for cluster and node names.
    • The webserver you installed earlier should be listed.  If you don’t want to do this step, you could likely enter a bogus URL in the “Enter URL” textfield and later access Docs using the internal ports.
  • Integration with Other Content Management Systems
    • This is the important screen.  I used my own implementation during my installation.  But since we’ll be using a sample provided by IBM later in this post, we’ll enter the following values into this screen.
    • Repository type: REST
    • URL for the file metadata: http://<your server information>/docs-sample/files/{ID}/meta
    • URL for getting/setting file content: http://<your server information>/docs-sample/files/{ID}/content
    • Call authentication method: s2s_token
    • Server-to-server token key: token
    • Server-to-server token value: 123456789
    • Act as a user: as-user
    • User profiles endpoint: <Leave this blank>
    • Repository home: http://<your server information>/docs-sample/files
  • Client-side mount points
    • I chose to use local directories rather than NFS shares.  Create these directories manually prior to installation.
  • Editor Server Cluster
    • Fully qualified host name and address of Connections file server: <add a bogus URL; this is a bug>
    • Fully qualified host name and address of email notification service: <add a bogus URL; this is a bug>
  • Restart Web Server
    • Yes

Now grab a cup of coffee because the install takes about an hour on my VM.

For those using the beta code, see the manual step in the troubleshooting section at the end of this post.

To confirm the installation, access the URL http://<your server information>/docs/api/list?method=fileType.  You should receive a JSON response with the following data.

{".ods":"20480",".xls":"20480",".odt":"20480",".pptx":"51200",".txt":"20480",".ppt":"51200",".xlsx":"20480",".csv":"5120",".doc":"20480",".odp":"51200",".docx":"20480"}

Security

Docs relies on the user’s Java security Principal.  There’s a few ways to approach security: LDAP, SAML, OAuth, etc.  When you installed the WebSphere server, security should have been enabled.  You can log in to WebSphere’s console to add users to the file based repository.  Access https://<deployment manager url>:<port>/ibm/console.  Then go to Users and Groups -> Manage Users.  Then use the create button to add new users.

Integration via REST

Using the settings from above as an example, the out-of-the-box document retrieval process works like this.

  1. The user begins in the 3rd party application and elects to edit a document.  The 3rd party application would perform any operations to do so.  For example, the document may need to be locked in the 3rd party repository or authentication performed.  Finally the 3rd party application should redirect the user to the Docs application.
  2. If the user is not authenticated in WebSphere, a redirect to the login page will occur.  Note, this may not occur or be necessary depending on configuration of your specific server.
  3. Connections Docs will request meta data about the document described by the file_id URL parameter.
  4. The 3rd party application must respond with specific JSON data describing the document and permissions that can be performed on the document.  Special note: include the extension in the “name” property.  If you do not, the mime type will not be recognized and a failure will occur.  Alternatively, you can add a “mime” JSON property with the extension as the value.
  5. Connections Docs will then request the actual document.
  6. The 3rd party application sends over the document.
  7. The user is redirected to the Docs application where the document is opened ready to be edited.

Docs Integration

 

There are optional, additional steps if you have integrated profiles.  This is not covered here [yet], but the process is essentially the same.  Given an endpoint to the 3rd party repository, Docs can query external user information in JSON format.

{
 "id" : "5c11a0c0-7f6f-1033-982d-eba7a40afa7a", 
 "name" : "docs_tester", 
 "display_name" : "docs_tester", 
 "email" : "docs_tester@mail.com", 
 "photo_url" : "https://domain/profiles/id/photo.png", 
 "org_id" : "default_org" 
}

Integration Sample

Fortunately, there is an IBM reference implementation located here.  This is boldfaced because I overlooked this fact in the beta documentation.  Don’t you do the same. IBM’s implementation is a servlet that retrieves and stores documents from a directory inside the web module.  It’s trivial to extend this example to store and retrieve from disk, database, etc.

Sample Configuration

Download the code and open it with your IDE.  We need to update the configuration file.  In the Java src folder, expand the package com.ibm.docs.api.rest.sample.filters.  You’ll see a config.json file.  Update the file with the following contents.

{
 "s2s_method": "s2s_token",
 "s2s_token": "123456789",
 "onbehalfof_key" : "as-user"
}

The above tells the sample to use the token mechanism and which header identifies the user.  The sample code is currently written to look for the “token” header and validate it with the s2s_token property in the config.json.  Note that these must match the same settings we used when installing the server.

  • Server-to-server token key: token
  • Server-to-server token value: 123456789
  • Act as a user: as-user

Sample Installation

Next export and install the web module (or EAR) on the IBMDocsMember1 server.

Install the WAR using WebSphere Console
Install the WAR using WebSphere Console
Ensure the web module is mapped to both the web server and IBMDocsMember1 server.
Ensure the web module is mapped to both the web server and IBMDocsMember1 server.
Docs Sample Install
Ensure the context matches the URLs used in the installation wizard.

 

And to be certain that everything is properly mapped in the HTTP server’s plugin, now is a good time to update the web server.  In WebSphere, do the following:

  • Generate Plugin
  • Propagate Plugin
  • Restart the HTTP server

Docs Web Server

Testing

If all goes well, you should be able to perform the following actions.

Download Video: MP4

Troubleshooting and Reference

Here are a few tips and tricks as you build your first integration.

Important URL Examples

  • https://docs.demos.ibm.com:9051/ibm/console
  • http://docs.demos.ibm.com/docs/login
  • http://docs.demos.ibm.com/docs/api/list?method=fileType
  • http://docs.demos.ibm.com/docs/driverscallback?repository=rest&file_id=test.ods

Beta Configuration Step

For beta users, you’ll need to create a mock <install root>\WebSphere\AppServer\profiles\AppSrv01\config\cells\docsCell01\LotusConnections-config\LotusConnections-config.xml file.  I’ve attached my LotusConnections-config for this purpose.  If you do not, you’ll see errors.  After you make the update, restart Docs.

[12/10/15 16:12:53:142 EST] 00000070 ConnectionsCo W com.ibm.connections.httpClient.ConnectionsConfigHelper loadConfig SONATA: Connections configuration file [F:\IBM\Docs\WebSphere\AppServer\profiles\AppSrv01\config\cells\docsCell01\LotusConnections-config\LotusConnections-config.xml] does NOT exist.

Script to Start Deployment Manager

@ECHO OFF

call time /t

echo Starting Deployment Manager …

F:\IBM\Docs\WebSphere\AppServer\profiles\Dmgr01\bin\startManager.bat

call time /t

PAUSE

Script to Start Docs

@ECHO OFF

call time /t

echo Starting Docs …

call F:\IBM\Docs\WebSphere\AppServer\profiles\AppSrv01\bin\startNode.bat

call F:\IBM\Docs\WebSphere\AppServer\profiles\AppSrv01\bin\startServer.bat IBMConversionMember1
call F:\IBM\Docs\WebSphere\AppServer\profiles\AppSrv01\bin\startServer.bat IBMDocsMember1
call F:\IBM\Docs\WebSphere\AppServer\profiles\AppSrv01\bin\startServer.bat IBMDocsProxyMember1
call F:\IBM\Docs\WebSphere\AppServer\profiles\AppSrv01\bin\startServer.bat IBMViewerMember1

call time /t

PAUSE

Script to Stop Deployment Manager

@ECHO OFF

call time /t

echo Stopping Deployment Manager …

set username=wasadmin
set password=password

call F:\IBM\Docs\WebSphere\AppServer\profiles\Dmgr01\bin\stopManager.bat -username %username% -password %password%

call time /t

PAUSE

Script to Stop Docs

@ECHO OFF

call time /t

echo Stopping Docs…

set username=wasadmin
set password=password

call F:\IBM\Docs\WebSphere\AppServer\profiles\AppSrv01\bin\stopServer.bat IBMConversionMember1 -username %username% -password %password%
call F:\IBM\Docs\WebSphere\AppServer\profiles\AppSrv01\bin\stopServer.bat IBMDocsMember1 -username %username% -password %password%
call F:\IBM\Docs\WebSphere\AppServer\profiles\AppSrv01\bin\stopServer.bat IBMDocsProxyMember1 -username %username% -password %password%
call F:\IBM\Docs\WebSphere\AppServer\profiles\AppSrv01\bin\stopServer.bat IBMViewerMember1 -username %username% -password %password%
call time /t

PAUSE

Docs Configuration

If you find that you need to change a configuration setting.  Review the <install root>\WebSphere\AppServer\profiles\Dmgr01\config\cells\docsCell01\IBMDocs-config\concord-config.json file.  This contains all the settings used during the installation wizaLotusConnections-configrd.  Should you need to make a change, you’ll need to update this file and synchronize the nodeagent.  Then restart the Docs servers. The file located at <install root>\WebSphere\AppServer\profiles\AppSrv01\config\cells\docsCell01\IBMDocs-config must update and reflect your changes for the new settings to take effect.

Application Security

Make absolutely sure that Application Security is enabled.  If you do not, you will receive 401 errors when accessing Docs and errors in the log similar to the following.

[12/9/15 14:14:36:442 EST] 000000b3 ExternalAuth  W   Request is not authorized while accessing URL: /docs/api/list

This is an easy fix.

Docs Security Enabled

When All Else Fails

Review the SystemOut.logs in F:\IBM\Docs\WebSphere\AppServer\profiles\AppSrv01\logs.  Specifically see the logs inside IBMDocsMember1.

11 thoughts on “Building Collaborative Document Solutions with Connections Docs 2.0”

  1. Hi,

    This is great guide. Thanks. Unfortunatelly we have a little problem with AuthenticationFilter handler.
    We are getting error Error 500: javax.servlet.ServletException: Filter [AuthenticationFilter]: com.ibm.docs.api.rest.sample.filters.AuthenticationFilter was found, but is corrupt
    when opening url https://host/docs-sample/files and opening the Docs url is giving error Opening connection denied.

    What can be wrong?
    War application with this sample rest repository has been compiled and installed onto Websphere without any errors.

    Any ideas? Thank you in advance.

    1. Let’s try looking at earlier entries in the log. For example, if you compiled with a Project Facet of 1.7, it will compile with no issue but won’t run. The underlying version of Java in WAS is 1.6 – I believe. The AuthenticationFilter exception is a result of some other failure. Can you upload your SystemOut.log somewhere? Either post here or DM me on Twitter @vanstaub.

      1. Thank you for fast response. Unfortunatelly I had to abandon this project for last week. You were correct. I have compiled repository code with 1.7 and after compiling it with 1.6 version, this error has gone. But… there is always some thing that can go wrong. We have another issue.

        After calling the driveback url, we are getting this error:

        “Conversion server is not available.” – but conversion server is working like docs and viewer server.

        with trace on:

        “2.16 16:59:46:499 CET] 00000178 ConversionTas > com.ibm.concord.platform.conversion.ConversionTask convertRequest ENTRY C:\data\shares\docs\draft\external\draft\632\576\test2.ods\temp\08c57435-82b0-4ee1-9c56-7060af207219\contentfile.ods application/vnd.oasis.opendocument.spreadsheet application/json C:\data\shares\docs\draft\external\draft\632\576\test2.ods\temp\e5457243-4030-4b1f-a896-6907e4e54ff2\concord
        [02.02.16 16:59:46:499 CET] 00000178 PostMethod 3 org.apache.commons.httpclient.methods.PostMethod addParameters enter PostMethod.addParameters(NameValuePair[])
        [02.02.16 16:59:46:499 CET] 00000178 EntityEnclosi 3 org.apache.commons.httpclient.methods.EntityEnclosingMethod clearRequestBody enter EntityEnclosingMethod.clearRequestBody()
        [02.02.16 16:59:46:499 CET] 00000178 ServerToServe 1 com.ibm.connections.httpClient.ServerToServerHttpClient executeMethod SONATA: URL = https://docs2.acme.com/conversion/ConversionService; userID = wasadmin; alias = docsAdmin; user’s domain key = null
        [02.02.16 16:59:46:499 CET] 00000178 ConversionTas E Unknown error happened.
        java.lang.NullPointerException
        at com.ibm.connections.httpClient.ServerToServerHttpClient.getKey(ServerToServerHttpClient.java:314)
        at com.ibm.connections.httpClient.ServerToServerHttpClient.executeMethod(ServerToServerHttpClient.java:164)
        at com.ibm.concord.platform.conversion.ConversionTask.convertRequest(ConversionTask.java:93)
        at com.ibm.concord.platform.conversion.RemoteConversionService.convert(RemoteConversionService.java:164)
        at com.ibm.concord.document.common.AbstractDocumentService.convert(AbstractDocumentService.java:1851)
        at com.ibm.concord.document.common.AbstractDocumentService.importDocument(AbstractDocumentService.java:1451)
        at com.ibm.concord.spreadsheet.SpreadsheetDocumentService.importDocument(SpreadsheetDocumentService.java:224)
        at com.ibm.concord.job.object.ImportDraftFromRepositoryJob.exec(ImportDraftFromRepositoryJob.java:148)
        at com.ibm.concord.job.Job.run(Job.java:218)
        at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:269)
        at java.security.AccessController.doPrivileged(AccessController.java:252)
        at javax.security.auth.Subject.doAs(Subject.java:495)
        at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:132)
        at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:90)
        at com.ibm.ws.asynchbeans.J2EEContext$DoAsProxy.run(J2EEContext.java:336)
        at java.security.AccessController.doPrivileged(AccessController.java:280)
        at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:804)
        at com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:222)
        at com.ibm.ws.asynchbeans.ABWorkItemImpl.run(ABWorkItemImpl.java:206)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)”

        And normal SystemOut.Log

        “[02.02.16 15:23:02:494 CET] 00000147 Authenticatio I Server to server call via s2s_token…
        [02.02.16 15:23:02:509 CET] 00000147 Authenticatio I Server to server call as-user: adam.Nowak@acme.com
        [02.02.16 15:23:02:525 CET] 00000123 RestDocumentE W No mime returned for the document meta!
        [02.02.16 15:23:02:540 CET] 00000123 RestDocumentE I RestDocument Name: test2.ods, MIME: application/vnd.oasis.opendocument.spreadsheet, Size: 9 223
        [02.02.16 15:23:02:572 CET] 00000123 StatefulDraft I draft state of test2.ods is null, the media folder contains 0 files, isFinal is true
        [02.02.16 15:23:02:572 CET] 00000123 DocumentEntry W failed to get document entry from draft because draft does not exist
        [02.02.16 15:23:02:603 CET] 00000123 PoolManager W NULL_MESSAGE_KEY_PASSED
        [02.02.16 15:23:02:650 CET] 00000123 StatefulDraft I draft state of test2.ods is null, the media folder contains 0 files, isFinal is true
        [02.02.16 15:23:02:665 CET] 00000123 EditAction I the draft exist status of test2.ods is false
        [02.02.16 15:23:02:665 CET] 00000123 PoolManager W NULL_MESSAGE_KEY_PASSED
        [02.02.16 15:23:02:681 CET] 00000123 ImportDraftFr I mediaURI: test2.ods modified: 1428492116000 sourceMime: application/vnd.oasis.opendocument.spreadsheet targetMime: sheet getSnapshot: false draftVersion: 1.3.0
        [02.02.16 15:23:02:696 CET] 00000123 EditAction I Action on IBM Docs: The user 7fae11f3-66e3-4f1e-ae16-02fb89854383 belonging to organization default_org executed EDITDOC operation on document test2.ods with additional information {mimeType: application/vnd.oasis.opendocument.spreadsheet, fileSize: 9223bytes}
        [02.02.16 15:23:02:712 CET] 00000123 PoolManager W NULL_MESSAGE_KEY_PASSED
        [02.02.16 15:23:02:759 CET] 0000017a AbstractDocum I The background conversion job is not started, target folder is: C:\data\shares\docs\draft\external\draft\632\576\test2.ods\temp\upload\0e2ae83193dc43b1051a2e9251b8def3\concord
        [02.02.16 15:23:02:790 CET] 00000123 PoolManager W NULL_MESSAGE_KEY_PASSED
        [02.02.16 15:23:02:884 CET] 00000123 PoolManager W NULL_MESSAGE_KEY_PASSED
        [02.02.16 15:23:02:884 CET] 00000123 PoolManager W NULL_MESSAGE_KEY_PASSED
        [02.02.16 15:23:02:946 CET] 00000123 PoolManager W NULL_MESSAGE_KEY_PASSED
        [02.02.16 15:23:02:962 CET] 00000123 PoolManager W NULL_MESSAGE_KEY_PASSED
        [02.02.16 15:23:02:993 CET] 00000123 PoolManager W NULL_MESSAGE_KEY_PASSED
        [02.02.16 15:23:02:993 CET] 00000123 PoolManager W NULL_MESSAGE_KEY_PASSED
        [02.02.16 15:23:03:024 CET] 00000123 PoolManager W NULL_MESSAGE_KEY_PASSED
        [02.02.16 15:23:03:024 CET] 00000123 PoolManager W NULL_MESSAGE_KEY_PASSED
        [02.02.16 15:23:03:055 CET] 00000123 PoolManager W NULL_MESSAGE_KEY_PASSED
        [02.02.16 15:23:03:055 CET] 00000123 PoolManager W NULL_MESSAGE_KEY_PASSED
        [02.02.16 15:23:03:227 CET] 00000122 Authenticatio I Server to server call via s2s_token…
        [02.02.16 15:23:03:242 CET] 00000122 Authenticatio I Server to server call as-user: adam.Nowak@acme.com
        [02.02.16 15:23:03:258 CET] 0000017a ExternalRestR I It takes 468 ms to get the content of test2.ods
        [02.02.16 15:23:03:289 CET] 0000017a AbstractDocum I The size of file test2.ods is 8001 bytes.
        [02.02.16 15:23:03:289 CET] 0000017a AbstractDocum I Action on IBM Docs: The user 7fae11f3-66e3-4f1e-ae16-02fb89854383 belonging to organization default_org executed CONVERTDOC operation on document test2.ods with additional information {sourceType: application/vnd.oasis.opendocument.spreadsheet, targetType: application/json}
        [02.02.16 15:23:03:289 CET] 0000017a RemoteConvers I Conversion Request Start: source=C:\data\shares\docs\draft\external\draft\632\576\test2.ods\temp\c64ae366-e6c5-434d-8a23-725cddd43338\contentfile.ods; target=C:\data\shares\docs\draft\external\draft\632\576\test2.ods\temp\739b092c-9d19-47cb-8ed5-6a8c7590cc31\concord; backgroundConvert=false; ConvertTarget=null
        [02.02.16 15:23:03:289 CET] 0000017a ConversionTas E Unknown error happened.
        java.lang.NullPointerException
        at com.ibm.connections.httpClient.ServerToServerHttpClient.getKey(ServerToServerHttpClient.java:314)
        at com.ibm.connections.httpClient.ServerToServerHttpClient.executeMethod(ServerToServerHttpClient.java:164)
        at com.ibm.concord.platform.conversion.ConversionTask.convertRequest(ConversionTask.java:93)
        at com.ibm.concord.platform.conversion.RemoteConversionService.convert(RemoteConversionService.java:164)
        at com.ibm.concord.document.common.AbstractDocumentService.convert(AbstractDocumentService.java:1851)
        at com.ibm.concord.document.common.AbstractDocumentService.importDocument(AbstractDocumentService.java:1451)
        at com.ibm.concord.spreadsheet.SpreadsheetDocumentService.importDocument(SpreadsheetDocumentService.java:224)
        at com.ibm.concord.job.object.ImportDraftFromRepositoryJob.exec(ImportDraftFromRepositoryJob.java:148)
        at com.ibm.concord.job.Job.run(Job.java:218)
        at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:269)
        at java.security.AccessController.doPrivileged(AccessController.java:252)
        at javax.security.auth.Subject.doAs(Subject.java:495)
        at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:132)
        at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:90)
        at com.ibm.ws.asynchbeans.J2EEContext$DoAsProxy.run(J2EEContext.java:336)
        at java.security.AccessController.doPrivileged(AccessController.java:280)
        at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:804)
        at com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:222)
        at com.ibm.ws.asynchbeans.ABWorkItemImpl.run(ABWorkItemImpl.java:206)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)

        [02.02.16 15:23:03:305 CET] 0000017a RemoteConvers W Conversion request could not be processed successfully
        java.lang.NullPointerException
        at com.ibm.connections.httpClient.ServerToServerHttpClient.getKey(ServerToServerHttpClient.java:314)
        at com.ibm.connections.httpClient.ServerToServerHttpClient.executeMethod(ServerToServerHttpClient.java:164)
        at com.ibm.concord.platform.conversion.ConversionTask.convertRequest(ConversionTask.java:93)
        at com.ibm.concord.platform.conversion.RemoteConversionService.convert(RemoteConversionService.java:164)
        at com.ibm.concord.document.common.AbstractDocumentService.convert(AbstractDocumentService.java:1851)
        at com.ibm.concord.document.common.AbstractDocumentService.importDocument(AbstractDocumentService.java:1451)
        at com.ibm.concord.spreadsheet.SpreadsheetDocumentService.importDocument(SpreadsheetDocumentService.java:224)
        at com.ibm.concord.job.object.ImportDraftFromRepositoryJob.exec(ImportDraftFromRepositoryJob.java:148)
        at com.ibm.concord.job.Job.run(Job.java:218)
        at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:269)
        at java.security.AccessController.doPrivileged(AccessController.java:252)
        at javax.security.auth.Subject.doAs(Subject.java:495)
        at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:132)
        at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:90)
        at com.ibm.ws.asynchbeans.J2EEContext$DoAsProxy.run(J2EEContext.java:336)
        at java.security.AccessController.doPrivileged(AccessController.java:280)
        at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:804)
        at com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:222)
        at com.ibm.ws.asynchbeans.ABWorkItemImpl.run(ABWorkItemImpl.java:206)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)

        [02.02.16 15:23:03:305 CET] 0000017a Job E C:\data\shares\docs\job_cache\default_org\job_cache\632\576\test2.ods\7a11dbd84816fbff3107a47e3df41d53\error.json
        com.ibm.concord.job.exception.JobExecutionException: com.ibm.concord.platform.exceptions.ConversionException: Exception occurred with error code: CLFAD1200, message: Conversion service is unavailable, and additional data: {“target”:”C:\\data\\shares\\docs\\draft\\external\\draft\\632\\576\\test2.ods\\temp\\739b092c-9d19-47cb-8ed5-6a8c7590cc31\\concord”,”detail_msg”:”Conversion request could not be processed successfully.”,”jobid”:null,”source”:”C:\\data\\shares\\docs\\draft\\external\\draft\\632\\576\\test2.ods\\temp\\c64ae366-e6c5-434d-8a23-725cddd43338\\contentfile.ods”,”native_err_code”:200}
        at com.ibm.concord.job.object.ImportDraftFromRepositoryJob.exec(ImportDraftFromRepositoryJob.java:173)
        at com.ibm.concord.job.Job.run(Job.java:218)
        at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:269)
        at java.security.AccessController.doPrivileged(AccessController.java:252)
        at javax.security.auth.Subject.doAs(Subject.java:495)
        at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:132)
        at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:90)
        at com.ibm.ws.asynchbeans.J2EEContext$DoAsProxy.run(J2EEContext.java:336)
        at java.security.AccessController.doPrivileged(AccessController.java:280)
        at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:804)
        at com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:222)
        at com.ibm.ws.asynchbeans.ABWorkItemImpl.run(ABWorkItemImpl.java:206)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
        Caused by: com.ibm.concord.platform.exceptions.ConversionException: Exception occurred with error code: CLFAD1200, message: Conversion service is unavailable, and additional data: {“target”:”C:\\data\\shares\\docs\\draft\\external\\draft\\632\\576\\test2.ods\\temp\\739b092c-9d19-47cb-8ed5-6a8c7590cc31\\concord”,”detail_msg”:”Conversion request could not be processed successfully.”,”jobid”:null,”source”:”C:\\data\\shares\\docs\\draft\\external\\draft\\632\\576\\test2.ods\\temp\\c64ae366-e6c5-434d-8a23-725cddd43338\\contentfile.ods”,”native_err_code”:200}
        at com.ibm.concord.platform.conversion.RemoteConversionService.convert(RemoteConversionService.java:264)
        at com.ibm.concord.document.common.AbstractDocumentService.convert(AbstractDocumentService.java:1851)
        at com.ibm.concord.document.common.AbstractDocumentService.importDocument(AbstractDocumentService.java:1451)
        at com.ibm.concord.spreadsheet.SpreadsheetDocumentService.importDocument(SpreadsheetDocumentService.java:224)
        at com.ibm.concord.job.object.ImportDraftFromRepositoryJob.exec(ImportDraftFromRepositoryJob.java:148)
        … 12 more
        Caused by: java.lang.NullPointerException
        at com.ibm.connections.httpClient.ServerToServerHttpClient.getKey(ServerToServerHttpClient.java:314)
        at com.ibm.connections.httpClient.ServerToServerHttpClient.executeMethod(ServerToServerHttpClient.java:164)
        at com.ibm.concord.platform.conversion.ConversionTask.convertRequest(ConversionTask.java:93)
        at com.ibm.concord.platform.conversion.RemoteConversionService.convert(RemoteConversionService.java:164)
        … 16 more

        [02.02.16 15:23:08:078 CET] 000001c9 Authenticatio I Server to server call via s2s_token…
        [02.02.16 15:23:08:141 CET] 000001c9 Authenticatio I Server to server call as-user: adam.Nowak@acme.com
        [02.02.16 15:23:08:188 CET] 00000122 RestDocumentE W No mime returned for the document meta!
        [02.02.16 15:23:08:219 CET] 00000122 RestDocumentE I RestDocument Name: test2.ods, MIME: application/vnd.oasis.opendocument.spreadsheet, Size: 9 223
        [02.02.16 15:23:08:250 CET] 00000122 StatefulDraft I draft state of test2.ods is null, the media folder contains 0 files, isFinal is true
        [02.02.16 15:23:09:046 CET] 00000122 DocumentEntry W failed to get document entry from draft because draft does not exist

        1. I’m fairly sure that the NullPointer is a result of a missing LotusConnections-config.xml file. check my post and do the “Beta configuration” step. I thought Dev would have fixed this in the 2.0 GA code, but maybe they did not. Download the sample I have and stick it on the deployment manager and full resync with the DocsMember node. Then restart DocsMember server.

  2. Good point 🙂 Thank you very much – it works.
    I thought that such issue found in Beta Code should be solved in GA code.

  3. Another one question that the answer does not exist in any documentation. What about permissions for the file document per user?

    I mean – we have prepared our own Rest External repository. How IBM Docs deal with user permission to file documents?

    User A has read / write permission to file A
    User B has not any permission to file A

    When the user B try to edit the document in Docs when there is no draft in Docs he will fail because he does not has any permission to this file (this is done by our application ACL). And this is ok.

    When user A tries to edit the document in Docs when there is no draft he succeed to pull the document from repository to docs (creates draft) and then edit. This is ok also.

    But when User B tries to open this document in Docs using Docs url that opens doc in editor he succed (because this document is in docs as draft already). It is not good. He has no permissions to file in our repository application.

    Does Docs deal with such scenario in some way?

    Thank for any suggestions.

    1. So when you invoke the edit URL or driverscallback, the first request is to get the metadata about the file. In that metadata is a permissions block with read and write, set either to true or false. It’s contingent on your code to properly set those flags to prevent unauthorized editing. If that’s not how it works in practice, I think we have a bug.

Leave a Reply

Your email address will not be published.