WildFly 11 - Update classes and resources doesn't work
Answered
Hi,
my company is currently evaluating IntelliJ and we encountered a show stopper (for us at least):
When I change i.e. the source code of a service class and press CTRL+F9, it seems that the class get compiled but after some seconds the little green tooltip states "Loaded classes are up to date. Nothing to reload". When I look at the time stamp of the .class file, I still see the time of the last successful compilation and not the current time.
This happens most of the time. Sometimes it is recompiling and the class is reloaded, but I haven't figured out how I can convice IntelliJ to do this always.
We're using WildFly 11, JDK 8 on Windows 10 with the latest version of IntelliJ.
Any help is much appreciated
Please sign in to leave a comment.
Update to my own post: when I press Ctrl+Shift+F9 the class gets reloaded.This is for the time being a workaround, but it's not very useful if you have modifications in multiple files.
Hello Andreas,
Is it possible to provide idea.log ("Help | Show Log in...") after restarting IDE and reproducing the issue? Do you face the same problem with all projects?
Hi Yaroslav,
this is in the log file when I press Ctrl+F9 after changing a file:
2018-06-12 08:11:58,214 [3073876] INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED (BUILD PROCESS)
2018-06-12 08:11:58,218 [3073880] INFO - j.compiler.server.BuildManager - Using preloaded build process to compile C:\dev\.git\tws
2018-06-12 08:11:58,378 [3074040] INFO - lij.compiler.impl.CompilerUtil - COMPILATION FINISHED (BUILD PROCESS); Errors: 0; warnings: 0 took 171 ms: 0 min 0sec
2018-06-12 08:11:58,387 [3074049] INFO - s.CompilerReferenceServiceImpl - backward reference index reader is opened
2018-06-12 08:11:58,769 [3074431] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: C:/Program Files/JetBrains/IntelliJ IDEA 2018.1.4/lib/jps-launcher.jar;C:/dev/tws/java/jdk1.8.0_131/lib/tools.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1.4/lib/optimizedFileManager.jar
2018-06-12 08:11:58,818 [3074480] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
2018-06-12 08:11:58,819 [3074481] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Defaulting to no-operation (NOP) logger implementation
2018-06-12 08:11:58,819 [3074481] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
It seems to me, that IntelliJ is not detecting the modified .java file. If I explicitly compile the changed file via Ctrl+Shift+F9, it works.
In the build.log file I can see this when I press Ctrl+F9 after a change:
2018-06-12 08:19:06,651 [ 68676] INFO - rains.jps.cmdline.BuildSession - No changes found since last build. Exiting.
2018-06-12 08:19:07,167 [ 0] INFO - etbrains.jps.cmdline.BuildMain - ==================================================
Andreas,
Could you please attach full idea.log after restarting IDE? You could use any online sharing service or our FTP: ftp://ftp.intellij.net/.uploads/
Do you use any build system (Maven, Gradle) or any external tools that might compile changed sources?
Hi Yaroslav,
thanks for your reply. Meanwhile we figured out why the Ctrl+F9 didn't work: our sources were located in a subfolder of a ".git" folder. We moved our project to a folder that doesn't start with a dot.
My best guess is, that IntelliJ is not scanning .git folders for source code file changes.
Is it possible with IntelliJ to start a build (and hot redeploy to an application server) after a file has been changed? My colleagues were using Eclipse beforhand and they love this feature.
Andreas,
You are right - ".git" folder is excluded by default.
It's possible to update changed files: https://www.jetbrains.com/help/idea/updating-applications-on-application-servers.html
Hi Bedrov,
I am also facing the same issue in my IDEA.
Hello,
Please report an issue on YouTrack attaching logs folder zipped (https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files): http://youtrack.jetbrains.com/issues/IDEA.
Really a showstopper. Yes, CTRL + SHIFT +F9 Works and after me spending few hours restarting, Server, IDE, machine. This post helped, but eclipse pick up right way