2009. 8. 31. 12:50

hibernate SLF4J관련 오류


하이버네이트를 사용하려고 예제소스를 돌려봤는데 다음과같은 에러가 났다.

 

======================================================================================================================

log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
log4j:WARN Please initialize the log4j system properly.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

 

=======================================================================================================================

 

원인은 slf4j 관련 jar파일이 빠져있던것...

친절하게 위에 받는 경로가 있어서, 가서 다운 받고 압축을 푼 후에, 다음 파일을 라이브러리에 추가한다.

 

slf4j-api-1.5.8.jar

slf4j-jdk14-1.5.8.jar (여기에 org/slf4j/impl/StaticLoggerBinder가있다.)

'OpenSource > Hibernate' 카테고리의 다른 글

hibernate SLF4J관련 오류  (0) 2009.08.31
Trackback 0 Comment 0