Content Management and Capture

Content Management and Capture

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
Expand all | Collapse all

ICN Plugin does not updated from fist version

  • 1.  ICN Plugin does not updated from fist version

    Posted Tue March 25, 2025 09:30 AM
    Edited by Teera Wattanapongsakorn 19 days ago

    I have tried to develop ICN Plugin to add new context menu action. This's for get meta-data in FileNet document and call to external application with parameter. (Ex. Document number)

    I used sample in https://github.com/ibm-ecm/ibm-content-navigator-samples/tree/master/samplePlugin

    It can test this sample plugin, and it can show menu action properly. But when I tried updated code inside plugins jar and upload to ICN.

    It seems plugin always use previous version of code, it's not updated to my new code. I'm not sure how I complete upload new code.

    I tried both update jar / delete and upload jar in ICN's admin but it still not updated to new one.

    For more question, where is uploaded ICN plugin stored in WebSphere application server? (I tried to find entire WebSphere's directories but can't find it)

    ICN Plugin screenshot:

    I have upload and save:

    I already have commented this line of code in new jar:





  • 2.  RE: ICN Plugin does not updated from fist version

    Posted Wed March 26, 2025 11:48 AM

    There should be a plugins directory under the ECMClient directory where ICN is installed. Try putting it there.
    If you have multiple versions it will load whichever one it finds first. It might also pick it up from the classpath
    so rename the old jar to be sure. 



    ------------------------------
    Stephen Weckesser
    ------------------------------



  • 3.  RE: ICN Plugin does not updated from fist version

    Posted Thu March 27, 2025 04:26 AM

    Hi Teera,

    using the Plug-In's Version information, you can verify that ICN Server loaded the desired version (in your screenshot, is 3.0.7.1 the updated version?).

    One of the caches to consider when this is the desired number is the browser cache, when client side (JavaScript) functionality is modified, as your screenshot implies. Try clearing the browser cache. 

    Happy to hear about your feedback. 



    ------------------------------
    Mathias Korell
    ------------------------------



  • 4.  RE: ICN Plugin does not updated from fist version

    Posted Thu March 27, 2025 04:42 AM

    once you load a new plugin version it is better to restart the webserver where ICN is installed, because you have a lot of cache on the server

    and to remove everything in your client browser like cookis etc..

    then try again

    hope helps ypu

    dorothea



    ------------------------------
    dorothea

    dorotheavulcan@yahoo.com
    ------------------------------



  • 5.  RE: ICN Plugin does not updated from fist version

    Posted Thu March 27, 2025 11:08 AM

    Hello Teera - When updating your ICN plug-in, please make sure to restart the server to see your code changes take effect after replacing the plug-in JAR file.

    In some cases, you may also need to clear the WebSphere cache, but this is typically not required.

    For smoother development and testing, it's recommended to:

    Keep your browser's developer tools open

    Disable caching

    Perform a hard refresh to ensure the latest changes are loaded for client side files.



    ------------------------------
    Zachary Obeid
    ------------------------------



  • 6.  RE: ICN Plugin does not updated from fist version

    Posted Fri March 28, 2025 01:42 AM

    Thank you everyone. I will try solution recommended and update you soon.



    ------------------------------
    Teera Wattanapongsakorn
    ------------------------------



  • 7.  RE: ICN Plugin does not updated from fist version

    Posted 26 days ago

    Hi teera, rename the sample plugin to some samplePluginTest2.jar.

    Also in your navigator  installed path in your websphere server add below lines to the file and restart navigator server.

    file name: ESAPI WAF policy file:

    <add-header name="Cache-Control" value="no-cache, no-store" path=".*/|.*\.jsp|.*/jaxrs/.*|.*/api/.*"/><add-header name="Cache-Control" value="no-cache" path=".*/plugin/.*/getResource/.*"/>



    ------------------------------
    Narsimha Naidu
    ------------------------------



  • 8.  RE: ICN Plugin does not updated from fist version

    Posted 19 days ago

    Thank you everyone.

    I have founded root cause of this issue.

    When I modified SamplePlugin.js, I need to re-gzip the javascript into SamplePlugin.js.jgz again. Because ICN Plugin execute from SamplePlugin.js.jgz, not from SamplePlugin.js.



    ------------------------------
    Teera Wattanapongsakorn
    ------------------------------



  • 9.  RE: ICN Plugin does not updated from fist version

    Posted 16 days ago

    Hi Teera,

    great that you have found the error your plugin.

    It's a good idea to compress the Javascript sources. However, you can also load the js sources directly for development. This also makes debugging easier.
    To do this, specify the URL parameter ...navigator/?debug=true.
     
    You can specify which script is loaded in which mode in your plugin main class (in PluginSample this is the following: com.ibm.ecm.extension.sample.SamplePlugin):
    getScript and getDebugScript.
    For small plugins, where compression may not be appropriate, you can also load the js source directly:
    public String getScript() {
      return getDebugScript();
    }


    ------------------------------
    Christoph Sünderkamp
    ------------------------------



  • 10.  RE: ICN Plugin does not updated from fist version

    Posted 15 days ago

    Hello Christoph,

    How to do compress JS files in plugin? Do you recommend any specific library for this ? 



    ------------------------------
    Ramagopal Medam
    ------------------------------



  • 11.  RE: ICN Plugin does not updated from fist version

    Posted 15 days ago

    Hi Christopher, Thank you for your reccemend on debugging, I will try this.

    Hi Ramakopal, You can use normal linux's gzip to do that.

    gzip -c SamplePlugin.js > SamplePlugin.js.jgz



    ------------------------------
    .
    ------------------------------



  • 12.  RE: ICN Plugin does not updated from fist version

    Posted 15 days ago

    in the samplePlugin IBM uses the shrinksafe tool from the Dojo utils to merge all Dojo classes into one JavaScript file.

    Packing is done by gzip:

    We have implemented our own compression mechanism in our build process to be more flexible. In general, it works like shrinksafe.



    ------------------------------
    Christoph Sünderkamp
    ------------------------------