Eclipse hangs while starting, shows message as "Initializing Spring Tooling" - spring

Eclipse (Oxygen) hangs while starting/restarting, shows message as Initializing Spring Tooling at right bottom corner as below and always be in Not Responding state.
Killed the process multiple times by Task Manager to exit and restarted several times but doesn't help.
Can please someone help to fix this ?

Below steps will resolve the issue:
Terminate Eclipse IDE with Task Manager and delete below folder:
.metadata/.plugins/org.eclipse.core.resources/.history
There will be folder .metadata in your Eclispe workspace. Just delete the .log files in it.
Move to path where eclipse.exe is available. Then from Command Prompt just type
eclipse.exe -clean

Related

Impossible to publish on Tomcat

At start I thought it was an Eclipse problem but continuing to make attempts I think the problem is upstream, in Tomcat indeed maybe in Windows even. Everything worked well until the last shutdown. Since I restarted the machine, trying to publishing on Tomcat I get errors like: "Could not replace with temp file ...", "Could not create directory ..." etc. Ultimately, the publication fails because I can no longer write to Tomcat's "webapps" folder. Actually I noticed that the whole "Program files" folder has become "read only". I tried to modify the attributes in all the ways, through changes to the properties of Windows (even giving "full controll" in "security" in the "Apache ... Tomcat" folder), through modifications of "attrib" using "PowerShell"... nothing to do: either the changes are not taken into consideration or I receive the message "access denied" (but I am system administrator).
I'm at my wit's end!
Ps _ Tomcat 8, win 10. No change was made to Tomcat or eclipse installation, no windows update in the last shutdown-restart.

Debug jHipster application

I'm new to jHipster, I've created APIs which are consumed by my application's front end. I want to debug my services but unable to attach debugger with IntelliJ.
My application starts by running command "mvnw" which is jHispter standard command when I opened this bat file in editor i found this :
#REM e.g. to debug Maven itself, use
#REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
I setup MAVEN_OPTS environment variable but still it was of no use. I also tried to make a remote connection from IDE on port 8000 but still, it didn't serve a purpose.
Any help will be appreciated, thanks.
you can just run (in debug mode) the main method in the JhipApp Class (the SpringBootApplication Class). It worked for me
My tested and proven solution for debugging and then dividing the front end with the back ends, works for OS Windows and Ubuntu with the use of the latest version of the Ide Intellij Community (2020.1.1 used in both OS), provides that after creating a jhipster app (created with Ubuntu), from the command promp or from the Ubuntu shell launch the command: mvn -DskipTests = true clean install to compile the back end first and then the front end (in Angular 8 in my case), at the end of this compilation run the following command: mvn spring-boot: run.
After launching the application, click Ctrl + C and stop the run. Now you can launch the npm commands and then the command: npm start from the same command prompt or from the shell, since your project has been built and already launched it will be restarted and now from the Ide you can launch your class configuration annotated with #SpringBootApplication from the debug icon, at the end of the compilation you will have front ends and back ends divided and debuggable easily as well as hot changes for the front end take place quickly, while for the back end you will always have to save recompile and restart in debug.
You can do it, if you connect remotely, as you suggested in your question
Start jhipster in the terminal, but pass in some debug params
$ ./mvnw -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
Then you just connect to it using your IDE at port 5005.
For example, in Visual Studio Code
add a "launch.json" file
A "Add Configuration" button will be displayed when you have the launch.json as the active file in the editor. Click it.
Choose "Java: Attach by Process Id"
That will add a new configuration to the "Run and Debug" tab.
Click the "Attach by Process ID", button, and choose your process (port 5005 in this example)
Debugging will begin!

Can't execute .exe with an additional param using the .bat file

