Is there any "Hello World" documentation

59 views
Skip to first unread message

jamest...@gmail.com

unread,
May 8, 2013, 2:57:51 PM5/8/13
to akiba...@akiban.com
I compiled this successfully and now I have the jars. What do I do now to get the jar to run? If I type:

> java akiban-sql-parser-1.0.15-SNAPSHOT.jar
Exception in thread "main" java.lang.NoClassDefFoundError: akiban-sql-parser-1/0/15-SNAPSHOT/jar
Caused by: java.lang.ClassNotFoundException: akiban-sql-parser-1.0.15-SNAPSHOT.jar
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: akiban-sql-parser-1.0.15-SNAPSHOT.jar. Program will exit.

Just a getting started document would be fine. I just need to parse some pl/sql and can't find a parser without using ANTLR grammar and coding it myself.

Nathan Williams

unread,
May 8, 2013, 4:45:20 PM5/8/13
to akiba...@akiban.com, jamest...@gmail.com
Hi James,

Examples are one area where we are lacking for the parser. Sorry about that.

A key point to note is that the parser is intended to be used as a library in an application, not invoked directly. That's why the jar file is not executable on its own.

I've put something together in the past that should get you started, I think. Have a look at:
https://github.com/nathanlws/akiban-parser-demo

The demo shows how to install, depend on, and parse queries. It's a trivial example, only referenced columns are printed to stdout, but is generally representative.

The SQLParser class is where you'll want to get started:
http://akiban.github.io/sql-parser/javadoc/com/akiban/sql/parser/SQLParser.html

As always, don't hesitate to ask if you run into any problems.

-Nathan
Reply all
Reply to author
Forward
0 new messages