Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix conflict of XML processing between EhCache and onboarding #3266

Merged
merged 5 commits into from
Jan 12, 2024

Conversation

pj892031
Copy link
Contributor

Description

During the startup of Gateway sometimes appears an issue with XML. Here is the stack trace:

2024-01-12 12:47:26.984 <ZWEAGW1:main:33948398> APIMLPC ERROR (o.s.b.SpringApplication) Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cacheServiceController' defined in URL [jar:file:/z/apimlpc/monitor/apimla/components/api-mediation/gateway-service.jar!/BOOT-INF/classes!/org/zowe/apiml/gateway/controllers/CacheServiceController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serviceCacheEvictor' defined in URL [jar:file:/z/apimlpc/monitor/apimla/components/api-mediation/gateway-service.jar!/BOOT-INF/classes!/org/zowe/apiml/gateway/cache/ServiceCacheEvictor.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serviceAuthenticationServiceImpl' defined in URL [jar:file:/z/apimlpc/monitor/apimla/components/api-mediation/gateway-service.jar!/BOOT-INF/classes!/org/zowe/apiml/gateway/security/service/ServiceAuthenticationServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 4; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManager' defined in class path resource [org/zowe/apiml/gateway/config/CacheConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.CacheManager]: Factory method 'cacheManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManagerFactoryBean' defined in class path resource [org/zowe/apiml/gateway/config/CacheConfig.class]: Invocation of init method failed; nested exception is java.lang.AssertionError: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'jar:file:/z/apimlpc/monitor/apimla/components/api-mediation/gateway-service.jar!/BOOT-INF/lib/ehcache-3.10.8.jar!/ehcache-core.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:801)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:224)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:929)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:409)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
        at org.zowe.apiml.gateway.GatewayApplication.main(GatewayApplication.java:58)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:508)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
        at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serviceCacheEvictor' defined in URL [jar:file:/z/apimlpc/monitor/apimla/components/api-mediation/gateway-service.jar!/BOOT-INF/classes!/org/zowe/apiml/gateway/cache/ServiceCacheEvictor.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serviceAuthenticationServiceImpl' defined in URL [jar:file:/z/apimlpc/monitor/apimla/components/api-mediation/gateway-service.jar!/BOOT-INF/classes!/org/zowe/apiml/gateway/security/service/ServiceAuthenticationServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 4; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManager' defined in class path resource [org/zowe/apiml/gateway/config/CacheConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.CacheManager]: Factory method 'cacheManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManagerFactoryBean' defined in class path resource [org/zowe/apiml/gateway/config/CacheConfig.class]: Invocation of init method failed; nested exception is java.lang.AssertionError: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'jar:file:/z/apimlpc/monitor/apimla/components/api-mediation/gateway-service.jar!/BOOT-INF/lib/ehcache-3.10.8.jar!/ehcache-core.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:801)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:224)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1609)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1573)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1462)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1349)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:911)
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
        ... 25 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serviceAuthenticationServiceImpl' defined in URL [jar:file:/z/apimlpc/monitor/apimla/components/api-mediation/gateway-service.jar!/BOOT-INF/classes!/org/zowe/apiml/gateway/security/service/ServiceAuthenticationServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 4; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManager' defined in class path resource [org/zowe/apiml/gateway/config/CacheConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.CacheManager]: Factory method 'cacheManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManagerFactoryBean' defined in class path resource [org/zowe/apiml/gateway/config/CacheConfig.class]: Invocation of init method failed; nested exception is java.lang.AssertionError: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'jar:file:/z/apimlpc/monitor/apimla/components/api-mediation/gateway-service.jar!/BOOT-INF/lib/ehcache-3.10.8.jar!/ehcache-core.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:801)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:224)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1609)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1573)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1462)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1349)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:911)
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
        ... 42 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManager' defined in class path resource [org/zowe/apiml/gateway/config/CacheConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.CacheManager]: Factory method 'cacheManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManagerFactoryBean' defined in class path resource [org/zowe/apiml/gateway/config/CacheConfig.class]: Invocation of init method failed; nested exception is java.lang.AssertionError: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'jar:file:/z/apimlpc/monitor/apimla/components/api-mediation/gateway-service.jar!/BOOT-INF/lib/ehcache-3.10.8.jar!/ehcache-core.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:481)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:911)
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
        ... 59 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.CacheManager]: Factory method 'cacheManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManagerFactoryBean' defined in class path resource [org/zowe/apiml/gateway/config/CacheConfig.class]: Invocation of init method failed; nested exception is java.lang.AssertionError: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'jar:file:/z/apimlpc/monitor/apimla/components/api-mediation/gateway-service.jar!/BOOT-INF/lib/ehcache-3.10.8.jar!/ehcache-core.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:648)
        ... 73 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManagerFactoryBean' defined in class path resource [org/zowe/apiml/gateway/config/CacheConfig.class]: Invocation of init method failed; nested exception is java.lang.AssertionError: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'jar:file:/z/apimlpc/monitor/apimla/components/api-mediation/gateway-service.jar!/BOOT-INF/lib/ehcache-3.10.8.jar!/ehcache-core.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:307)
        at org.zowe.apiml.gateway.config.CacheConfig$$EnhancerBySpringCGLIB$$c76ca81e.cacheManagerFactoryBean(<generated>)
        at org.zowe.apiml.gateway.config.CacheConfig.cacheManager(CacheConfig.java:63)
        at org.zowe.apiml.gateway.config.CacheConfig$$EnhancerBySpringCGLIB$$c76ca81e.CGLIB$cacheManager$2(<generated>)
        at org.zowe.apiml.gateway.config.CacheConfig$$EnhancerBySpringCGLIB$$c76ca81e$$FastClassBySpringCGLIB$$abe762cd.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
        at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
        at org.zowe.apiml.gateway.config.CacheConfig$$EnhancerBySpringCGLIB$$c76ca81e.cacheManager(<generated>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:508)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
        ... 74 common frames omitted
