Trying to Set CLI path for mTurk for Mac - terminal

I am setting up the CLI on a MAC (iOS 10.9) and I believe I've set up the MTURK_CMD_HOME and JAVA_CMD_HOME paths correctly.
But, I'm still getting an error that the file can't be found when I run getBalance.sh. My code is as follows:
/users/USER/Desktop/aws-mturk-clt-1.3.1/
-bash: /users/USER/Desktop/aws-mturk-clt-1.3.1/: is a directory
/System/Library/Frameworks/JavaVM.framework/Home
-bash: /System/Library/Frameworks/JavaVM.framework/Home: is a directory
export MTURK_CMD_HOME=/users/USER/Desktop/aws-mturk-clt-1.3.1/
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
export PATH=$PATH:/users/USER/Desktop/aws-mturk-clt-1.3.1/bin
/users/USER/Desktop/aws-mturk-clt-1.3.1/bin/getBalance.sh
Returns the following error:
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: ../log/aws-mturk-clt.log (No such file or directory)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:192)
at java.io.FileOutputStream.<init>(FileOutputStream.java:116)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:194)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:164)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:133)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:97)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:689)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:647)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:544)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:440)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:476)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:125)
at org.apache.log4j.Logger.getLogger(Logger.java:118)
at com.amazonaws.mturk.cmd.AbstractCmd.<clinit>(AbstractCmd.java:51)
There was a problem reading your properties file from mturk.properties
The exception was java.io.FileNotFoundException: mturk.properties (No such file or directory)
Exception in thread "main" java.lang.RuntimeException: Cannot load onfiguration properties file from mturk.properties
at com.amazonaws.mturk.util.PropertiesClientConfig.<init> (PropertiesClientConfig.java:99)
at com.amazonaws.mturk.util.PropertiesClientConfig.<init>(PropertiesClientConfig.java:72)
at com.amazonaws.mturk.cmd.AbstractCmd.<init>(AbstractCmd.java:61)
at com.amazonaws.mturk.cmd.GetBalance.<init>(GetBalance.java:24)
at com.amazonaws.mturk.cmd.GetBalance.main(GetBalance.java:27)
Caused by: java.io.FileNotFoundException: mturk.properties (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at com.amazonaws.mturk.util.PropertiesClientConfig.<init> (PropertiesClientConfig.java:95)
... 4 more
It seems the directory is specified correctly (and bin contains getBalance.sh). I've double checked that my access keys are correct and the file path is correct. What do I do?

Set your directory:
cd /users/USER/Desktop/aws-mturk-clt-1.3.1/bin/
and then run ./getBalance.sh

Related

Apache Nifi : java.io.FileNotFoundException: /opt/nifi/nifi-current/content_repository (No such file or directory)

I am facing below issue and all of my flows are getting failed.
PSB the issue:
IOException thrown from ExecuteSQLRecord: java.io.FileNotFoundException: /opt/nifi/nifi-current/content_repository/325/1640693707361-201029 (No such file or directory)
Please help.

YARN - log4j:ERROR setFile(null,true) call failed. java.io.FileNotFoundException (Is a directory)

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /usr/local/hadoop/logs/userlogs/application_1502783189107_0007/container_1502783189107_0007_01_000001 (Is a directory)
`
Please provide me a suggestion when I am running sqoop with oozie I am facing the error above

H2 db: how to run a SQL script in the current directory

I'm trying to do this in an arbitrary folder:
java -cp .;e:\tools\h2\bin\* org.h2.tools.RunScript -url myDBURI -script CreateDatabase.sql
CreateDatabase.sql is in the current folder.
Inside it I have:
runscript from 'classpath:/DropSchemas.sql';
I have also tried
runscript from 'DropSchemas.sql';
runscript from './DropSchemas.sql';
When I do this I get a file not found error fror DropSchemas.sql:
Exception in thread "main" org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.
FileNotFoundException: resource /DropSchemas.sql"; "classpath:/DropSchemas.sql";
SQL statement:
runscript from 'classpath:/DropSchemas.sql' [90031-172]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
at org.h2.message.DbException.get(DbException.java:158)
at org.h2.message.DbException.convertIOException(DbException.java:315)
at org.h2.command.dml.ScriptBase.openInput(ScriptBase.java:168)
at org.h2.command.dml.RunScriptCommand.update(RunScriptCommand.java:45)
at org.h2.command.CommandContainer.update(CommandContainer.java:79)
at org.h2.command.Command.executeUpdate(Command.java:235)
at org.h2.server.TcpServerThread.process(TcpServerThread.java:335)
at org.h2.server.TcpServerThread.run(TcpServerThread.java:151)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: resource /DropSchemas.sql
at org.h2.store.fs.FilePathDisk.newInputStream(FilePathDisk.java:298)
at org.h2.store.fs.FileUtils.newInputStream(FileUtils.java:206)
at org.h2.command.dml.ScriptBase.openInput(ScriptBase.java:166)
... 6 more
at org.h2.engine.SessionRemote.done(SessionRemote.java:579)
at org.h2.command.CommandRemote.executeUpdate(CommandRemote.java:186)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:180)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:155)
at org.h2.tools.RunScript.process(RunScript.java:255)
at org.h2.tools.RunScript.process(RunScript.java:188)
at org.h2.tools.RunScript.process(RunScript.java:319)
at org.h2.tools.RunScript.runTool(RunScript.java:142)
at org.h2.tools.RunScript.main(RunScript.java:69)
It works if I specify the absolute path to dropschemas.sql but that's not a good way to build my script.
How do I create a master script that runs other scripts in a portable manner?
Thanks
Michael

Hudson:java.io.IOException: Cannot run program "cvs" : CreateProcess error=2, The system cannot find the file specified

I am using hudson 2.2.0 for a test application.At the basic level I want to take check out form my cvs.
For this I have created a new job and configured.But while build this job it is giving me error.
Below is the error console:
Started by user anonymous
[formcsam] $ cvs -Q -z3 -d :pserver:username:password#host:/root co -P -d workspace -D "Friday, May 18, 2012 5:51:37 AM UTC" core/myapp
java.io.IOException: Cannot run program "cvs" (in directory "C:\Documents and Settings\sanjay\.hudson\jobs\formcsam"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:192)
at hudson.Proc$LocalProc.<init>(Proc.java:164)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:639)
at hudson.Launcher$ProcStarter.start(Launcher.java:274)
at hudson.Launcher$ProcStarter.join(Launcher.java:281)
at hudson.scm.CVSSCM.run(CVSSCM.java:575)
at hudson.scm.CVSSCM.run(CVSSCM.java:585)
at hudson.scm.CVSSCM.checkout(CVSSCM.java:756)
at hudson.scm.CVSSCM.checkout(CVSSCM.java:319)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1479)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:507)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:424)
at hudson.model.Run.run(Run.java:1366)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 17 more
[DEBUG] Skipping watched dependency update for build: formcsam #1 due to result: FAILURE
Finished: FAILURE
Then I copied the same command to fire it from command prompt.From command prompt it is working fine.So I am not getting what is the issues in hudson while firing the same command .
Please help me out.
Thanks in advance.
Just forgot to add cvs.exe in configuration of hudson.

what's the best way to get etherpad to launch on startup on OSX

I think launchd is the answer, but using this plist:
http://gist.github.com/553573
I get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: net/appjet/oui/main
Caused by: java.lang.ClassNotFoundException: net.appjet.oui.main
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
...
Any ideas?
Classpath problems perhaps? The script /usr/local/etherpad/trunk/etherpad/bin/run-local.sh is supposed to be started from a specific directory (path). Try editing your copy to start with a cd command to go the right folder just before it creates subfolders data/appjet.

Resources