Trying to set up a couple of JDBC connections in the context.xml of my tomcat instance but struggling to understand why some names seem to clash.
With some combinations of name I get the folllowing:
java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp2.BasicDataSource cannot be cast to javax.naming.Context
Can someone explain why it doesn't work if I have 2 resources with names like:
name="jdbc/postgres/1/2/3/4/5"
name="jdbc/postgres/1/2/3/4/5/6"
But changing the second name to this does work:
name="jdbc/postgres/1/2/3/4/4/6"
Thanks.