apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Priyanka Gugale <priya...@datatorrent.com>
Subject Re: Running application built against custom Malhar version
Date Tue, 12 Jul 2016 05:06:43 GMT
As per maven documentation, the "system" scope is similar to "provided"
scope. That means jre or platform is suppose to provide the jar at runtime.
Normally, Malhar library jar is included in uber jar and is not at provided
scope when we build an apa. That's why your application can't locate the
classes at runtime.

Why you are using system scope? You can simply "install" the malhar-library
in your local repository and your application will pick it from there.

-Priyanka

On Mon, Jul 11, 2016 at 9:58 PM, Ganelin, Ilya <Ilya.Ganelin@capitalone.com>
wrote:

> I’m attempting to build a new application leveraging a custom Malhar
> library. I’ve compiled the updated Malhar library, confirmed that the
> classes I’ve added are present, and added this specific library as a system
> dependency in my pom of the newly created application:
>
> <dependency>
>   <groupId>org.apache.apex</groupId>
>   <artifactId>malhar-library</artifactId>
>   <version>3.5.0-SNAPSHOT</version>
>   <scope>system</scope>
>
> <systemPath>code/apex-malhar/library/target/malhar-library-3.5.0-SNAPSHOT.jar</systemPath>
> </dependency>
>
> However, when I then build this new application and upload the generated
> APA to the cluster and attempt to run it with the DataTorrent UI, I get a
> NoClassDefFoundError. I would appreciate some help understanding what I’m
> doing incorrectly – I believe the dependency on the newly added class
> should be provided since the APA is an UberJar. Am I missing something
> obvious here?
>
> An error occurred trying to launch the application. Server message:
> java.lang.NoClassDefFoundError:
> com/datatorrent/lib/stream/MultipleStreamMerger at
> com.example.merger.Application.populateDAG(Application.java:41) at
> com.datatorrent.stram.plan.logical.LogicalPlanConfiguration.prepareDAG(LogicalPlanConfiguration.java:1171)
> at
> com.datatorrent.stram.client.StramAppLauncher$1.createApp(StramAppLauncher.java:404)
> at
> com.datatorrent.stram.client.StramAppLauncher.launchApp(StramAppLauncher.java:479)
> at com.datatorrent.stram.cli.DTCli$LaunchCommand.execute(DTCli.java:2048)
> at com.datatorrent.stram.cli.DTCli.launchAppPackage(DTCli.java:3452) at
> com.datatorrent.stram.cli.DTCli.access$7000(DTCli.java:104) at
> com.datatorrent.stram.cli.DTCli$LaunchCommand.execute(DTCli.java:1893) at
> com.datatorrent.stram.cli.DTCli$3.run(DTCli.java:1447) Caused by:
> java.lang.ClassNotFoundException:
> com.datatorrent.lib.stream.MultipleStreamMerger at
> java.net.URLClassLoader$1.run(URLClassLoader.java:366) at
> java.net.URLClassLoader$1.run(URLClassLoader.java:355) at
> java.security.AccessController.doPrivileged(Native Method) at
> java.net.URLClassLoader.findClass(URLClassLoader.java:354) at
> java.lang.ClassLoader.loadClass(ClassLoader.java:425) at
> java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:789) at
> java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 9 more Fatal
> error encountered
>
>
>
> ________________________________________________________
>
> The information contained in this e-mail is confidential and/or
> proprietary to Capital One and/or its affiliates and may only be used
> solely in performance of work or services for Capital One. The information
> transmitted herewith is intended only for use by the individual or entity
> to which it is addressed. If the reader of this message is not the intended
> recipient, you are hereby notified that any review, retransmission,
> dissemination, distribution, copying or other use of, or taking of any
> action in reliance upon this information is strictly prohibited. If you
> have received this communication in error, please contact the sender and
> delete the material from your computer.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message