dcsimg
Problem with executing JNDI Context.lookup in Forte 4.0-EA.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   c_h
Posted On:   Tuesday, April 30, 2002 01:13 PM

Hi All,

I have a class to get JDBC connection using JNDI supported in Tomcat 4. The following code works when executing in Tomcat 4:


InitialContext ic = new InitialContext();

Context envCtx = (Context) ic.lookup("java:comp/env/");

javax.sql.DataSource ds = (javax.sql.DataSource)envCtx.lookup("jdbc/mydb");

However, when I ran this code in Forte 4.0-EA using the default installed J2EE server (i.e. Tomcat 4), I received this exception:


java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource

Has anyone seen this problem? Any suggestion to resolve this is appreciated.

Re: Problem with executing JNDI Context.lookup in Forte 4.0-EA.

Posted By:   Techno_SF  
Posted On:   Sunday, May 26, 2002 09:38 PM

I had the same problem and found the solution on apache labs Thanks Kevin Jones...

Make sure you have jdbc2_0-stdext.jar in a common lib directory only and not also in the WEB-INF/lib directory.

Classloaders apparently.
About | Sitemap | Contact