I have been working on an issue where JNDI name is not found in the context an axis2 webservice is running. This issue is only in Tomcat 8 when I use spring. Some details:
@bplso I had the same issue when I upgrade tomcat7 to tomcat8.5 on a axis2 project, try the steps given in image. It may be solve your issue. !
Step 1: Specify the connection resource in server.xml inside <GlobalNamingResources> like
<Resource name="jdbc/name"
global="jdbc/name"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
auth="Container"
type="javax.sql.DataSource"
username="xxx"
password="YYY"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://host:port/dbname"
maxTotal="10"
maxIdle="10"
maxWaitMillis="10000" />
Step 2: Specify the resource reference in web.xml inside the <web-app> like
<resource-ref>
<description> This is a reference to the global Resource for SQL database connetion. </description>
<res-ref-name>jdbc/name</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Step 3: Create a context.xml file and paste it in your project/META-INF/ path as below
<?xml version=.1.0 encoding="UTF-8.?>
<Context>
<ResourceLink name="jdbc/name" global="jdbc/name" type="javax.sgl.DataSource"
</Context>