Eclipse permanently not responding while debugging - java

I was wondering if anyone has experienced this problem.
We work with Eclipse 2020-03 running Wildfly 16 and OpenJDK 1.12 on a Windows 10 Desktop connecting the a local instance of SQL Server. When the app server is deployed we connect using Chrome or IE. When I'm debugging the java app, Eclipse becomes unresponsive. It could go 2 or 3 days before this happens and then happen 10 times back to back. It is inconsistent and I cannot determine what I might being doing to cause the issue. I have worked with older versions of Eclipse and have not had this issue till the Luna version. Of course at the same time we moved to Maven and GIT as well.
Some of symptoms
1. Hang when stepping through code.
2. Hang when click away after stopped at a breakpoint and then coming back.
3. Hang when inspecting variables.
4. Hang when increase the display area of one of the variables when its a long String.
If I just run and do not interact with the debug perspective, I have no issue and it never hangs.
Funny thing is we have at least a hundred developers running with this setup and only 2 or 3 of us have had this problem. At least from what I have tried to gather in terms of information.
Things I've tried
1. Complete format and re-install of PC. (I was desparate)
2. Upgraded Eclipse from 2019-03.
3. Based on google searches, turned off mylyn
4. Logged a comment on a issue with Eclipse: https://bugs.eclipse.org/bugs/show_bug.cgi?id=322126
5. Reviewed Eclipse, Wildfly and Java logs. Nothing of note.
6. Changes startup parameters of Eclipse with no luck.
7. A few other things I cannot remember.
To recover, I have to terminate the Eclipse process and the terminate the OpenJDK process.
Any help would be appreciated.

Related

ORA-12516 Issue with ojdbc in Intellij

I have a strange behaviour happening in one of our projects and I wonder if anyone encountered anything similar. It is a legacy Java project and we are using ojdbc6.jar to connect to an Oracle DB. Locally we are using a Tomcat 6 app server.
When using IntelliJ IDE the db connection fails in some cases (specially where higher number or more complicated queries are run), with
ORA-12516, TNS:listener could not find available handler with matching protocol stack
The strange thing is, that Eclipse users never have the mentioned problem. (For some reason, their db calls seem much faster too)
We are using an IBM Websphere JDK because of production reasons, its a 64 bit 1.8 jdk.
The issue happens more often when running debug, but also happens while running normally.
I looked up this error and tried the following things:
monitored the number of processes oracle is running, but we have a limit of 400 and it never went above 300
tried changing locally to ojdbc7 and ojdbc8: 7 produces the same issues, 8 throws a could not establish connection with Network Adapter error at the same situation
tried changing the jdk-s under tomcat: no effect
tried all kinds of memory settings for tomcat and for intellij, no effect
It's a pretty annoying issue and I dont understand, why this does not happen with Eclipse.
Thank you for your advice in advance!

Eclipse Luna Hangs in Java Debug

Did some research on this but can't find an answer for my set of circumstances.
Problem: I can't start a debug on any Java apps in Eclipse Luna. The progress window tells me that it's "Launching Main" and the progress bar extends to 85% where it hangs. At this point I am given the following beneath the progress bar "Launching: Finding free socket..."
Here's my setup:
Eclipse Luna (clean install)
Java is latest (1.7.0_65)
Windows 7
pinging both localhost and 127.0.0.1 return good connections
Debug worked fine with old Juno install
Project runs fine, behaves properly and returns data, but can't be debugged.
Not running Avast
I am running Norton (no previous interference with debug)
Any ideas would be appreciated. I've can't figure out what the heck is wrong with it. I'm sure it's some new variable that Eclipse added that I've never heard of that has to be set, but it sure is frustrating.
Thanks guys.
Timeouts related to the network layer typically indicate packet loss. This can be caused by bad network equipment or a firewall denying access.
When there is no network equipment involved because it is on your local machine, this is typically a problem with a software firewall. This can be verified by temporarily disabling the firewall.

How to work out why Eclipse is slow to start JVM?

In the last week or two, when I run Java code inside Eclipse Juno, it takes 2-3 seconds before it starts executing. I know it doesn't sound like long, but it adds up to being really annoying. (The same thing happens when I run JUnit tests).
It didn't use to take this long. It used to be almost instantaneous. I can't figure out what has changed in my system configuration and how to change it back.
In terms of the environment, the only thing that I can think of is that I recently installed a Java plugin into Chrome, but I can't see how that would affect Eclipse, as it's using a different JDK (and not the JRE I installed).
What should my next step be? How can I narrow-down what's causing it?
I bet this is because of having so many projects that are open in the workspace! You can close any non-used project by right-clicking on it and then select Close Project.

