Thanks Unico, I am runing slide in webapp mode. 
To nail down the problem. I modified the examples JndiServlet( which I believe is 
written by Remy) as the attached. When I invoked the servlet. I got the output as 
below. which basically indicate the following two line of code gives  
"Datasource:null" result. The same servlet works fine with tomcat4.0.3 with jdk1.3.1 
on windows2000. 
            DataSource ds = (DataSource)envCtx.lookup("jdbc/EmployeeAppDb");
            out.println("DataSource:"+ds);


Output>>

Simple lookup test : 
Max exemptions value : 15
list() on /comp/env Context : 
Binding : mail: org.apache.naming.NamingContext
Binding : minExemptions: java.lang.Integer
Binding : maxExemptions: java.lang.Integer
Binding : jdbc: org.apache.naming.NamingContext
Binding : ejb: org.apache.naming.NamingContext
Binding : name3: java.lang.Integer
Binding : foo: org.apache.naming.NamingContext
listBindings() on /comp/env/jdbc Context : 
Binding : EmployeeAppDb: org.apache.naming.ResourceRef:Reference Class Name: 
javax.sql.DataSource
Type: description
Content: Testing datasource usage
Type: scope
Content: Shareable
Type: auth
Content: Container
Type: user
Content: sa
Type: driverName
Content: jdbc:HypersonicSQL:database
Type: password
Content: 
Type: driverClassName
Content: org.hsql.jdbcDriver

DataSource:null
JNDI lookup failed : java.lang.NullPointerException


-----Original Message-----
From: Unico Hommes [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 12:51 PM
To: [EMAIL PROTECTED]
Subject: RE: J2EEDescriptorsStore in tomcat4.03-LE-jdk14



Ok, concerning your specific problem, since you are saying you have it
working in another tomcat 4.0 setup, this may not be your problem. Any case
the thread I am referring to and the most salient message in it is here :

http://www.mail-archive.com/[email protected]/msg01500.html

If you are running Slide in webapp mode, this will not apply.

Now, the only thing I can think of is the fact that Sun changed the
java.sql.Connection interface in jdk1.4. What method do you use to
initialize your datasources ?

rgdrs,
/U.

>>

Well, I do NOT have the same problem when using tomcat4.0.3 and JDK1.3. In
that
configuration, I can successfully settup the jdbc datasource and
J2EEDescriptorsStore
working.
This problem only happen when I use tomcat4.0.3-LE-jdk14. I doubt there was
a
discussion about it a few months back (no jdk14 yet), but I will search it
anyway.
Am I missing sth?
Thanks.
Jiantao




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Attachment: JndiTestServlet.java
Description: JndiTestServlet.java

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to