Howto get SQL-stats for JIRA (with Oracle)

143 views
Skip to first unread message

sp...@wmfhome.de

unread,
Jan 21, 2011, 10:20:47 AM1/21/11
to javamelody
Hello,

i put javamelody to my JIRA installation. It's great, but
unfortunately it does not print any SQL statistics.

The log says:
2011-01-21 16:11:42,699 TP-Processor3 DEBUG [net.bull.javamelody]
JavaMelody listener init started
2011-01-21 16:11:42,716 TP-Processor3 DEBUG [net.bull.javamelody]
datasources found in JNDI: [java:comp/env/jdbc/JiraDS]
2011-01-21 16:11:42,724 TP-Processor3 DEBUG [net.bull.javamelody]
datasource rebinded: java:comp/env/jdbc/JiraDS from class
org.apache.commons.dbcp.BasicDataSource to class $Proxy554
2011-01-21 16:11:42,724 TP-Processor3 DEBUG [net.bull.javamelody]
JavaMelody listener init done
2011-01-21 16:11:42,728 TP-Processor3 DEBUG [net.bull.javamelody]
JavaMelody filter init started
2011-01-21 16:11:42,732 TP-Processor3 DEBUG [net.bull.javamelody] OS:
Linux unknown, amd64/64
2011-01-21 16:11:42,732 TP-Processor3 DEBUG [net.bull.javamelody]
Java: Java(TM) SE Runtime Environment, 1.6.0_22-b04
2011-01-21 16:11:42,732 TP-Processor3 DEBUG [net.bull.javamelody]
Server: Apache Tomcat/5.5.23
2011-01-21 16:11:42,733 TP-Processor3 DEBUG [net.bull.javamelody]
Webapp context: /jira
2011-01-21 16:11:42,733 TP-Processor3 DEBUG [net.bull.javamelody]
JavaMelody version: 1.25.0
2011-01-21 16:11:42,734 TP-Processor3 DEBUG [net.bull.javamelody]
Host: somehost.so...@123.123.123.123
2011-01-21 16:11:42,734 TP-Processor3 DEBUG [net.bull.javamelody]
parameter defined: storage-directory=/somepath/javamelody
2011-01-21 16:11:42,734 TP-Processor3 DEBUG [net.bull.javamelody]
parameter defined: http-transform-pattern=-\d+|/\d+|chment/.+|onent/.+|
abel/.+|/x/.+|est/.+|ifact/.+
2011-01-21 16:11:42,734 TP-Processor3 DEBUG [net.bull.javamelody]
parameter defined: system-actions-enabled=true
2011-01-21 16:11:42,734 TP-Processor3 DEBUG [net.bull.javamelody]
parameter defined: rewrap-datasources=true
2011-01-21 16:11:42,734 TP-Processor3 DEBUG [net.bull.javamelody]
parameter defined: analytics-id=UA-1335263-8
2011-01-21 16:11:42,748 TP-Processor3 DEBUG [net.bull.javamelody] log
listeners initialized
2011-01-21 16:11:42,751 TP-Processor3 DEBUG [net.bull.javamelody]
datasources found in JNDI: [java:comp/env/jdbc/JiraDS]
2011-01-21 16:11:42,751 TP-Processor3 DEBUG [net.bull.javamelody]
Datasource needs rewrap: java:comp/env/jdbc/JiraDS of class
org.apache.commons.dbcp.BasicDataSource
2011-01-21 16:11:42,758 TP-Processor3 DEBUG [net.bull.javamelody] job
global listener initialized
2011-01-21 16:11:42,761 TP-Processor3 DEBUG [net.bull.javamelody]
counters initialized
2011-01-21 16:11:42,956 TP-Processor3 DEBUG [net.bull.javamelody]
counters data read from files in /misc/jira/data/javamelody/
jira_jira.integ2.clng.development.easycredit.de
2011-01-21 16:11:42,971 TP-Processor3 DEBUG [net.bull.javamelody]
collect task scheduled every 60s
2011-01-21 16:11:43,312 TP-Processor3 DEBUG [net.bull.javamelody]
first collect of data done
2011-01-21 16:11:43,312 TP-Processor3 DEBUG [net.bull.javamelody]
JavaMelody filter init done

