You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@apex.apache.org by Vikram Patil <vi...@datatorrent.com> on 2016/11/25 05:30:43 UTC

Fwd: ClassNotFoundException for com.ning.http.client.AsyncHttpClientConfig

---------- Forwarded message ----------
From: Vikram Patil <vi...@datatorrent.com>
Date: Fri, Nov 25, 2016 at 10:56 AM
Subject: ClassNotFoundException for
com.ning.http.client.AsyncHttpClientConfig
To: users@apex.apache.org


Hello All,

I am trying out demo example for apex. I have complied an application and
launched in apex cli as follows but when I am trying to run
TopNWordsWithQueries application it throws an exception. Please let me know
workaround for this one.

apex> launch /home/vikram/.m2/repository/com/example/topnwords/1.0.0-
SNAPSHOT/topnwords-1.0.0-SNAPSHOT.apa
done with populateDAG, isDebugEnabled = false
  1. TopNWordsWithQueries
  2. WordCountDemo
Choose application: 1
java.lang.NoClassDefFoundError: com/ning/http/client/AsyncHttpClientConfig
at com.datatorrent.demos.wordcount.ApplicationWithQuerySupport.populateDAG(
ApplicationWithQuerySupport.java:82)
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.ning.http.client.
AsyncHttpClientConfig
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)


Thanks & Regards,
Vikram

Re: ClassNotFoundException for com.ning.http.client.AsyncHttpClientConfig

Posted by Vikram Patil <vi...@datatorrent.com>.
Hi Thomas,

Yes it was problem due to version version mismatch.

Thanks & Regards,
Vikram


On Fri, Nov 25, 2016 at 9:34 PM, Thomas Weise <th...@apache.org> wrote:

> Vikram,
>
> Can you list all the jar files in your application package. Is it possible
> that you are using an old version of Malhar library with Apex core 3.4 or
> later? That class has been removed in 3.4. You can only use version Malhar
> 3.4 and later with core 3.4.
>
> Thanks,
> Thomas
>
> On Thu, Nov 24, 2016 at 9:30 PM, Vikram Patil <vi...@datatorrent.com>
> wrote:
>
>>
>> ---------- Forwarded message ----------
>> From: Vikram Patil <vi...@datatorrent.com>
>> Date: Fri, Nov 25, 2016 at 10:56 AM
>> Subject: ClassNotFoundException for com.ning.http.client.AsyncHttp
>> ClientConfig
>> To: users@apex.apache.org
>>
>>
>> Hello All,
>>
>> I am trying out demo example for apex. I have complied an application and
>> launched in apex cli as follows but when I am trying to run
>> TopNWordsWithQueries application it throws an exception. Please let me know
>> workaround for this one.
>>
>> apex> launch /home/vikram/.m2/repository/com/example/topnwords/1.0.0-SNAP
>> SHOT/topnwords-1.0.0-SNAPSHOT.apa
>> done with populateDAG, isDebugEnabled = false
>>   1. TopNWordsWithQueries
>>   2. WordCountDemo
>> Choose application: 1
>> java.lang.NoClassDefFoundError: com/ning/http/client/AsyncHttp
>> ClientConfig
>> at com.datatorrent.demos.wordcount.ApplicationWithQuerySupport.
>> populateDAG(ApplicationWithQuerySupport.java:82)
>> at com.datatorrent.stram.plan.logical.LogicalPlanConfiguration.
>> prepareDAG(LogicalPlanConfiguration.java:2226)
>> at com.datatorrent.stram.client.StramAppLauncher$1.createApp(St
>> ramAppLauncher.java:490)
>> at com.datatorrent.stram.client.StramAppLauncher.launchApp(Stra
>> mAppLauncher.java:601)
>> at com.datatorrent.stram.cli.ApexCli$LaunchCommand.execute(Apex
>> Cli.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(Apex
>> Cli.java:1906)
>> at com.datatorrent.stram.cli.ApexCli$3.run(ApexCli.java:1468)
>> Caused by: java.lang.ClassNotFoundException:
>> com.ning.http.client.AsyncHttpClientConfig
>> 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)
>>
>>
>> Thanks & Regards,
>> Vikram
>>
>>
>>
>

Re: ClassNotFoundException for com.ning.http.client.AsyncHttpClientConfig

Posted by Thomas Weise <th...@apache.org>.
Vikram,

Can you list all the jar files in your application package. Is it possible
that you are using an old version of Malhar library with Apex core 3.4 or
later? That class has been removed in 3.4. You can only use version Malhar
3.4 and later with core 3.4.

Thanks,
Thomas

On Thu, Nov 24, 2016 at 9:30 PM, Vikram Patil <vi...@datatorrent.com>
wrote:

>
> ---------- Forwarded message ----------
> From: Vikram Patil <vi...@datatorrent.com>
> Date: Fri, Nov 25, 2016 at 10:56 AM
> Subject: ClassNotFoundException for com.ning.http.client.
> AsyncHttpClientConfig
> To: users@apex.apache.org
>
>
> Hello All,
>
> I am trying out demo example for apex. I have complied an application and
> launched in apex cli as follows but when I am trying to run
> TopNWordsWithQueries application it throws an exception. Please let me know
> workaround for this one.
>
> apex> launch /home/vikram/.m2/repository/com/example/topnwords/1.0.0-SNAP
> SHOT/topnwords-1.0.0-SNAPSHOT.apa
> done with populateDAG, isDebugEnabled = false
>   1. TopNWordsWithQueries
>   2. WordCountDemo
> Choose application: 1
> java.lang.NoClassDefFoundError: com/ning/http/client/AsyncHttpClientConfig
> at com.datatorrent.demos.wordcount.ApplicationWithQuerySupport.
> populateDAG(ApplicationWithQuerySupport.java:82)
> at com.datatorrent.stram.plan.logical.LogicalPlanConfiguration.
> prepareDAG(LogicalPlanConfiguration.java:2226)
> at com.datatorrent.stram.client.StramAppLauncher$1.createApp(St
> ramAppLauncher.java:490)
> at com.datatorrent.stram.client.StramAppLauncher.launchApp(Stra
> mAppLauncher.java:601)
> at com.datatorrent.stram.cli.ApexCli$LaunchCommand.execute(Apex
> Cli.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(Apex
> Cli.java:1906)
> at com.datatorrent.stram.cli.ApexCli$3.run(ApexCli.java:1468)
> Caused by: java.lang.ClassNotFoundException:
> com.ning.http.client.AsyncHttpClientConfig
> 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)
>
>
> Thanks & Regards,
> Vikram
>
>
>