I try to search this error across the web but I cannot find the solution. Any idea?
Regards,
Jimmy
It is a common problem, because IntelIJ is caching a lot of stuff. Your application may run with success in terminal, but IntelIJ may be stubborn to show you these errors.
This is common especially when you change between git branches with different versions of code.
What I usually do :
I run maven clean command : mvn clean - to remove target folders
after I press build and after again build Ctrl + F9. Important you must run build from IntelIJ twice
This is the fast solution and usually it works.
If the problem persists, I restart IntelIJ with Invalidate Cache and Restart.
Sometimes I delete .idea folder and reimport the project.
If this does not work as well I go for the longest solution:
mvn clean package
Usually it may have problems if you installed the project with mvn install, so I run the mentioned command to clear the installed version.
If this does not work as well I go and press reimport maven projects (the first button from the picture)
Hope it helps. It happens to me a lot as well. If you find another solution please let me know as well.
I can't seem to access eGit or use any related features in Eclipse Oxygen.
I have tried everything, and even wiped the meta, pool, and eclipse information to a complete re-install but still end up with the same issue.
For your information, I have 2 versions of Eclipse installed, Java and Java EE (if that might be a problem). I also have GitHub for Windows installed.
Some symptoms (i.e. when Eclipse stops responding):
Opening eGit perspective (it is possible if I don't have any projects in explorer, and open it from start after deleting metadata folder). Then it works until I open git projects.
Importing git & eclipse projects. Auto share git projects does not complete (or takes a long time - I stop it after 5-10 minutes).
Importing git project as Git Project (from import screen).
Importing git project from eGit perspective.
Edit: Additional symptoms:
Clone external git repository.
Load got project without git autoshare, and share project...then no response.
Accessing Team->Git->Configuration in Preferences.
Attempt to share new project.
Edit: I have now discovered (after installing previous Eclipse Neon version) that EGit still fails to work. Which may mean there is something deeper wrong with my setup/system. I hope I don't have to reinstall Windows on my system with a clean wipe. :(
I have tried just about everything. Any suggestions are greatly appreciated.
EDIT: As suggested, here is another fix to a similar (or same?) issue:
Eclipse not respond when try to configure GIT
As I was working on my project, an exclamation point popped up. Attempting to resolve this issue, I came across this solution from here:
Right click on your project -> Close Project. it will Close your project and all opened file(s) of the project
Right click on your project -> Open Project. it will Open your project and rebuild your project, Hopefully it will fix red exclamation mark
This not only fixed my project, but finally granted me access to eGit features in Eclipse.
I've just installed Eclipse 4.2.0 and also imported all my old programs into it, except that when I run my programs, it pops up with a message saying:
Select what to run:
Ant Build: Launches an Ant Build with default
Ant Build...: Launches an Ant Build and allows it to be configured
This message has never appeared to me before. I wonder if it is because I imported my files incorrectly or something that I forgot to install. Please tell me how I can make it work properly again. Thanks in advance.
Ah! this is an issue I've experienced earlier. This tip solved the issue. Here's How to do it.
Make sure that you've built it. Or you can enable Project --> Build Automatically.
After the above option is set, try cleaning the workspace. Project --> Clean and clean all the projects you've imported.
Now restart eclipse and you can launch your program.
I'm struggling a bit, trying to properly setup my maven projects in an IDE.
I don't particularly care between Eclipse and IntelliJ, but it seems that IntelliJ handles much better when it comes to import my projects, so I think I will stick with this one.
I'm having other problems now when trying to run the install goal through IntelliJ.
The first error :
The svn command failed. Command output: 'svn' is not recognized as
an internal or external command, operable
program or batch file.
How do I configure IntelliJ in order to let him see svn ? This error sounds weird to me, as I have installed Subversion as my Version Control System in IntelliJ.
Also, and this is related, I have a setenv.cmd that I usually run from the commandLine before calling mvn install. It only sets some variable like :
PROJECT_HOME=d:\Project\xxx\xxx\Trunk
PROJECT_VERSION=0.4.3-SNAPSHOT
M2_HOME=d:\Java\apache-maven-2.0.11
JAVA_HOME=d:\Java\jdk1.5.0_11
PYTHON_HOME=d:\Python26
XOOOF_HOME=d:\Project\xxx\xxx\XOOOF-BIN-1.0.3
XOOOF_URL=file:///d:/Project/xxx/xxx/XOOOF-BIN-1.0.3
SVNCLIENT_HOME=d:\Java\svn-win32-1.6.3
CATALINA_HOME=d:\Java\apache-tomcat
PATH=C:\WINDOWS;C:\WINDOWS\system32
How could I improve this step, and find a way to make it work from my IDE ?
Thanks !
If you want to do maven builds in eclipse I would strongly suggest installing m2eclipse by Sonatype.
It has an excellent reference on how to use it -> http://www.sonatype.com/books/m2eclipse-book/reference/
Regarding the first error it seems to be not Idea fault. AFAIK Idea doesn't need/use external SVN binaries. What happens when you click "9: Changes" tab at the bottom in Idea? If you make your project/module as managed by SVN there should be Repository subtab.
You run Maven from Idea to perform install goal and that error seems to come from it. Do you use SCM/SVN plugin in pom.xml? If yes or you would like to have an ability to run SVN from command line add directory with svn.exe (d:\Java\svn-win32-1.6.3? d:\Java\svn-win32-1.6.3\bin?) to PATH (not only to SVNCLIENT_HOME). After that operation svn command from new "run window" should be recognized.
So I have a maven module (module-A) in IntelliJ. I recently moved some classes from it into another new maven module (module-B) and added a dependency to it. Once I had done this I also modified the signature of a method of one of the moved classes (now in module-B).
I re-imported the poms so that IntelliJ would pick up the dependency changes and ensured all Java imports for the affected files were correct again. Now when I attempt to run my webapp (which depends on the two modules) I get a compile error in a class in module-A calling the modified method of the class in module-B.
The error message is basically saying that that method doesn't exist but believes the old method still exists! I click on the 'make' error and it takes me to the line in a class in module-A calling the modified method...the weird thing is, IntelliJ knows it is fine in the file. i.e. The method is not underlined in red like a compile error would normally be, but the class file name is :(
I compiled it from the command line using 'mvn install' (having also installed module-B) and it is all successful. I have deleted the classes directory in the target of both module-A and module-B and also invalidated IntelliJ's caches and restarted...still happening...any ideas?
I found out that this might help:
File -> Invalidate Caches
Maven Projects -> Reimport should help.
I spent a few hours on this same issue. All of the cleans in the world didn't help.
I deleted my out and target directory in my project and recompiled - that cleared it.
Edit: There is also a magic feature under the file menu: "Invalidate Caches / Restart" This fixes a bunch of "intellij is confused" problems.
Change "Java Compiler" setting in IDEA (User compiler javac in-process) to fix the problem.
Try to mvn clean your projects and mvn install your project B.
The maven integration with intelliJ is kind of buggy when you use the make command directly provided by Intellij. You should directly use the mvn commands, or start them from the maven panel.
I ran across a very similar problem that was driving me insane.
My code would compile fine with the ant task I normally run, but it would not build in IntelliJ, complaining about "Cannot Find Symbol blah blah"
Turns out, you can add "Excluded" files for the compiler. My file somehow got added to that list.
This list is located in File > Settings > Compiler > Excludes (IntelliJ 13)
Following steps should fix this problem :
delete .IntelliJIdea12 / .IdeaIC12 older under c:/user/.../
Invalidate Intelli's cache: File > Invalidate Caches.
This re-indexes your workspace on start-up and also clears your local history. Before you do this, commit or back up all your uncommitted changes.
Once your workspace is back after indexing, do a maven clean install.
when the build is successful, click on Maven Re-imports
This worked for me, I think it should work for others too with a similar problem.
So just stated it up this morning and it's all working!
Last night what I did do was open a new project (intelliJ project) from module-A's and module-B's parent pom and successfully got it to build, possibly doing that and then opening my original project again fixed it somehow...very annoying though
The behavior I see is similar to the one described by the original author.
Error markers show up on the right side of the editor in Intellij 14 and less so in 13.
This happens also if using Scala instead of Java and using SBT instead of Maven.
Also noticed this occurs after the second project is loaded. The first is always fine.
(After much trial and error) Figured it might be caused by Intellij's internal caches becoming somehow corrupt. "Invalidate caches" worked sometime and sometimes did not.
I work with a number of projects using Play! Framework and they use different versions of Scala and lots of dependencies.
I hypothesized the caches become corrupt because the internal key Intellij uses is not good enough to handle situations when the same class, loaded multiple times in different jars, has different signatures, and this results in the editor errors while external builds work fine.
Then the "Changing Ivy Cache Location for sbt projects in IntelliJ IDEA?" post gave the idea to segregate the ivy cache SBT and Intellij use in the hope that the ivy path is part of the internal cache key.
Paul Phillips of TypeSafe provide the "SBT extras" tooling and here I found a way to instruct SBT to use a project based ivy home, cache and SBT boot:
https: //raw.githubusercontent.com/paulp/sbt-extras/master/sbt
declare -r noshare_opts="-Dsbt.global.base=project/.sbtboot -Dsbt.boot.directory=project/.boot -Dsbt.ivy.home=project/.ivy"
How to configure Intellij
: see http://content.screencast.com/users/SemanticBeeng/folders/Snagit/media/ec8ec491-6d0c-4691-9598-916a63ba65ef/12.02.2014-08.59.png
Then did the same for the external SBT build to work in sync
: see http://content.screencast.com/users/SemanticBeeng/folders/Snagit/media/dcb287c4-200f-47f3-a937-42865675a22b/12.02.2014-09.01.png
Finally got rid of the user home based .ivy2 and all the contents.
To be sure Intellij does not use this folder I made it readonly.
This was a mistake. Intellij seems to silently fail resolve dependencies if you do this.
This solved the errors and believe they will not come back. :-)
If Intellij guys hear this: please test your releases (Scala, SBT, editor) with all the Play Framework templates from TypeSafe. The problem becomes apparent quickly this way.
I just had a similar issue that was driving me insane. I had done all the other things mentioned in the answers above because I have used Intellij forever, but none worked. In the end I found out that in the maven projects portion of Intellij, one of my modules had been marked "ignore" a simple unignore command from the context menu did the trick.
In my case, I had manually marked a directory as "Test Sources Root" but IDEA marked it on a parent Maven project. Unmarking it in File->Project structure...->Modules fixed the problem.
This could happen if you are using different version of java while building outside IntelljJ. My IntelliJ had java10 and I was using java8 while building at terminal. Changing java version to IntelliJ fixed this issue for me.
I had a very similar behavior. Running (Scala-)tests would always fail due to errors in unrelated java classes during the 'make' step.
It turned out, I had included a 'global' SDK library that collided with one of the dependencies from the project. A proper helpful error message only showed up after I deleted the 'make' step from the test.
I then deleted the duplicate library, re-added the make step to the test and everything is now working fine.
I ran into this problem today after upgrading from 12 to 13.
Later I fixed issue as I used the same name for Project and Module and looks Intellij allows this but cannot handle it correctly.
No idea why setting will impact the compilation, although there is no error in java editor. Should be a bug in version 13.
I was facing a similar issue after upgrading from IntelliJ 12 to 13. After multiple uninstalls and re-installs (of multiple intelliJ versions), numerous cleans and .m2 repository clearing, I finally figured out what my issue was.
In my intelliJ settings, the repositories mentioned in my main POM file could not be connected to. this was in turn due and alternate repository that was mentioned as a part of my pom file.
Once the POM was made to point to the correct repository, all my classes had their compilation issues resolved.
To check if your repositories are being connected to, go to File -> Settings -> Maven -> Repositories
Here, your indexed maven repositories should be connected to successfully. If they are not, then intelliJ will not be able to resolve most 3rd party and module dependencies.
I'm embarrassed to say, but we also had this problem, but it was due to a mistake in our package name.
When creating the packages for a new project I accidentally created a package called "org.package".
My project then had a directory structure like:
/src/main/java/org.package/
Which caused all sorts of havoc with IntilliJ.
Once the correct folder structure was created on the file system, IntelliJ worked great.
/src/main/java/org/package/
Note the difference in /org.package/ vs /org/package/
The fix was i made it javac instead of Ajc and i put 1.8 of course according to your jdk version.
for some reason when i invalidate and restart intellij it was set to be the default !
my version is
This happened to me...what fixed it was realising there was an extra main.iml file in the source directory. Deleting that instantly made the compile errors go away.
None of the above answers worked for me.
In my case, I had to finally create an explicit Maven Run Configuration for the module (with Command Line as "clean install") and then run it.
It is in Run > Edit Configurations
close the project
go-to the project folder and delete idea project file and .iws file
run mvn idea:idea
restart the project.
seems idea keeping the old project dependencies without cleaning even though we run file -> invalidate caches
Setting the proper Java SDK solves the issue
Right click on the project and select "Open Module Settings"
Check if you have the right Java SDK under platform settings
Check the SDK under Modules
Rebuild the project from "Build" menu
Delete the installation directory.
Remove the following directories:
~/.config/JetBrains/
~/.cache/JetBrains/
~/.local/share/JetBrains/
This will remove each and every configuration plus installation of jetbrains tools, be it IDEA, goland,etc.
Now install everything from scratch.
That's the only way it worked for me