1

我有 Alfresco 社区 5.2 并建立了一个自定义内容商店(基于他们对https://github.com/Alfresco/alfresco-sdk-samples/tree/alfresco-51/all-in-one/custom-content所做的事情-商店回购)。

使用该自定义存储,我可以使用共享或 CMIS 创建文档,没问题。但是,当我使用 office 创建文档时,它不起作用。

Word 可以与 repo 连接,但是当我尝试保存操作时失败。

我检查了访问日志并得到以下信息:

[31/Aug/2017:08:25:15 +0000] "OPTIONS /alfresco/aos/Shared/ HTTP/1.0" 200 -
[31/Aug/2017:08:25:16 +0000] "HEAD /alfresco/aos/Shared/3y24.docx HTTP/1.0" 404 -
[31/Aug/2017:08:25:17 +0000] "OPTIONS /alfresco/aos/Shared/3y24.docx HTTP/1.0" 200 -
[31/Aug/2017:08:25:18 +0000] "PROPFIND /alfresco/aos/Shared/3y24.docx HTTP/1.0" 404 22
[31/Aug/2017:08:25:18 +0000] "OPTIONS /alfresco/aos/Shared/3y24.docx HTTP/1.0" 200 -
[31/Aug/2017:08:25:19 +0000] "HEAD /alfresco/aos/Shared/3y24.docx HTTP/1.0" 401 -
[31/Aug/2017:08:25:19 +0000] "HEAD /alfresco/aos/Shared/3y24.docx HTTP/1.0" 404 -
[31/Aug/2017:08:25:19 +0000] "PUT /alfresco/aos/Shared/3y24.docx HTTP/1.0" 201 -
[31/Aug/2017:08:25:20 +0000] "LOCK /alfresco/aos/Shared/3y24.docx HTTP/1.0" 200 533
[31/Aug/2017:08:25:22 +0000] "PUT /alfresco/aos/Shared/3y24.docx HTTP/1.0" 409 999

alfresco.log,正确提升了日志记录级别,为我提供了以下信息:

2017-08-29 10:36:25,310 DEBUG [org.alfresco.repo.content.AbstractContentStore] [http-apr-8080-exec-1] 
Fetched new writer: 
  Store:   mycomponent.cmis.database.DbContentStore@27c9fb78
  Context: NodeContentContext[ contentUrl=null, existing=false, nodeRef=workspace://SpacesStore/4fe8f573-b19e-4231-9485-ca04c6ca6d47, propertyQName={http://www.alfresco.org/model/content/1.0}content]
  Writer:  ContentAccessor[ contentUrl=db://301f9a77-51a2-4986-896d-e4f7f6e63995.bin, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
2017-08-29 10:36:25,310 DEBUG [mycomponent.cmis.database.LoggingContentStore] [http-apr-8080-exec-1] EXITING getWriter =ContentAccessor[ contentUrl=db://301f9a77-51a2-4986-896d-e4f7f6e63995.bin, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
2017-08-29 10:36:25,311 DEBUG [mycomponent.cmis.database.DbContentWriter] [http-apr-8080-exec-1] Creating temp file [uuid=b74b6d85-1842-4859-a2df-b2f8377ff421]
2017-08-29 10:36:25,312 DEBUG [mycomponent.cmis.database.DbContentWriter] [http-apr-8080-exec-1] Returning write channel to temp file [uuid=b74b6d85-1842-4859-a2df-b2f8377ff421]
2017-08-29 10:36:25,312 DEBUG [org.alfresco.repo.content.AbstractContentWriter] [http-apr-8080-exec-1] 
  Created callback byte channel: 
   original: sun.nio.ch.FileChannelImpl@19f2447e
   new: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@8907420
2017-08-29 10:36:25,312 DEBUG [org.alfresco.repo.content.AbstractContentWriter] [http-apr-8080-exec-1] 
  Opened channel onto content: 
   content: ContentAccessor[ contentUrl=db://301f9a77-51a2-4986-896d-e4f7f6e63995.bin, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
   channel: org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel@8907420
2017-08-29 10:36:25,313 ERROR [org.alfresco.repo] [http-apr-8080-exec-1] Could not find db://301f9a77-51a2-4986-896d-e4f7f6e63995.bin in the repo
2017-08-29 10:36:25,313 DEBUG [org.alfresco.repo.content.AbstractContentWriter] [http-apr-8080-exec-1] 
Writer spawned new reader: 
  writer: ContentAccessor[ contentUrl=db://301f9a77-51a2-4986-896d-e4f7f6e63995.bin, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
  new reader: ContentAccessor[ contentUrl=db://301f9a77-51a2-4986-896d-e4f7f6e63995.bin, mimetype=null, size=0, encoding=UTF-8, locale=en_US]
2017-08-29 10:36:25,314 DEBUG [org.alfresco.repo.content.cleanup.EagerContentStoreCleaner] [http-apr-8080-exec-1] Post-commit deletion of old content URLs: 

我知道我没有提供代码,但我的问题如下:这个 EagerContentStoreCleaner 正在将我的 URL 标记为要删除。我不知道为什么。

我的自定义组件创建一个临时文件,然后使用 org.alfresco.service.cmr.repository.ContentStreamListener(如https://github.com/Alfresco/alfresco-sdk-samples/blob/alfresco-51/all中所示-in-one/custom-content-store-repo/src/main/java/org/alfresco/tutorial/contentstore/DbContentStreamListener.java),等待Alfresco通知文件已被填充,但该方法永远不会被调用.

我不知道如何解决这个问题,侦听器没有被调用,文件也没有被写入,所以当然,它从来没有找到。我不知道在哪里看。普通文件系统内容提供程序不会发生这种情况。

4

0 回答 0