Fedora Linux Support Community & Resources Center
  #1  
Old 2nd April 2006, 08:29 AM
Coenos Offline
Registered User
 
Join Date: Apr 2006
Location: Vught
Age: 39
Posts: 14
Cool Fedora's Tomcat can't find jar library ??

Hi,

I installed the Tomcat version that comes with Core 5. I added the Oracle JDBC drivers to the
<app>/WEB-INF/lib directory and also added the same jar file to the common/lib and shared/lib (to be sure). But Tomcat can't find the jar file (???). I get java error saying NoClassDefFoundException meaning its not in the classpath.

On Tomcat 5.5.9 I had the same config and then it was working ok by just placing the ojdbc14.jar in the common/lib or shared/lib directory.

Is this a bug, or is there some other config file where I need to add the classpath or something ??

Hope someone knows a solution.

Coenos
Reply With Quote
  #2  
Old 2nd April 2006, 04:58 PM
MatthewWall Offline
Registered User
 
Join Date: Feb 2006
Posts: 15
Hi Coenos,

I've not had this problem with the FC4 install of tomcat but an alternative solution would be to install the tarball version of tomcat somewhere and install the jar in the shared/lib directory there. Not perfect I know, but it should work.

Mat
Reply With Quote
  #3  
Old 3rd April 2006, 11:12 AM
Coenos Offline
Registered User
 
Join Date: Apr 2006
Location: Vught
Age: 39
Posts: 14
Still no solution

Yes, but why doesn't the Tomcat version that comes with Fedora work properly ?

Is this a known bug, or is there some (extra) config file to be set ? Anyone else who has got this problem ?

Thanks!
Coenos
Reply With Quote
  #4  
Old 3rd April 2006, 09:13 PM
MatthewWall Offline
Registered User
 
Join Date: Feb 2006
Posts: 15
You should definately not have the tomcat in the WEB-INF/lib directory as this can cause memory leaks in the web application.

By default the /etc/init.d/tomcat5 script for the tomcat configured with FC4 runs tomcat from the /usr/share/tomcat directory.

Try removing the JDBC jar from WEB-INF/lib and installing it in /usr/share/tomcat5/shared/lib OR /usr/share/tomcat5/common/lib

Also, what JDK are you using? I've seen strange behaviour from GCJ sometimes. Try this with a SUN JVM.

Good luck!

Mat
Reply With Quote
  #5  
Old 5th April 2006, 10:02 AM
Coenos Offline
Registered User
 
Join Date: Apr 2006
Location: Vught
Age: 39
Posts: 14
Hi Matthew,

I changed the tomcat conf script to use the Sun JVM instead of the default. On FC3 I installed the jakarta Tomcat 5.5.9 and there the install pointed directly to to right JVM.
It is working now.

Thanks for the tips !

Coen
Reply With Quote
  #6  
Old 5th April 2006, 11:16 AM
tomcat Offline
Registered User
 
Join Date: Aug 2005
Location: EU, Germany
Age: 40
Posts: 1,184
I got installed on your boxes? Oh oh...


__________________
Powered by Fedora & CentOS | Windows-free since 2002
Reply With Quote
  #7  
Old 5th April 2006, 12:46 PM
Coenos Offline
Registered User
 
Join Date: Apr 2006
Location: Vught
Age: 39
Posts: 14
I hope your postcount isn't just that high because of replying to tomcat topics with that super helpful reply


Reply With Quote
  #8  
Old 5th April 2006, 01:16 PM
tomcat Offline
Registered User
 
Join Date: Aug 2005
Location: EU, Germany
Age: 40
Posts: 1,184
No, don't worry. This was the first time that I posted this "joke".
__________________
Powered by Fedora & CentOS | Windows-free since 2002
Reply With Quote
  #9  
Old 4th August 2006, 01:11 AM
DaRocker22 Offline
Registered User
 
Join Date: Aug 2006
Posts: 2
I found out how to get this fixed

I was having the same problem that alot of people have been having with Tomcat 5.5x, Fedora Core 5, Oracle 10g, and GNU JVM thats packaged with Fedora Core.

If you try to use the ojdbc14.jar version 10.2.0.1.0 which is the lastest version it does not work with the GNU JVM 1.4, for some odd reason. You will always get the class not found exception no matter where you place the jar. Same thing goes if you use ojdbc14.jar (10.1.0.4 version).

The only version i've been able to get to work is ojdbc14.jar (10.1.0.2)

So after downgrading the driver version to 10.1.0.2, I have been able to connect to my 10g Database and also my 8i Database with out any problems. So the Fedora Core people really need to get this fixed for FC6, so we ca use the newest driver version.
Reply With Quote
  #10  
Old 4th August 2006, 07:36 AM
Coenos Offline
Registered User
 
Join Date: Apr 2006
Location: Vught
Age: 39
Posts: 14
Hi daRocker,

the problem with me lied in the Java VM, when I used the Sun version all was working well.

Cheers,
Coen
Reply With Quote
  #11  
Old 4th August 2006, 02:14 PM
DaRocker22 Offline
Registered User
 
Join Date: Aug 2006
Posts: 2
Coenos,

Did you not read what I said? I said the problem was in the GNU JVM, for some reason this vitural machine will not find the Oracle10g Driver, but does work if you downgrade the driver version 10.1.0.2.

But if you want to use the newest driver version you won't be able to use the GNU JVM packaged on FC5, you would have to switch to Sun's JVM.
Reply With Quote
  #12  
Old 5th August 2006, 09:52 AM
MatthewWall Offline
Registered User
 
Join Date: Feb 2006
Posts: 15
Interesting. Were you using the OCI drivers or the thin drivers for Oracle?

I still say go with a Sun or BEA JVM at the moment for any serious Java work, although GCJ is improving with every release.
Reply With Quote
Reply

Tags
fedora, jar, library, tomcat

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ld can not find library chenpeib Using Fedora 2 15th May 2007 01:49 PM
ldd can not find a static library jsanza@terra.es Using Fedora 0 19th September 2006 05:39 PM
ldd can not find a static library jsanza@terra.es Using Fedora 0 19th September 2006 05:20 PM
Apache/Tomcat can't find jsp files rboone Using Fedora 0 25th May 2006 01:52 AM
SimGear can't find Openal Library but it is installed Kingtu Using Fedora 1 22nd May 2005 06:01 AM


Current GMT-time: 12:53 (Wednesday, 23-04-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat