|
In addition to the Faq that Gary posted, there are some other possibilities. Dieter mentioned using Class.forName, which in general will try the system, ext, and then user tree of class loaders starting at the root, exception being ext classes loading classes. You can also use the Class.forName class loader and specify you class loader. Finally, you can use the thread class loader. Here is an example of that route, which is what I recommend you consider especially if you are using Tomcat: DriverManager.registerDriver((Driver) Thread.currentThread().getContextClassLoader().loadClass("com.ibm.as400.access.AS400JDBCDriver").newInstance()); David Morris >>> garyp@firstech.com 11/20/02 06:20PM >>> This is most likely a classloader/classpath problem. On what platform is your java code running? What version of the JDK are you using? What servlet engine are you using? Where is ServletClasses.java deployed? Where is JTOpen installed? If you're running on the iSeries, be sure to follow the classpath instructions for your release of OS/400: http://www-1.ibm.com/servers/eserver/iseries/toolbox/faq.htm#faqT HTH, Gary > -----Original Message----- > From: java400-l-admin@midrange.com > [mailto:java400-l-admin@midrange.com] On Behalf Of Chris Proctor > Sent: Wednesday, November 20, 2002 2:19 PM > To: 'Java400-l' > Subject: (no subject) > > > This message is in MIME format. Since your mail reader does > not understand this format, some or all of this message may > not be legible. > -- > [ Picked text/plain from multipart/alternative ] > Hi all, > > No one answered this question the last time I asked, so I > thought I'd ask again. I am getting an error when trying to > run a java servlet. It's telling me that the registerDriver > method isn't in the DriverManager class, however, when I look > at the javadocs it shows registerDriver as a method within > the class. Am I doing something wrong? BTW, I downloaded > JTOPEN from the website. That's what I'm using. If anyone > could straighten me out I'd appreciate it. Here's my error message: > > "ServletClasses.java": Error #: 300 : method > registerDriver(com.ibm.as400.access.AS400JDBCDriver) not > found in class java.sql.DriverManager at line 18, column 27 > > Thanks! > > Chris Proctor
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.