Max,

Seems like you need to add the following dependency.

    <dependency>
      <groupId>com.github.fge</groupId>
      <artifactId>json-schema-validator</artifactId>
      <version>2.0.1</version>
    </dependency>

See the following example, but it is marked as optional so not sure if it
is really required.

https://github.com/DataTorrent/examples/blob/master/tutorials/parser/pom.xml

Shubham, Priyanka,

Any thoughts?

Regards,
Ashwin.

On Thu, Dec 1, 2016 at 11:14 AM, Max Bridgewater <max.bridgewa...@gmail.com>
wrote:

> I am trying to use the Malhar JSonParser. My code goes like this:
>
>
>   KafkaSinglePortInputOperator in = dag.addOperator("kafkaIn", new
> KafkaSinglePortInputOperator());
>     in.setInitialOffset(AbstractKafkaInputOperator.
> InitialOffset.EARLIEST.name());
>     JsonParser parser= dag.addOperator("jsonParser",new JsonParser());
>     LineOutputOperator out = dag.addOperator("fileOut", new
> LineOutputOperator());
>     dag.addStream("parse", in.outputPort, parser.in);
>     dag.addStream("data",parser.out , out.input);
>
>
> However, when I deploy it , I get following exception. This seems to be a
> guava class. Am I supposed to add guava as dependency in my app? I thought
> all of  contrib dependencies are provided by the Apex runtime environment.
> Any thoughts?
>
>
> the application. Server message: java.lang.NoClassDefFoundError:
> com/github/fge/jsonschema/exceptions/ProcessingException
> at com.example.myapexapp.KafkaApp.populateDAG(KafkaApp.java:24)
> at com.datatorrent.stram.plan.logical.LogicalPlanConfiguration.prepareDAG(
> LogicalPlanConfiguration.java:2226)
> at com.datatorrent.stram.client.StramAppLauncher$1.createApp(
> StramAppLauncher.java:490)
> at com.datatorrent.stram.client.StramAppLauncher.launchApp(
> StramAppLauncher.java:601)
> at com.datatorrent.stram.cli.ApexCli$LaunchCommand.execute(
> ApexCli.java:2062)
> at com.datatorrent.stram.cli.ApexCli.launchAppPackage(ApexCli.java:3451)
> at com.datatorrent.stram.cli.ApexCli.access$7400(ApexCli.java:153)
> at com.datatorrent.stram.cli.ApexCli$LaunchCommand.execute(
> ApexCli.java:1906)
> at com.datatorrent.stram.cli.ApexCli$3.run(ApexCli.java:1468)
> Caused by: java.lang.ClassNotFoundException: com.github.fge.jsonschema.
> exceptions.ProcessingException
> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:814)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> ... 9 more
>



-- 

Regards,
Ashwin.

Reply via email to