Yeah its confusing. In your global naming resources you need to declare a resource and then a seperate group of resource params with the same name. For your app context look below at my example (....) is the name of your app.
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Context path="/...." docBase="...." debug="5" reloadable="true" crossContext="true"> <Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="localhost_log." suffix=".txt" timestamp="true"/> <ResourceLink name="jdbc/...." global="jdbc/...." type="javax.sql.DataSource"/> </Context> --- twcTC <[EMAIL PROTECTED]> wrote: > I have the same problem. please help. > ===============================detail > info============== > hello all, > > I need help. > I am using jwsdp-1.3. I am trying to connect to > oracle 8.1.5 database using DataSource. > I get sqlexception > "java.sql.SQLException: Cannot load JDBC driver > class". > > I have put oracle jdbc classes12.zip into > /common/lib/classes12.jar. > (I rename classes12.zip to classes12.jar) > > Thank you very much. > It took me a lot of time. > > --Tony > > The following is config and code files. > > conf/server.xml > ======== > <?xml version='1.0' encoding='utf-8'?> > <Server > className="org.apache.catalina.core.StandardServer" > debug="0" > port="8005" shutdown="SHUTDOWN"> > <Listener > className="org.apache.catalina.mbeans.ServerLifecycleListener" > debug="0"/> > <Listener > className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" > debug="0"/> > <GlobalNamingResources> > <Environment description="Absolute Pathname of > the JWSDP Installation" > name="jwsdp.home" override="true" > type="java.lang.String" > value="D:\jwsdp13"/> > <Environment name="simpleValue" override="true" > type="java.lang.Integer" value="30"/> > <Resource auth="Container" description="User > database > that can be updated and saved" name="UserDatabase" > scope="Shareable" > type="org.apache.catalina.UserDatabase"/> > <Resource name="jdbc/myoracle" scope="Shareable" > type="javax.sql.DataSource"/> > <ResourceParams name="UserDatabase"> > <parameter> > <name>factory</name> > > <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value> > </parameter> > <parameter> > <name>pathname</name> > <value>conf/tomcat-users.xml</value> > </parameter> > </ResourceParams> > <ResourceParams name="jdbc/myoracle"> > <parameter> > <name>maxWait</name> > <value>5000</value> > </parameter> > <parameter> > <name>maxActive</name> > <value>4</value> > </parameter> > <parameter> > <name>password</name> > <value>tiger</value> > </parameter> > <parameter> > <name>url</name> > > <value>jdbc:oracle:thin:@127.0.0.1:1521:dellorcl</value> > </parameter> > <parameter> > <name>driverClassName</name> > > <value>oracle.jdbc.driver.OracleDriver</value> > </parameter> > <parameter> > <name>maxIdle</name> > <value>2</value> > </parameter> > <parameter> > <name>username</name> > <value>scott</value> > </parameter> > </ResourceParams> > </GlobalNamingResources> > <Service > className="org.apache.catalina.core.StandardService" > debug="0" name="Java Web Services Developer Pack"> > <Connector > className="org.apache.coyote.tomcat5.CoyoteConnector" > acceptCount="100" bufferSize="2048" > clientAuth="false" > compression="off" connectionLinger="-1" > connectionTimeout="20000" > connectionUploadTimeout="300000" debug="0" > disableUploadTimeout="true" > enableLookups="true" keepAlive="true" > maxKeepAliveRequests="100" > maxProcessors="100" minProcessors="5" port="8080" > protocol="HTTP/1.1" > protocolHandlerClassName="org.apache.coyote.http11.Http11Protocol" > proxyPort="0" redirectPort="8443" scheme="http" > secure="false" serverSocketTimeout="0" > tcpNoDelay="true" > tomcatAuthentication="true" xpoweredBy="true"> > </Connector> > <Engine > className="org.apache.catalina.core.StandardEngine" > backgroundProcessorDelay="10" baseDir="D:\jwsdp13" > debug="0" > defaultHost="localhost" domain="Catalina" > name="Catalina"> > <Host > className="org.apache.catalina.core.StandardHost" > appBase="webapps" > autoDeploy="true" backgroundProcessorDelay="-1" > configClass="org.apache.catalina.startup.ContextConfig" > contextClass="org.apache.catalina.core.StandardContext" > debug="0" > deployOnStartup="true" deployXML="true" > domain="Catalina" > errorReportValveClass="org.apache.catalina.valves.ErrorReportValve" > liveDeploy="true" name="localhost" > unpackWARs="false" > xmlNamespaceAware="false" xmlValidation="false"> > <Valve > className="org.apache.catalina.authenticator.SingleSignOn" > debug="0"/> > </Host> > <Logger > className="org.apache.catalina.logger.FileLogger" > debug="0" directory="logs" prefix="jwsdp_log." > suffix=".txt" timestamp="true" verbosity="1"/> > <Realm > className="org.apache.catalina.realm.UserDatabaseRealm" > debug="0" resourceName="UserDatabase" > validate="true"/> > <Valve > className="org.apache.catalina.valves.AccessLogValve" > debug="0" directory="logs" > fileDateFormat="yyyy-MM-dd" > pattern="%h %l %u %t "%r" %s %b" > prefix="access_log." > resolveHosts="false" rotatable="true" > suffix=".txt"/> > </Engine> > </Service> > </Server> > ======== > > /hello1/build/Wen-inf/web.xml > ========================= > <?xml version="1.0" encoding="UTF-8"?> > <web-app version="2.4" > xmlns="http://java.sun.com/xml/ns/j2ee" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> > <display-name>hello1</display-name> > <servlet> > <display-name>GreetingServlet</display-name> > <servlet-name>GreetingServlet</servlet-name> > > <servlet-class>servlets.GreetingServlet</servlet-class> > </servlet> > <servlet> > <display-name>ResponseServlet</display-name> > <servlet-name>ResponseServlet</servlet-name> > > <servlet-class>servlets.ResponseServlet</servlet-class> > </servlet> > <servlet-mapping> > <servlet-name>GreetingServlet</servlet-name> > <url-pattern>/greeting</url-pattern> > </servlet-mapping> > <servlet-mapping> > <servlet-name>ResponseServlet</servlet-name> > <url-pattern>/response</url-pattern> > </servlet-mapping> > <resource-ref> > <description>Oracle Datasource > example</description> > <res-ref-name>jdbc/myoracle</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > <res-auth>Container</res-auth> > </resource-ref> > </web-app> > ========================= > > /Catalina/localhost/hello1.xml > ======================= > === message truncated === __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]