You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oodt.apache.org by Mengying Wang <wa...@usc.edu> on 2014/09/19 22:18:16 UTC

HttpClient NoClassDefFoundError For the url-downloader Script of the Apache OODT Crawler

Dear Everyone,

I am trying to use the url-downloader script of the Apache OODT Crawler.
However, it raises the following "no class definition" error, I am not sure
what is going on. Could you please give me some hints? Many thanks.

$ ./url-downloader
http://pds-imaging.jpl.nasa.gov/data/msl/MSLHAZ_0XXX/CATALOG/CATINFO.TXT .
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/oodt/cas/pushpull/protocol/http/HttpClient
Caused by: java.lang.ClassNotFoundException:
org.apache.oodt.cas.pushpull.protocol.http.HttpClient
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)

Best,
Angela Wang

Re: HttpClient NoClassDefFoundError For the url-downloader Script of the Apache OODT Crawler

Posted by "Mattmann, Chris A (3980)" <ch...@jpl.nasa.gov>.
Hi Angela,

Can you tell me what is in your $PUSHPULL_HOME/lib directory?

Cheers,
Chris


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Chief Architect
Instrument Software and Science Data Systems Section (398)
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 168-519, Mailstop: 168-527
Email: chris.a.mattmann@nasa.gov
WWW:  http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Associate Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++






-----Original Message-----
From: Mengying Wang <wa...@usc.edu>
Reply-To: "dev@oodt.apache.org" <de...@oodt.apache.org>
Date: Friday, September 19, 2014 1:18 PM
To: "dev@oodt.apache.org" <de...@oodt.apache.org>
Subject: HttpClient NoClassDefFoundError For the url-downloader Script of
the Apache OODT Crawler

>Dear Everyone,
>
>I am trying to use the url-downloader script of the Apache OODT Crawler.
>However, it raises the following "no class definition" error, I am not
>sure
>what is going on. Could you please give me some hints? Many thanks.
>
>$ ./url-downloader
>http://pds-imaging.jpl.nasa.gov/data/msl/MSLHAZ_0XXX/CATALOG/CATINFO.TXT .
>Exception in thread "main" java.lang.NoClassDefFoundError:
>org/apache/oodt/cas/pushpull/protocol/http/HttpClient
>Caused by: java.lang.ClassNotFoundException:
>org.apache.oodt.cas.pushpull.protocol.http.HttpClient
>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)
>
>Best,
>Angela Wang


Re: HttpClient NoClassDefFoundError For the url-downloader Script of the Apache OODT Crawler

Posted by "Ramirez, Paul M (398J)" <pa...@jpl.nasa.gov>.
Wow where did I get Melanie. Sorry about that Angela. 

--Paul

Sent from my iPhone

