Cynosure.X International LLC


Add Comment | Related Links | TrackBack
Related Content

Amazon Mechanical Turk Command Line Tools Can't Run From Any Directory

The Amazon Mechanical Turk (AMT) Command Line Tools (CLT) 1.3.0 claims that you can run it from any directory if you just set the MTURK_CMD_HOME environment variable. However, that's not true (as least it's not true on Windows). If you set the environment variable and try to run the tools, you will get the following error message:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/cli/BasicParser
Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.BasicParser
at$ Source)
at Method)
at Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: com.amazonaws.mturk.cmd.LoadHITs. Program will exit.

I found the reason for it is because of bugs in the "invoke.cmd" that is distributed with AMT CLT. In this batch script, it references the current directory variable (%CD%) rather than the MTURK_CMD_HOME variable.

I fixed the problem in the attached "invoke.cmd" script. The license for this script is covered under then same Amazon Software License ( ).

With this fix, you will get another error message:

There was a problem reading your properties file from
The exception was (The system cannot find the file specified)
Exception in thread "main" java.lang.RuntimeException: Cannot load configuration properties file from
at com.amazonaws.mturk.util.PropertiesClientConfig.(
at com.amazonaws.mturk.util.PropertiesClientConfig.(
at com.amazonaws.mturk.cmd.AbstractCmd.(
at com.amazonaws.mturk.cmd.LoadHITs.(
at com.amazonaws.mturk.cmd.LoadHITs.main(
Caused by: (The system cannot find the file specified)
at Method)
at Source)
at com.amazonaws.mturk.util.PropertiesClientConfig.(
... 4 more

It seems like a Java class file in the AMT CLT is also not reading the MTURK_CMD_HOME variable. Instead, it is probably looking for the configuration in the current working directory. But at least you can resolve that by moving the "" file around.

Attached File: invoke.cmd (2 KB)

Chieh Cheng
Tue, 20 Oct 2009 21:16:06 +0000

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

Add Comment

Spam Control | * indicates required field
Your Name: *
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 2 + 1?
Click button only once, please!


TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.

Messages, files, and images copyright by respective owners.

Products | Services
Forums | Latest | RSS
Library | Search | Wiki
Help | Licenses

Login | Register

49 Users Online

Hacking Digital Cameras
Fun for Photographers

Amazon Associate

Copyright © 1996 - 2024. All Rights Reserved.