Why does Tomcat 'Out of Memory' right when I attempt to start server in Eclipse?

As soon I click to start (literally immediately) the tomcat server with my web app, it displays the following error:
http://i67.photobucket.com/albums/h282/jamesekki/error.jpg
What's weird is the application still builds successfully and works fine. The problem is it slows down development time since I get this error every time I need to deploy any changes.
Here is my eclipse ini:
http://i67.photobucket.com/albums/h282/jamesekki/Capture.jpg
Any ideas?
Things I have tried:
1. Increased xms/xmx in increments of 128 megs all the way up to 4 gigs (still fail)
2. Increased permsize/maxpermsize similar to increments above (still fail)
Maybe these will help explain:
http://www.mulesoft.com/tomcat-oome-out-of-memory-error
http://baskarfelix.wordpress.com/2008/08/06/out-of-memory-errorjava-heap-space/
I'd also be curious to know if you have the same issue if you leave Eclipse out of the picture. Create a WAR file, add it to the Tomcat /webapps directory, and start Tomcat using a command shell and the start script in the /bin directory. If you still have a problem, I'd say you should look at how Tomcat and your JVM are configured. If you don't, it tells me that Eclipse is the problem.
Thanks everyone for your inputs. I was able to narrow it down to what was the root cause of the whole issue. I had an external api jar file in the src/main/resources/lib of my services layer and Eclipse seems to not like that for whatever reason. As soon as I moved that out of that location, it resolved the issue. Can anyone explain why this would potentially cause an issue? Just for learning purposes. Thanks!
Your settings look good to me. You could try the long way of profiling [1] tomcat to see what happens on startup, or the crude way of deleting your local server and runtime, to see if it helps with a fresh one. If that fails, re-download latest Eclipse Java EE edition, and set up from scratch.
While it's not the best solution (in case the problem resurfaces, you still have no proper solution), it is sometimes worth it if it takes too long otherwise.
[1] You could profile with JProfiler or YourKit Profiler. Both have trial versions. JVisualVM is also an alternative that comes with the JDK. However it may be an issue if Tomcat crashes immediately.

Eclipse 3.6 frequently stalls during Content Assist

The auto complete stalls so frequently and for so long, I quit using it altogether.
I've had success with the following using Eclipse (Classic) 3.6.1 on Windows 7 x64.
"A workaround, until the fix is released in 3.6.2 is summarized here: http://groups.google.com/group/android-developers/msg/0f9d2a852e661cba"
(copied for convenience)
"You can replace your /plugins/
org.eclipse.jdt.core_3.6.1.v_A68_R36x.jar plugin with one from
http://www.google.com/url?q=http://adt-addons.googlecode.com/svn/patches/org.eclipse.jdt.core_3.6.1.v_A68_R36x.zip&ei=vg5aTf2RIMrUgAeI-qTvDA&sa=X&oi=unauthorizedredirect&ct=targetlink&ust=1297749446528273&usg=AFQjCNFv7FGlTrnoVhRGE35JPjHxOwI_Bw
and restart Eclipse. Content Assists will be much better. Just try it.
Don't forget backup your original plugins. "
This solved part of my problem.
In preferences, I defaulted all the 'Java->Editor->Content assist' screens and the performance is much improved. Any lag I have now is due to system speed and is negligible. I've gone from minutes to seconds building the suggestion list.
UPDATE: This didn't completely solve my problem, but it got me close. The search continues...
UPDATE: I'm developing in Java for Android using the default packages that are included and any that might have come down during a update(in retrospect, maybe choosing update all in the SDk update might not have been wise). The timing is fairly consistent online and offline. I did a few tests and found the following:
Startup Eclipse and enter a line of code that can use a .toString(). Typing the '.' populates the auto complete within 2-3 seconds. Type a 't' and it takes 70-75 seconds. After that, 10 seconds. Diff objects do the same thing(75 the first time, 10 after that). It's the filtering process that appears to stall. My CPU does not max, Memory is OK, but the program will go not responding till it's done. Any typeahead gets cached and eventually filters the list when Eclipse starts responding.
For me the problem went away when I increased the memory for the vm.
Put this in your eclipse.ini:
-Xms512m
-Xmx1024m
on my 4GB Windows Vista system this would happen A LOT !! (as well as debug issues when looking up variables).
This all went away after I built my new PC with 8GB RAM. I can now run 4 emulators simultaneously and it doesn't have any debug problems any more either. Auto complete with huge lists also works just fine.
it would seem to be just an issue with how much RAM you've got.

Categories

Resources