tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Isaacs <Larry.Isa...@sas.com>
Subject RE: JNDI InitialContext not working when upgrading from Tomcat 3. 2.3 to 3.3
Date Thu, 29 Nov 2001 20:59:36 GMT
My first guess is that this would be a "classpath" issue.
There is a big difference in classloader hierarchy between
Tomcat 3.2.x and 3.3.  Tomcat 3.2.x uses the CLASSPATH,
Tomcat 3.3 doesn't.  See:

<http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ug.html#configuring_classes>

for more information.

Were there jars or directories being added to the CLASSPATH
for Tomcat 3.2.3?  If so, how were they added to Tomcat 3.3?

Cheers,
Larry

> -----Original Message-----
> From: Adrian Robitu [mailto:adrian@intelliware.ca]
> Sent: Thursday, November 29, 2001 12:49 PM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: JNDI InitialContext not working when upgrading from Tomcat
> 3.2.3 to 3.3
> 
> 
> Hi,
> 
> We are in the process of migrating our app from 3.2.3 to 3.3 
> (both on JDK
> 1.2.2). The application uses a trim-down in-house EJB 
> container and Tomcat
> as its servlet container. It works just fine under 3.2.3 but 
> not under 3.3.
> Here is the sample code that we have problem with.
> 
> 	Properties properties = new Properties(System.getProperties());
> 	InputStream input =
> classLoader.getResourceAsStream("jndi.properties");
>       ...
> 	properties.load(input);
> 	...
> 	Context context = InitialContext(properties);
> 	VendorServiceHome home = (VendorServiceHome)
> context.lookup(VendorServiceHome.class.getName());
> 
> Our jndi.properties file is:
> 
> 	
> java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
> 	java.naming.provider.url=file\:d\:\\cellbucks
> 
> After loading the properties we print them and get:
> 	
> {java.naming.factory.initial=com.sun.jndi.fscontext.RefFSConte
> xtFactory,
> java.naming.provider.url=file:d:\cellbucks}
> which would indicate that jndi.properties is visible.
> 
> Under 3.2.3 the context.lookup returns a 
> VendorServiceHomeImpl (which is
> what we expect). Under 3.3 the context returns a 
> javax.naming.Reference.
> 
> We've searched the archives, the manuals and other web 
> resources that we
> could think of, but we didn't get anywhere. Any help on this 
> matter would be
> highly appreciated.
> 
> Best regards,
> Adrian Robitu
> e-Commerce Architect
> (416) 762-0032/410
> IT.IP.IQ
> http://www.intelliware.ca
> 
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
> 

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message