> On Sep 20, 2014, at 9:17 AM, "Chris Mattmann" <ch...@gmail.com> wrote:
> 
> s/Melanie/Angela :)
> 
> ------------------------
> Chris Mattmann
> chris.mattmann@gmail.com
> 
> 
> 
> 
> -----Original Message-----
> From: "Ramirez, Paul M (398J)" <pa...@jpl.nasa.gov>
> Reply-To: <de...@oodt.apache.org>
> Date: Saturday, September 20, 2014 6:44 AM
> To: "<de...@oodt.apache.org>" <de...@oodt.apache.org>
> Subject: Re: HttpClient NoClassDefFoundError For the url-downloader Script
> of the Apache OODT Crawler
> 
>> Melanie,
>> 
>> Your answer for right now then is to run that script from its directory.
>> It would great if you could open a Jira issue for improvement [1]. If you
>> happen to update the script to make it more robust that would be a great
>> contribution back to the community. To do that you would just create a
>> patch file and attach it to the issue.
>> 
>> Thanks,
>> Paul
>> 
>> [1] https://issues.apache.org/jira/browse/OODT
>> 
>> 
>> 
>> Sent from my iPhone
>> 
>>> On Sep 19, 2014, at 8:34 PM, "Lewis John Mcgibbney"
>>> <le...@gmail.com> wrote:
>>> 
>>> You are correct Paul R.
>>> The http client dependency is present in crawler Pom.xml
>>> <dependency>
>>> <groupId>commons-httpclient</groupId>
>>> <artifactId>commons-httpclient</artifactId>
>>> <version>3.0</version>
>>> </dependency>
>>> The crawler launcher script had the following hard pathS which we should
>>> improve
>>> 
>>> Java.ext.dirs=../lib
>>> 
>>> If this I not invoked from crawler module path then dependencies a are
>>> not
>>> on classpath
>>> 
>>> On Friday, September 19, 2014, Ramirez, Paul M (398J) <
>>> paul.m.ramirez@jpl.nasa.gov> wrote:
>>> 
>>>> Could also just be the way the script references the jars. Maybe they
>>>> aren't on the classpath. Not near a computer at the moment or I would
>>>> look
>>>> at the script.
>>>> 
>>>> --Paul
>>>> 
>>>> Sent from my iPhone
>>>> 
>>>>>> On Sep 19, 2014, at 7:25 PM, "Lewis John Mcgibbney" <
>>>>> lewis.mcgibbney@gmail.com <javascript:;>> wrote:
>>>>> 
>>>>> Hi Angela.
>>>>> If you are using OODT from source, you can simply add the http client
>>>>> commons library to the Pom.xml and rebuild the module. This does
>>>>> however
>>>>> mean working with the XML and maven to build. Which version of oodt do
>>>> you
>>>>> have?
>>>>> 
>>>>>> On Friday, September 19, 2014, Mengying Wang <wang533@usc.edu
>>>> <javascript:;>> wrote:
>>>>>> 
>>>>>> Dear Everyone,
>>>>>> 
>>>>>> I am trying to use the url-downloader script of the Apache OODT
>>>>>> Crawler.
>>>>>> However, it raises the following "no class definition" error, I am
>>>>>> not
>>>> sure
>>>>>> what is going on. Could you please give me some hints? Many thanks.
>>>>>> 
>>>>>> $ ./url-downloader
>>>> 
>>>> http://pds-imaging.jpl.nasa.gov/data/msl/MSLHAZ_0XXX/CATALOG/CATINFO.TXT
>>>> .
>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError:
>>>>>> org/apache/oodt/cas/pushpull/protocol/http/HttpClient
>>>>>> Caused by: java.lang.ClassNotFoundException:
>>>>>> org.apache.oodt.cas.pushpull.protocol.http.HttpClient
>>>>>> 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)
>>>>>> 
>>>>>> Best,
>>>>>> Angela Wang
>>>>> 
>>>>> 
>>>>> --
>>>>> *Lewis*
>>> 
>>> 
>>> -- 
>>> *Lewis*
> 
> 

Re: HttpClient NoClassDefFoundError For the url-downloader Script of the Apache OODT Crawler

Posted by Chris Mattmann <ch...@gmail.com>.
s/Melanie/Angela :)

------------------------
Chris Mattmann
chris.mattmann@gmail.com




-----Original Message-----
From: "Ramirez, Paul M (398J)" <pa...@jpl.nasa.gov>
Reply-To: <de...@oodt.apache.org>
Date: Saturday, September 20, 2014 6:44 AM
To: "<de...@oodt.apache.org>" <de...@oodt.apache.org>
Subject: Re: HttpClient NoClassDefFoundError For the url-downloader Script
of the Apache OODT Crawler

>Melanie,
>
>Your answer for right now then is to run that script from its directory.
>It would great if you could open a Jira issue for improvement [1]. If you
>happen to update the script to make it more robust that would be a great
>contribution back to the community. To do that you would just create a
>patch file and attach it to the issue.
>
>Thanks,
>Paul
>
>[1] https://issues.apache.org/jira/browse/OODT
>
>
>
>Sent from my iPhone
>
>> On Sep 19, 2014, at 8:34 PM, "Lewis John Mcgibbney"
>><le...@gmail.com> wrote:
>> 
>> You are correct Paul R.
>> The http client dependency is present in crawler Pom.xml
>> <dependency>
>> <groupId>commons-httpclient</groupId>
>> <artifactId>commons-httpclient</artifactId>
>> <version>3.0</version>
>> </dependency>
>> The crawler launcher script had the following hard pathS which we should
>> improve
>> 
>> Java.ext.dirs=../lib
>> 
>> If this I not invoked from crawler module path then dependencies a are
>>not
>> on classpath
>> 
>> On Friday, September 19, 2014, Ramirez, Paul M (398J) <
>> paul.m.ramirez@jpl.nasa.gov> wrote:
>> 
>>> Could also just be the way the script references the jars. Maybe they
>>> aren't on the classpath. Not near a computer at the moment or I would
>>>look
>>> at the script.
>>> 
>>> --Paul
>>> 
>>> Sent from my iPhone
>>> 
>>>>> On Sep 19, 2014, at 7:25 PM, "Lewis John Mcgibbney" <
>>>> lewis.mcgibbney@gmail.com <javascript:;>> wrote:
>>>> 
>>>> Hi Angela.
>>>> If you are using OODT from source, you can simply add the http client
>>>> commons library to the Pom.xml and rebuild the module. This does
>>>>however
>>>> mean working with the XML and maven to build. Which version of oodt do
>>> you
>>>> have?
>>>> 
>>>>> On Friday, September 19, 2014, Mengying Wang <wang533@usc.edu
>>> <javascript:;>> wrote:
>>>>> 
>>>>> Dear Everyone,
>>>>> 
>>>>> I am trying to use the url-downloader script of the Apache OODT
>>>>>Crawler.
>>>>> However, it raises the following "no class definition" error, I am
>>>>>not
>>> sure
>>>>> what is going on. Could you please give me some hints? Many thanks.
>>>>> 
>>>>> $ ./url-downloader
>>> 
>>>http://pds-imaging.jpl.nasa.gov/data/msl/MSLHAZ_0XXX/CATALOG/CATINFO.TXT
>>> .
>>>>> Exception in thread "main" java.lang.NoClassDefFoundError:
>>>>> org/apache/oodt/cas/pushpull/protocol/http/HttpClient
>>>>> Caused by: java.lang.ClassNotFoundException:
>>>>> org.apache.oodt.cas.pushpull.protocol.http.HttpClient
>>>>> 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)
>>>>> 
>>>>> Best,
>>>>> Angela Wang
>>>> 
>>>> 
>>>> --
>>>> *Lewis*
>> 
>> 
>> -- 
>> *Lewis*



