Announcement Announcement Module
Collapse
No announcement yet.
AbstractMethodError: NOPLogger.trace when starting server Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • AbstractMethodError: NOPLogger.trace when starting server

    Hello guys,

    I tried to set-up a project using struts2, spring, hibernate. But everytime I start the server, I receive this error: Caused by: java.lang.AbstractMethodError: org.slf4j.impl.NOPLogger.trace(Ljava/lang/String; )V

    I checked the Javadoc regarding this and found out that this error (AbstractMethodError) is thrown when an application attempts to access an abstract method., but the problem is, I dont know how to fix this. . Sorry for being clueless guys. Here's the full stacktrace:

    PHP Code:
    SEVEREContext initialization failed
    org
    .springframework.beans.factory.BeanCreationExceptionError creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failednested exception is java.lang.AbstractMethodErrororg.slf4j.impl.NOPLogger.trace(Ljava/lang/String;)V
        at org
    .springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
        
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
        
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
        
    at java.security.AccessController.doPrivileged(Native Method)
        
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
        
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
        
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
        
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
        
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
        
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
        
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
        
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
        
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
        
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
        
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
        
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
        
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:927)
        
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:890)
        
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
        
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
        
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
        
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        
    at org.apache.catalina.core.StandardService.start(StandardService.java:448)
        
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        
    at java.lang.reflect.Method.invoke(Method.java:585)
        
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
    Caused byjava.lang.AbstractMethodErrororg.slf4j.impl.NOPLogger.trace(Ljava/lang/String;)V
        at org
    .hibernate.cfg.annotations.PropertyBinder.make(PropertyBinder.java:184)
        
    at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1911)
        
    at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1279)
        
    at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:754)
        
    at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:546)
        
    at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:291)
        
    at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1148)
        
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:673)
        
    at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
        
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
        
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
        ... 
    39 more 
    any help is much appreciated.

    -marckun

  • #2
    Check if you have two different versions of the SLF4J libraries in your classpath. (Or rather: check if you use a different version of the SLF4J library than Spring (PropertyBinder.java) was built against.)

    It might be a SLF4J misconfiguration. Otherwise check the SLF4J website.

    AFAIR you just need the slf4j-api in your classpath and some implementation (like ch.qos.logback).

    Best regards,
    Morten

    Comment


    • #3
      Originally posted by silverjam View Post
      Check if you have two different versions of the SLF4J libraries in your classpath. (Or rather: check if you use a different version of the SLF4J library than Spring (PropertyBinder.java) was built against.)

      It might be a SLF4J misconfiguration. Otherwise check the SLF4J website.

      AFAIR you just need the slf4j-api in your classpath and some implementation (like ch.qos.logback).

      Best regards,
      Morten
      Hehehe.. I guess you are right, it's an error regarding the version of slf4j-nop.jar i used. hehehe I shifted from 1.0 to 1.5.2 and all is well..

      thank you.

      -marcKun

      Comment

      Working...
      X