https://issues.apache.org/bugzilla/show_bug.cgi?id=49600
Summary: Bad exception thrown by ProxyDirContext.lookup
Product: Tomcat 7
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=25766)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25766)
Unit tests illustrating the problems
Two problems with exception thrown by ProxyDirContext.lookup
- ProxyDirContext.lookup throws notFoundException when the entry doesn't exist.
notFoundException is a field and therefore initialized at ProxyDirContext
creation.
The consequence is that the exception thrown contains a stacktrace that has
nothing to do with the current execution stack. This makes difficult to find
the root cause of a problem. If this is really an optimization (what is the
gain), then what about making this field static?
- ProxyDirContext.lookup is not consistent: for the same call it may throw
NamingException or NameNotFoundException depending whether the cache has been
used or not.
Problems occur in Tomcat 6 and 7.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]