Re: HttpClient NoClassDefFoundError For the url-downloader Script of the Apache OODT Crawler

Posted by "Ramirez, Paul M (398J)" <pa...@jpl.nasa.gov>.
Melanie,

Your answer for right now then is to run that script from its directory. It would great if you could open a Jira issue for improvement [1]. If you happen to update the script to make it more robust that would be a great contribution back to the community. To do that you would just create a patch file and attach it to the issue. 

Thanks,
Paul

[1] https://issues.apache.org/jira/browse/OODT



Sent from my iPhone

> On Sep 19, 2014, at 8:34 PM, "Lewis John Mcgibbney" <le...@gmail.com> wrote:
> 
> You are correct Paul R.
> The http client dependency is present in crawler Pom.xml
> <dependency>
> <groupId>commons-httpclient</groupId>
> <artifactId>commons-httpclient</artifactId>
> <version>3.0</version>
> </dependency>
> The crawler launcher script had the following hard pathS which we should
> improve
> 
> Java.ext.dirs=../lib
> 
> If this I not invoked from crawler module path then dependencies a are not
> on classpath
> 
> On Friday, September 19, 2014, Ramirez, Paul M (398J) <
> paul.m.ramirez@jpl.nasa.gov> wrote:
> 
>> Could also just be the way the script references the jars. Maybe they
>> aren't on the classpath. Not near a computer at the moment or I would look
>> at the script.
>> 
>> --Paul
>> 
>> Sent from my iPhone
>> 
>>>> On Sep 19, 2014, at 7:25 PM, "Lewis John Mcgibbney" <
>>> lewis.mcgibbney@gmail.com <javascript:;>> wrote:
>>> 
>>> Hi Angela.
>>> If you are using OODT from source, you can simply add the http client
>>> commons library to the Pom.xml and rebuild the module. This does however
>>> mean working with the XML and maven to build. Which version of oodt do
>> you
>>> have?
>>> 
>>>> On Friday, September 19, 2014, Mengying Wang <wang533@usc.edu
>> <javascript:;>> wrote:
>>>> 
>>>> Dear Everyone,
>>>> 
>>>> I am trying to use the url-downloader script of the Apache OODT Crawler.
>>>> However, it raises the following "no class definition" error, I am not
>> sure
>>>> what is going on. Could you please give me some hints? Many thanks.
>>>> 
>>>> $ ./url-downloader
>> http://pds-imaging.jpl.nasa.gov/data/msl/MSLHAZ_0XXX/CATALOG/CATINFO.TXT .
>>>> Exception in thread "main" java.lang.NoClassDefFoundError:
>>>> org/apache/oodt/cas/pushpull/protocol/http/HttpClient
>>>> Caused by: java.lang.ClassNotFoundException:
>>>> org.apache.oodt.cas.pushpull.protocol.http.HttpClient
>>>> 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)
>>>> 
>>>> Best,
>>>> Angela Wang
>>> 
>>> 
>>> --
>>> *Lewis*
> 
> 
> -- 
> *Lewis*

Re: HttpClient NoClassDefFoundError For the url-downloader Script of the Apache OODT Crawler

