I have an Oracle JNDI datasource configured in context.xml for
deployment to Tomcat 6.
The datasource is used by Spring, definition:
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/trsa"/>
I have added a basic JMelody configuration to my application but get
no SQL stats.
On application startup I get the following debug output which would
indicate some issue with the JNDI preventing SQL stats.
Can you advise?
Thanks.
2012-02-24 12:59:04,093 [main] DEBUG net.bull.javamelody - JavaMelody
filter init started
2012-02-24 12:59:04,109 [main] DEBUG net.bull.javamelody - OS: Windows
XP Service Pack 3, x86/32
2012-02-24 12:59:04,109 [main] DEBUG net.bull.javamelody - Java:
Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_10-b03
2012-02-24 12:59:04,109 [main] DEBUG net.bull.javamelody - Server:
VMware vFabric tc Runtime 2.6.1.RELEASE/6.0.33.A.RELEASE
2012-02-24 12:59:04,109 [main] DEBUG net.bull.javamelody - Webapp
context: /trsa-web
2012-02-24 12:59:04,109 [main] DEBUG net.bull.javamelody - JavaMelody
version: 1.34.0
2012-02-24 12:59:04,109 [main] DEBUG net.bull.javamelody - Host:
WGLAIM...@169.24.39.130
2012-02-24 12:59:04,124 [main] DEBUG net.bull.javamelody - log
listeners initialized
2012-02-24 12:59:04,156 [main] DEBUG net.bull.javamelody - datasources
found in JNDI: [java:comp/env/jdbc/trsa]
2012-02-24 12:59:04,187 [main] DEBUG net.bull.javamelody - rebinding
datasources failed, skipping
javax.naming.NamingException: Context is read only
at org.apache.naming.NamingContext.checkWritable(NamingContext.java:
903)
at org.apache.naming.NamingContext.bind(NamingContext.java:831)
at org.apache.naming.NamingContext.rebind(NamingContext.java:208)
at org.apache.naming.NamingContext.rebind(NamingContext.java:223)
at org.apache.naming.SelectorContext.rebind(SelectorContext.java:222)
at javax.naming.InitialContext.rebind(InitialContext.java:367)
at
net.bull.javamelody.JdbcWrapperHelper.rebindDataSource(JdbcWrapperHelper.java:
106)
at net.bull.javamelody.JdbcWrapper.rebindDataSources(JdbcWrapper.java:
391)
at net.bull.javamelody.FilterContext.<init>(FilterContext.java:80)
at net.bull.javamelody.MonitoringFilter.init(MonitoringFilter.java:
98)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:
295)