Debugger not stopping at breakpoints: Websphere in Eclipse - java

I've recently had my app moved from Websphere Application Server 6.1 to WAS 7.5, due to end-of-life for 6.1. Consequently, I needed to update my debugging server. I found this to be an opportune time to move my application from an IBM RAD IDE to Eclipse (already had Indigo installed). Or so I thought.
Anyway, the powers that be, here, have recommended taking my debugger all the way to WAS 8.5, since I'm only using it to debug.
But the issue that I'm encountering is that I cannot get the debugger to stop on my breakpoints. I've got approx. 10 breakpoints in my opening page, all in JSP/Java code.
I'm running Java 1.6.0_32 and Java SE Runtime Environment build 1.6.0_32-b05. I really don't know how to check which JDK I've got loaded. I've seen recommendations to "go back" to JDK 1.5, but I can't be certain that's not what I'm running.
And to cover a few other bases, I have JUST started my system for the day, opened the IDE, started the server in debug (says "Debugging, Synchronized"), put focus on the opening page of the application and clicked "Debug on server". The front page opens without stopping at any of the breakpoints.
Does anyone have ideas or suggestions?

If you use eclipse's debugger and running the application outside eclipse environment , we have to configure it as remote java application.
Also check if the code deployed in server is in sync with the one present in workspace.

anything wrong of the ecplise's site.
Run->Skip all breakpoints

Well, I had recently faced this problem, where the code did not use to stop at breakpoints while I was in debugging mode and was sure that the particular piece of code is executing. In order to solve the problem, I did a clean-build-republish but it did not work, recreated the profile and readded the server with new profile, still did not work then finally re-installed RAD and web-sphere but It still did not work. Then I found the below article
https://www-304.ibm.com/support/docview.wss?uid=swg21240896
and realized it could be a problem due to some other OS process interfering with debug process/port so I performed a system restore. After restore when I deployed the application, debugger started working properly.

I'd like to say I found the answer to this, but I never did. I ended up dropping RAD and moving to debugging on Jetty. My local testing isn't EXACTLY as it would be on the test server, but it works. Not sure if this should be flagged as "answered" or not.
UPDATE: I have left this project but before I did, the entire development platform was moved to IDEA and debugging was no longer an issue. I don't know if I should find a way to mark this question as inactive or closed or whatever so that it's not just sitting out here getting views and responses when it's no longer an issue for me.

Related

JMeter can't copy-paste to and from JMeter and Windows 10

