Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / May 2004

Tip: Looking for answers? Try searching our database.

classpath and jdbc?

Thread view: 
Todd Prickett - 21 May 2004 14:33 GMT
I have a Tomcat 4.1 web app written using Eclipse.  The app uses
Microsoft's JDBC driver.  On my dev Tomcat server everything works
fine.

When I deploy to a prod Tomcat server I get an error when I make a
call to JDBC.  So, I added a debug statement to print out my
classpath.

On my dev server I see all the jars that I have checked in the project
property's "Java Build Path" tab.

But, on my app server I only see "bootstrap.jar".  No JDBC jars nor
any of the other jars checked in the "Java Build Path".

Does this seem like it is the cause of my problem (i.e. the classpath
not showing the JDBC)?  If so, how do I successfully deploy the
correct classpath?

Being a newbie to Eclipse I'm not even certain this is the correct
issue so please go easy on me if it is not :-)

Thanks in advance.
Juha Laiho - 21 May 2004 21:17 GMT
QPCSDPTNTIYG@spammotel.com (Todd Prickett) said:
>I have a Tomcat 4.1 web app written using Eclipse.  The app uses
>Microsoft's JDBC driver.  On my dev Tomcat server everything works
[quoted text clipped - 9 lines]
>But, on my app server I only see "bootstrap.jar".  No JDBC jars nor
>any of the other jars checked in the "Java Build Path".

Ok, what have you configured as the classpath for the production
server? Btw, have you read the class-loading howto from the Tomcat
documentation?

>Does this seem like it is the cause of my problem (i.e. the classpath
>not showing the JDBC)?  If so, how do I successfully deploy the
>correct classpath?

Classpath cannot (easily) be modified by a deployed application, it is
to be configured to the application server. Alternatively, just copy
the needed jars to the correct place for the application server, or
include the jars to your application (WEB-INF/lib).
Signature

Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
        PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)

Todd Prickett - 24 May 2004 19:09 GMT
Hi Juha,
Thanks for the reply.  

Juha Laiho <Juha.Laiho@iki.fi> wrote in message news> Ok, what have you configured as the classpath for the production
> server? Btw, have you read the class-loading howto from the Tomcat
> documentation?

Nothing, other than what Eclipse generates from the "Java Build Path"
tab.  No, I have not yet read the class-loading howto.  I assume its
on the Tomcat homepage?  If so, I'll read it immediately.  Thanks for
the tip.

> Classpath cannot (easily) be modified by a deployed application, it is
> to be configured to the application server. Alternatively, just copy
> the needed jars to the correct place for the application server, or
> include the jars to your application (WEB-INF/lib).

I just copied the jars to the web-inf/lib directory and that took care
of the problem.  That seems like a better solution than trying to get
the classpath all sorted out, in that it allows the app to be a self
contained bundle.

Thank you very much for your help!


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.