"Package HttpClient does not exist" when compiling - eclipse

I am attempting to compile EWSJavaAPI1.5 in Eclipse and in IntelliJ. I have had no luck. I keep getting a org.apache.commons.httpclient does not exist error. Its driving me nuts. I added the four required files:
commons-codec-1.4.jar
commons-httpcliient-3.1.jar
commons-logging-1.1.1.jar
jcifs-1.3.15.jar
The four jar files are being referenced, yet it does not find the httpclient when compiling. It may have to do with the class path but I am not sure if I am adding it to the class path correctly. What to do?

Check that the library classpath is set correctly and this library is added to the dependencies of your module. Another possible case could be corrupted jar file, try to download it again.

Related

include gwt-graphics into a Eclipse WebApp-Project

I try to include the gwt-graphics library into a WebApp-Project made with Eclipse.
This is the description: https://code.google.com/archive/p/gwt-graphics/wikis/Manual.wiki
"Download gwt-graphics.jar and add it to the class path of your GWT project. In addition, you have to add the following line to the GWT module file: After these two steps, you are ready to use GWT Graphics in your GWT project!"
I have done this and after I start the app in super-dev-mode, I got an error from the compiler:
"[ERROR] Unable to find 'org/vaadin/gwtgraphics/GWTGraphics.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?"
I am not sure how I can solve this.
Did you add it to the class path? If not, you can right click to the jar file and do Add to Classpath

SBT unmanaged jars

I have a dependency that includes several jar files in the lib folder. When I try to compile my application, it does not find the classes in those jar files.
More specifically, it fails to find the classes defined in polyglot.jar, with this error:
Error:scalac: Class polyglot.frontend.JLExtensionInfo not found - continuing with a stub.
Is there any way to make the included jar files visible on the classpath, without copying them into my own project's lib folder?
Thanks!
What 0__ said: no, nested jars won't be discovered. There are some workarounds, but they really aren't worth it. If you want the jars as unmanaged dependencies, you'll have to add them to your own lib/.

Add a .so library with class files to sbt scala project

I need to call some c functions from my sbt project. I have already used SWIG and created a .so file along with .class files.
I wrapped everything in a jar file and put it in lib/ folder but it keeps saying no value found.
How can I use the .so library generated from swig along with the .classes files in an sbt project?
The name of the library is libsample.so.
I can successfully upload the library in sbt with System.LoadLibrary("sample") but I cannot call sample.entry() (not found value sample...)
Can you use something like a DependencyWalker and make sure your are not missing any dependencies on they box?

Eclipse JAR at runtime

I'm importing several JARs all sitting in the same directory. When my program runs I'm able to access the classes in several of those JARs, no problem. So my classpath is fine (I assume). But there is one JAR giving me trouble. When I try to run:
Configuration conf = new BaseConfiguration();
I get a NoClassDefFoundError error. The searching I did on "NoClassDefFound" typically points to classpath problems but as mentioned above, other JARs in the same directory are being found so I think that's not the problem.
This is in Eclipse 3.8.
The import statements:
import org.apache.commons.configuration.BaseConfiguration;
import org.apache.commons.configuration.Configuration;
And the name of the JAR is:
commons-configuration-1.6.jar
Any ideas?
Tom
Perhaps it's failing to load a dependency of one of the classes in commons-configuration-1.6.jar? Maybe from another commons- JAR? The NoClassDefFoundError should tell you which class the runtime failed to load. Have you checked this?

Error in Eclipse about type indirectly referenced from required .class file

I'm having this exception with some stubs generateds by Axis2:
"The type org.apache.axiom.om.OMElement cannot be resolved. It is
indirectly referenced from required .class files"
I've been reading many posts, and trying to find a solution. What I've found so far is to add the apache tomcat 5.5 library to the build path. It removed the error in the java file, but then, when I to execute any java program inside the project, I got this error:
'Launching myApp' has encountered a problem Exception occurred
executing command line. Cannot run program "C:\Program
Files\Java\jdk1.5.0_22\bin\javaw.exe" (in directory
"D:\Digicel\workspace\Digicel\myClassSample"): CreateProcess error=87,
The parameter is incorrect
then if I remove the apache tomcat library from the build path, I can run the other java programs, but not the one mentioned initially.
Any thoughts about it?
Okay, I've found the cause of the problem with the help of a friend :)
The thing is that Eclipse is aware that one of my dependencies, depends of another library, and Eclipse is checking for it when it tries to build the code.
So, what I've done is try to check which jar file contains this library: " org.apache.axiom.om.OMElement".
I've googled it and found that it is "axiom-api-1.2.10.jar" and finally my file compiled with 0 errors.
He also explained to me that my original solution of adding the apache tomcat server library is adding all the jars that cames with apache tomcat (which is a big list), and probably there may have been a version conflict with my current list of added jars.
So, the fix was to find the appropriate jar and add it to the project.
This error can also occur when a indirect dependency has a corrupt jar file. This may be caused by problems at the public maven repository.
If this is the case removing the local maven repository to download fresh jar files will fix your problem:
rm -Rf ~/.m2/repository/{enter/path/to/broken/stuff}
Goto Maven >Update Maven project>checkmark the Force update >Then Run
..That error Will gone....