I'm writing a small Java application and having some trouble with log4j that appears to be caused by multiple, independent libraries trying to use it simultaneously:
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.log4j.Logger.info(Ljava/lang/String;)V
at twitter4j.internal.logging.Log4JLogger.info(Log4JLogger.java:85)
at twitter4j.internal.logging.Logger.<clinit>(Logger.java:72)
at twitter4j.http.BasicAuthorization.<clinit>(BasicAuthorization.java:43)
at twitter4j.http.AuthorizationFactory.getBasicAuthorizationInstance(AuthorizationFactory.java:66)
at twitter4j.TwitterStreamFactory.getInstance(TwitterStreamFactory.java:121)
at org.voltdb.twitter.drivers.Collect.main(Collect.java:13)
The two libraries I'm using are Twitter4J and VoltDB. Both are in the form of JARs. If I use either in isolation, I don't run into this problem; both work fine on their own.
It would be acceptable to disable the log4j component of either library if this fixed the problem.