简体   繁体   中英

Exception in thread “main” org.apache.velocity.exception.VelocityException

Does anyone know how can I solve this problem?

I am trying to make a connection with amazonMechanicalTurk using Java API.

Exception in thread "main"
 org.apache.velocity.exception.VelocityException: Error initializing
 log: org.apache.log4j.Logger object set as runtime.log.logsystem is
 not a valid log implementation.
    Caused by: org.apache.velocity.exception.VelocityException:
    org.apache.log4j.Logger object set as runtime.log.logsystem is not a
    valid log implementation.

Do yourself a favor, working with Velocity I've learned that is better to shut down his damn log:

//disabling Velocity log
Velocity.setProperty("runtime.log.logsystem.class", "org.apache.velocity.runtime.log.NullLogSystem");

I just decided to add some other Velocity libraries to my project. My project only had the Apache Velocity jar file, then from here , I also added Velocity-Dep to my Maven project and Yesssssssssss! VICTORY! Still asking why?!! because my project was working well until I decided to update java-aws-mturk library to version 1.7.0; then after I got that error!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM