I had the same initial trouble getting MS SQL Server to work (at home) and Oracle 8i (at work). You have to wade through all the documentation (haven't these guys heard of "search?") to find the precise connection strings and make sure the JDBC classes are in your classpath before you can instantiate a connection object (I use the forClass() method).
Well, I finally got the code to work up to a point. The JNDI Context ClassNotFoundException was being thrown because, of course, the compiler could not find the classpath. After finding the relevant jar file buried in one of JRun's lib directories (no documentation, of course) and copying it's decompressed package contents to my development root relevant to my package (and setting the classpath in the system environmental variables and rebooting), it suddenly started to work. I don't know if it was copying the package to my dev directory or rebooting after setting the system env variable, but it's a pain-in-the-ass, no matter what. Now, I'm getting something that's really pissing me off: javax.naming.CommunicationException: Failed to communicate with 192.168.0.1:2323. Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused: connect I've spent the better part of an hour going through every one of JRun's properties files and changing every instance of "127.0.0.1" to "192.168.0.1" (my server on my home LAN) and I still get this exception. I tell you, it's almost enough to go back to ASP and take up .NET! Cheers! Mark (I emphasize, "almost!" :-) ) ----- Original Message ----- From: "Tom & Sharon Kochanowicz" <[EMAIL PROTECTED]> Sent: Saturday, January 12, 2002 6:03 PM > I feel your pain Mark, I am trying to set a servlet using jndi for > connecting up to a DB2 ver 7.2 database and get the error: > > JDBC_DataSource.java:34: cannot resolve symbol > symbol : class DB2DataSource > location: package jdbc > ds = new COM.ibm.db2.jdbc.DB2DataSource(); > > > But I can't find where the package or jar file is. I can't help you, but > I share your misery ;-) > > Tom K. ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
