Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-13 Thread Rob Sargent
On 12/13/22 22:25, dineshk wrote: Hi Mark, I guess you are right , I tried with simple web application and JNDI look up fails in both tomcat 7.x and 9.x if the current thread context class loader is changed but strangely when we deploy our application which uses hibernate (4.3.11) , it do

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-13 Thread dineshk
Hi Mark, I guess you are right , I tried with simple web application and JNDI look up fails in both tomcat 7.x and 9.x if the current thread context class loader is changed but strangely when we deploy our application which uses hibernate (4.3.11) , it does work in tomcat 7.x  but not in 9.x.

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-13 Thread Rémy Maucherat
On Tue, Dec 13, 2022 at 9:36 AM dineshk wrote: > > > Hi Mark, > I guess you are right , I tried with simple web application and JNDI look up > fails in both tomcat 7.x and 9.x if the current thread context class loader > is changed but strangely when we deploy our application which uses hibernat

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-13 Thread dineshk
Hi Mark, I guess you are right , I tried with simple web application and JNDI look up fails in both tomcat 7.x and 9.x if the current thread context class loader is changed but strangely when we deploy our application which uses hibernate (4.3.11) , it does work in tomcat 7.x  but not in 9.x. N

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-12 Thread Mark Thomas
On 12/12/2022 16:07, dineshk wrote: Hi Mark, We could reproduce this issue very easily with simple java program as well. Just before doing the JNDI look up , set  any custom class loader in the current thread as context class loader , this will fail the JNDI look up where as if we don't set a

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-12 Thread dineshk
Hi Mark, We could reproduce this issue very easily with simple java program as well. Just before doing the JNDI look up , set  any custom class loader in the current thread as context class loader , this will fail the JNDI look up where as if we don't set any custom class loader , it works fine

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-12 Thread Christopher Schultz
Dineshk, On 12/12/22 08:30, dineshk wrote: I don't think we should suspect the custom class loader here as its very old code and works fine across all application servers e.g. IBM WebSphere and JBoss EAP 7.X. The custom class loader  is required as our java classes are part of the Database wh

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-12 Thread dineshk
Hi Mark , I don't think we should suspect the custom class loader here as its very old code and works fine across all application servers e.g. IBM WebSphere and JBoss EAP 7.X. The custom class loader  is required as our java classes are part of the Database which we need to load and hence requi

Re: apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-12 Thread Mark Thomas
The JNDI binding code is unchanged (apart from the removal of some deprecated methods) between 7.0.x and 9.0.x (and beyond that range). I think you'll need to do some debugging to figure out exactly why this isn't working but I suspect the custom class loader is at least a part of the reason.

apache-tomcat-9.0.70 >> JNDI look up fails in a different thread context class loader !!

2022-12-12 Thread dineshk
Hi , We are trying to deploy our application on tomcat 9.0.70. Before the hibernate bootstraps in our application , we do change the "Current Thread Context Class Loader " in the running thread to our "Custom class loader" which is required. Changing the "Current Thread Context Class Loader "  fa