Hi, everyone
my aem startup with below error , seems like aem missing some Log4j2 dependency, can anyone help me fix it
ERROR StatusLogger Unable to load OSGI services for service class org.apache.logging.log4j.spi.Provider
java.lang.NullPointerException
at org.apache.logging.log4j.util.OsgiServiceLocator.loadServices(OsgiServiceLocator.java:61)
at org.apache.logging.log4j.util.ServiceLoaderUtil.loadServices(ServiceLoaderUtil.java:92)
at org.apache.logging.log4j.util.ServiceLoaderUtil.loadServices(ServiceLoaderUtil.java:77)
at org.apache.logging.log4j.util.ProviderUtil.<init>(ProviderUtil.java:67)
at org.apache.logging.log4j.util.ProviderUtil.lazyInit(ProviderUtil.java:145)
at org.apache.logging.log4j.util.ProviderUtil.hasProviders(ProviderUtil.java:129)
at org.apache.logging.log4j.LogManager.<clinit>(LogManager.java:90)
at org.apache.poi.ooxml.POIXMLRelation.<clinit>(POIXMLRelation.java:54)
at org.apache.tika.parser.pkg.StreamingZipContainerDetector.<clinit>(StreamingZipContainerDetector.java:61)
at org.apache.tika.parser.pkg.ZipContainerDetector.<init>(ZipContainerDetector.java:99)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.base/java.lang.Class.newInstance(Class.java:584)
at org.apache.tika.config.ServiceLoader.loadStaticServiceProviders(ServiceLoader.java:358)
at org.apache.tika.detect.DefaultDetector.getDefaultDetectors(DefaultDetector.java:56)
at org.apache.tika.detect.DefaultDetector.<init>(DefaultDetector.java:68)
at org.apache.tika.detect.DefaultDetector.<init>(DefaultDetector.java:73)
at org.apache.tika.detect.DefaultDetector.<init>(DefaultDetector.java:77)
at org.apache.tika.detect.DefaultDetector.<init>(DefaultDetector.java:81)
at org.apache.tika.parser.internal.Activator.start(Activator.java:40)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:698)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2402)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1539)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.base/java.lang.Thread.run(Thread.java:829)
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
In SP17 either
Hi @charlie_yc ,
The error you are getting because you have the log4j-api-2.x jar file in your classpath but you still need to add the log4j-core-2.x jar to the classpath. Add this dependency in both master pom and core pom.
Also, try updaing the version of Log4j 2.
Thanks
Tarun
Hi TarunKumar,
Thanks for your reply, but I didn't find any log4j-api-2.x dependency in my source code.
Do you think it's possible that the AEM service package bundle is causing this problem? This issue didn't show up before I updated my AEM to 6.5.18, and my last AEM version was 6.5.13
I'm also trying to install log4j-core-2.x in the bundle, but it still isn't working.
@charlie_yc Can you specify the AEM version and SP details?
Check the compatibility of your AEM version with the Log4j version you are using. Different versions of AEM may have specific dependencies and requirements.
Is any functionality breaking because of this ?
@charlie_yc Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies