Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

using log4j 2 in bamboo plugin

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.
Oct 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.

=]

thanks for referring.

Like Daniel Santos likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events