aspose file tools*
The moose likes Tomcat and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark ""JavaService" error when IBM JDBC driver is in classpath" Watch ""JavaService" error when IBM JDBC driver is in classpath" New topic
Author

"JavaService" error when IBM JDBC driver is in classpath

R Tripp
Greenhorn

Joined: Mar 07, 2003
Posts: 2
I'm trying to get Apache and Tomcat 4.1.12 set up on a Toshiba S255 laptop running WinXP Pro. The setup is identical to a machine running XP Home in my office, which works fine. When I set up the server, everything works OK, until I add the IBM DB2 JDBC driver into the common/classes folder (COM.ibm.db2.jdbc.app.DB2Driver). The COM folder is a copy of the one that is on the XP Home machine. When I put this in place and restart Tomcat, the service fails about 10 seconds after startup and the error log was showing a "Can't load driver" message, but after deleting and reinstalling the COM folder, it now shows no error, yet Tomcat fails the same as before. I get a notification that the "JavaService has encountered a problem and needs to close". I tried Tomcat 4.1.18 with the same results, but moved back to 4.1.12 because that's the version that is working on the machine that doesn't have this problem. I have the same server.xml and web.xml files on the laptop as on the working machine. The databases that are in the xml files are installed on the laptop with the same database names. Any ideas what to check/change? Thanks.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

This seems to tickle something in my memory.

regarding db drivers... I think they need a (very) minimal install of a DB instance. Aren't there certain system-level services (like an NT Service) that need to be active and running on the machine for the db driver classes to work?
R Tripp
Greenhorn

Joined: Mar 07, 2003
Posts: 2
Mike,
Eureka! Thanks for the tip. I had the DB2 Workgroup Admin Client installed on the laptop. After uninstalling and installing the full DB2 7.2 everything's hunky-dory. Thanks for the nudge in the right direction.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15632
    
  15

Originally posted by Mike Curwen:
This seems to tickle something in my memory.

regarding db drivers... I think they need a (very) minimal install of a DB instance. Aren't there certain system-level services (like an NT Service) that need to be active and running on the machine for the db driver classes to work?

Well it appears in this particular case you were right. However JDBC drivers fall into about 4 different classes depending on whether they are thick or thin and whether they are JNI or pure Java. A lot of JDBC drivers use java.net service requests to communicate to the database server. I forget which class that one is, though.


Customer surveys are for companies who didn't pay proper attention to begin with.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Further to DB2 drivers... as Tim mentioned, there's the 4 types, and I also forget which type is the 'standard IBM provided DB2 driver'. But whichever it is... a senior analyst where I once worked could NOT get the driver to work without first doing a FULL install of DB2 on his system.

He was doing a connectivity test under a certain application server, against several different types of DB's (amongst them, Oracle and DB2 that I can recall). The DB2 driver gave him the most difficulty; in fact it was pretty much the only one that required any attention.

And oops.. I just saw what Tim was probably posting about... I meant to say "Regarding db2 drivers" not just "db drivers". Replace ALL instances of 'db' with 'db2' in my first post.


[ March 07, 2003: Message edited by: Mike Curwen ]
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

I asked the guy for what info he could remember. Here is what he said:

********
I think that IBM offers type 4 (all java) and type 2 (needs native client)
drivers for DB2. I don't remember the package names, so I'm not sure which
one is which -- probably the type 4 by the sounds of it.
I needed a full install of DB2 on my machine because the instance of DB2 I
wanted to connect to was DB2/390. The way that DB2/390 handles tablespaces
and connections is so different, that you need a local instance of DB2 to
provide a JDBC-accessible "alias" of the 390 database. And the way to do
this was documented really, really badly. I think it took me a week to
figure out the right values for all the connection parameters, mostly by
trial and error. None of this would be required for any other version of
DB2.
********
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: "JavaService" error when IBM JDBC driver is in classpath
 
Similar Threads
Home Wireless Network - Help Needed
Struts Problem in the March Article
Hibernate code not working on Linux Server
Tomcat as a service
How do you fix trust level problem to allow Tomcat to start as a service?