Why JConsole can't lunch or start - java

I am facing issue here JConsole is not running.
Even though in my system hsperfdata_USERNAME directory and pid file also created. After that I try to run jconsole from the command line neither it shows any error nor i am seeing jconsole is running .
Today I have install JdK9 and I am facing this issue.
Please refer below image, thanks in advance for any kind of information or help.
I have refer this link and tried but still i could not start Jconsole.

Related

Unable to run VisualVM with Intellij or commandline

I downloaded visualvm 2.0.6 (currently latest) on windows.
I tried making the following attempts:
Integrating VisualVM with Intellij IDEA.
I installed VisualVM Launcher plugin.
Set the VisualVM executable path bin/visualvm.exe
Executing Run
VisualVM window opens up.
My program completed execution.
VisualVm shows this error: can not open requested application
Tried all solutions from this stackoverflow post.
Executing Debug
VisualVM window opens up.
I can see my application inside the Application node.
Visualvm freezes completely and I cannot click/open my application to profile it. I had to end the task from the task manager.
Commandline way
After seeing no results from above, I tried to run my application normally using the command line.
Opened visualvm.exe.
Opened cmd, and executed the regular java command:
java -classpath "path/to/all/jars/dependencies/" main.Main
Program completed execution, but visualvm didn't show anything.
Other solutions from StackOverflow posts:
All the following didn't work:
Gave full access to folder %temp%/hsperfdata_<username>. [post]
Deleted %temp%/hsperfdata_<username> and closed all java applications, restarted VisualVM (which recreated the hsperfdata folder), and tried again. [post]
Explicitly tried to set the java.io.tmpdir while running VisualVm. [post]
visualvm -J-Djava.io.tmpdir=[path/to/hsperfdata_<username>]
Tried opening Intellij & cmd as administrators and run visualvm. [post]
Is there any step/process I am missing?
If any more information is required, let me know.
Shall I try any other open-source alternative for VisualVM?

Apache Tomcat will not start on Mac

I cannot get Apache Tomcat to start. I followed the instructions for installing Tomcat on the Mac found at https://www.dev2qa.com/how-to-install-tomcat-in-macos/.
After I type the command to start Tomcat, the response from the command line is that Tomcat has started.
However, when I go to the browser, the default page is not showing up. I further checked to see if the port was being used by using the command
lsof -nP -i4TCP:8080 | grep LISTEN
which showed that no program is using the port. I also read the 'RUNNING.txt' that instructed me on setting the environmental variables, which I did. Any suggestions on why Tomcat is not starting up.
I'm using jdk 1.8.0_202 and Apache Tomcat 9.0.14 that is running of Mac OS High Sierra.
BatChmod
After downloading a fresh version of Tomcat, I use the BatChmod app to alter the file permissions. Tomcat will not launch properly without altering the permissions.
I do not know the command-line equivalent, but here is a screenshot of the settings I have used for years successfully.
Plea for help
If anyone can write the equivalent as a shell script for macOS, please post!
Even better, explain how to wrap such a script as an AppleScript for drag-and-drop execution in Finder.
The problem turned out to be a permissions problem. When I installed Tomcat, I put the folder in the '/Library/Tomcat' directory. Even though the Tomcat files were changed to be executable, the user and group ownership remained the same. To get Tomcat to run, I moved the directory to 'Users/MyUserName/Tomcat'. Once I did that, the default Tomcat page ran.

Error starting Wildfly 10.0.0.Final

