在FIleNet P8中执行签入操作时,启动上载失败错误

时间:2014-02-10 12:09:35

标签: filenet-p8 filenet filenet-content-engine

在此代码中,文档表示内容引擎中已存在的文档对象。 newDocument 表示我想要将所有属性与文档的内容一起分配到的文档。 My_Class 包含文档类的所有属性字段。我使用以下代码执行此操作。

public class DocumentHandler implements EventActionHandler{
private static Logger log = Logger.getLogger(DocumentHandler.class.getName());

@Override
public void onEvent(ObjectChangeEvent event, Id subscriptionId) throws EngineRuntimeException {
    PropertyConfigurator.configure("log4j.properties");

    try {
        if(event.getClassName().equalsIgnoreCase("UpdateEvent")){
            ObjectStore objectStore = event.getObjectStore();
            Id docId = event.get_SourceObjectId();
            Document document = (Document)Factory.Document.fetchInstance(objectStore, docId, null);
            log.info("Document fetched after detecting UpdateEvent");
            Properties properties = document.getProperties();
            if(some condition....)
            {
                String[] propertyName = {"Prop1","Prop2","Prop3"};
                Document newDocument = Factory.Document.createInstance(objectStore, "My_Class");
                Properties newDocProps = newDocument.getProperties();
                Properties properties = document.getProperties();

                //Assigning all the properties from document to newDocument
                newDocProps.putValue("DocumentTitle", document.get_Name().toString());
                for(int i=0;i<propertyName.length;i++)
                {
                    newDocProps.putValue(propertyName[i], properties.getStringValue(propertyName[i]));
                }

                try{
                    createNewDocument(newDocument,document);
                }catch (Exception exp) {
                    log.error("Error while checking in the document "+exp.getLocalizedMessage());
                }

                Folder folder = Factory.Folder.fetchInstance(objectStore, "/TestDoc", null);

                ReferentialContainmentRelationship rcr= Factory.ReferentialContainmentRelationship.createInstance(objectStore, null,AutoUniqueName.AUTO_UNIQUE,DefineSecurityParentage.DO_NOT_DEFINE_SECURITY_PARENTAGE);

                rcr.set_Tail(folder);
                rcr.set_Head(newDocument);
                rcr.set_ContainmentName(newDocument.get_Name());
                rcr.save(RefreshMode.NO_REFRESH);

                //Delete document 
                document.delete();
                document.save(RefreshMode.NO_REFRESH);
            }else{
                Do something else.....
            }
        }catch(Exception e){
            log.error(e.getLocalizedMessage());
        }
}
}

以下是创建新文档的私有方法

private void createNewDocument(Document newDocument, Document document) throws IOException {
        if(document != null){
            ContentElementList transferList = document.get_ContentElements();
            if(!transferList.isEmpty()){
                ContentTransfer transfer = (ContentTransfer) transferList.get(0);
                InputStream fileInputStream = transfer.accessContentStream();
                byte[] bs = IOUtils.toByteArray(fileInputStream);
                ContentElementList elementList = Factory.ContentElement.createList();
                ContentTransfer contentTransfer = Factory.ContentTransfer.createInstance();
                contentTransfer.set_ContentType(document.get_MimeType());
                contentTransfer.set_RetrievalName(transfer.get_RetrievalName());    
                contentTransfer.setCaptureSource(new ByteArrayInputStream(bs));
                elementList.add(contentTransfer);

                newDocument.set_ContentElements(elementList);
                newDocument.set_MimeType(document.get_MimeType());
                newDocument.checkin(AutoClassify.DO_NOT_AUTO_CLASSIFY, CheckinType.MAJOR_VERSION);
                newDocument.save(RefreshMode.NO_REFRESH);
            }
        }
}

执行签入过程时,我收到错误

Error while checking in the document Start upload failed /opt/FileNet_FileStore/ObjStMyPrj_FSA/inbound/I0/FN{443F423A-3165-41DE-9CAD-ADB9689A8754}{A0CD3934-918F-416D-B289-FDAD8F3C43C5}.
java.io.FileNotFoundException: /opt/FileNet_FileStore/ObjStMyPrj_FSA/inbound/I0/FN{443F423A-3165-41DE-9CAD-ADB9689A8754}{A0CD3934-918F-416D-B289-FDAD8F3C43C5} (The file access permissions do not allow the specified action.)

因为我正在使用EventActionHandler并且测试是在服务器上完成的;所以,我只能生成错误日志。谢谢!

编辑:错误堆栈跟踪

