The import org.apache.camel cannot be resolved - eclipse

Yesterday I was working in my project. Today when I opened eclipse there is an error:
The import org.apache.camel cannot be resolved in .java file.
I tried to add .jar file then I got another error:
The import org.springframework cannot be resolved.
Then I tried to add this .jar and I got another error. What happened overnight?
Note: There is maven integration with my eclipse.

you need to specify versions for each library defined in pom.xml file.

Related

openfire build install4j jar file

I am trying to build openfire from the source code. getting compile time error. below classes not found.
import com.install4j.api.Context;
import com.install4j.api.ProgressInterface;
import com.install4j.api.UninstallAction;
from where we can download these jar files. tried
https://mvnrepository.com/artifact/com.install4j?sort=newest
all the jar file still does not work. Any idea.
Thanks
Mohsin
The install4j artifacts are available from the repository
https://maven.ej-technologies.com/repository
See https://www.ej-technologies.com/resources/install4j/help/api for more information.

Selenium package "com.thoughtworks" cannot be resolved in Eclipse

I want to make a Selenium project with Eclipse. I have added the reference to the selenium-server-standalone-3.4.0.jar file but I cannot import the package com.thoughtworks so the following lines produce an error:
import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;
Selenium RC has become obsolete in the newer selenium versions.
Download Selenium server 2.43 jar file, include it in your project and your issue will be gone.

org.apache.commons.codec Cannot be resolved

I'm trying to import org.apache.commons.codec.binary.Base64.encodeBase64, but Eclipse keeps telling me this import cannot be resolved, even though I've added the apache commons codec jar file to both the lib file of my project and also as an Eclipse plugin. What could be causing this issue?
org.apache.commons.codec.binary.Base64.encodeBase64 is a method. You import Types, like org.apache.commons.codec.binary.Base64.

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?

Only a type can be imported. org.apache.poi.hssf.usermodel.HSSFWorkbook resolves to a package

Trying to use Apache POI in a Eclipse JSP project. The POI jar is in the project's Java Resources Library list.
<%# page import="org.apache.poi.hssf.usermodel.HSSFSheet"%>
at run the following error occurs:
An error occurred at line: 7 in the
generated java file Only a type can be
imported.
org.apache.poi.hssf.usermodel.HSSFWorkbook
resolves to a package
Any ideas? Thanks
Don Lawton
The message indicates that the class could not be found on the classpath of your deployed application. Did you make sure that the POI jar is in your WEB-INF/lib folder?
Same happened to me, even when the needed jars were indeed in the WEB-INF folder.
I was using the provided server in SpringSource ToolSuite (STS). It took me several attempts to clean, republish, etc... before it finally worked.