I need to run NetBeans 7.4 with an additional param such as --locale en:US.
I have no problems doing this using wingows 7 console like this:
>b:
>cd "Program Files\NetBeans 7.4\bin"
>netbeans64.exe --locale en:US
But this way is very cumbersome. Besides it closes the program itself if I close the console.
So I tryed to make a .bat file with the following content:
#echo off
echo Netbeans
start "netbeans" "b:\Program Files\NetBeans 7.4\bin\netbeans64.exe --locale en:US"
pause
exit
However this solution doesn't work. It tells that it can't find this file. If I remove the param '--locale en:US' it founds it. But it is necessary to use this param.
Something should be changed, but how?
Almost done. Just change where the quotes are placed
start "netbeans" "b:\Program Files\NetBeans 7.4\bin\netbeans64.exe" --locale en:US
And, for the console problem, from netbeans launcher documentation
Default behaviour - parent process console is attached. This means if
netbeans.exe is started from console it is "reused" for output, if
netbeans.exe is started by shortcut no console is created
If option "--console new" is specified netbeans.exe creates new
console for output. This is useful if you want to start NB by
shortcut and you want still see console output or if you need to
start several NB instances with different user dirs. Console window
will have correct icon and corresponding title e.g. netbeans
--userdir d:\test_userdir --console new) so it is easy to distinguish which console belongs to certain NB instance
If option "--console suppress" is specified no output will be written
to console you invoke it from
In this moment i have no access to netbeans installation to test, but it seems there are three ways
Start with --console new so netbeans gets its own console and do not depend on cmd
Start with --console suppress to dettach from console
Create a shortcut to netbeans (with your parameters, of course). If it is necessary to start netbeans from console, start the .lnk file (shortcut) instead of netbeans executable.
As said, i can not try. Maybe this works.

Failed to successfully launch or connect to a child MSBuild.exe process

In VS2012, when building I frequently will get the following error:
Error 5 The build stopped unexpectedly because of an internal failure.
Microsoft.Build.Exceptions.BuildAbortedException: Build was canceled. Failed to successfully launch or connect to a child MSBuild.exe process. Verify that the MSBuild.exe "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" launches successfully, and that it is loading the same microsoft.build.dll that the launching process loaded. If the location seems incorrect, try specifying the correct location in the BuildParameters object, or with the MSBUILD_EXE_PATH environment variable.
at Microsoft.Build.BackEnd.NodeProviderOutOfProc.CreateNode(Int32 nodeId, INodePacketFactory factory, NodeConfiguration configuration)
at Microsoft.Build.BackEnd.NodeManager.AttemptCreateNode(INodeProvider nodeProvider, NodeConfiguration nodeConfiguration)
at Microsoft.Build.BackEnd.NodeManager.CreateNode(NodeConfiguration configuration, NodeAffinity nodeAffinity)
at Microsoft.Build.Execution.BuildManager.PerformSchedulingActions(IEnumerable`1 responses)
at Microsoft.Build.Execution.BuildManager.HandleNewRequest(Int32 node, BuildRequestBlocker blocker)
at Microsoft.Build.Execution.BuildManager.IssueRequestToScheduler(BuildSubmission submission, Boolean allowMainThreadBuild, BuildRequestBlocker blocker)
In the task manager I see that there are at least 10-20 MSBuild.exe and Conhost.exe. I am unable to terminate these and even closing VS does not solve the issue. The only workaround at the moment is to log out and re-login.
Has anyone experienced this too, and perhaps have a resolution?
Thanks in advance.
Rob
See Failed to successfully launch or connect to a child MSBuild.exe process. Verify that the MSBuild.exe which says to restart Visual Studio to fix the problem.
That certainly worked for me.

Unable to delete pom.xml in Jenkins under Tomcat/Windows

I've been struggling with an annoying "Jenkins/Tomcat/Windows" problem for a while now without reaching any solution.
I've installed Tomcat version 7.0.25 in a Windows 7 Enterprise machine and Jenkins 1.451 as a webapplication
running under Tomcat. I have just 4 jobs configured right now and all of then are using the "Always chekout a fresh copy" checkout strategy,
so everytime a job runs the content in /jobs//workspace gets deleted. But, there are situations in which the job fails to run because
it is unable to delete the /jobs//workspace/pom.xml file like you can see in this (edited) stacktrace:
Building in workspace C:\.hudson\jobs\<task name>\workspace
Cleaning local Directory .
java.io.IOException: Unable to delete C:\.hudson\jobs\<task name>\workspace\.\pom.xml
at hudson.Util.deleteFile(Util.java:237)
at hudson.Util.deleteRecursive(Util.java:287)
at hudson.Util.deleteContentsRecursive(Util.java:198)
at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:73)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:136)
at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:780)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:761)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:745)
at hudson.FilePath.act(FilePath.java:788)
at hudson.FilePath.act(FilePath.java:770)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:735)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:677)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1195)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:576)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:465)
at hudson.model.Run.run(Run.java:1409)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Retrying after 10 seconds
Here you can see Tomcat locking the file as I told:
After some time Jenkins/Tomcat releases the lock on the pom.xml and i can execute the job again without any problem.
Does anyone know how to get around this ? Am i missing something ? Thanks in advance!
I changed to Windows Service installation, and the pom.xml never gets locked anymore.
Seems that this caused by Tomcat that somehow locks the pom.xml, although the build has finished.

Resources