Changed the one level subgraph so that it works. Converted it to maven project, and it runs as a servlet.