5 Replies Latest reply on Apr 19, 2018 11:48 PM by Likrant

    Problem in exploding the public resources for extension with UUID

    SunilKr

      Hi Guys,

       

      I am able to successfully upload the add-ons extension zip but after successful upload, one alert message comes up with error message "Error in unpacking public resources of addon".

      In sbs log, getting below error

       

      2016-03-17 06:12:59,537 [TaskEngineWorker-pool-1] [::] WARN com.jivesoftware.community.extension.publicdata.FileSystemResourceManagerImpl - Unclean pruning of the existing directory [C:\Users\jiveDEV\jive\web\..\target\jiveHome\www\resources\add-ons\df53afd6-41c3-32d5-be5a-c08e4f06b17b\fac2187b27.exploding]

      2016-03-17 06:12:59,758 [TaskEngineWorker-pool-1] [::] ERROR com.jivesoftware.community.extension.task.ExtensionPublicResourcesExploderTask - problem in exploding the public resources for extension with UUID: df53afd6-41c3-32d5-be5a-c08e4f06b17b and resource hash: null

      java.io.IOException: There was a problem exploding the public resources for addon

        at com.jivesoftware.community.extension.publicdata.FileSystemResourceManagerImpl$3.explodeImpl(FileSystemResourceManagerImpl.java:137)

        at com.jivesoftware.community.extension.publicdata.AbstractExtensionResourceBundle.explodeCurrentVersion(AbstractExtensionResourceBundle.java:154)

        at com.jivesoftware.community.extension.task.ExtensionPublicResourcesExploderTask.explodePublicResources(ExtensionPublicResourcesExploderTask.java:53)

        at com.jivesoftware.community.extension.task.ExtensionPublicResourcesExploderTask.explodeLatestVersionOfPublicResources(ExtensionPublicResourcesExploderTask.java:36)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:497)

        at com.jivesoftware.base.taskmanager.impl.BeanTaskRunnable.run(BeanTaskRunnable.java:51)

        at com.jivesoftware.base.taskmanager.impl.LocalExecutor$3.call(LocalExecutor.java:140)

        at com.jivesoftware.community.aaa.authz.SystemExecutor.executeCallable(SystemExecutor.java:39)

        at com.jivesoftware.base.taskmanager.impl.LocalExecutor.runInSystemContext(LocalExecutor.java:136)

        at com.jivesoftware.base.taskmanager.impl.LocalExecutor.access$2(LocalExecutor.java:123)

        at com.jivesoftware.base.taskmanager.impl.LocalExecutor$1.run(LocalExecutor.java:89)

        at com.jivesoftware.util.task.TaskEngineRunnable.run(TaskEngineRunnable.java:51)

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

        at java.lang.Thread.run(Thread.java:745)

       

       

       

      While adding tiles, getting below error log but I explore the directory for configuration.html I am able to see it.

       

      2016-03-17 06:14:18,583 [http-bio-8080-exec-6] [2013:sunilkr:REGULAR] WARN com.jivesoftware.community.extension.publicdata.FileSystemResourceManagerImpl - Unclean pruning of the existing directory [C:\Users\jiveDEV\kms\trane-knowledgecenter-jive\web\..\target\jiveHome\www\resources\add-ons\df53afd6-41c3-32d5-be5a-c08e4f06b17b\fac2187b27.exploding]

      2016-03-17 06:14:18,765 [http-bio-8080-exec-6] [2013:sunilkr:REGULAR] WARN com.jivesoftware.community.extension.publicdata.AbstractExtensionResourceBundle - Unable to explode the current version when looking for /tiles/my-content-tile/configuration.html [hash=fac2187b27]

      java.io.IOException: There was a problem exploding the public resources for addon

        at com.jivesoftware.community.extension.publicdata.FileSystemResourceManagerImpl$3.explodeImpl(FileSystemResourceManagerImpl.java:137)

        at com.jivesoftware.community.extension.publicdata.AbstractExtensionResourceBundle.explodeCurrentVersion(AbstractExtensionResourceBundle.java:154)

        at com.jivesoftware.community.extension.publicdata.AbstractExtensionResourceBundle.findResource(AbstractExtensionResourceBundle.java:74)

        at com.jivesoftware.community.extension.publicdata.BundledAppUrlTransform.transformImpl(BundledAppUrlTransform.java:104)

        at com.jivesoftware.community.extension.publicdata.BundledAppUrlTransform.transform(BundledAppUrlTransform.java:71)

        at com.jivesoftware.community.opensocial.gadgets.impl.GadgetUrlTransformFactory.transformImpl(GadgetUrlTransformFactory.java:79)

        at com.jivesoftware.community.opensocial.gadgets.impl.GadgetUrlTransformFactory.access$0(GadgetUrlTransformFactory.java:76)

        at com.jivesoftware.community.opensocial.gadgets.impl.GadgetUrlTransformFactory$1.apply(GadgetUrlTransformFactory.java:32)

        at com.jivesoftware.community.opensocial.gadgets.impl.GadgetUrlTransformFactory$1.apply(GadgetUrlTransformFactory.java:1)

        at com.jivesoftware.api.core.v3.converters.tiles.AbstractDefinitionEntityConverter.normalizePublicResources(AbstractDefinitionEntityConverter.java:155)

        at com.jivesoftware.api.core.v3.converters.tiles.TileDefinitionEntityConverter.normalizePublicResources(TileDefinitionEntityConverter.java:26)

        at com.jivesoftware.api.core.v3.converters.tiles.TileDefinitionEntityConverter.normalizePublicResources(TileDefinitionEntityConverter.java:1)

        at com.jivesoftware.api.core.v3.converters.tiles.AbstractDefinitionEntityConverter.populateViews(AbstractDefinitionEntityConverter.java:151)

       

       

      Any input would be much appreciated.

       

      Thanks

      -Sunil

        • Re: Problem in exploding the public resources for extension with UUID
          shipra

          Hello Sunil Kumar

           

          I am facing same issue with tile.

          Error in unpacking public resources of addon. Do you have any solution for this now?

           

          Thanks!

          Shipra

          • Re: Problem in exploding the public resources for extension with UUID
            mamathak

            Hi Sunil Kumar,

             

            I am facing the error while uploading add-on in my local instance .

            Error: Error in unpacking public resources of add on.

             

            Please let me know if there is any fix to resolve this error.

             

            Thanks,

            Mamatha

              • Re: Problem in exploding the public resources for extension with UUID
                john_reynolds

                In my experience, this issue is intermittent for Hosted and Cloud communities. It often goes away when you follow the instructions to "try again". Are you cloud / hosted / on-prem?

                • Re: Problem in exploding the public resources for extension with UUID
                  Likrant

                  Afaik that is only on Windows OS. I have a small plugin to fix it.

                   

                  spring.xml

                   

                      <bean id="publicResourceManager" class="com.jivesoftware.community.extension.publicdata.MyFileSystemResourceManagerImpl">

                          <property name="extensionManager" ref="extensionManager"/>

                      </bean>

                   

                  com.jivesoftware.community.extension.publicdata.MyFileSystemResourceManagerIm

                   

                   

                  import com.jivesoftware.base.util.Pair;
                  import org.apache.commons.io.IOUtils;
                  import org.apache.log4j.Logger;
                  
                  import java.io.File;
                  import java.io.FileOutputStream;
                  import java.io.IOException;
                  import java.io.InputStream;
                  import java.util.Iterator;
                  
                  public class MyFileSystemResourceManagerImpl extends FileSystemResourceManagerImpl {
                  
                     private static final Logger LOG = Logger.getLogger(MyFileSystemResourceManagerImpl.class);
                  
                  
                  <pair<string, inputstream=""><string, inputstream="">protected boolean writeDirectory(File rootDir, Iterator<pair<string, inputstream="">> iterator) {
                     boolean success = true;
                     if (rootDir.exists() || rootDir.mkdirs()) {
                     while (iterator.hasNext()) {
                    Pair<string, inputstream=""> entry = iterator.next();
                    File file = new File(rootDir, entry.getA());
                     if (file.getParentFile() == null || file.getParentFile().exists() || file.getParentFile().mkdirs()) {
                     try {
                    FileOutputStream fos = new FileOutputStream(file);
                    IOUtils.copy(entry.getB(), fos);
                    fos.flush();
                    fos.close();
                    } catch (IOException e) {
                    success = false;
                     if (LOG.isTraceEnabled()) {
                     LOG.info("Failed to write file [" + file + "]: " + e.getMessage(), e);
                    } else {
                     LOG.info("Failed to write file [" + file + "]: " + e.getMessage());
                    }
                    }
                    } else {
                    success = false;
                     LOG.info("Failed to create directory [" + file.getParent() + "]");
                    }
                    }
                    } else {
                    success = false;
                     LOG.warn("Unable to create output directory [" + rootDir + "]");
                    }
                     return success;
                  }
                  
                  
                  }

                   

                   

                  I don't remember, why I did that, but only difference in rows:

                  FileOutputStream fos = new FileOutputStream(file);
                  IOUtils.copy(entry.getB(), fos);
                  fos.flush();
                  fos.close();