Home > Blockchain >  How to solve SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" in Eclipse Ty
How to solve SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" in Eclipse Ty

Time:08-14

I'm using Eclipse 2022-03.

I got two types of error messages after an update of a third party library.

1) Missing contraints

This type of error I solved by 'Add required plug-ins' in the Run and Debug configurations. The plug-in org.slf4j.api (1.7.30.v20200204-2150) solved the problem. Unfortunately I have to do 'Add required plug-ins' each time I start up Eclipse.

Any idea how I can get 'Add required plug-ins' to stick between restarts of Eclipse?

2) SLF4J: Failed to load class

Same error occurs for my headless build: enter image description here

What is the way to solve the classic error message "SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"" in a Eclipse Tycho RCP project?

According to Installed software

Here is my product definition:

<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>

<product name="ReqTool" uid="reqtool" id="info.wallberg.reqtool.userinterface.plugin.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="0.0.1" useFeatures="true" includeLaunchers="true">

   <configIni use="default">
   </configIni>

   <launcherArgs>
      <programArgs>-clearPersistedState
-console
      </programArgs>
      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
      </vmArgsMac>
   </launcherArgs>

   <windowImages/>

   <launcher>
      <win useIco="false">
         <bmp/>
      </win>
   </launcher>

   <vm>
   </vm>

   <plugins>
   </plugins>

   <features>
      <feature id="info.wallberg.library.jre.win32.x86_64"/>
      <feature id="info.wallberg.library.fileextractor.feature"/>
      <feature id="info.wallberg.library.oscommand.feature"/>
      <feature id="info.wallberg.library.pdfextractor.feature"/>
      <feature id="info.wallberg.reqtool.requirementmodel.feature"/>
      <feature id="info.wallberg.reqtool.requirementservice.cursorial.feature"/>
      <feature id="info.wallberg.reqtool.userinterface.feature"/>
      <feature id="org.eclipse.e4.rcp" installMode="root"/>
      <feature id="org.eclipse.emf.ecore" installMode="root"/>
      <feature id="org.eclipse.emf.common" installMode="root"/>
      <feature id="org.eclipse.nebula.widgets.nattable.core.feature" installMode="root"/>
      <feature id="org.eclipse.nebula.widgets.nattable.extension.glazedlists.feature" installMode="root"/>
   </features>

   <configurations>
      <plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
   </configurations>

   <preferencesInfo>
      <targetfile overwrite="false"/>
   </preferencesInfo>

   <cssInfo>
      <file path="/info.wallberg.reqtool.userinterface.plugin/css/default.css"/>
   </cssInfo>

</product>

CodePudding user response:

That depends on how you want to add logging support to your application. If you don't care about logging you can either ignore the warning or add the nop logger or simple logger from eclipse Orbit. The NatTable examples are using the simple binding for example. The target definition consumes the SLF4J binding from Orbit, the E4 example feature includes the bundle.

  • Related