How to unintegrate jprofile with netbeans - ide

I installed jprofile to investigate a memory leak and also clicked the integrate IDE with netbeans 6.9.1. Runing my Web application worked well when clicking the Profile Project, However, when I want to debug again the project the jprofile is still being run when I just want to debug [i.e. Clicking the debug button instead of Profile]. This causes the debugging to fail all the time.
Glassfish Server Output Console.
JProfiler> Protocol version 33
JProfiler> Using JVMTI
JProfiler> JVMTI version 1.1 detected.
JProfiler> 32-bit library
JProfiler> Listening on port: 33200.
JProfiler> Instrumenting native methods.
JProfiler> Can retransform classes.
JProfiler> Can retransform any class.
JProfiler> Native library initialized
JProfiler> VM initialized
JProfiler> Waiting for a connection from the JProfiler GUI ...
I did not said to profile but still this log shows in the console. I tried to look at any uninstall or unintegrate option within the jprofile and there is non. But the jprofile is also not registered as a plugin when looking at the Tools > Plugins menu. Is there a way to unintegrate jprofile?
Note: I already grepped the whole "C:\Program Files\Netbeans 6.9.1\" folder and already removed the xml config of jprofile plus the jar inside the "modules\" folder. But after restarting netbeans and clicking debug button. It still shows the JProfiler prompt.
1. \NetBeans 6.9.1\ide\config\Modules\com-jprofiler-integrations-netbeans.xml
2. \NetBeans 6.9.1\ide\update\backup\netbeans\config\Modules\com-jprofiler-integrations-netbeans.xml

Debugging should not append the VM parameter for profiling (-agentpath) to the java command, even if the JProfiler integration is installed, so this sounds kind of strange.
Look into the %USERPROFILE%.netbeans\6.9\modules directory and delete com-jprofiler-integrations-netbeans.jar. If that file does not exist either, the -agentpath parameter is added in a different way, maybe explicitly in your debug configuration.

Related

JProfiler doesn't detect running AdoptOpenJDK 11 openJ9

I'm trying to profile a Java app running with AdoptOpenJDK 11 version OpenJ9.
My problem is that, when I try to attach JProfiler on my app, it doesn't detect the running instance.
I'm using the last version of JProfiler (11.1.4).
Is it compatible with this JRE?
Is there something to do/configure to make it working?
Best regards
As of JProfiler 11.0, attach mode is not supported for OpenJ9 JVMs. Also, attach mode is not enabled by default for OpenJ9.
When passing the -agentpath VM parameter as given by the integration wizards, profiling OpenJ9 JVMs is fully supported.

How to setup remote debug on initialization?

I'm trying to set up a remote debug properly. I have already set a remote debug and it works, but it not working on an application initialization stage, which means I can not see how a cache fills and so on.
My environment: Payara 4 (it is Glassfish) and IntelliJ IDEA Community Edition.
How to make a correct setup?
You can suspend the JVM on remote debugging by using suspend=y which make the JVM to wait until the remote debugger is attached.
So the debugger's JVM options will be as below
Java 5-8
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005
Java 9 and later
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
Note: Adjust the port based on your settings.

How to start WebLogic in profiling mode?

No information found for this. Is there any way to start weblogic in profiling mode? Or, maybe, it's activated by default?
Profiling action can be initiated 2 ways
1) Pass the profiling action while you execute the startWeblogic.sh. Following parameters can be appended
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8010
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
2) The same parameters can be appended from startup tab in weblogic server
Here's what i got. Mainly focused on remote profiling using NetBeans
generated remote profiling package for target OS and JVM architecture (32 or 64 bit) (Netbeans -> Profile -> Attach Profiler -> Change link, select OS and Java platform -> click "Create a remote profiling package" link)
copy this package to target machine
execute calibration script (calibrate.bat / calibrate.sh (chmod +x))
add specific argument to java_otps with path to this package
-agentpath:PathToProfilerPackage\lib\deployed\jdk16\windows-amd64\profilerinterface.dll=PathToProfilerPackage\lib,5140
restart weblogic. Startup will be interrupted until remote profiler connected
connect to a server using NetBeans profiler. Weblogic startup will continue.
However, i still can't download heap dump (which is available when attaching to local java.exe Weblogic process) but that's something.

JProfiler GUI on local windows machine can't connect to remote Linux server machine

1) I ran my server program on a linux machine, remotely.
JProfiler> Protocol version 41
JProfiler> Using JVMTI
JProfiler> JVMTI version 1.1 detected.
JProfiler> 64-bit library
JProfiler> Listening on port: 8849.
JProfiler> Instrumenting native methods.
JProfiler> Can retransform classes.
JProfiler> Can retransform any class.
JProfiler> Native library initialized
JProfiler> VM initialized
JProfiler> Waiting for a connection from the JProfiler GUI ...
2) I then try to connect my profiler GUI from my local windows machine. I got the config.xml from the server generated by JProfiler and imported it via the GUI. When I try to connect, I get a "Connection status" in progress forever.
i am able to telnet to the Linux machine to the specific port, 8849.
Interestingly, when i kill the server on the Linux machine, the "Connection status" dialog box on my GUI is also killed. And it shows this message.
"Either an old version of the native library is used or another application is listening on port 8849. Please check your PATH environment variable and your port configuration".
I've found out my issue. My client side has version 8.07 while my server side has version 8.10. After I upgrade my client side, everything works.

Red5: Error: Could not find or load main class org.red5.server.Bootstrap

I am doing a red5 eclipse integration using the following directions:
https://docs.google.com/document/d/1GncMDOEeUSyWxm6OM1Cedtl6BeJ2ppU-J-TIIKODreo/edit#heading=h.crcr7jpvtmhj
Versions: java8
Red5: 1.0.2-RC4
When I am starting the red5-server as java application debug, it is working fine
But on starting the server in the last step I am getting the following error
Running on Linux
Starting Red5
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option UseStringCache; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release
Listening for transport dt_socket at address: 8787
Error: Could not find or load main class org.red5.server.Bootstrap
Build and / or use the tarball or zip file; extract the jars and you'll have a server jar and another jar containing the bootstrap class. For version 1.0.2 I believe it will be named red5-bootstrap.jar; the sh and bat files will contain the correct jar file paths.