Bhanu,

On 4/22/16 9:46 AM, bhanu lakkala wrote:
> I have been working on an issue for the past few days and wanted to check
> with you guys if you have any suggestions on fixing this issue.
> My current technology stack is: windows 7, java 7/8, tomcat 8, axis2 1.6.3.
> I have an axis2 based web service that is very basic and it just connects
> to a database and reads some info and spits out the info it read.
> I have setup a JNDI resource for the datasource.  In the service's init
> class's startup method, I am attempting to load the spring's
> ApplicationContext and thereby load the JNDI resource.
> All of this used to work well with the combination of java 7, tomcat 7.x
> axis2 1.6.3.
> Recently due to a need to upgrade to newer version of tomcat, I upgraded to
> tomcat 8. this resulted in "Name not found" exception.

I don't believe anything significant changed with Tomcat's handling of
JNDI DataSources. Are you sure you upgraded only Tomcat and not some
other component at the same time (e.g. Spring)?

> I ditched the spring's usage of finding jndi resource and used the
> initContext to lookup the JNDI resource and it worked fine.

That suggests to me that the JNDI context is correctly-configured by
Tomcat, and the problem lies within your configuration (likely) or
Spring itself (unlikely).

> I have to use spring to find the JNDI
> context since most of our applications are already using spring and if i
> need to change every single one of them it is a tedious process.
>
> We also have a unix environment that I tested this with and I didn't find
> any issues there. i.e., I used spring to load the jndi resource, tomcat
> 8.x, java 7, axis2 1.6.3.
> Since this is a windows only issue, I tried to upgrade to Tomcat 9.x and
> that resulted in the same error.
> I have also posted this issue on the stackoverflow site but haven't had
> much luck finding a solution to the issue.
> http://stackoverflow.com/questions/36207119/tomcat-8-axis2-webservices-aar-spring-jndi-not-bound-in-context

What is your <Resource> configuration in Tomcat, and how are you
specifying your JNDI DataSource name in your Spring configuration?

What do the (Spring) logs say?

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to