WebSphere Application Server & Liberty

Expand all | Collapse all

shared library

  • 1.  shared library

    Posted 17 days ago
    Hi all,
    Is there a way to check which library has been loaded by websphere 8.5;
    Try to explain better my issue;
    I've created a shared library and call it LOCAL_LIBRARY, it is on the path /opt/LOCAL_LIBRARY, and it contains:

    Now I'm asking how I can check which one has been really loaded by WAS?

    thanks 1000


    ------------------------------
    francesco Viscomi
    ------------------------------


  • 2.  RE: shared library

    Posted 16 days ago
    You can turn on verbose classloading in the JVM panel.  Server > process definition > Java virtual machine and then select the checkbox for "verbose class loading" and save.  You will need to restart the app server.  Logs will be in the nativeerr.log

    Brian

    ------------------------------
    Brian S Paskin
    Sr. Web Engineer
    IBM Tech Garage
    ------------------------------



  • 3.  RE: shared library

    Posted 16 days ago
    I did as you say; 


    Restarted the server but no file has been created:



    thanks so much;



    ------------------------------
    francesco Viscomi
    ------------------------------



  • 4.  RE: shared library

    Posted 15 days ago
    Sorry the follow file name is native_stderr.log.

    Brian

    ------------------------------
    Brian S Paskin
    Sr. Web Engineer
    IBM Tech Garage
    ------------------------------



  • 5.  RE: shared library

    Posted 15 days ago
    Ok thanks I found it, unfortunately I cannot understand, it seems that no log anything in that file


    As you can see I have restarted many times the server (You can see the timestamp of SystemOut.log) while the timestamp of native_stderr.log is at 20.24;


    Besides I get:

    [30/09/21 21.58.02:726 CEST] 00000128 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper service Uncaught service() exception thrown by servlet CiaoMondoPortlet: java.lang.NoSuchMethodError: com/ibm/workplace/wcm/api/Repository.getCurrentVirtualPortalContext()Lcom/ibm/workplace/wcm/api/VirtualPortalContext; (loaded from file:/home/dev/IBM/WebSphere/PortalServer/wcm/prereq.wcm/wcm/shared/app/ilwwcm-api.jar by 
    com.ibm.ws.classloader.ExtJarClassLoader@bd332660[server:0]​

    And the wps is almost unavailable (meaning that any portlet is not visible):



    thanks really much




    ------------------------------
    francesco Viscomi
    ------------------------------



  • 6.  RE: shared library

    Posted 15 days ago

    Hi, make sure you have verbose class loading turned.


    However, the error you are receiving is that WAS cannot find the method Repository.getCurrentVirtualPortalContext() which was added to Portal in 8.0.0.1, I believe. What is the full version of WAS and Portal are you running?

    Brian



    ------------------------------
    Brian S Paskin
    Sr. Web Engineer
    IBM Tech Garage
    ------------------------------



  • 7.  RE: shared library

    Posted 15 days ago
    Hi Brian, thanks for your time!!
    the version of WPS is
    IBM WebSphere Portal 8.5
    Livello di costruzione: 20140424-1749 2014-04-24 18:45

    while the version of WAS is
    WebSphere Platform 8.5.5.11 [ND 8.5.5.11 cf111649.01]

    I think that the problem is related to classloader because it happens when I add to the server a library;

    ------------------------------
    francesco Viscomi
    ------------------------------



  • 8.  RE: shared library

    Posted 15 days ago
    Hi, Portal is very outdated and should be patched.  It is over 7 years without a single patch.  WAS is also 5 years without a patch.  Make sure your shared library does not contain any Portal or WebSphere libraries.  You could try changing the class loader order by going into the application and selecting "Class Loader" and change the order to parent last.

    Brian


    ------------------------------
    Brian S Paskin
    Sr. Web Engineer
    IBM Tech Garage
    ------------------------------



  • 9.  RE: shared library

    Posted 12 days ago
    HI, I've tried to change the order and check shared library do not contain any was/wps library;
    I have restarted the server many many times, and finally I find:

    [04/10/21 9.35.45:047 CEST]     FFDC Exception:java.lang.NoClassDefFoundError SourceId:class com.ibm.wkplc.extensionregistry.ExtensionClassLoader.loadClass ProbeId:1
    java.lang.NoClassDefFoundError: javax.portlet.filter.ActionFilter
    	at java.lang.ClassLoader.defineClassImpl(Native Method)
    	at java.lang.ClassLoader.defineClass(ClassLoader.java:306)
    ​
    So the problem is related that my version of JDK dosn't contain api for portlet;
    Reading documentation at: https://www.ibm.com/docs/en/was-nd/8.5.5?topic=container-portlet-filters
    seems that "Since the release of JSR 286: Portlet Specification 2.0", To have ActionFilter I need that the server implements JSR 286;

    So How I can check if my server implemente JSR 286 and not JSR 186?

    thanks really a lot




    ------------------------------
    francesco Viscomi
    ------------------------------



  • 10.  RE: shared library

    Posted 12 days ago
    Hi, WAS v855 supports JSR 286.  That error may be caused by the class loading if it is not set to the original class loading.  Can you attach the verbose class loading output (native_stderr.log) for the server?

    Brian

    ------------------------------
    Brian S Paskin
    Sr. Web Engineer
    IBM Tech Garage
    ------------------------------



  • 11.  RE: shared library

    Posted 12 days ago
    Hi, 
    thanks really much for your time;
    I'll send the log file to you privately (I think is better do not publish it);

    But there are a plenty of line like this one:
    class load: com.ibm.lotus.search.customlinks.CustomLinksFactory from: file:/home/dev/IBM/WebSphere/PortalServer/ext/wp.search.api/search/api/shared/app/wp.search.providerAPI.jar
    class load: com.ibm.lotus.search.customlinks.imp.CustomLinksFactoryImp from: file:/home/dev/IBM/WebSphere/PortalServer/search/wp.search.provider/core/service/shared/app/wp.search.providerCore.jar
    class load: com.ibm.lotus.search.customlinks.CustomLink from: file:/home/dev/IBM/WebSphere/PortalServer/ext/wp.search.api/search/api/shared/app/wp.search.providerAPI.jar
    ​

    And other line (where the jar is found in a library defined by me):

    class load: javax/xml/ws/WebEndpoint from: /home/dev/IBM/WebSphere/AppServer/endorsed_apis/jaxws-api.jar
    class load: org.apache.axis2.jaxws.description.builder.WebEndpointAnnot from: file:/home/dev/IBM/WebSphere/AppServer/plugins/org.apache.axis2.jar
    class load: com.vaadin.server.Constants from: file:/home/dev/shared-drives/C:/share/librerie/LOCAL_PRODUCT_LIBRARIES/vaadin-server-7.7.9.jar
    class load: com.vaadin.server.VaadinServlet from: file:/home/dev/shared-drives/C:/share/librerie/LOCAL_PRODUCT_LIBRARIES/vaadin-server-7.7.9.jar
    class load: com.vaadin.spring.server.SpringVaadinServlet from: file:/home/dev/shared-drives/C:/share/librerie/LOCAL_PRODUCT_LIBRARIES/vaadin-spring-1.0.2.jar
    class load: cz.demcre.vencar.be.carve.carrello.v2.CRCARVENBECARVECARRELLOV2 from: file:/home/dev/IBM/WebSphere/wp_profile/installedApps/dev-machineCell/PA_CRCARVENFECARVECAR.ear/CRCARVENFECARVECA.war/WEB-INF/lib/CR_CARVEN_BE_CARVE_CARRELLOCLIENT_V2-2.2.0.jar
    class load: com.vaadin.server.ServiceException from: file:/home/dev/shared-drives/C:/share/librerie/LOCAL_PRODUCT_LIBRARIES/vaadin-server-7.7.9.jar
    class load: com.vaadin.server.DeploymentConfiguration from: file:/home/dev/shared-drives/C:/share/librerie/LOCAL_PRODUCT_LIBRARIES/vaadin-server-7.7.9.jar​

    But the library where filter is defined is present in LIBRERIE_SERVER, not in 
    /home/dev/shared-drives/C:/share/librerie/LOCAL_PRODUCT_LIBRARIES;

    The difference between LOCAL_PRODUCT_LIBRARIES and LIBRERIE_SERVER is that the first one is defined at application level, while the othern one is defined at server level!!! 

    But if you need the log file i will send to you!!!!


    ------------------------------
    francesco Viscomi
    ------------------------------



  • 12.  RE: shared library

    Posted 12 days ago
    Try to explain better: 
    On the console at level of server i defined:


    I started the server, and get the following error:
    [04/10/21 17.01.42:581 CEST] 00000001 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident CWRDC1003I: FFDC Incident emitted on /home/dev/IBM/WebSphere/wp_profile/logs/ffdc/WebSphere_Portal_71b8054c_21.10.04_17.01.42.5795922739928696395662.txt com.ibm.ws.portletcontainer.ext.ExtensionHandler.processGlobalPortletFilter 346
    [04/10/21 17.01.42:582 CEST] 00000001 ExtensionHand E com.ibm.ws.portletcontainer.ext.ExtensionHandler processGlobalPortletFilter EJPPC0231E: Si è verificata una eccezione nel tentativo di creare il filtro portlet.
                                     org.eclipse.core.runtime.CoreException: CWXRS0008E: Failed to load Extension class: it.demcre.serbus.fe.archi.contextfilter.ContextFilter
    	at com.ibm.wkplc.extensionregistry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:142)
    	at com.ibm.ws.portletcontainer.ext.ExtensionHandler.processGlobalPortletFilter(ExtensionHandler.java:333)
    	at com.ibm.ws.portletcontainer.ext.ExtensionHandler.initExtensions(ExtensionHandler.java:137)
    	at com.ibm.ws.portletcontainer.runtime.PortletContainerComponentImpl.registerAppExtensions(PortletContainerComponentImpl.java:235)
    	at com.ibm.ws.portletcontainer.runtime.PortletContainerComponentImpl.access$000(PortletContainerComponentImpl.java:49)
    	at com.ibm.ws.portletcontainer.runtime.PortletContainerComponentImpl$ExtensionPropertyChangeListener.propertyChange(PortletContainerComponentImpl.java:268)
    	at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:346)
    	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
    	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:274)
    	at com.ibm.wsspi.runtime.component.WsComponentImpl.setState(WsComponentImpl.java:584)​

    looking at native_stderr.log:


    While if I look for LOCAL_PRODUCT_LIBRARIES (that is a library associate not at the server but at the application):




    I'm going to get crazy :) 





    ------------------------------
    francesco Viscomi
    ------------------------------



  • 13.  RE: shared library

    Posted 11 days ago
    Hi, this is not a good way or specifying a shared library.  This is definitely cause classloader issues.  Remove your libraries from the list and add the shared library and associate it with the application.  

    Brian

    ------------------------------
    Brian S Paskin
    Sr. Web Engineer
    IBM Tech Garage
    ------------------------------