Caused by: java.lang.AssertionError: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'jar:file:/z/apimlpc/monitor/apimla/components/api-mediation/gateway-service.jar!/BOOT-INF/lib/ehcache-3.10.8.jar!/ehcache-core.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
        at org.ehcache.xml.ResourceConfigurationParser.<clinit>(ResourceConfigurationParser.java:70)
        at org.ehcache.xml.ConfigurationParser.lambda$new$5(ConfigurationParser.java:142)
        at java.util.function.Function.lambda$andThen$1(Function.java:99)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:514)
        at org.ehcache.xml.ConfigurationParser.<init>(ConfigurationParser.java:141)
        at org.ehcache.xml.XmlConfiguration.<init>(XmlConfiguration.java:116)
        at org.ehcache.xml.XmlConfiguration.<init>(XmlConfiguration.java:92)
        at org.ehcache.jsr107.EhcacheCachingProvider$ConfigSupplier.getConfiguration(EhcacheCachingProvider.java:328)
        at org.ehcache.jsr107.EhcacheCachingProvider.getCacheManager(EhcacheCachingProvider.java:134)
        at org.ehcache.jsr107.EhcacheCachingProvider.getCacheManager(EhcacheCachingProvider.java:85)
        at org.springframework.cache.jcache.JCacheManagerFactoryBean.afterPropertiesSet(JCacheManagerFactoryBean.java:83)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)
        ... 93 common frames omitted
Caused by: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'jar:file:/z/apimlpc/monitor/apimla/components/api-mediation/gateway-service.jar!/BOOT-INF/lib/ehcache-3.10.8.jar!/ehcache-core.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown Source)
        at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source)
        at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
        at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
        at org.ehcache.xml.XmlUtil.newSchema(XmlUtil.java:74)
        at org.ehcache.xml.ResourceConfigurationParser.<clinit>(ResourceConfigurationParser.java:68)
        ... 105 common frames omitted

The root cause is in using a global configuration. Once the Discovery client establishes communication (and reads XML) it is not possible to initiate EhCache. If the onboarding is not possible (because for example wrong port of DS) EhCache is initiated. The issue appeared while using FatJars, lite jars are working correctly. It is a race condition.

This PR defines a strict order of initialization (Discovery client after EhCache).

Linked to # (issue)
Part of the # (epic)

Type of change

Please delete options that are not relevant.

  • fix: Bug fix (non-breaking change which fixes an issue)
  • feat: New feature (non-breaking change which adds functionality)
  • docs: Change in a documentation
  • refactor: Refactor the code
  • chore: Chore, repository cleanup, updates the dependencies.
  • BREAKING CHANGE or !: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the style guidelines of this project
  • PR title conforms to commit message guideline ## Commit Message Structure Guideline
  • I have commented my code, particularly in hard-to-understand areas. In JS I did provide JSDoc
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The java tests in the area I was working on leverage @nested annotations
  • Any dependent changes have been merged and published in downstream modules

For more details about how should the code look like read the Contributing guideline

@pj892031 pj892031 requested a review from pablocarle January 12, 2024 14:42
@pj892031 pj892031 marked this pull request as ready for review January 12, 2024 14:42
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@pablocarle pablocarle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for looking into this

