Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

using log4j 2 in bamboo plugin

Octane CI Plugins Owner
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 17, 2019

Hi.

We have bamboo plugin which uses 3-rd party dependency (also developed by us) that uses log4j 2 .

 

As well, in the plugin we also created  logger based on log4j 2 : LogManager.getLogger(type); In that case log from plugin and from 3-rd party dependency is written to the same place. 

Until bamboo 6.9 - everything work perfectly.

In 6.10 something changed and log initialization is failing

 

Causes are : 

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.bamboo.listener.GeneralEventsListener]: Constructor threw exception; nested exception is java.util.ServiceConfigurationError: org.apache.logging.log4j.spi.Provider: Provider org.apache.logging.slf4j.SLF4JProvider not a subtype
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:267)
... 129 more
Caused by: java.util.ServiceConfigurationError: org.apache.logging.log4j.spi.Provider: Provider org.apache.logging.slf4j.SLF4JProvider not a subtype
at java.util.ServiceLoader.fail(ServiceLoader.java:239)
at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at org.apache.logging.log4j.util.ProviderUtil.loadProviders(ProviderUtil.java:101)
at org.apache.logging.log4j.util.ProviderUtil.<init>(ProviderUtil.java:67)
at org.apache.logging.log4j.util.ProviderUtil.lazyInit(ProviderUtil.java:142)
at org.apache.logging.log4j.util.ProviderUtil.hasProviders(ProviderUtil.java:126)
at org.apache.logging.log4j.LogManager.<clinit>(LogManager.java:89)
at com.bamboo.SDKBasedLoggerProvider.getLogger(SDKBasedLoggerProvider.java:42)
at com.bamboo.listener.BaseListener.<init>(BaseListener.java:27)
at com.bamboo.listener.GeneralEventsListener.<init>(GeneralEventsListener.java:33)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
... 131 more

 

Please help.

1 answer

0 votes
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 18, 2019

Hi @Octane CI Plugins Owner

Thank you for reaching out to us to move forward on this one. In order to set you for success, I suggest you ask the same question on a different channel, more aligned to this content. This is the one:

It is more likely that your question will be read by people Bamboo developement skills, including our developers.

=]

Octane CI Plugins Owner
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 18, 2019

thanks for referring.

Like Daniel Santos likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events