I met a bizarre issue on my working laptop. Usually, I use my desktop PC for work, but I am in the office today. I am using my working laptop. For some reason, I cannot copy from Windows 10 to JMeter and from JMeter to Windows 10. For example, I am using Notepad++ for creating test cases for interface testing. I am trying to copy-paste from Notepad++ to JMeter. It is not possible.
Something that is very strange for me is that JMeter window has some strange green line at the edge of the window.
I am using JMeter version 5.5
Windows 10 - 64 bit
I tried with JDK 17.0.1 and JDK 1.8_202 (because I wasn't sure if the issue came from Java at all)
I don't think it's connected with JMeter by any means, most probably it's some form of antivirus software which prevents clipboard actions somehow.
You can try increasing JMeter's logging verbosity to DEBUG level just in case and see if there are any suspicious entries in jmeter.log file, however I'm more than sure that the behaviour is caused by some 3rd-party software running on your laptop, if it's not the antivirus it could be something like WRITEit application so do a clean boot and the issue will go away and then add the startup programs and start services one by one unless you detect the one which causes this problem
I had the same problem with JMeter 5.5 when I had changed Option->LookAndFeel->"Metal". Then I returned back to "System" and the problem had gone. Now copy-paste are working well.
I find the solution.
#Dmitri T was right. The issue appears because of antivirus protection. The fix was to run the jmeter.bat file as an administrator.

Netbeans: debugging Java Servlet on Tomcat opens two debug consoles?

I have been developing a Java Servlet app over several years. I have recently started to have slight problems debugging the app with Netbeans. When I click "Debug Project" under the Debug-menu in Netbeans 11.1, the following happens:
Tomcat is started and the app is deployed.
A debugger console is opened that says "User program running".
The app is recompiled.
There seems to be an attempt to somehow redeploy/debug(?) the app again: a second debugger console is opened but this one says "Connection refused".
Historically only steps 1-2 have occurred. I have no idea why recently also steps 3-4 have started to occur. E.g. the only changes I have done to the project pom-file is that some dependencies have been updated to a newer version. The only other major changes have been that the underlying Java SDK is now for version 12 and Netbeans has been updated from 8.2 to 11.1.
The end result is sort of half-ok: I am able to debug (set breakpoints, view variables etc.) the app. But one annoyance is that hot redeploying does not seem to work anymore. Previously changing and saving a Java code file caused that one file to be recompiled and the updated app to be redeployed automatically. This does not happen anymore if I modify and save Java code; I have to compile and redeploy manually. And of course also the fact that the whole project is recompiled at the beginning of each debug session slows things down. I assume these problems must be related to how the extra steps 3-4 have started to occur, but have no idea what could trigger those.
I wonder if anyone has any ideas what might cause this?

Sudden Glassfish 2.1 failure

So, nothing has changed with my setup over the past week. I have recently upgraded to Lion, but I have run this application several times since I have done that.
Today, I click the "Run Main Project" arrow in NetBeans 6.8, and I get a dialog box I have never seen before...
I have absolutely no idea what to do. I can find no reference to this error in Google.
Steps I have taken:
Reviewed the logs (nothing unusual up to the point where NetBeans freaks out.
Reverted to a backup Netbeans installation (no change in behavior)
Attempted to change the username/login information to the administrative Glassfish panel (no change in behavior)
Removed the .netbeans directory from my home, and restored to a known good offsite backup.
I have absolutely no idea what "8228 8228 8228" means.
One thing important to note is that Glassfish is running and the creds that I have supplied to NetBeans do work. I can log into the running Glassfish admin panel with them.
Any suggestions at all?
Leaving this here for anyone who happens to run into the same problem.
I would wager that this affects all versions of NetBeans.
I am not entirely sure what caused the original issue, but it appears that NetBeans attempted to "auto-discover" a proxy that I had installed on my system. (GlimmerBlocker, for blocking ads, among other things)
When it did this, Glimmerblocker did not report its IP address correctly (or NetBeans interpreted it incorrectly), resulting in something that looked like:
127.0.0.1
127.0.0.1:8228
8228
8228
Well, needless to say, when the Java NumberFormatter got a hold of that, it didn't like it one bit.
Setting NetBeans to "No Proxy" in it's settings, and restoring from backup again (to undo all the troubleshooting damage I had done) took care of the problem.
Again, leaving this only in the hopes that it helps at least one other problem who may run into something similar.

Glass fish server not starting

Hi am creating a web application using NetBeans 6.9.1 IDE and am trying to deploy GlassFuish server without success.
I know this sounds silly, but are you sure Glassfish won't start? It is under Start/Programs/Sun/Start Default Server.
If that is what you are doing, I want you to know that I have had a problem with GlassFish not starting. You may want to check your log to see what kind of error you are getting Sun/AppServer/domains/domain1/log/server
Review that and see what that says. It may be giving you a bunch of different errors. In general, though - if she won't start she needs to be uninstalled.
So, uninstall both applications.
Before you install anything make sure that you have the correct jdk installed. For instance, if you are installing NetBeans 6.9.1 IDE, go back and check to make sure you are installing the correct JDK first. I am sorry I don't know what JDK goes with this, but if you check the page/documentation for NetBeans 6.9.1, it should tell you.
Hello, try a custom deployment after, when you do the custom install, since this is a bundle, uncheck the following:
Prelude (Sun GlassFish Enterprise Server v3 prelude) -- if you see that, if not, just keep going.
Also, do you have any system or environment variables that need to be set? What os are you working on?

Launching Eclipse as a debugger

What’s the equivalent of
System.Diagnostics.Debugger.Break();
in the Java world?
Purpose: I have a tomcat based webapp launched by a custom build tool and need to debug the application in eclipse. In the .net world the above statement when encountered will prompt the OS to attach a debugger and I can attach Visual Studio to debug. I am trying to achieve the equivalent in java with eclipse
Here's an excellent article on remote debugging using Eclipse. They even have a section discussing Tomcat.
Here's a link that I used to debug web apps on Tomcat. It goes through installing Eclipse, Tomcat and Java and then setting up Tomcat to run in Eclipse. Towards the bottom explains how to debug a servlet in Eclipse.
http://www.windofkeltia.com/j2ee/wtp-tutorial.html
In general the Java program cannot tell if the JVM runs in debug mode or not, and there is no way to from your program to say that you always want to start a debugger HERE.
You can, however, tell the DEBUGGER that you want to have a breakpoint at a given location, and you will then enter the debugger when the program reaches that spot.
EDIT: You will need to investigate your launcher to see how you can trick it to contain the options needed to enable debugging in the JVM. You may also see if jvisualvm can give you the information you need as it can attach to an unprepared Sun JVM.

Categories