Hi,
I'm running JBoss profiler version 2 in JBoss 4.2.2. I have followed the instructions
in the README.txt verbatim, but cannot get it to 'log' any method calls.
My setup is as follows:
- Windows XP machine
- Compiled JBoss Profiler version 2 from svn (at version 423) using the build file -
resulted in dist dir from which all artefacts are taken
- Copied jboss-profiler.jar to JBOSS_HOME/bin
- Copied jboss-profiler.properties to JBOSS_HOME/bin
- Copied jboss-profiler-plugins.jar to JBOSS_HOME/bin
- Copied jboss-profiler.sar to JBOSS_HOME/server/default/deploy
- Edited run.bat to include the following line:
set JAVA_OPTS=%JAVA_OPTS% -javaagent:jboss-profiler.jar
-Djboss-profiler.properties=jboss-profiler.properties
My jboss-profiler.properties file looks as follows:
| core=javassist
| enable=yes
| cpu=yes
| memory=yes
| includes=com.sadalbari.demo.ejb3.*
| excludes=*
| visibility=private
| save=yes
| startup=yes
| repository=no
| remote=yes
| store=memory
| location=.
| host=localhost
| port=5400
| ejb=yes
| servlet=yes
| jsf=yes
| jmx=yes
| rmi=yes
| corba=yes
| plugin.1=org.jboss.profiler.plugins.Hibernate
|
I then boot jboss. I notice the following lines on the console which indicate to me that
I have configured 'correctly':
| D:\servers\jboss\jboss-4.2.2.GA\bin>run -b 127.0.0.1
| ===============================================================================
|
| JBoss Bootstrap Environment
|
| JBOSS_HOME: D:\servers\jboss\jboss-4.2.2.GA
|
| JAVA: C:\dev\java\jdk1.5.0_14\bin\java
|
| JAVA_OPTS: -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n
-Dprogram.name=run.bat -server -Dsun.rmi.dgc.c
| lient.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
-Dewage.configuration-name=justin -Dorg.apache.tapestry.disable-c
| aching=true -Xms64m -Xmx256m -XX:MaxPermSize=128m -javaagent:jboss-profiler.jar
-Djboss-profiler.properties=jboss-profiler.propert
| ies
|
| CLASSPATH:
C:\dev\java\jdk1.5.0_14\lib\tools.jar;D:\servers\jboss\jboss-4.2.2.GA\bin\run.jar
|
| ===============================================================================
|
| JBoss Profiler 2.0.CR9 (Sun Microsystems Inc. 1.5.0_14)
| JBoss Profiler depends on external communication module
| Listening for transport dt_socket at address: 8787
| 21:38:08,187 INFO [Server] Starting JBoss (MX MicroKernel)...
| ...
| ...
|
etc etc
There are no errors in my log file.
I also have a simple EJB3 session bean which I wish to profile, which starts up correctly.
The bean implementation class is in the package com.sadalbari.demo.ejb3
I then invoke my bean a number of times from a test client. The bean creates 1000
instances of a POJO class, SomeClass (in the same package) during its invocation.
I then shutdown the server (shutdown.bat -S), at which point the server exits gracefully
leaving my with a timestamped .jps file
I then run the command:
java -Xmx512m -Djboss-profiler-client.properties=jboss-profiler-client.properties -jar
jboss-profiler-client.jar load <file-name>.jps
on the file, which produces a directory.
A directory with the timestamped name is created containing the files:
classes.txt
hotspots.txt
methods.txt
overview.txt
and two directories:
classes
threads
The classed directory contains 2 files:
com.sadalbari.demo.ejb3.EJB3SessionBean.txt
com.sadalbari.demo.ejb3.SomeClass.txt
None of these files contain any evidence of a method invocation/thread usage. For
example, overview.txt:
| From: 17 April 2008 21:38:07:875
| To : 17 April 2008 21:44:02:812
|
| Threads:
| ========
|
| Most time:
| ==========
| Count Ms % Method
|
| Hotspots:
| =========
| Count Ms Avg % Method
|
| Classes:
| ========
| com.sadalbari.demo.ejb3.EJB3SessionBean EJB_SESSION 0.00 ms
| com.sadalbari.demo.ejb3.SomeClass POJO 0.00 ms
|
com.sadalbari.demo.ejb3.SomeClass.txt is as follows:
| com.sadalbari.demo.ejb3.SomeClass POJO
| Total time: 0.00 ms
| Wait time: 0.00 ms
|
| Methods:
| ========
| Count Ms % (C) % (T) Method
|
| Hotspots:
| =========
| Count Ms Avg % Method
|
I've done a bit of digging/messing and my feeling is that there is something wrong
with the MANIFEST of the jboss-profiler.jar file.
This file contains the following entry (on one line)
Boot-Class-Path: jboss-profiler.jar jboss-profiler-connectors.jar
jboss-profiler-plugins.jar asm.jar javassist.jar ../lib/javassist.jar jboss-remoting.jar
jboss-common.jar concurrent.jar log4j.jar
o Very few of these jars are resolveable from the location in which the startup script is
inited (JBOSS_HOME/bin).
o A number of them don't even exist in jboss (for example
jboss-profiler-connectors.jar which _is_ part of the profiler build, but was not mentioned
in any setup step)
o Why is asm.jar repeated?
I tried cleaning up as far as possible and pointing to the jars in the jboss installation.
As I went along I got a number of NoClassDefFoundError exceptions, which I resolved by
adding the jars to the Boot-Class-Path. For example, when I resolved the
jboss-remoting.jar correctly (I actually just copied the jar to the bin directory), I got
Caused by: java.lang.NoClassDefFoundError:
org/jboss/mx/util/JBossNotificationBroadcasterSupport
at org.jboss.remoting.network.NetworkRegistry.(NetworkRegistry.java:55)
Eventually I got to a point where I got a NPE in the JBoss boot sequence.
Has anybody got the profiler working properly with JBoss 4.2.2? Any help would be
appreciated.
----
BTW - there is also an error in /JBossProfiler2/src/etc/jboss-service.xml:
false
is repeated twice, once with true, the second time with the value false
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4144989#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...