Posted by Lewis John Mcgibbney <le...@gmail.com>.
You are correct Paul R.
The http client dependency is present in crawler Pom.xml
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.0</version>
</dependency>
The crawler launcher script had the following hard pathS which we should
improve

Java.ext.dirs=../lib

If this I not invoked from crawler module path then dependencies a are not
on classpath

On Friday, September 19, 2014, Ramirez, Paul M (398J) <
paul.m.ramirez@jpl.nasa.gov> wrote:

> Could also just be the way the script references the jars. Maybe they
> aren't on the classpath. Not near a computer at the moment or I would look
> at the script.
>
> --Paul
>
> Sent from my iPhone
>
> > On Sep 19, 2014, at 7:25 PM, "Lewis John Mcgibbney" <
> lewis.mcgibbney@gmail.com <javascript:;>> wrote:
> >
> > Hi Angela.
> > If you are using OODT from source, you can simply add the http client
> > commons library to the Pom.xml and rebuild the module. This does however
> > mean working with the XML and maven to build. Which version of oodt do
> you
> > have?
> >
> >> On Friday, September 19, 2014, Mengying Wang <wang533@usc.edu
> <javascript:;>> wrote:
> >>
> >> Dear Everyone,
> >>
> >> I am trying to use the url-downloader script of the Apache OODT Crawler.
> >> However, it raises the following "no class definition" error, I am not
> sure
> >> what is going on. Could you please give me some hints? Many thanks.
> >>
> >> $ ./url-downloader
> >>
> http://pds-imaging.jpl.nasa.gov/data/msl/MSLHAZ_0XXX/CATALOG/CATINFO.TXT .
> >> Exception in thread "main" java.lang.NoClassDefFoundError:
> >> org/apache/oodt/cas/pushpull/protocol/http/HttpClient
> >> Caused by: java.lang.ClassNotFoundException:
> >> org.apache.oodt.cas.pushpull.protocol.http.HttpClient
> >> 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)
> >>
> >> Best,
> >> Angela Wang
> >
> >
> > --
> > *Lewis*
>


-- 
*Lewis*

Re: HttpClient NoClassDefFoundError For the url-downloader Script of the Apache OODT Crawler

Posted by "Ramirez, Paul M (398J)" <pa...@jpl.nasa.gov>.
Could also just be the way the script references the jars. Maybe they aren't on the classpath. Not near a computer at the moment or I would look at the script. 

--Paul

Sent from my iPhone

> On Sep 19, 2014, at 7:25 PM, "Lewis John Mcgibbney" <le...@gmail.com> wrote:
> 
> Hi Angela.
> If you are using OODT from source, you can simply add the http client
> commons library to the Pom.xml and rebuild the module. This does however
> mean working with the XML and maven to build. Which version of oodt do you
> have?
> 
>> On Friday, September 19, 2014, Mengying Wang <wa...@usc.edu> wrote:
>> 
>> Dear Everyone,
>> 
>> I am trying to use the url-downloader script of the Apache OODT Crawler.
>> However, it raises the following "no class definition" error, I am not sure
>> what is going on. Could you please give me some hints? Many thanks.
>> 
>> $ ./url-downloader
>> http://pds-imaging.jpl.nasa.gov/data/msl/MSLHAZ_0XXX/CATALOG/CATINFO.TXT .
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/apache/oodt/cas/pushpull/protocol/http/HttpClient
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.oodt.cas.pushpull.protocol.http.HttpClient
>> 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)
>> 
>> Best,
>> Angela Wang
> 
> 
> -- 
> *Lewis*

Re: HttpClient NoClassDefFoundError For the url-downloader Script of the Apache OODT Crawler

Posted by Lewis John Mcgibbney <le...@gmail.com>.
Hi Angela.
If you are using OODT from source, you can simply add the http client
commons library to the Pom.xml and rebuild the module. This does however
mean working with the XML and maven to build. Which version of oodt do you
have?

On Friday, September 19, 2014, Mengying Wang <wa...@usc.edu> wrote:

> Dear Everyone,
>
> I am trying to use the url-downloader script of the Apache OODT Crawler.
> However, it raises the following "no class definition" error, I am not sure
> what is going on. Could you please give me some hints? Many thanks.
>
> $ ./url-downloader
> http://pds-imaging.jpl.nasa.gov/data/msl/MSLHAZ_0XXX/CATALOG/CATINFO.TXT .
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/oodt/cas/pushpull/protocol/http/HttpClient
> Caused by: java.lang.ClassNotFoundException:
> org.apache.oodt.cas.pushpull.protocol.http.HttpClient
> 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)
>
> Best,
> Angela Wang
>


-- 
*Lewis*