Start a Conversation

Unsolved

This post is more than 5 years old

4314

February 17th, 2010 13:00

WRITE_CLIP not allowed

We are trying to write an integration in java for Centera and we keep getting things like

EXCEPTION : com.filepool.fplibrary.FPLibraryException: The use of this operation is restricted (transid='sles1164/826/WRITE_CLIP

.....

we are using a peafile and has capability query says we do have read,write,exist, etc rights.

How can we troubleshoot this?

Code follows
       
        FPClip theClip = null;
        FPTag newTag = null;       
        FPTag topTag =null;
        try
        {
            FPPool pool = CenteraPoolManager.getInstance().getPool(poolAddress); // singleton
            theClip = new FPClip(pool,clipName);
           
            /**
             * Follow centera best practices
             */
            theClip.setDescriptionAttribute("app-vendor", "GWAVA");
            theClip.setDescriptionAttribute("app-name",CenteraPoolManager.appName);
            theClip.setDescriptionAttribute("app-version", CenteraPoolManager.appVersion);

            // retention period in seconds
            if (
                    (retentionDays > 0)
                )    {
                theClip.setRetentionPeriod(retentionDays * (24 * 60 * 60));
            }
            topTag = theClip.getTopTag();

            newTag = new FPTag(topTag, tagName);

            try {
                topTag.Close(); // SDK docs imply this should occur after blobWrite, but SDK example shows this
            } finally {
                topTag=null;
            }
           
            // Blob size is written to clip, so lets just write out filename.
            newTag.setAttribute("filename", asDoc.getFileName());
            newTag.setAttribute(MetaNames.contentType, asDoc.getMeta().getProperty(MetaNames.contentType));
            newTag.setAttribute("docID", asDoc.getMeta().getProperty("old_hash"));
            newTag.setAttribute("size", asDoc.getSize());         

            // write the binary data for this tag to the Centera
            newTag.BlobWrite(is); // Could add argument for example to explicitly state LINK (not embedded) or EMBED)

           
           
            String clipID = theClip.Write();

            return clipID;

        } finally
        {
            StreamUtils.close(is);           
            close(newTag);
            close(topTag);
            close(theClip);
        }

No Responses!
No Events found!

Top