Copy oracle driver jar to common/lib

-----Original Message-----
From: Giacomino Raccuia [mailto:[EMAIL PROTECTED] 
Sent: June 23, 2005 2:11 PM
To: Tomcat Users List
Subject: Load oracle.jdbc.driver.OracleDriver class


Hi!
I just upgraded from tomcat 4.0.3 to 5.5.9, I put all my librarie in 
shared/lib and set correctly the CLASSPATH, but when I try to load the class

oracle.jdbc.driver.OracleDriver

tomcat return this error

ava.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
        java.net.URLClassLoader$1.run(URLClassLoader.java:198)
        java.security.AccessController.doPrivileged(Native Method)
        java.net.URLClassLoader.findClass(URLClassLoader.java:186)
        java.lang.ClassLoader.loadClass(ClassLoader.java:299)
        java.lang.ClassLoader.loadClass(ClassLoader.java:255)
        java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
        java.lang.Class.forName0(Native Method)
        java.lang.Class.forName(Class.java:140)
        glib.sql.ConnectionPool.<init>(ConnectionPool.java:41)
        org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:111)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
22)
        
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        nmda.servlets.MultipartFilter.doFilter(MultipartFilter.java:58)

Do you have any suggestion??
I try this code

try { Class.forName ("oracle.jdbc.OracleDriver"); } catch (Exception ex) {}

and works fine.

Thanks
Mino



On 20/06/2005 16:30, Christoph Kutzinski wrote:

> Hi,
>
> I'm trying to install a custom CharsetProvider (UTF7) with my web
> application (i.e. deliver a JAR with a 
> META-/services/java.nio.charset.spi.CharsetProvider entry in WEB-INF/lib)
> However the CharsetProvider isn't recognized when it comes to parsing 
> (i.e. calling javax.mail.Part.getContent())
> If I place the JAR into <JRE>/lib/ext it works.
>
> The API of CharsetProvider
>
(http://java.sun.com/j2se/1.5.0/docs/api/java/nio/charset/spi/CharsetProvide
r.html) 
> says:
> "Charset providers may be installed in an instance of the Java 
> platform as extensions, that is, jar files placed into any of the 
> usual extension directories. Providers may also be made available by 
> adding them to the applet or application class path or by some other 
> platform-specific means. Charset providers are looked up via the 
> current thread's context class loader."
>
> I interpret it this way:
> If the JAR is in the classpath (specifically: if it is found by the
> current context class loader) the Charsetprovider should be 
> automatically recognized.
> I checked that the context classloader immediately before calling 
> Part.getContent() is the webapp-classloader, so the JARs in 
> WEB-INF/lib should be visible.
>
> So is there any solution to this other than placing the JAR in an
> extension directory?
> Could this be a Tomcat bug or is this expected behaviour due to the 
> speciality of the webapp classloaders? (I tried to understand the 
> implifications of Tomcats classloading at 
> http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html
> but couldn't figure it out by myself)
>
>
> Thank you,
> Christoph
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


!DSPAM:42bafb4e110031577611889!

Reply via email to