0

I want to profile a Java EE application runs on JBoss 4. I use Ubuntu . Java 1.5. JProfiler 8.0.1. Server is Jboss 4. Once I set the host as localhost and try to profile,(New Session -> Attach -> Attach to profile JVM(Local or remote) ) JProfiler says, "Could not connect to localhost:8849. Please make sure that the remote address is correct ". But in the terminal, it shows the JBoss starting and I can access the web applications as well. I want to trace all creating java Ojbects and their sizes. How can I solve this issue ?

EDIT: The error log file of JProfiler shows.

sun.awt.X11.XException: Cannot write XdndAware property
at sun.awt.X11.XDnDDropTargetProtocol.registerDropTarget(Unknown Source)
at sun.awt.X11.XDropTargetRegistry.registerDropSite(Unknown Source)
at sun.awt.X11.XWindowPeer.addDropTarget(Unknown Source)
at sun.awt.X11.XComponentPeer.addDropTarget(Unknown Source)
at java.awt.dnd.DropTarget.addNotify(Unknown Source)
at java.awt.Component.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addImpl(Unknown Source)
at java.awt.Container.add(Unknown Source)
at com.ejt.framework.gui.aq.b(ejt:290)
at com.ejt.framework.wizard.o.b(ejt:43)
at com.ejt.framework.wizard.o.<init>(ejt:18)
at com.ejt.framework.wizard.g.b(ejt:125)
at com.jprofiler.frontend.d.a.p.actionPerformed(ejt:29)
at com.jprofiler.frontend.g.g.l(ejt:63)
at com.jprofiler.frontend.g.g.a(ejt:17)
at com.jprofiler.frontend.g.h.run(ejt:56)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$400(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Débora
  • 5,816
  • 28
  • 99
  • 171
  • 1
    java 5?!?!?!?!?!?!?!??!?!?!?!! (*quietly sheds a tear*) – SnakeDoc Oct 01 '13 at 14:52
  • Because of another concern, java 5 should be used. :) – Débora Oct 01 '13 at 14:54
  • Which port is JBoss running? I believe the profiler attaches to a different port (8849). Can you do a netstat and see if there is something listening at 8849 for incoming connections? Can you check this: http://stackoverflow.com/questions/8053484/how-to-connect-jprofiler-to-an-application-running-on-localhost – Praba Oct 01 '13 at 14:59
  • yes, but its possible jprofiler's latest release has dropped j5 support (possibly, i don't know for sure). j5 has been EOL since 2009. :( even java 6 is EOL earlier this year – SnakeDoc Oct 01 '13 at 14:59
  • JBoss listening : 8080. How ever, in JPRofiler download page, they say, it supports java 5 !!! And the port 8849 is not being used by another process . – Débora Oct 01 '13 at 15:01

1 Answers1

0

Probably JBoss is not profiled, i.e. the profiling agent is not loaded.

You have to use the integration wizard to modify the JBoss start script.

Invoke

Session->Integration wizards->New Server Integration

select JBoss 4.x and follow the steps in the wizard.

Ingo Kegel
  • 46,523
  • 10
  • 71
  • 102