File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exceptions while running jconsole in Fedroa linux

 
Ajay Vikas
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am experiencing following exceptions while running jconsole over Linux. I believe i might have missed some settings. Please help me over this.

Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
at java.awt.Window.<init>(Window.java:406)
at java.awt.Frame.<init>(Frame.java:402)
at javax.swing.JFrame.<init>(JFrame.java:207)
at sun.tools.jconsole.JConsole.<init>(JConsole.java:96)
at sun.tools.jconsole.JConsole$6.run(JConsole.java:746)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

Thank you!!!

Regards,
Ajay Vikas.
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HeadlessException is caused by running an application which requires a GUI rendering feature (including functionality like printing or creating images on the fly) on a platform which does not have a graphical interface (like Xwindows). Since jconsole is a GUI program, I can't imagine why you'd be trying to run it on a headless platform. If you are trying to monitor a server application, you should set up your application for remote monitoring and run jconsole on a workstation.
Using Jconsole to Monitor Applications
 
Ajay Vikas
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Joe. URL you posted is useful.

MY query is is how can i run jconsole over Linux. I need to view VM statistics of my tomcat server and its consumption of memory.
Please help me over this.

Thank you !!!

--
Ajay Vikas.
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JConsole can monitor a VM remotely. I think this is what you have to do since you have a headless Linux server.
 
Ajay Vikas
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is an option to do so , but i am interested to do in Linux as standalone VM reading.
 
Ajay Vikas
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just interested to run as in Windows. Also there is any possibility to do so.
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ajay Vikas:
There is an option to do so , but i am interested to do in Linux as standalone VM reading.


Jconsole is a GUI program. You can't run it on a headless server.

Originally posted by Ajay Vikas:

Just interested to run as in Windows. Also there is any possibility to do so.

Are you asking if you can monitor a Linux server using JConsole on a Windows computer? The answer is yes.
 
Ajay Vikas
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Joe. I got my replies what i need exactly. Ok i shall monitor Linux java VM from windows.

Thank you for your time.

--
Ajay Vikas.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17622
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't have to monitor from Windows, you just have to monitor from a machine that's running a GUI. X for Linux would do just as well.

All "headless" operation is is operating without a display head - which is to say, a windowing system. Servers will usually operate more efficiently that way, since the GUI overhead is easily 100MB or more of RAM these days, but without the GUI, all you can do is work with text.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic