Expand my Community achievements bar.

SOLVED

Files deleted from GDS while still in use

Avatar

Former Community Member

In an effort to improve performance as much as possible, I rewrote a custom render process to be one step calling a custom component.The speed improvement is great, but I am getting intermitant errors where files are missing from the global document storage. Now it would be great if the error included other information from the Document object to help debug exactly which object was missing it's file. It doesn't so I logged all the Document objects to track it down myself. I am creating com.adobe.idp.Document objects and put them into a Map later passed to the form render call's attachment parameter. This all occurs in about 1/2 second yet many times the GDS file behind the attachment is gone when the form render runs. I have tried with and without calling passivate, and passivateGlobally. It still fails. I just have to open then close the same task in Workspace a few times before it will occur. The bigger the attachments, the more likely it is to occur. The default disposal timeout is set to 10 minutes, so something must be explicitally disposing these documents. Any ideas?

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

I figured it out. Well, I stopped the error and have a theory as to why. My custom component uses Reader Extensions. I would get  an error about not finding the classes unless I included the jar in the component.xml classpath. That would seem how most of the custom component samples I find do it. I found some blog entires referring to using <import-packages> instead of <classpath> for other errors. So I removed all the jars and the classpath. I added this:

    <import-packages>

        <package version="1.0">org.apache.commons.codec</package>

        <package version="1.0">org.apache.commons.codec.binary</package>

        <package version="1.0">com.adobe.uuid</package>

        <package version="1.0">com.adobe.livecycle.readerextensions.client</package>

    </import-packages>

Problem solved and my render got even faster. By including the Reader Extension jars, that created those classes in the component's classloader. That in turn required me to add the standard client jar containing Document. My theory is the the Document object in the component was garbage collected while a copy in the main classloader was still using a copy of it. Both pointed to the same GDS file. I also theorize that the GDS file gets deleted in the finalize of Document.

View solution in original post

1 Reply

Avatar

Correct answer by
Former Community Member

I figured it out. Well, I stopped the error and have a theory as to why. My custom component uses Reader Extensions. I would get  an error about not finding the classes unless I included the jar in the component.xml classpath. That would seem how most of the custom component samples I find do it. I found some blog entires referring to using <import-packages> instead of <classpath> for other errors. So I removed all the jars and the classpath. I added this:

    <import-packages>

        <package version="1.0">org.apache.commons.codec</package>

        <package version="1.0">org.apache.commons.codec.binary</package>

        <package version="1.0">com.adobe.uuid</package>

        <package version="1.0">com.adobe.livecycle.readerextensions.client</package>

    </import-packages>

Problem solved and my render got even faster. By including the Reader Extension jars, that created those classes in the component's classloader. That in turn required me to add the standard client jar containing Document. My theory is the the Document object in the component was garbage collected while a copy in the main classloader was still using a copy of it. Both pointed to the same GDS file. I also theorize that the GDS file gets deleted in the finalize of Document.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----