IO in embedded JAQL scripts

85 views
Skip to first unread message

mhe...@googlemail.com

unread,
Dec 17, 2010, 12:11:22 PM12/17/10
to Jaql Users
Hi,

I am trying to dynamically call some JAQL files from within a Java
application. Calling the scripts works fine, as long as I don't
accesss a filesystem. As soon as I add an IO call (e.g.
values -> write(hdfs("/temp/myFile.txt"));
), I receive the following Exception:

java.lang.RuntimeException: adapter not found for i/o descriptor: {
"location": "myFile.txt",
"type": "hdfs"
}
at com.ibm.jaql.io.AdapterStore
$OptionHandler.getAdapter(AdapterStore.java:309)
at com.ibm.jaql.io.AdapterStore
$OutputHandler.getAdapter(AdapterStore.java:372)
at
com.ibm.jaql.lang.expr.io.AbstractWriteExpr.eval(AbstractWriteExpr.java:
78)
at com.ibm.jaql.lang.expr.top.QueryExpr.eval(QueryExpr.java:85)
at com.ibm.jaql.lang.Jaql.evaluate(Jaql.java:798)
at com.ibm.jaql.lang.JaqlQuery.evaluate(JaqlQuery.java:101)
at com.yay.Main.main(Main.java:46)

(This also occurs for location:"local").

I guess that I must have missed an important step in setting up the
query - since the query itself works finde with jaqlshell. Any
thoughts on what I might be missing here?

PS:
I call the script - as described in the documentation - via the
following snippet:
JaqlQuery query = new JaqlQuery(script);
query.evaluate();

vuk.ercegovac

unread,
Dec 17, 2010, 1:21:10 PM12/17/10
to Jaql Users
From the wiki page: http://code.google.com/p/jaql/wiki/EmbeddingJaql#Setup_environment

# Add the following folder into the project's build path

conf folder from Jaql source

I suspect that you didn't add jaql's conf to the classpath-- can you
verify?

Thanks!

Vuk

On Dec 17, 9:11 am, "mhei...@googlemail.com" <mhei...@googlemail.com>
wrote:

mhe...@googlemail.com

unread,
Dec 17, 2010, 6:33:39 PM12/17/10
to Jaql Users
Thanks,

it really was caused by the conf directory missing. How embarrasing :(
Reply all
Reply to author
Forward
0 new messages