Null point exception for Unregistering ApiPortalDataLensAssertion when shutdown software gateway

book

Article ID: 221356

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

Environment: Software Gateway10 CR03.

Install Portal Module using 'base-8.4-10.0-package.tgz', 'setup-ssg-8.4-10.0.sh' file,

or install using 'base-3.5-CR19-package.tgz', 'setup-3.5.CR19.sh'


The following SEVERE message occurs each time exit the gateway with 'gateway.sh stop'.

=========================================================================================

2021-08-10T15:10:50.895+1000 INFO    1 com.l7tech.server.policy.module.ModularAssertionsScanner: Unregistering dynamic assert
ion com.l7tech.external.assertions.apiportaldatalens.ApiPortalDataLensOdataWriteAssertion from just-unregistered module ApiPo
rtalDataLensAssertion.aar
2021-08-10T15:10:50.896+1000 SEVERE  1 com.l7tech.server.policy.module.j: Module ApiPortalDataLensAssertion.aar: exception wh
ile notifying class com.l7tech.external.assertions.apiportaldatalens.listener.ModuleListener of module unload: java.lang.refl
ect.InvocationTargetException
java.lang.reflect.InvocationTargetException
        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:498)
        at com.l7tech.server.policy.module.j.onModuleUnloaded(Unknown Source)
        at com.l7tech.server.policy.module.j.a(Unknown Source)
        at com.l7tech.server.policy.module.j.close(Unknown Source)
        at com.l7tech.server.policy.module.ModularAssertionModule.close(Unknown Source)
        at com.l7tech.server.policy.module.ModularAssertionsScanner.onModuleUnloaded(Unknown Source)
        at com.l7tech.server.policy.module.ModularAssertionsScanner.onModuleUnload(Unknown Source)
        at com.l7tech.server.policy.module.ModularAssertionsScanner.onModuleUnload(Unknown Source)
        at com.l7tech.server.policy.module.ModulesScanner.destroy(Unknown Source)
        at com.l7tech.server.policy.module.ScheduledModuleScanner.destroy(Unknown Source)
        at com.l7tech.server.policy.module.ModularAssertionsScanner.destroy(Unknown Source)
        at com.l7tech.server.policy.ServerAssertionRegistry.destroy(Unknown Source)
        at org.springframework.beans.factory.support.DisposableBeanAdapter$1.run(DisposableBeanAdapter.java:178)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:176)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:487)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:463)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:431)
        at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1048)
        at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1022)
        at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:970)
        at com.l7tech.server.boot.GatewayBoot.destroy(Unknown Source)
        at com.l7tech.server.boot.GatewayBoot.runUntilShutdown(Unknown Source)
        at com.l7tech.server.boot.GatewayMain.main(Unknown Source)
Caused by: java.lang.NullPointerException
        at java.util.concurrent.ConcurrentSkipListMap.remove(ConcurrentSkipListMap.java:1991)
        at java.util.concurrent.ConcurrentSkipListSet.remove(ConcurrentSkipListSet.java:259)
        at com.l7tech.server.service.ServiceTemplateManagerImpl.unregister(Unknown Source)
        at com.l7tech.external.assertions.apiportaldatalens.listener.ModuleListener.unregisterServiceTemplates(ModuleListener.java:210)
        at com.l7tech.external.assertions.apiportaldatalens.listener.ModuleListener.onModuleUnloaded(ModuleListener.java:68)
        ... 27 more

 

Environment

Release : 10.0

Component :

Resolution

The error only occurs when unregistering data lens assertions during shutdown the gateway, and when startup the gateway again, the ssg log always shows the data lens assertions are loaded and registered successful.

Therefore this error should impact the usage of data lens assertions.

As the portal 3.5 is EOS, the fix is not available, please migrate to portal EE,

https://support.broadcom.com/external/content/release-announcements/Portal-3.5-EOS-Announcement/10779