I am getting this error in my pom.xml for my SpringMVC project in Eclipse:
"Cannot invoke "java.net.URI.getScheme()" because "uri" is null"
Any pointers on this?
If you were not getting this error earlier, when you loaded the maven project into the IDE, move the pom.xml content to a notepad, save the empty pom.xml, let the IDE try processing the empty pom.xml and paste the content back and save it.
Somehow STS IDE starts PMS-ing all by itself. Worked for me - Spring Tool Suite 4.
Delete the project from Eclipse without deleting the contents from disk. Import the project again and wait for build(if it is automatic) and clean the project. It should work and worked for me!
This may not apply as I'm not sure if you are using Maven; This error occurred when I renamed a maven project under the Refactor menu option in Eclipse. To fix it, inside of the Project Explorer, right click on the project and select:
Maven -> Update Project ... -> Select Force Update of Snapshots/Releases then OK. It should fix the issue.
I run my Spring Boot project from the command line using mvn install and then mvn spring-boot:run -Dspring.profiles.active="development". This works fine but is not very convenient. I would like to start it directly from Intellij by clicking the green run button.
I tried to add a new run configuration but without success. I set "main class" and "active profiles" and tried to add "run maven goal" but the last one does not work (when I choose the working directory - the one with pom.xml - it says Maven projects not found). What should I exactly set up ? I just want to run the two commands mentioned above from the root directory of the project.
Update: here is the project structure project structure
Please follow the following steps:
Set the maven goal by clicking the "+" in IntelliJ (circled area)
Write mvn install.
Set the VM Options as: -Dspring.profiles.active=development
After that it should just run fine just by clicking the green play button.
This should help you get started.
I've recently installed the new Spring Tool Suite 4 in macOS High Sierra but when I tried to run Lombok's installation it wouldn't find my STS installation,
I followed this steps for manual installation (adding -javaagent to the ini file) but with no luck: https://www.edvpfau.de/sts-spring-tool-suite-4-mit-lombok/.
Any idea?
I did install Lombok in Spring Tool Suite 4 just some days ago for Mac and Windows.
And none problems.
One:
Execute java -jar lombok.jar
Note: normally or by default, it does not find the installer, it is the common scenario in my experience.
Two:
Press the Specify Location button. Therefore proceed to find and select the STS.ini file. It could be SpringToolSuite4.ini too.
Note: for Mac, go to the Contents directory within the .app file
Conclusion: therefore for any OS, the goal is find the unique file with the .ini extension
Normally I do this with the IDE closed.
Although this might be late, but it can be of help for others just experiencing this. Bellow is how I solved this issue
STEP 1
Find lombok in your project maven directory -> Right click -> Run As -> Java Application
STEP 2
Click on Specify Location button to choose the path where STS is installed
STEP 3
Go to Application/Contents/Eclipse/SpringToolSuit4.ini Then click on Install -> Quick Installer
STEP 4
Restart STS you good to go
I renamed SpringToolSuite4.exe and SpringToolSuite4.ini to STS.exe and STS.ini. Then used lombok installer's Specify Location to find them. After lombok installed, I renamed those files back to their original names.
I faced same issue with for Spring tool suite 4
Solution
Close running STS.
Open terminal
Go to ~/.m2/repository/org/projectlombok/lombok/version
Run java -jar lombok-version.jar
Pop window will come.
If it does not pick up the STS itself. Then chose specify location
Choose SpringToolSuite4.ini at Applications ▸ SpringToolSuite4 ▸ Contents ▸ Eclipse .
Click install
After this Starts Spring tool suite and clean project.
Just to add to M. Jordan's and prodigy's answer, please be sure to give execute permission to lombok.jar
(After you follow the above-mentioned step) Open terminal and change directory to the content of SpringToolSuite.app
cd /Applications/SpringToolSuite4.app/Contents/Eclipse
Then check whether execute permission is available to lombok.jar
ls -al
If you see -rw-r--r-- it means you need to give execute permission
chmod +x lombok.jar
alternatively you could also do
chmod +x /Applications/SpringToolSuite4.app/Contents/Eclipse/lombok.jar
Then restart STS
I'll show you how to completely install lombok into Spring Tool Suite 4 or latest version. First go to your project pom.xml file and add this dependency on dependencies section.
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
Go to your project root folder on your IDE and click the right button on it. Select like below:
And make sure, checked Force Update of Snapshots/Releases. Click Ok to download and update dependencies.
After finishing all task. Go to project Maven Dependencies and find lombok.jar file (>Maven Dependencies >lombok.jar). Right click on lombok jar. Go to Run As Java Application.
It will open lombok installer window and click ok. Then click Specify Location button.
Select the location where your STS bundle was installed. If it is selected properly then it will checked STS.exe, like below:
Then click install/update button. Finally lombok will be installed successfully.
Hopefully it helps you. Thanks.
None of the steps worked for me as the file dialog box won't even let me select the directory containing the SpringToolSuite4.ini
So I did the following:
Get lombok-<version>.jar from either your ~/.m2/repository/org/projectlombok/lombok/<latest-version>/
If not available you can get it from mvn repository:
https://mvnrepository.com/artifact/org.projectlombok/lombok/1.18.6
copy the lombok-<version>.jar to /Applications/SpringToolSuite4.app/Contents/Eclipse as lombok.jar
cp /path/to/lombok.jar /Applications/SpringToolSuite4.app/Contents/Eclipse/
Edit the file: /Applications/SpringToolSuite4.app/Contents/Eclipse/SpringToolSuite4.ini inside the directory to add this last line:
-javaagent:/Applications/SpringToolSuite4.app/Contents/Eclipse/lombok.jar
Open your project in eclipse. Right click on Maven -> update project. Follow similar step if you're using another build tool (like Gradle)
In my case, Lombok 1.16 could not locate STS 4 installation even after pointing to it manually. Worked only after I tried with updated Lombok version - Lombok 1.18.
Turn off STS
Install lombok following other common guidances with jar.
Turn on STS
I spent like 3 or 4 hours looking for a solution to the Lombok problem with springo book and eclipse, the solution I found on the internet was the following, I leave the link: (https://projectlombok.org/all-
versions) where is the entire Lombok version and I chose the latest lombok version then updated the IDE and MVN and everything worked.
For Latest Mac OS Big Sur
Just place lombok jar In Application folder then Follow the steps
folder path /Applications/SpringToolSuite4.app/Contents/Eclipse
once you complete all the steps restart your IDE
1.
2
3.
4.
5.
6.
the easiest way you can do is that by running the following command on command prompt
java -jar (jar location/lombok.1.8.1.jar) install (the path where you installed Spring tool suite(STS))
for example:
java -jar C:\Users\karthick\.m2\repository\org\projectlombok\lombok\1.18.8\lombok-1.18.8.jar install D:\STS_Tool\spring-tool-suite-4-4.1.2.RELEASE-e4.10.0-win32.win32.x86_64\sts-4.1.2.RELEASE
after that, you have to restart the tool.
on macOS Catalina all I had to do was to use lombok 1.18 and all worked fine.
I did it in a different way. just did the below.
Copy the lombok.jar to the root directory of STS
Added "-javaagent:lombok-1.16.18.jar" to the SpringToolSuite4.ini
It worked for me.
I had the same issue with STS-4.6 and lombok-1.18.18 on Windows10. I added lombok dependency to pom.xml, built the project, ran lombok jar in .m2 repository and restarted STS. Building the project did not work. Finally, Project -> Build All worked.
after install lombok project into your eclipse--
Go to the eclipse sts4 folder--
get the permission to the lombok.jar
$chmod +x lombok.jar
then open the eclipse.
Step to add lombok project in your eclipse--
download lombok jar and place one folder.
edit the SpringToolSuite4.ini file which is exist in the eclipse folder.
add three lines in last of file--
--add-modules=ALL-SYSTEM
-javaagent:/spring-tool-suite-4-4.10.0.RELEASE-e4.19.0-linux.gtk.x86_64/sts-4.10.0.RELEASE/plugins/org.projectlombok.agent_1.18.20/lombok.jar
restart the eclipse.
best option is through install new software option built in ecliplse
help>install new software> and add this site https://projectlombok.org/p2
you are good to go
Although this might be late, but it can be of help for others just experiencing this. Bellow is how I solved this issue
STEP 1
Find lombok in your project maven directory -> Right click -> Run As -> Java Application enter image description here
STEP 2 Click on Specify Location button to choose the path where STS is installed
enter image description here
Install -> Install/Update Installer
STEP 3 Go to Application/Contents/Eclipse/SpringToolSuit4.ini Then click on Install/update
STEP 4 Restart STS you good to go
Restart your IDE and Run Project->Update Maven Project and then all your errors will be gone
I installed SpringSource Tool Suite after which I was alerted that I hadn't set the JAVA_HOME. The installation was successful by then, so I closed the suite and set the java_home.
But now I don't find any way to open the suite. No shortcut in desktop or start menu.
How to open it?
Or should I re-install it?
In windows 7 go to Start > search program and files and type spring then in the results you will find Spring Tool Suit.
Else if you remember the installation path, to there you can find the STS.exe file
I face the same issue, was unable to open STS because of the Lombok path .inc file of STS.
remove the path and start.
Suggestion
if you added some external project like Lombok and did not install properly and you removed that project due to some reason then you must remove the path from the inc STS file.
Using NetBeans 7.1.2.
When editing pages with NetBeans as per the procedure explained below, the IDE offers only autocompletion for <jsp:...> tags:
This is how I have created the NetBeans project and the jsp (though it isn't archetype specific, nor the issue has anything to do with opencms): I have created a maven project with the OpenCms-Module archetype
mvn archetype:generate -DarchetypeCatalog=http://bp-cms-commons.sourceforge.net/m2repo
The archetype creates a maven project with jar packaging.
After that, I have added a jsp under src/main/opencms/modules/blahblah/templates.
And then I have added the taglibs.standard dependency to the project, to try to provide NetBeans with the corresponding tlds.
After several hours trying to get this working, I found this reported and closed bug that hinted me into the right direction:
Added src/main/webapp directory Edit 1: There is autocompletion only for jstl tags if the files are inside src/main/webapp. Workaround in linux (not sure if windows links will work): Create a symlink:
ln -s opencms/ src/main/webapp from the project root folder
Change maven project packaging to war (Project properties -> General -> Packaging)
(Notice that neither the #taglib directive nor the taglibs.standard dependency are necessary.)
If the Web Pages entry does not appear under your project (in the projects view), you may need to restart NetBeans. Now you'll have full autocompletion (only) under src/main/webapp! :-)
Edit 2
Unfortunately, if under version control, NetBeans sees the symlink as a new directory, and all files under it, as new files :-( This is very inconvenient, because to access the IDE integrated version control functionality, you still need to open the original resource.