Bug 54168 - NamingContext.close() throws exception in case of read-only context
Summary: NamingContext.close() throws exception in case of read-only context
Status: RESOLVED DUPLICATE of bug 51744
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 7.0.32
Hardware: PC All
: P2 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2012-11-19 14:13 UTC by Oleg Alexeyev
Modified: 2012-11-19 20:54 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Alexeyev 2012-11-19 14:13:35 UTC
The following exception is thrown when closing Context returned for a JNDI resource defined in server.xml:

javax.naming.OperationNotSupportedException: Context is read only
	at org.apache.naming.NamingContext.checkWritable(NamingContext.java:962)
	at org.apache.naming.NamingContext.close(NamingContext.java:762)

Looking at the code it looks like there should be call to isWritable(), not checkWritable, so that it would just return false and close() would do nothing.
Comment 1 Mark Thomas 2012-11-19 20:54:43 UTC

*** This bug has been marked as a duplicate of bug 51744 ***