Eclipse Luna Hangs in Java Debug - java

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.

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 permanently not responding while debugging

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.

Apache Tomcat 7 not accepting connections

I am running Apache Tomcat 7.0.42 on Ubuntu 12.04. When I start up Apache initially it's all fine and I can connect. However after using it for a while I can no longer browse to any site hosted on Apache, not even the root site. The browser just waits for a connection forever. If I go on the machine I can see lots of connections that have been closed and are CLOSE_WAIT on netstat, but nothing open. The Apache log file doesn't tell me anything either.
If I restart Apache the problem doesn't go away, even rebooting the server hasn't solved the problem. After struggling for a while it starts working again only to stop shortly afterwards.
I don't have any network issues between the machines.
I had a look at the known bugs on 7, but don't notice anything that sounds related. I have also reinstalled Apache on the machine, but the problem returned soon after.
I feel like I'm missing something silly, but I'm just not getting it.
I am not sure if this will help, but you can give a try for below options.
The problem may not be for Tomcat7, but for your own site. I have used tomcat for so many days and didnt notice such kind of issue single time.
May be your one of the site is having memory leaks and after running for sometime, it makes server stop because of low memory.
If there are many sites then you can try removing all and adding one by one to check which site is giving the issue.
You can try with simple page first by removing all other sites to check if the issue is with tomcat or your site.

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.

How to connect JProfiler to an application running on localhost?

I have an application running on my localhost and I want to profile the application to see how can I enhance the performance of the application. I am doing the setup steps as defined but it is not able to connect to localhost server, is there a proper step by step guideline available on how to:
Configure JProfiler to work with application running on localhost?
How to profile and what areas to look for while profiling for an application?
Configure JProfiler with Eclipse IDE, right now am able to see profile in run dropdowns in eclipse but they are not activated and so how can it be activated?
I have similar issue as in this question but am not able to understand the solution, any suggestions on this would be really appreciated.
I am tried for sometime now without any success on configuring JProfiler to work with application running on localhost, any suggestions would be highly appreciated.
I am new to profiling application world and so would really appreciate if you can provide some useful pointers
I am getting following error message:
Could not connect to 127.0.0.1:8849. Please make sure that the remote address is correct, the remote program is started properly, and the network route allows socket connections. and I have set up configuration using New Server Integration, not sure what else needs to be done and how can this be fixed.
After adding -agentpath:C:\Users\user~1.DOS\SOFTWA~1\JPROFI~1\bin\WINDOW~1\jprofilerti.dll=port=8849,nowait,id=117,config=C:\Users\user\.jprofiler6\config.xml to vm arguments under run configuration and then when i run configuration i get
JProfiler> Protocol version 32
JProfiler> Using JVMTI
JProfiler> JVMTI version 1.1 detected.
JProfiler> 64-bit library
JProfiler> Don't wait for frontend to connect.
JProfiler> Using config file C:\Users\user\.jprofiler6\config.xml (id: 117)
JProfiler> Could not find session with id: 117`
Manually adding a VM parameter to a run configuration in eclipse is not recommended for profiling with JProfiler.
For more on the eclipse IDE integration, see this screen cast and this help page. You can then profile JBoss with an eclipse run configuration without adding any VM parameters.
There are other ways to profile without manually adding any VM parameters:
The easiest way to get started is to use the "Quick attach" feature in JProfiler. With "Session->Quick Attach" you get a list of running JVMs that you can profile without having to add any JVM parameters.
If you miss source code navigation to eclipse in the above step, the same action is available in eclipse if the JProfiler plugin is installed.
For standalone configuration, use the integration wizard by invoking "Session->Integration Wizards->New Server Integration" from JProfiler's main menu. The integration wizard will modify the start script, so that you don't have to add any VM parameters.
For the error message that you got, I suspect that C:\Users\user\.jprofiler6\config.xml does not exist. Reducing the parameter to -agentpath:C:\Users\user~1.DOS\SOFTWA~1\JPROFI~1\bin\WINDOW~1\jprofilerti.dll=port=8849 will work, then the JBoss VM will wait until you connect with a session of type "Attach to JVM (local or remote)" from JProfiler. Anyway, adding VM parameters manually is only necessary in special situations.
I know that this is an old thread. Also I am not sure wether the problem described here is the same than the one that I mean.
A colleage of mine had a very similar problem: he could not see any local running JVM using the "Quick Attach" feature on Windows. Trying to add the jvm agent parameter or to reinstall JProfiler also didn't help.
The solution was to delete a folder called %USERPROFILE%\AppData\Local\Temp\hsperfdata_username after stopping all java processes. Probably something related to the permissions of this folder was messed up.

Categories

Resources