Hello All,
    I have been scouring the mailing list archives and lot of other
places. I am seeing a problem configuring a datasource with Tomcat. I
have put the following entry in my server.xml

                                <Context path="/loa"
docBase="C:\software\eclipse\workspace\HRTechnology\TOMCAT_ROOT"
reloadable="true">
                                        <Resource name="jdbc/loacenet"
auth="Container" type="javax.sql.DataSource"/>
                                        <ResourceParams
name="jdbc/loacenet">
                                                        .........
                                                        .........
                                                        .........
                                                        .........
                                                <parameter>
        
<name>password</name>
        
<value>databasepassword</value>
                                                </parameter>
                                                <parameter>
                                                        <name>url</name>
        
<value>jdbc:oracle:[EMAIL PROTECTED]:1521:[sid]</value>
                                                </parameter>
                                                <parameter>
        
<name>driverClassName</name>
        
<value>oracle.jdbc.driver.OracleDriver</value>
                                                </parameter>
                                                <parameter>
        
<name>username</name>
        
<value>user</value>
                                                </parameter>
                                        </ResourceParams>
                                </Context>
However when I try to load my plugin in the struts application, I get
the following exception. I looked at everything on archives and on there
people were complaining about NULL for driverClassName, in my case, it
reads the drivername and url properly and still blows up. Please help. I
am using Tomcat 5.0 with the latest ojdbc14.jar/commons-dbcp-1.1.jar in
common/lib and am trying to connect to oracle 8.1.7. 

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '
oracle.jdbc.driver.OracleDriver' for connect URL
'jdbc:oracle:[EMAIL PROTECTED]
:1521:[sid]', cause:
java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getDriver(DriverManager.java:243)
        at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:743)
        at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:518)
        at
com.sbc.hrtech.framework.utility.InitializerPlugin.init(InitializerPl
ugin.java:41)
        at
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServle
t.java:1158)
        at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
        at javax.servlet.GenericServlet.init(GenericServlet.java:256)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:1044)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:88
7)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:3960)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4
283)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)

        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)

        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518
)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:5
19)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:234
5)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:598)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
        at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
Excpetion in InitializerPlugin


The java code in the plugin is as follows
                        Context init = new InitialContext();
                        Context ctx = (Context)
init.lookup("java:comp/env");
                        DataSource dataSource = (DataSource)
ctx.lookup("jdbc/loacenet");
                        c = dataSource.getConnection(); -- line which
blows up
                        st = c.createStatement();



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

Reply via email to