@pj892031 pj892031 merged commit 8d30acb into v2.x.x Jan 12, 2024
31 checks passed
@delete-merged-branch delete-merged-branch bot deleted the reboot/fixECache_xml_processing branch January 12, 2024 16:08
@pj892031 pj892031 mentioned this pull request Jan 17, 2024
15 tasks
pj892031 added a commit that referenced this pull request Jan 23, 2024
… 2024-01-19 (#3279)

* chore: Brian ui fixes + fix service order (#3238)

* UI feedback (#3218)

* UI enhancements per Jan

* Fix font sizes

* UI tweaks

* Design feedback UI

* change token

* remove token

* remove added code

---------

Co-authored-by: Brian Lee <[email protected]>

* fix conflicts

Signed-off-by: at670475 <[email protected]>

* remove unused component

Signed-off-by: at670475 <[email protected]>

* change

Signed-off-by: at670475 <[email protected]>

* fix

Signed-off-by: at670475 <[email protected]>

* sort tiles

Signed-off-by: at670475 <[email protected]>

* revert

Signed-off-by: at670475 <[email protected]>

* add tests

Signed-off-by: at670475 <[email protected]>

* hide scrollbar

Signed-off-by: at670475 <[email protected]>

* fix sonar

Signed-off-by: at670475 <[email protected]>

* add action and reducers to be able to scroll after clicking on content icons

Signed-off-by: at670475 <[email protected]>

* add tests

Signed-off-by: at670475 <[email protected]>

* fix eslint

Signed-off-by: at670475 <[email protected]>

* fix sonarcloud

Signed-off-by: at670475 <[email protected]>

* set timeout to scrolling to avoid weird behaviour and address pr comments

Signed-off-by: at670475 <[email protected]>

* fix test

Signed-off-by: at670475 <[email protected]>

---------

Signed-off-by: at670475 <[email protected]>
Co-authored-by: briandavid85 <[email protected]>
Co-authored-by: Brian Lee <[email protected]>

* feat: Introduce native identity mapper as a replacement for ZSS identity mapping of x509 and OIDC identities (#3252)

* replace external mapper with local

Signed-off-by: achmelo <[email protected]>

* Add OIDC Native mapper.

Signed-off-by: Petr Weinfurt <[email protected]>

* Add wrapper around native UserMapper. Add tests.

Signed-off-by: Petr Weinfurt <[email protected]>

* Add property to schema. Log responses.

Signed-off-by: Petr Weinfurt <[email protected]>

* Add unit tests

Signed-off-by: Petr Weinfurt <[email protected]>

* Fix repository source for jackson-mapper-asl

Signed-off-by: Petr Weinfurt <[email protected]>

* Add parameter to start.sh

Signed-off-by: Petr Weinfurt <[email protected]>

* Unit test for NativeMapper

Signed-off-by: Petr Weinfurt <[email protected]>

* Remove temporary option.

Signed-off-by: Petr Weinfurt <[email protected]>

* Use ConditionalOnProperty

Signed-off-by: Petr Weinfurt <[email protected]>

* Code review comments

Signed-off-by: Petr Weinfurt <[email protected]>

* fix property value

Signed-off-by: Petr Weinfurt <[email protected]>

* address code reviews

Signed-off-by: Petr Weinfurt <[email protected]>

---------

Signed-off-by: achmelo <[email protected]>
Signed-off-by: Petr Weinfurt <[email protected]>
Co-authored-by: achmelo <[email protected]>

* chore: dependency upgrades for Zowe 2.14 (#3258)

---------

Signed-off-by: Pablo Hernán Carle <[email protected]>
Co-authored-by: Pavel Jares <[email protected]>
Co-authored-by: Pablo Hernán Carle <[email protected]>

* chore(deps): bump follow-redirects in /metrics-service-ui/frontend (#3259)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pablo Carle <[email protected]>

* chore(deps): bump follow-redirects in /api-catalog-ui/frontend (#3260)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pablo Carle <[email protected]>

* chore: support different page titles + use text label for single api version (#3245)

* support different page titles

Signed-off-by: at670475 <[email protected]>

* use label instead of dropdown for single api version

Signed-off-by: at670475 <[email protected]>

* fix tests

Signed-off-by: at670475 <[email protected]>

* fix css for zowe catalog too

Signed-off-by: at670475 <[email protected]>

---------

Signed-off-by: at670475 <[email protected]>

* fix: update keyring path, configure registry from start script, set logging levels (#3265)

Signed-off-by: achmelo <[email protected]>

* fix: Fix conflict of XML processing between EhCache and onboarding (#3266)

* cors enabled by default in attls mode in gw (#3270)

Signed-off-by: Pablo Hernán Carle <[email protected]>
Co-authored-by: Pablo Hernán Carle <[email protected]>

* fix: use empty keystore instead of implicit (#3273)

Signed-off-by: achmelo <[email protected]>

* chore: Add the workflow that marks stale (#3257)

* Add the workflow that marks stale

Signed-off-by: Jakub Balhar <[email protected]>

* Update texts for close

Update list of excluded labels

Signed-off-by: Jakub Balhar <[email protected]>

---------

Signed-off-by: Jakub Balhar <[email protected]>
Co-authored-by: Pablo Carle <[email protected]>

* fix: Fix closing WebSocket in case of 401 and other exception (#3271)

* fix: Fix disabling EhCache (#3276)

* chore: remove unused (#3277)

Signed-off-by: achmelo <[email protected]>

---------

Signed-off-by: at670475 <[email protected]>
Signed-off-by: achmelo <[email protected]>
Signed-off-by: Petr Weinfurt <[email protected]>
Signed-off-by: Pablo Hernán Carle <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Jakub Balhar <[email protected]>
Co-authored-by: Andrea Tabone <[email protected]>
Co-authored-by: briandavid85 <[email protected]>
Co-authored-by: Brian Lee <[email protected]>
Co-authored-by: Petr Weinfurt <[email protected]>
Co-authored-by: achmelo <[email protected]>
Co-authored-by: Pablo Carle <[email protected]>
Co-authored-by: Pablo Hernán Carle <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: achmelo <[email protected]>
Co-authored-by: Jakub Balhar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants