miaoyf / javamelody

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

Unable to view jdbc connections and sql hits for tomcat jdbc connection pool using java melody. #382

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

My App has tomcat jdbc connection pool( 
https://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html ) deployed over 
tomcat 7 .I am unable to view the jdbc connections and sql hits using java 
melody.

What is the expected output? What do you see instead?
Alway 0 for "active jdbc connection","Used jdbc connection" and 0 sql hits.

What version of the product are you using? On what application server, JDK,
operating system?
OS:     Ubuntu
Java:   OpenJDK Runtime Environment, 1.7.0_25-b30
JVM:    OpenJDK 64-Bit Server VM, 23.7-b01, mixed mode
App server: Tomcat 7.0
Java Melody: 1.49

Please provide any additional information below.

My web.xml config:
<filter>
        <filter-name>monitoring</filter-name>
        <filter-class>net.bull.javamelody.MonitoringFilter</filter-class>

    </filter>
    <filter-mapping>
        <filter-name>monitoring</filter-name>
           <url-pattern>/*</url-pattern>
    </filter-mapping>
    <listener>
        <listener-class>net.bull.javamelody.SessionListener</listener-class>
    </listener> 

My context.xml:
<Resource type="javax.sql.DataSource" 
       name="jdbc/TESTDB" 
       factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" 
       driverClassName="com.mysql.jdbc.Driver" 
       url="jdbc:mysql://localhost:3306/TESTDB"
       username="XXX" 
       password="XXX" 
       initialSize="5" 
       maxActive="20" 
       maxIdle="2" 
       minIdle="1" 
       testOnBorrow="true" 
       validationQuery="select 1 from dual" 
       commitOnReturn="true" 
       alternateUsernameAllowed="true"
       /> 
Any help would be appriciated.

Regards,
Megha R M
9916525464

Original issue reported on code.google.com by megha....@gmail.com on 18 Feb 2014 at 7:33

GoogleCodeExporter commented 8 years ago
Debugging Logs:

Debugging logs:
Tue Feb 18 13:20:52 IST 2014     DEBUG     JavaMelody listener init started
Tue Feb 18 13:20:52 IST 2014     DEBUG     datasources found in JNDI: 
[java:comp/env/jdbc/TESTDB, java:comp/env/jdbc/TEST1DB, 
java:comp/env/jdbc/TEST2DB]
Tue Feb 18 13:20:52 IST 2014     DEBUG     datasource rebinded: 
java:comp/env/jdbc/TESTDB from class org.apache.tomcat.jdbc.pool.DataSource to 
class com.sun.proxy.$Proxy6
Tue Feb 18 13:20:52 IST 2014     DEBUG     datasource rebinded: 
java:comp/env/jdbc/TEST1DB from class org.apache.tomcat.jdbc.pool.DataSource to 
class com.sun.proxy.$Proxy6
Tue Feb 18 13:20:52 IST 2014     DEBUG     datasource rebinded: 
java:comp/env/jdbc/TEST2DB from class org.apache.tomcat.jdbc.pool.DataSource to 
class com.sun.proxy.$Proxy6
Tue Feb 18 13:20:52 IST 2014     DEBUG     JavaMelody listener init done in 354 
ms
Tue Feb 18 13:20:58 IST 2014     DEBUG     JavaMelody filter init started
Tue Feb 18 13:20:58 IST 2014     DEBUG     OS: Linux unknown, amd64/64
Tue Feb 18 13:20:58 IST 2014     DEBUG     Java: OpenJDK Runtime Environment, 
1.7.0_25-b30
Tue Feb 18 13:20:58 IST 2014     DEBUG     Server: Apache Tomcat/7.0.30
Tue Feb 18 13:20:58 IST 2014     DEBUG     Webapp context: /TEST
Tue Feb 18 13:20:58 IST 2014     DEBUG     JavaMelody version: 1.49.0
Tue Feb 18 13:20:58 IST 2014     DEBUG     JavaMelody classes loaded from: 
file:/xyz/TEST/TESTGUI/WEB-INF/lib/javamelody-1.49.0.jar
Tue Feb 18 13:20:58 IST 2014     DEBUG     Host: test1-OptiPlex-GX620@127.0.1.1
Tue Feb 18 13:20:58 IST 2014     DEBUG     log listeners initialized
Tue Feb 18 13:20:58 IST 2014     DEBUG     datasources found in JNDI: 
[java:comp/env/jdbc/TESTDB, java:comp/env/jdbc/TEST1DB, 
java:comp/env/jdbc/TEST2DB]
Tue Feb 18 13:20:58 IST 2014     DEBUG     counters initialized
Tue Feb 18 13:20:58 IST 2014     DEBUG     counters data read from files in 
/tmp/tomcat7-tomcat7-tmp/javamelody/TEST_test1-OptiPlex-GX620
Tue Feb 18 13:20:58 IST 2014     DEBUG     collect task scheduled every 60s
Tue Feb 18 13:21:00 IST 2014     DEBUG     first collect of data done
Tue Feb 18 13:21:00 IST 2014     DEBUG     JavaMelody filter init done in 2122 
ms

Original comment by megha....@gmail.com on 18 Feb 2014 at 7:45

GoogleCodeExporter commented 8 years ago
Are you able to give the sources of a simple project, using Maven if possible, 
to reproduce the issue?

Original comment by evernat@free.fr on 20 Feb 2014 at 8:37

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
After deploying the java melody jars,I am still viewing active jdbc and used 
jdbc connection values as 0 eventhough total pool size is dipicting properly.I 
have reduced the data collection time by setting:
javamelody.resolution-seconds=1 in my catalina.properties.

I am able to see sql statistics and sql hits per minute(just a single value for 
a whole day).

Please have a look over the snapshots attached and provide your inputs.

Original comment by megha....@gmail.com on 21 Feb 2014 at 1:18

Attachments:

GoogleCodeExporter commented 8 years ago
OK, a single SQL value for a whole day.
This does not seem like a really used app anyway.
Are you able to give the sources of a simple project, using Maven if possible, 
to reproduce the issue?
Or can we close this?
Thanks

Original comment by evernat@free.fr on 22 Feb 2014 at 3:40

GoogleCodeExporter commented 8 years ago
No response and no way to reproduce the issue. So resolving the issue as 
invalid/incomplete.

Original comment by evernat@free.fr on 8 Mar 2014 at 9:58