tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Harris <Dav...@activ.net.au>
Subject RE: JNDI Under Tomcat 3.2, jdk1.3
Date Fri, 27 Oct 2000 06:42:44 GMT
I'm really trying to get away from modifying the system or tomcat classpath.
I was hoping that all my jars could be kept with the application.

I have found a work around, which is to check instanceof Reference, in which
case I use the object factory to recreate the class using
objectFactory.getObjectInstance(ref, null, null, null). I know there is
something I am missing - possibly in the jndi.properties file or the
context's environment, but I prefer this approach to storing application
jar's seperately.

-----Original Message-----
From: Amrhein, Thomas [mailto:tamrhein@debis.com]
Sent: Friday, October 27, 2000 4:31 PM
To: tomcat-user@jakarta.apache.org
Subject: AW: JNDI Under Tomcat 3.2, jdk1.3


Hi,

I use Tomcat 3.2 and jdk1.2.2.
The Application Server is Voyager and I have to use some .jar-files
They have to be put in Tomcat's Classpath (Tomcat_Home/lib/).
The problem: I can not use this within classes from a web application 
(web_app/Web-Inf/lib/)
I don't know why. Seems to be a classpath problem.

Solution:
Put all your classes included the classes of the web_app, which try
Context.lookup() in tomcat_home/lib or tomcat_home/classes and
the lookup works fine.

Hope this helps.


Thomas



-----Urspr√ľngliche Nachricht-----
Von: David Harris [mailto:DavidH@activ.net.au]
Gesendet am: Freitag, 27. Oktober 2000 00:15
An: Tomcat-User (E-mail)
Betreff: JNDI Under Tomcat 3.2, jdk1.3

Hi,
 
Has anyone experienced problems with the Context.lookup() function in a web
application running under Tomcat 3.2 with jdk1.3 ?
 
My problem is that the object returned is of type java.naming.reference, so
it cannot be cast into the correct class. I do not get this behaviour when I
run the same code as a console application. I think it must be something to
do with the classloaders and/or the class path or the use of object
factories which I do not fully understand yet.
 
JRun 3.0 behaves the same way, however Tomcat 3.1 does not have this
problem.
 
any ideas?
 
David Harris - Software Engineer
Activ Australia Pty Ltd 
Level 3, 168 Day Street SYDNEY NSW 2000 
Tel +61 2 9284 4250 Fax +61 2 9284 4242
http://www.activ.com.au <http://www.activ.com.ausupport/> 
 <mailto:davidh@activ.net.au> davidh@activ.net.au
 

Mime
View raw message