Maven build path error - eclipse

I'm created a maven project using eclipse and it gives me following build path error
Description Resource Path Location Type Archive for required library: 'C:/Users/scjayasekara/.m2/repository/org/springframework/spring-beans/4.1.1.RELEASE/spring-beans-4.1.1.RELEASE.jar' in project 'KromeSoop' cannot be read or is not a valid ZIP file BookStore Build path Build Path Problem
I remove the complete repository and update all projects in the workspace. But it didn't work either. any suggestions to solve this issue??

I got the answer.
I just replace spring web-mvc 4.1.1 dependency with spring web-mvc 4.1.3 and it solved the build path problem.

Related

Error occurred during initialization of boot layer java.lang.module.FindException executing Selenium tests using TestNG and Java 12 through Eclipse

ErrorOccuredDuringInitializationofbootlayer I keep getting this error when I run
my test:
Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for
C:\Users\Bonfire.eclipse\org.eclipse.platform_4.12.0_867647348_win32_win32_x86_64\plugins\com.beust.jcommander_1.72.0.jar
Caused by: java.lang.IllegalArgumentException:
com.beust.jcommander.1.72.0: Invalid module name: '1' is not a Java
identifier
How can I fix it?
Add TestNG Library to classpath in buildpath ( not to module path). It will work fine.
To avoid this error, do not add TestNG library in the project or src folder. Try adding it into the package. To do so , follow the below mentioned procedure.
Right click on the package, click Build Path->Configure Build Path, go to Libraries tab, select Classpath and click on Add Library to select TestNG.
This error message...
Error occurred during initialization of boot layer java.lang.module.FindException:
Unable to derive module descriptor for C:\Users\Bonfire.eclipse\org.eclipse.platform_4.12.0_867647348_win32_win32_x86_64\plugins\com.beust.jcommander_1.72.0.jar
Caused by: java.lang.IllegalArgumentException: com.beust.jcommander.1.72.0: Invalid module name: '1' is not a Java identifier
...implies that there was an issue with the java classpath.
As per the discussion Launch with java 11 fails: Error: Could not find or load main class with Caused by: java.lang.ClassNotFoundException: with there are some issues with some particular classpaths for java-11 and the launch fails if:
The classpath contains a folder with spaces
The classpath length is larger than 32767 characters.
Where as java-8 works fine.
Reference
Unable to import org.openqa.selenium.WebDriver using Selenium and Java 11
Outro
Eclipse plugin: TestNG testcase does not run with Jdk11
Need to add 1.8 version library
Remove TestNG from build path library and add again
Recheck - the issue should be resolved.
I got same issue and I solved it. When creating the project, don't create module-info.java. When the project was already created with the module-info.java, deleting this file didn't help me.
I just created new project without module-info.java, and all works good now.
Best option to resolve this:
Find all file and folder starting with . e.g. — .metadata / .setting and delete them.
Add all the JARS.
Add testNG Libraries.
Execute it.
Done.

Gradle other project as dependency in eclipse

I have a web application which depends on another standalone project. Simply the web project requires a standalone project jar to be in classpath. I have built the standalone project jar with gradle and included that in web application's WEB-INF/lib folder. The project is running as expected. Now i want to make it automatic by adding that project as dependency. This is also achieved using the following code.
settings.gralde
include 'job-invoker'
project(':job-invoker').projectDir = new File(settingsDir, '../job-invoker')
build.gradle
dependencies {
compile project(':job-invoker')
.
.
}
I'm able to build the war file from command line using gradle and run it in tomcat. But i'm getting errors in eclipse. I'm not able to run the project in eclipse due to the compilation errors. Can some one please help me. Thanks in advance.
Finally i found a solution for this by installing the other project in maven local repository and adding this as a regular dependency in project. Reference code is given below.
Other project Gradle file
apply plugin: 'maven'
group = 'com.xxx.job'
version = '1.0'
Run gradle install command on this project. Then add mavenLocal() to your repositories in another project and add the dependency
compile 'com.xxx.job:job-invoker:1.0'

Imported library 'ExcelLibrary' contains no keywords

Have created maven project and done robot framework setup in eclipse using jython.
Getting "Imported library 'ExcelLibrary' contains no keywords." warning message while running the script and ExcelLibrary keywords have not been recognized.
Any help to resolve this issue?
Specifying the path of ExcelLibrary explicitly in the POM xml resolved this issue.
<extraPathDirectory>C:\Python\Python36-32\Lib\site-packages\ExcelLibrary</extraPathDirectory>

Unable to reimport Grails project into GGTS / STS?

I have copied a grails project to the workspace folder -
and try to import. The following error is shown:
Invalid project description.
OK
C:\Users...\workspace-ggts-3.5.1.RELEASE\ overlaps the location of another project: ''
How can I can clean the workspace correctly (delete the project properly) so that this message does not appear? I did ensure that the project name under .projects did
not exist prior to import - but message still indicates an overlap?
I then open project and Run As Grails Command (run-app).Grails home is set to: C:\grails-1.3.7\ -
and get
Base Directory: C:...
Resolving dependencies...
Dependencies resolved in 470ms.
C:... does not appear to be part of a Grails application.
The following commands are supported outside of a project:
add-proxy
clear-proxy
create-app
create-plugin
help
list-plugins
package-plugin
plugin-info
remove-proxy
set-proxy
Run 'grails help' for a complete list of available scripts.
Note that I had imported the project successfully before (as a Grails project) and
have deleted since etc.
I have also tried moving to other folder which I do not want to do.
How can I resolve the above?
Thank you
Simon

build paths eclipse java j2ee

I have imported a project (I am very new at this) and I get the following errors:
Project cannot be built until build path errors are resolved
Project FST is missing required library: 'C:program Files/Apache Group/Tomcat 4.1/common/lib/servlet.jar'
Project FST is missing required library: 'C:program Files/Apache Group/Tomcat 4.1/common/lib/struts.jar'
The project cannot be built until build path errors are resolved
Unbound classpath variable: 'TOMCAT_HOME/common/lib/jasper-runtime.jar' in project
Unbound classpath variable: 'TOMCAT_HOME' in project FST
I create a variable called TOMCAT_HOME and give it the proper directory ,but Also, we should change the project classpath to use TOMCAT_HOME rather than the absolute path.
i dont know how to do it (change the project classpath and the absolute path)
thanks !
To answer somewhat indirectly, if you configure your project build with something like Maven or Gradle, so that you can successfully build the project using the corresponding command-line tool, then it should be quite straightforward to import the project into eclipse using the Maven or Gradle eclipse plugin. I think doing so will be worth whatever trouble it causes you in the short run--just take care to make your project structure conform to the usual project structure that Maven expects or you'll be asking for trouble (it should be no problem to do so for greenfield work).