My jira.xml:
<Context path="/jira" docBase="/somepath/jira/webapp" debug="0">
<Resource name="jdbc/JiraDS" auth="Container"
type="javax.sql.DataSource"
username="jira"
password="somepassword"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@db.somedomain.com:1521/servicename"
connectionProperties="SetBigStringTryClob=true"
validationQuery="select 1 from dual"
maxActive="20" />
<Resource name="UserTransaction" auth="Container"
type="javax.transaction.UserTransaction"
factory="org.objectweb.jotm.UserTransactionFactory"
jotm.timeout="60"/>
<Manager pathname=""/>
</Context>

Any hints?

Wolfgang

Emeric Vernat

unread,
Jan 21, 2011, 7:46:32 PM1/21/11
to javam...@googlegroups.com
Hello Wolfgang,

Strange yes.
It currently works for me with javamelody 1.25.0 for jira (4.0.1). My
datasource is in the context in the default conf/server.xml of jira,
whereas your datasource is in the context in a
Catalina/localhost/jira.xml if I understand right. But I do not think
that it changes anything.

And thanks for the log, because there is an issue in this log: you shoud
have "Datasource rewrapped: java:comp/env/jdbc/JiraDS" in the log just
after "Datasource needs rewrap: java:comp/env/jdbc/JiraDS of class
org.apache.commons.dbcp.BasicDataSource".
And yes, the problem is "org.apache.commons.dbcp.BasicDataSource" in
your log, because in Tomcat it is supposed to be
"org.apache.tomcat.dbcp.dbcp.BasicDataSource" for the dataSource from a
jndi context.

Do you know why your Tomcat seems not like "all" the others when it
concerns commons dbcp and the BasicDataSource class ?
I can certainly fix this for the next release and give a patched jar
file tomorrow, but I am curious about where this comes from.

bye, Emeric

Le 21/01/2011 16:20, sp...@wmfhome.de a �crit :

sp...@wmfhome.de

unread,
Jan 24, 2011, 2:45:22 AM1/24/11
to javamelody
Hello Emeric,

yes, my jira.xml is located in Catalina/localhost.
I'm using a standard tomcat 5.5 installation (RHEL 5.5).
According to http://wiki.apache.org/commons/DBCP the
"org.apache.commons.dbcp.BasicDataSource" is used as default when the
type "javax.sql.DataSource" is used.
Would be great if you could provide a fix.

Kind regards,
Wolfgang

On 22 Jan., 01:46, Emeric Vernat <ever...@free.fr> wrote:
> Hello Wolfgang,
>
> Strange yes.
> It currently works for me with javamelody 1.25.0 for jira (4.0.1). My
> datasource is in the context in the default conf/server.xml of jira,
> whereas your datasource is in the context in a
> Catalina/localhost/jira.xml if I understand right. But I do not think
> that it changes anything.
>
> And thanks for the log, because there is an issue in this log: you shoud
> have "Datasource rewrapped: java:comp/env/jdbc/JiraDS" in the log just
> after "Datasource needs rewrap: java:comp/env/jdbc/JiraDS of class
> org.apache.commons.dbcp.BasicDataSource".
> And yes, the problem is "org.apache.commons.dbcp.BasicDataSource" in
> your log, because in Tomcat it is supposed to be
> "org.apache.tomcat.dbcp.dbcp.BasicDataSource" for the dataSource from a
> jndi context.
>
> Do you know why your Tomcat seems not like "all" the others when it
> concerns commons dbcp and the BasicDataSource class ?
> I can certainly fix this for the next release and give a patched jar
> file tomorrow, but I am curious about where this comes from.
>
> bye, Emeric
>
> Le 21/01/2011 16:20, s...@wmfhome.de a crit :
> > Host: somehost.somedomain....@123.123.123.123

Emeric Vernat

unread,
Jan 25, 2011, 3:06:44 PM1/25/11
to javam...@googlegroups.com
Hello again,

I have committed a change in svn which should fix this:
http://code.google.com/p/javamelody/source/detail?r=1677
It is ready for the next release (1.26).

And if you want to try it, I have made a new build of the plugin
including the fix which is available at:
http://javamelody.googlecode.com/files/jira-javamelody-20110125.jar

Please let us know the result.
Thanks, Emeric


Le 24/01/2011 08:45, sp...@wmfhome.de a �crit :

sp...@wmfhome.de

unread,
Jan 27, 2011, 3:27:46 AM1/27/11
to javamelody
Hello Emeric,

it works :-)

Thank you,
Wolfgang
Reply all
Reply to author
Forward
0 new messages