 com.filenet.api.exception.EngineRuntimeException: FNRCC0023E: CONTENT_CA_START_UPLOAD_FAILED: Start upload failed /opt/FileNet_FileStore/ObjStMarcomPrj_FSA/inbound/I56/FN{7406E592-EBBF-4240-9665-A0A9E876AA4F}{8974CE3E-8F6C-4366-B6A7-DE774FED8AB0}.
at com.filenet.engine.content.BaseContentArea.createPutContentUpload(BaseContentArea.java:861)
at com.filenet.engine.content.FileContentArea.startPutContent(FileContentArea.java:929)
at com.filenet.engine.content.ContentOperations.startPutContent(ContentOperations.java:583)
at com.filenet.engine.content.PutContentHandler.startNewElement(PutContentHandler.java:613)
at com.filenet.engine.content.PutContentHandler.putContent(PutContentHandler.java:206)
at com.filenet.engine.jca.impl.RequestBrokerImpl.putContent(RequestBrokerImpl.java:393)
at com.filenet.engine.context.ServerSession.uploadContent(ServerSession.java:159)
at com.filenet.engine.context.ServerSession.executeChanges(ServerSession.java:88)
at com.filenet.apiimpl.core.Session.callExecuteChanges(Session.java:181)
at com.filenet.apiimpl.core.Session.executeChanges(Session.java:557)
at com.filenet.apiimpl.core.Session.executeChange(Session.java:846)
at com.filenet.apiimpl.core.IndependentlyPersistableObjectImpl.save(IndependentlyPersistableObjectImpl.java:83)
at com.filenet.apiimpl.core.IndependentlyPersistableObjectImpl.save(IndependentlyPersistableObjectImpl.java:74)
at com.ibm.idea.publishDocumentHandler.PublishDocumentHandler.createDocument(PublishDocumentHandler.java:161)
at com.ibm.idea.publishDocumentHandler.PublishDocumentHandler.onEvent(PublishDocumentHandler.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.filenet.engine.queueitem.SubscriptionProcessor.executeHandler(SubscriptionProcessor.java:1110)
at com.filenet.engine.queueitem.SubscriptionProcessor.execute(SubscriptionProcessor.java:902)
at com.filenet.engine.queueitem.SubscriptionProcessor.fireOrQueue(SubscriptionProcessor.java:737)
at com.filenet.engine.queueitem.SubscriptionProcessor.processEvent(SubscriptionProcessor.java:694)
at com.filenet.engine.queueitem.SubscriptionProcessor.fetchActionAndProcessEvents(SubscriptionProcessor.java:669)
at com.filenet.engine.queueitem.SubscriptionProcessor.processEvents(SubscriptionProcessor.java:504)
at com.filenet.engine.persist.SubscribablePersister.postExecuteChange(SubscribablePersister.java:352)
at com.filenet.engine.persist.ReplicablePersister.postExecuteChange(ReplicablePersister.java:135)
at com.filenet.engine.persist.WithContentPersister.postExecuteChange(WithContentPersister.java:525)
at com.filenet.engine.persist.VersionablePersister.postExecuteChange(VersionablePersister.java:302)
at com.filenet.engine.persist.IndependentPersister.executeChangeWork(IndependentPersister.java:437)
at com.filenet.engine.persist.IndependentPersister.executeChange(IndependentPersister.java:225)
at com.filenet.engine.persist.SubscribablePersister.executeChange(SubscribablePersister.java:172)
at com.filenet.engine.jca.impl.RequestBrokerImpl.executeChanges(RequestBrokerImpl.java:1266)
at com.filenet.engine.jca.impl.RequestBrokerImpl.executeChanges(RequestBrokerImpl.java:1146)
at com.filenet.engine.ejb.EngineCoreBean._executeChanges(EngineCoreBean.java:618)
at com.filenet.engine.ejb.EngineCoreBean.executeChanges(EngineCoreBean.java:586)
at com.filenet.engine.ejb.EJSLocalStatelessEngineCore_22877cb1.executeChanges(Unknown Source)
at com.filenet.engine.ejb.EngineBean.executeChanges(EngineBean.java:832)
at com.filenet.apiimpl.transport.ejbstubs.EJSRemoteStatelessEngine_2e64c374.executeChanges(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.ibm.rmi.util.ProxyUtil$4.run(ProxyUtil.java:620)
at java.security.AccessController.doPrivileged(AccessController.java:277)
at com.ibm.rmi.util.ProxyUtil.invokeWithClassLoaders(ProxyUtil.java:616)
at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java:1094)
at $Proxy32.executeChanges(Unknown Source)
at com.filenet.apiimpl.transport.ejbstubs._Engine_Stub.executeChanges(Unknown Source)
at com.filenet.apiimpl.transport.ejb.EJBSession$EJBImpl._executeChanges(EJBSession.java:898)
at com.filenet.apiimpl.transport.ejb.EJBSession$EJBImpl.executeChanges(EJBSession.java:623)
at com.filenet.apiimpl.transport.ejb.EJBSession.executeChanges(EJBSession.java:389)
at com.filenet.apiimpl.util.SessionHandle.executeChanges(SessionHandle.java:130)
at com.filenet.apiimpl.core.Session.callExecuteChanges(Session.java:174)
at com.filenet.apiimpl.core.Session.executeChanges(Session.java:557)
at com.filenet.apiimpl.core.Session.executeChange(Session.java:846)
at com.filenet.apiimpl.core.IndependentlyPersistableObjectImpl.save(IndependentlyPersistableObjectImpl.java:83)
at com.filenet.apiimpl.core.IndependentlyPersistableObjectImpl.save(IndependentlyPersistableObjectImpl.java:74)
at com.filenet.wcm.api.impl.bd.ZMI_SetProperties.execute(ZMI_SetProperties.java:180)
at com.filenet.wcm.api.impl.bd.MethodImplementation.createAndCall(MethodImplementation.java:154)
at com.filenet.wcm.api.impl.bd.RcBd.performMethodAndGetResponse(RcBd.java:222)
at com.filenet.wcm.api.impl.bd.RcBd.doRpc(RcBd.java:147)
at com.filenet.wcm.api.impl.bd.RcBd.doRpc(RcBd.java:40)
at com.filenet.wcm.api.impl.RemoteCommand.execute(RemoteCommand.java:415)
at com.filenet.wcm.api.impl.RemoteCommand.executeInner(RemoteCommand.java:397)
at com.filenet.wcm.api.impl.RemoteCommand.execute(RemoteCommand.java:329)
at com.filenet.wcm.api.impl.RemoteCommand.executeExpectingVoid(RemoteCommand.java:243)
at com.filenet.wcm.api.impl.BaseObjectImpl.setClassPropsPerms(BaseObjectImpl.java:1461)
at com.filenet.wcm.api.impl.BaseObjectImpl.setProperties(BaseObjectImpl.java:1492)
at com.filenet.wcm.api.impl.BaseObjectImpl.setProperties(BaseObjectImpl.java:1468)
at com.filenet.wcm.toolkit.server.dp.WcmAuthoringDataProvider.setProperties(WcmAuthoringDataProvider.java:937)
at com.filenet.wcm.apps.server.ui.info.WcmPropertiesInfoPage.panelFinish(WcmPropertiesInfoPage.java:2133)
at com.filenet.wcm.apps.server.ui.WcmInfoModule.applyModifiedPanels(WcmInfoModule.java:488)
at com.filenet.wcm.apps.server.ui.WcmInfoModule.apply(WcmInfoModule.java:454)
at com.filenet.wcm.apps.server.ui.WcmInfoModule.onApply(WcmInfoModule.java:445)
at sun.reflect.GeneratedMethodAccessor843.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.filenet.wcm.toolkit.server.base.WcmController.invokeNamedEvent(WcmController.java:4500)
at com.filenet.wcm.toolkit.server.base.WcmController.dispatchEvent(WcmController.java:4618)
at com.filenet.wcm.toolkit.server.base.WcmController.executeModel(WcmController.java:3764)
at com.filenet.wcm.apps.server.controller.WcmWorkplaceController.executeModel(WcmWorkplaceController.java:525)
at com.filenet.wcm.toolkit.server.base.WcmController.initializeModulesWork(WcmController.java:3677)
at com.filenet.wcm.toolkit.server.base.WcmController.initializeModules(WcmController.java:3614)
at com.filenet.wcm.toolkit.server.base.WcmController.initializeModules(WcmController.java:3491)
at com.filenet.wcm.toolkit.server.base.WcmController.handleEvent(WcmController.java:3202)
at com.filenet.wcm.apps.server.controller.WcmWorkplaceController.handleEvent(WcmWorkplaceController.java:569)
at com.filenet.wcm.toolkit.server.base.WcmController.handleEvent(WcmController.java:3134)
at com.ibm._jsp._ObjectInfo._jspService(_ObjectInfo.java:175)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
at com.filenet.ae.servlet.filter.SecurityPluginFilter.doFilter(SecurityPluginFilter.java:162)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.filenet.ae.toolkit.server.servlet.filter.ThreadLocalCleanupFilter.doFilter(ThreadLocalCleanupFilter.java:40)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.filenet.ae.toolkit.server.servlet.filter.PostprocessorFilter.doFilter(PostprocessorFilter.java:38)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.filenet.ae.toolkit.server.servlet.filter.ContainerBasedFilter.doFilter(ContainerBasedFilter.java:228)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.filenet.ae.toolkit.server.servlet.filter.SessionStateFilter.doFilter(SessionStateFilter.java:158)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.filenet.ae.toolkit.server.servlet.filter.PreprocessorFilter.doFilter(PreprocessorFilter.java:118)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:259)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
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:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
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)

1 个答案:

答案 0 :(得分:1)

当我们的文件存储磁盘完全填满时,我们遇到了同样的错误。添加更多磁盘解决了这个问题。