fengshao0907 / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

SQL monitoring doesn't work on SpringSource tc Runtime #303

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Deployment of an application with JavaMelody to a SpringSource tc Runtime 
instance.

What is the expected output? SQL Statistics. 
What do you see instead? Nothing in the SQL Statistics area of the JavaMelody 
report.  I only see "rebinding datasources failed, skipping" in the debug logs.

What version of the product are you using? On what application server, JDK, 
operating system?  See debug logs below.

When I took a quick look at the source code, it appears that the issue is in 
JdbcWrapperHelper.java in method changeContextWritable().  There is an if 
statement that is checking for "Tomcat" and "vFabric" that I believe should be 
checking for "SpringSource tc Runtime" as well.

Please provide any additional information below.

Thu Apr 25 07:00:27 CDT 2013     DEBUG     guice interceptor initialized
Thu Apr 25 07:00:27 CDT 2013     DEBUG     JavaMelody listener init started
Thu Apr 25 07:00:27 CDT 2013     DEBUG     datasources found in JNDI: 
[java:/comp/env/jdbc/xxxxxx]
Thu Apr 25 07:00:27 CDT 2013     DEBUG     rebinding datasources failed, 
skipping
Thu Apr 25 07:00:27 CDT 2013     DEBUG     JavaMelody listener init done in 5 ms
Thu Apr 25 07:00:28 CDT 2013     DEBUG     JavaMelody filter init started
Thu Apr 25 07:00:28 CDT 2013     DEBUG     OS: Linux unknown, amd64/64
Thu Apr 25 07:00:28 CDT 2013     DEBUG     Java: Java(TM) SE Runtime 
Environment, 1.6.0_26-b03
Thu Apr 25 07:00:28 CDT 2013     DEBUG     Server: SpringSource tc Runtime 
2.5.1.RELEASE/7.0.16.A.RELEASE
Thu Apr 25 07:00:28 CDT 2013     DEBUG     Webapp context: /xxxxxxxxx
Thu Apr 25 07:00:28 CDT 2013     DEBUG     JavaMelody version: 1.44.0
Thu Apr 25 07:00:28 CDT 2013     DEBUG     JavaMelody classes loaded from: 
file:/xxxxxxxxxxxxxxxx/WEB-INF/lib/ivy-net.bull-javamelody-javamelody-1.44.0.jar
Thu Apr 25 07:00:28 CDT 2013     DEBUG     Host: xxxxx@xx.xx.xx.xx
Thu Apr 25 07:00:28 CDT 2013     DEBUG     parameter defined: 
storage-directory=/data/xxxxxxxxxxxxxx
Thu Apr 25 07:00:28 CDT 2013     DEBUG     parameter defined: 
datasources=java:/comp/env/jdbc/xxxxxx
Thu Apr 25 07:00:28 CDT 2013     DEBUG     parameter defined: 
monitoring-path=/admin/monitoring
Thu Apr 25 07:00:28 CDT 2013     DEBUG     log listeners initialized
Thu Apr 25 07:00:28 CDT 2013     DEBUG     datasources found in JNDI: 
[java:/comp/env/jdbc/xxxxxx]
Thu Apr 25 07:00:28 CDT 2013     DEBUG     rebinding datasources failed, 
skipping
Thu Apr 25 07:00:28 CDT 2013     DEBUG     counters initialized
Thu Apr 25 07:00:28 CDT 2013     DEBUG     counters data read from files in 
/data/xxxxxxxxxxxxxx
Thu Apr 25 07:00:28 CDT 2013     DEBUG     collect task scheduled every 60s
Thu Apr 25 07:00:28 CDT 2013     DEBUG     first collect of data done
Thu Apr 25 07:00:28 CDT 2013     DEBUG     JavaMelody filter init done in 300 ms

Original issue reported on code.google.com by tim.t.pr...@gmail.com on 25 Apr 2013 at 1:21

GoogleCodeExporter commented 9 years ago
Using the current trunk, I have added "SpringSource tc Runtime" like "vFabric".
And I have made a new build from that, which is available at:
http://javamelody.googlecode.com/files/javamelody-20130427.jar

Does this new build work for you?
If yes, I will commit that in trunk.

Original comment by evernat@free.fr on 27 Apr 2013 at 2:04

GoogleCodeExporter commented 9 years ago
Yes!  That works perfectly for us.

Much appreciated.

Tim

Sat Apr 27 09:36:23 CDT 2013     DEBUG     guice interceptor initialized
Sat Apr 27 09:36:23 CDT 2013     DEBUG     JavaMelody listener init started
Sat Apr 27 09:36:23 CDT 2013     DEBUG     datasources found in JNDI: 
[java:/comp/env/jdbc/xxxxxx]
Sat Apr 27 09:36:23 CDT 2013     DEBUG     datasource rebinded: 
java:/comp/env/jdbc/xxxxxx from class org.apache.tomcat.jdbc.pool.DataSource to 
class $Proxy22
Sat Apr 27 09:36:23 CDT 2013     DEBUG     JavaMelody listener init done in 6 ms
Sat Apr 27 09:36:24 CDT 2013     DEBUG     JavaMelody filter init started
(snip)

Original comment by tim.t.pr...@gmail.com on 27 Apr 2013 at 2:41

GoogleCodeExporter commented 9 years ago
It's committed in trunk (revision 3386) and ready for the next release (1.45)

Original comment by evernat@free.fr on 27 Apr 2013 at 5:16