Thank you Roland, After reading what you had sent me I realized that I had been downloading the wrong files. I was download the source files not the Binary files, therefore I did not see any .jar files so I tried extracting them and putting all the files in the folders.
Now that I have the right binary files and extracted just the .jar files then set the classpath to include those 3 .jar files I was able to run the program successfully. Although for future reference is it not possible to make java read the .jar files in the classpath directory so I don't need to add them each time to the classpath? But in the meantime, Thank you very much for helping me with this. -----Original Message----- From: Roland Weber [mailto:[EMAIL PROTECTED] Sent: 12 September 2005 07:56 To: HttpClient User Discussion Subject: RE: ExceptionInInitializerError Error as soon as I Run Hi Graeme, > Thanks for that > I take it I am right in putting the commons-logging here: > C:\Program Files\Java\jdk1.5.0_04\classpath\org\apache\commons\logging > Is that's how its suppose to look like. In the Logging folder are files like > LogConfigurationException and LogFactory for example and the folder impl No, that is most likely wrong. The org/apache/commons/logging package prefix is defined in the JAR file. Putting a file into the classpath usually means defining the CLASSPATH environment variable to include the file: setenv CLASSPATH x:\Projects\MyProject\lib\commons-logging.jar Likewise for the other dependency required at runtime: setenv CLASSPATH x:\Projects\MyProject\lib\commons-logging.jar;x:\Projects\MyProject\lib\comm ons-codec.jar > I don't quite understand the configuring. Since the Tutorial doesn't go into > that so I am not entirely sure what I am suppose to do I am not even sure > what file I am suppose to edit in the common-logging. You can forget about configuring right now. Once you fixed your classpath issues, HttpClient should work with a reasonable default configuration. hope that helps, Roland > > > -----Original Message----- > From: Roland Weber [mailto:[EMAIL PROTECTED] > Sent: 12 September 2005 06:49 > To: HttpClient User Discussion > Subject: Re: ExceptionInInitializerError Error as soon as I Run > > Hi Graeme, > > > I have copied the tutorial here: > > http://jakarta.apache.org/commons/httpclient/tutorial.html > > So I know there are no errors in my code and I am sure I have all the > > dependencies in the classpath but I still get these errors as soon as I > run > > it: > > > > Exception in thread "main" java.lang.ExceptionInInitializerError > > at HttpClientTutorial.main(HttpClientTutorial.java:13) > > [...] > > Caused by: java.lang.ClassNotFoundException: > > org.apache.commons.logging.impl.Log > > FactoryImpl > > It looks like you are missing commons-logging. > > 1) verify the dependencies in the classpath again: > http://jakarta.apache.org/commons/httpclient/dependencies.html > > 2) verify the logging configuration: > http://jakarta.apache.org/commons/httpclient/logging.html > > hope that helps, > Roland > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