I haven't been able to find a specific answer to what could be causing this issue though I am hoping it is something quite simple.
Issue.
I have installed version 10.0.0.Final from the Wildfly website and extracted into C:\Program Files\wildfly-10.0.0.Final.
I then navigate to C:\Program Files\wildfly-10.0.0.Final\bin directory via windows command prompt and execute the standalone.bat command.
Wildfly doesn't start and I get the following exception:
java.lang.IllegalArgumentException: Failed to instantiate class "org.jboss.logmanager.handlers.PeriodicRotatingFileHandler" for handler "FILE"
If anyone has encountered this error message before, then your guidance would be greatly appreciated.
Thanks!
Ben
The error appears to be a result of either file permissions on the JBoss home directory, lack of space available, or a missing directory.
Relevant posts include:
Starting WildFly 8.2 under a user with limited permissions
Which suggests setting the JBOSS_BASE_DIR property to the root folder of the JBoss installation.
https://github.com/jboss-dockerfiles/wildfly/issues/24
Suggests this can occur if the root folder does not have enough space allocated for the user (typically running in Unix environments).
Error in starting Wildfly 8.0 server with JDK 1.8
The logs/boot.log didn't exist. The author manually created the file which then revealed a permission issue on the log file (more likely on the entire Jboss installation folder).
The issue was caused due to the command prompt. As I am using windows 10, I needed to be using Command Prompt (Admin),rather than just the normal cmd hence the permission issues alluded to previously by pczeus.
After using Command Prompt (Admin), I was able to start the server.

Error when starting Datomic shell: java.lang.NoClassDefFoundError: jline/ConsoleRunner

I followed the instructions on the Datomic site: http://docs.datomic.com/getting-started.html, but I'm getting this error when trying to start up the datomic shell prompt. I'm using a windows machine. Any suggestions? I tried the same thing on my linux box and did not get this error.
Edit: moved to a different windows machine and it's working. If I have time to troubleshoot this problem and I find a solution I'll report back
I noticed that you cannot run the shell.cmd from within the bin directory, you need to call it with bin\shell.cmd from the parent directory... hope that helps.
In case you are using cygwin/bash and call bin/shell :
The java runtime on windows does not understand classpath with a ":"
but this is what you get from bin/classpath.
Either correct this or use DOS-CMD shell and call bin/shell.cmd inside.
Regards
Some tips for running datomic on Windows (7 at least):
Do not download datomic into Program Files. On startup, it creates logging directories and temp files into its own directories, so unless you run the command prompt as Administrator, you're gonna have screens full of Unable to write to file... errors.
You need to run datomic as such (assuming you extracted the download to C:)
c:\datomic-free-0.x.xxxx>bin\shell.cmd
Note the backslash. Tripped me up forever coming from *nix world.
After that, return to your regularly scheduled datomic tutorials.

What can be the reasons that Spring STS hangs?

Sometimes on the start STS hangs.
Does it possible found the reason? May be exists log or possible start in debug mode?
Also how I can distinguish between hangs completely and working very slowly?
Thanks.
P.S. How to fix ?
That is usually for the same resons descibed here tricks-to-speed-up-eclipse.
Garbage collection or validation.
If you have enough RAM I would suggest that you set -Xmx768m or higher (in eclipse.ini).
Under Windows->Preferences->Validation you can switch off a lot of stuff.
My STS hanged when I tried to start it. Couldn't tell why.
Doing this fixed things for me:
Shut down eclipse and then navigate to /.metadata/.plugins/org.eclipse.core.resources and remove the .snap file.
Courtesy: https://doctorjw.wordpress.com/2011/12/05/eclipse-locking-upnot-responding-try-this/
There's a log file I think it's in .metadata/.log in the workspace used. To see if memory causes the issue, and it usually does, try to run jconsole (part of the JDK) and connect to the running eclipse process, and see the memory stats.
Ensure that STS is running with admin privileges to avoid permission problems.
In ubuntu edit the following line in STS.desktop launch file:
Exec=gksu /etc/springsource/sts-3.4.0.RELEASE/STS
Complete file:
[Desktop Entry]
Name=STS
Comment=SpringSource Tool Suite
Exec=gksu /etc/springsource/sts-3.4.0.RELEASE/STS
Icon=/etc/springsource/sts-3.4.0.RELEASE/icon.xpm
StartupNotify=true
Terminal=false
Type=Application
Categories=Development;IDE;Java;

Categories