FileNet CMIS error when updating MimeType system Property

1,280 views
Skip to first unread message

Chris Wheeler

unread,
Jan 16, 2014, 9:55:02 AM1/16/14
to cmis...@googlegroups.com
I have CmisSync connecting to the FileNet CMIS and for the most part things look pretty good, however when doing an update to an existing document in the repository I see the following when CmisSync is attempting apply the updates.  Any ideas would be helpful.  I'm not sure if IBM has only made this property READ ONLY on the CMIS side since I don't see any errors on the FileNet Application Server side.

****CmisSync Log*****

2014-01-16 07:50:11,644 [5] INFO  CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - ## Updating C:\Users\wheelercm\CmisSync\filenet-dev\SandBox\Old Stuff\Test.docx
2014-01-16 07:50:11,645 [5] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - before SetContentStream
2014-01-16 07:50:11,682 [5] WARN  CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Exception while update file C:\Users\wheelercm\CmisSync\filenet-dev\SandBox\Old Stuff\Test.docx: DotCMIS.Exceptions.CmisRuntimeException: Internal Server Error
   at DotCMIS.Binding.AtomPub.ObjectService.SetContentStream(String repositoryId, String& objectId, Nullable`1 overwriteFlag, String& changeToken, IContentStream contentStream, IExtensionsData extension)
   at DotCMIS.Client.Impl.Document.SetContentStream(IContentStream contentStream, Boolean overwrite, Boolean refresh)
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.UpdateFile(String filePath, IDocument remoteFile)
2014-01-16 07:50:11,682 [5] INFO  CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - # Updated C:\Users\wheelercm\CmisSync\filenet-dev\SandBox\Old Stuff\Test.docx
2014-01-16 07:50:11,682 [5] INFO  CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Update C:\Users\wheelercm\CmisSync\filenet-dev\SandBox\Old Stuff\Test.docx: False
2014-01-16 07:50:11,682 [5] WARN  CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Failure to update: C:\Users\wheelercm\CmisSync\filenet-dev\SandBox\Old Stuff\Test.docx


*** FileNet CMIS Log ***

[1/16/14 7:48:09:839 MST] 00000036 DALP8Exceptio E com.ibm.ecm.cmis.dal.p8.DALP8ExceptionHandler handleException null
                                 com.ibm.ecm.cmis.exceptions.CMISRuntimeException: CIL1500: The service cannot be completed.
Explanation: This error can occur for the following reasons:
 - An error in the IBM CMIS application
 - An error on the repository
Action: See the HTTP response or the application server SystemOut.log file for more information and to review the stack trace for the exception.
 By default, the SystemOut.log file is in the [WAS_profile_location]/logs/[server]/logs subdirectory of the application server installation directory.
        at com.ibm.ecm.cmis.dal.p8.DALP8Document.setContent(DALP8Document.java:1017)
        at com.ibm.ecm.cmis.app.beans.ContentStream.put(ContentStream.java:530)
        at com.ibm.ecm.cmis.app.servlet.CMISServlet.doPut(CMISServlet.java:222)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
        at com.ibm.ecm.cmis.app.servlet.CMISServlet.service(CMISServlet.java:426)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1658)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1598)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:149)
        at com.ibm.ecm.integration.common.compression.CompressionFilter.doFilter(CompressionFilter.java:55)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)
        at com.ibm.ecm.integration.common.nls.servlet.LocaleFilter.doFilter(LocaleFilter.java:57)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)
        at com.ibm.ecm.integration.common.messageTrace.servlet.MessageTraceFilter.doFilter(MessageTraceFilter.java:84)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:80)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:935)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:503)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
        at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3954)
        at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:942)
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)
        at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
        at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
        at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
        at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
        at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
        at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
        at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
        at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646)
Caused by: com.filenet.api.exception.EngineRuntimeException: FNRCE0057E: E_READ_ONLY: Method failed because an object or property is read-only. Read-only property MimeType cannot be updated.
        at com.filenet.apiimpl.property.PropertiesImpl.checkSettable(PropertiesImpl.java:696)
        at com.filenet.apiimpl.property.PropertiesImpl.checkSettable(PropertiesImpl.java:666)
        at com.filenet.apiimpl.property.PropertiesImpl.putValue(PropertiesImpl.java:370)
        at com.filenet.apiimpl.core.DocumentImpl.set_MimeType(DocumentImpl.java:782)
        at com.ibm.ecm.cmis.dal.p8.DALP8Util.putContentElement(DALP8Util.java:3324)
        at com.ibm.ecm.cmis.dal.p8.DALP8Document.setContent(DALP8Document.java:1012)
        ... 39 more

Nicolas Raoul

unread,
Jan 16, 2014, 10:16:22 AM1/16/14
to cmis...@googlegroups.com
Hello Chris,

Thank you for your feedback!

What version of FileNet are you using?
This looks like a FileNet bug, could you please report this bug to
FileNet and let us know how things go?

Thanks a lot!
Nicolas Raoul
Aegif
> --
> You received this message because you are subscribed to the Google Groups
> "CmisSync" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cmissync+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Jay Brown

unread,
Jan 16, 2014, 10:24:25 AM1/16/14
to cmis...@googlegroups.com
IBM FileNet CMIS correctly reports that the mime type directly off (a property of) cmis:document as read only.  The way you should be setting the mime time in this case is at the time you perform a setContentStream.  A readWrite mimetype is present on that operation.
(e.g. change the mime time when you change the content stream. )


Chris Wheeler

unread,
Jan 16, 2014, 10:29:55 AM1/16/14
to cmis...@googlegroups.com
Jay

Does this mean the issue is in CmisSync or do I need to have IBM look at the bug on the FileNet CMIS side

Chris Wheeler

unread,
Jan 16, 2014, 10:31:04 AM1/16/14
to cmis...@googlegroups.com
I have FileNet 5.2 running with CMIS 1.0.3 for FileNet.  I can open a bug with IBM but I just want to be sure this isn't something that would be on the CmisSync side

Jay Brown

unread,
Jan 16, 2014, 11:37:33 AM1/16/14
to cmis...@googlegroups.com
The specification states that cmis:contentStreamMimeType
is read-only.  The FileNet CMIS implementation is correct in this; and it is correctly reporting this in its types collection. 
http://docs.oasis-open.org/cmis/CMIS/v1.1/csprd01/CMIS-v1.1-csprd01.html

CMIS clients should inspect the types collection to check to see that any properties they are setting are indeed settable.   So this sounds like it is most likely a CMISSync issue.


On Thu, Jan 16, 2014 at 7:31 AM, Chris Wheeler <whee...@gmail.com> wrote:
I have FileNet 5.2 running with CMIS 1.0.3 for FileNet.  I can open a bug with IBM but I just want to be sure this isn't something that would be on the CmisSync side

--

Chris Wheeler

unread,
Jan 16, 2014, 12:02:42 PM1/16/14
to cmis...@googlegroups.com
Nicolas,

Is it possible for you to look into the issue on the CmisSync side since it appears to be implemented correctly on the Filenet CMIS side? 

Nicolas Raoul

unread,
Jan 16, 2014, 8:05:54 PM1/16/14
to cmis...@googlegroups.com
Thanks Jay for the investigation!

It was definitely a CmisSync bug indeed. I just fixed it, so please
try CmisSync 1.1beta7 or later:

https://bitbucket.org/Nicolas_Raoul/cmissync/downloads

Thanks Chris for reporting the problem!
Nicolas Raoul

Chris Wheeler

unread,
Jan 17, 2014, 12:13:59 PM1/17/14
to cmis...@googlegroups.com
Nicolas,

That seemed to fix the error on the FileNet CMIS side for the read only property, however I'm still seeing the following when looking at the CmisSync log.

2014-01-17 09:57:09,930 [9] ERROR CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Could not update file: C:\Users\wheelercm\CmisSync\filenet-dev\SandBox\Old Stuff\Test.docx
DotCMIS.Exceptions.CmisInvalidArgumentException: Content must be set!

Nicolas Raoul

unread,
Jan 20, 2014, 2:00:54 AM1/20/14
to cmis...@googlegroups.com
Because MIME is readonly, I had removed the following line from
CmisSync's UpdateFile method:

remoteStream.MimeType = MimeType.GetMIMEType(Path.GetFileName(filePath));

But it seems that DotCMIS requires a MIME type here.
So I get it from the remote file:

remoteStream.MimeType = remoteFile.GetContentStream().MimeType;

That should work better now, I just tested on a NemakiWare server.
Chris, could you please test again with CmisSync 1.1 beta9?
https://bitbucket.org/Nicolas_Raoul/cmissync/downloads

Thanks all for your feedback!
Nicolas Raoul
Aegif

Chris Wheeler

unread,
Jan 27, 2014, 5:04:49 PM1/27/14
to cmis...@googlegroups.com
Nicolas,

That seemed to have fixed it but now I'm getting Internal Server Errors sortly after when trying to update the file for the second time i have included the logs


You received this message because you are subscribed to a topic in the Google Groups "CmisSync" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cmissync/ibNXkJkL1qk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cmissync+u...@googlegroups.com.
debug_log.txt

Nicolas Raoul

unread,
Jan 27, 2014, 9:52:06 PM1/27/14
to cmis...@googlegroups.com
Hello Chris,

Thanks a lot for your feedback!

Since it says "Internal Server Error", would it be possible to have
the log of the server? It might reveal what is the problem.

Thank you!
Nicolas Raoul
Aegif

Chris Wheeler

unread,
Feb 8, 2014, 9:55:02 AM2/8/14
to cmis...@googlegroups.com
Nicolas,

sorry it took so long to get the log into from the server on the internal error below is the error message I'm seeing when I get the internal error on the IBM CMIS server

[2/8/14 7:52:48:311 MST] 0000002f DALP8Exceptio E com.ibm.ecm.cmis.dal.p8.DALP8ExceptionHandler handleException null

at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)

at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:875)

at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)

at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)

at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)

at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)

at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)

at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:277)

at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)

at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)

at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)

at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)

at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)

at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)

at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)

at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)

at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)

at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646)

Caused by: com.filenet.api.exception.EngineRuntimeException: FNRCE0057E: E_READ_ONLY: Method failed because an object or property is read-only. Read-only property MimeType cannot be updated.

at com.filenet.apiimpl.property.PropertiesImpl.checkSettable(PropertiesImpl.java:696)

at com.filenet.apiimpl.property.PropertiesImpl.checkSettable(PropertiesImpl.java:666)

at com.filenet.apiimpl.property.PropertiesImpl.putValue(PropertiesImpl.java:370)

at com.filenet.apiimpl.core.DocumentImpl.set_MimeType(DocumentImpl.java:782)

at com.ibm.ecm.cmis.dal.p8.DALP8Util.putContentElement(DALP8Util.java:3324)

at com.ibm.ecm.cmis.dal.p8.DALP8Document.setContent(DALP8Document.java:1012)

... 40 more 
Reply all
Reply to author
Forward
0 new messages