JNDI Error

293 views
Skip to first unread message

AlanH99

unread,
Feb 24, 2012, 8:00:39 AM2/24/12
to javamelody
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)

Vernat Emeric

unread,
Feb 24, 2012, 8:10:17 PM2/24/12
to javam...@googlegroups.com
Hi,

First, let me say that it's great to see javamelody used in vFabric tc
server.

Then I suggest to try the following build of javamelody which is patched
to behave as if vFabric was Tomcat:
http://javamelody.googlecode.com/files/javamelody-20120225.jar


If it works, I will include that in trunk.

Thanks,
Emeric


Le 24/02/2012 14:00, AlanH99 a �crit :

AlanH99

unread,
Feb 27, 2012, 5:32:59 AM2/27/12
to javamelody
Okay, thanks Emeric.

I have tested that and it works as expected.

Thanks for your help.


Alan
> > WGLAIM1L8N...@169.24.39.130
Reply all
Reply to author
Forward
0 new messages