About Me

My photo
PhD Candidate at Purdue University, Computer Science.

Sunday, April 26, 2009

embedding ftpServer

I was trying to embed the ftpserver in my Java code. I had a problem exception:

Exception in thread "main" java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory

I looked to the source files of the slf4j and found that in the latest release slf4j-1.5.6 there is a private modifier in Class org.slf4j.impl.StaticLoggerBinder

private static final StaticLoggerBinder SINGLETON = new StaticLoggerBinder();

ftpserver puts slf4j-api-1.5.2.jar, that's why it deals with this member as public.

All you need to do is
1- change the modifier of this member.
2- or get the latest sl4fj-api-1.5.6.jar

No comments: