Summary: | JNDI Datasource lookup failure - throws javax.naming.NamingException | ||
---|---|---|---|
Product: | Tomcat 8 | Reporter: | Per Carlson <per.carlson> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | regression | CC: | per.carlson |
Priority: | P2 | ||
Version: | 8.0.37 | ||
Target Milestone: | ---- | ||
Hardware: | PC | ||
OS: | Linux | ||
Attachments: |
server.xml
svvint/datasource1-include.xml svvconf/context1-include.xml context.xml |
Description
Per Carlson
2016-09-19 19:33:47 UTC
Configuration please. We need to see the DataSource configuration and the details of which file(s) it is in. Created attachment 34276 [details]
server.xml
Created attachment 34277 [details]
svvint/datasource1-include.xml
Created attachment 34278 [details]
svvconf/context1-include.xml
Added server.xml and the includes XML-files That doesn't show where the ResourceLink is created. Tomcat 8.0.x has always documented that the type attribute of a ResourceLink is required. As of 8.0.37 this requirement is enforced. It looks appears from the stack trace that that type attribute is missing. The ResourceLink configuration information should confirm that. I assume you are referring to the following clause in the in the changelog: "When retrieving an object via a ResourceLink, ensure that the object obtained is of the expected type." It might just be me, but I think this very potential breakage of bases is under-communicated. I'd preferred a much more clear notification of the impacts of this change. Setting state to NEEDINFO as we need to see the ResourceLink configuration to confirm the root cause of the NPE. After reviewing the code, I've applied a fix to improve the exception error message when the type is missing or incorrect. This has been fixed in the following branches: - 9.0.x for 9.0.0.M11 onwards - 8.5.x for 8.5.6 onwards - 8.0.x for 8.0.38 onwards - 7.0.x for 7.0.73 onwards - 6.0.x for 6.0.46 onwards Created attachment 34288 [details]
context.xml
As you suspected, the type attribute of the ResourceLinks is missing.
Thanks for the confirmation. Given that the docs have said that type is a required attribute since at least 6.0.0 and that I have added a better error message for the next round of releases I'm going to mark this as fixed. |