0

I'm trying to install and use Amazon Mechanical Turk Command Line Tools, which I just downloaded from https://requester.mturk.com/developer/tools/clt

I'm trying to run them from a Administrator Command Prompt in Windows 10.

When I try the getBalance script, I get the following error:

c:\mypath\aws-mturk-clt\aws-mturk-clt-1.3.4>bin\getBalance
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: com/amazonaws/mturk/filter/Filter
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.lang.Class.privateGetMethodRecursive(Unknown Source)
        at java.lang.Class.getMethod0(Unknown Source)
        at java.lang.Class.getMethod(Unknown Source)
        at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.amazonaws.mturk.filter.Filter
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 7 more

The error message tells me to check my installation, but there was really nothing to install.

0

Looks like these tools actually do come with an installer of sorts. Try running /installer/setup.nsi? From what I can see it builds some stuff so it could fix your problem.

  • Neither the download page for the tools, nor the GettingStarted.html that comes with it provides instructions for doing anything with setup.nsi -- I wouldn't know what to do with it as it's not an executable file as far as I can tell. It looks like it's a setup file for building an NSIS installer, but that seems unlikely to be required if not mentioned anywhere in the docs... – PurpleVermont Feb 1 at 2:19
0

„ClassNotFoundException“ will be raised if some necessary components for the command/script are missing. I do not know what the use case of Amazon Mechanical Turk is but as I mentioned bevor some parts are missing. You could try to search for an Amazon documentation, maybe you will finde there all components you need. Furthermore did you performed all get started steps? May some java parts itself are missing.

Update 1 I found the following under this link: https://stackoverflow.com/questions/23921598/getbalance-in-amazon-turk-gives-error

I fixed it by changing the http in mturk.properties to https:

~/Desktop/aws-mona/aws-mturk-clt-1.3.1/bin$ vim mturk.properties

`~/Desktop/aws-mona/aws-mturk-clt-1.3.1/bin$ vim mturk.properties‘ to ‚# use the service_url defined below: service_url=https://mechanicalturk.amazonaws.com/?Service=AWSMechanicalTurkRequester

~/Desktop/aws-mona/aws-mturk-clt-1.3.1/bin$ ./getBalance.sh Your account balance: $2.20‘

  • Yes, I performed all the GettingStarted steps. I can't figure out how anything would be missing -- I suspect it must be a classpath issue or something more subtle like that. – PurpleVermont Feb 1 at 2:21
  • Thanks for the edit. I had seen that as well but it is unrelated to the error I am experiencing. – PurpleVermont Feb 1 at 22:41

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.