tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Isen,Ciji" <ci...@tamu.edu>
Subject Re: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver
Date Mon, 02 Aug 2004 20:42:29 GMT
Thanks a lot!!!

cheers,
Isen

Shapira, Yoav wrote:

>Hi,
>If it's inside GlobalNamingResources, you need a <ResourceLink> to it in
>your Context.
>
>You should also place a <resource-ref> in your web.xml, but you may have
>done that already (you didn't post web.xml).
>
>
>Yoav Shapira
>Millennium Research Informatics
>
>
>  
>
>>-----Original Message-----
>>From: Isen,Ciji [mailto:cisen@tamu.edu]
>>Sent: Monday, August 02, 2004 3:49 PM
>>To: Tomcat Users List
>>Subject: Re: javax.servlet.ServletException: Cannot create JDBC driver
>>    
>>
>of
>  
>
>>class '' for connect URL 'null', cause: No suitable driver
>>
>>I wanted to tinker around hence i decide to just test using a jsp. The
>>jsp code is pasted below.
>>
>><%@page contentType="text/html"%>
>>
>><%@ page import="java.util.*" %>
>>
>><html>
>><head><title>JSP Page</title></head>
>><body>
>>
>><%
>>           Connection conn = null;
>>           DBManager dbMan = null;
>>           Context ctx = new InitialContext();
>>           if(ctx == null )
>>                    throw new DBLibraryBaseException("Boom - No
>>    
>>
>Context");
>  
>
>>           Context envContext=(Context)ctx.lookup("java:comp/env");
>>           if(envContext == null )
>>                    throw new DBLibraryBaseException("Boom -
>>java:comp/env - No Context");
>>
>>           DataSource myDataSource
>>=(DataSource)envContext.lookup("jdbc/EconDollarsDB");
>>           if (myDataSource != null) {
>>                  conn = myDataSource.getConnection();
>>           }else{
>>                           System.out.println("jdbc/EconDollarsDB' is
>>an unknown DataSource");
>>                       }
>>           %>
>></body>
>></html>
>>
>>Pasted below is the server.xml files part that i added.
>><Resource auth="Container" name="jdbc/EconDollarsDB"
>>type="javax.sql.DataSource"/>
>>   <ResourceParams name="jdbc/EconDollarsDB">
>>     <parameter>
>>       <name>url</name>
>>
>><value>jdbc:mysql://localhost:3306/EconDollars?autoReconnect=true</valu
>>    
>>
>e>
>  
>
>>     </parameter>
>>     <parameter>
>>       <name>validationQuery</name>
>>       <value>select * from major</value>
>>     </parameter>
>>     <parameter>
>>       <name>maxIdle</name>
>>       <value>5</value>
>>     </parameter>
>>     <parameter>
>>       <name>maxActive</name>
>>       <value>20</value>
>>     </parameter>
>>     <parameter>
>>       <name>driverClassName</name>
>>       <value>com.mysql.jdbc.Driver</value>
>>     </parameter>
>>     <parameter>
>>       <name>maxWait</name>
>>       <value>10000</value>
>>     </parameter>
>>     <parameter>
>>       <name>username</name>
>>       <value>asdf</value>
>>     </parameter>
>>     <parameter>
>>       <name>factory</name>
>>       <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>>     </parameter>
>><parameter>
>>       <name>password</name>
>>       <value>asdf</value>
>>     </parameter>
>>   </ResourceParams>
>>
>>This is placed inside GlobalNamingResources.
>>
>>
>>
>>
>>Robert Bateman wrote:
>>
>>    
>>
>>>Please show us the source that is causing this error...
>>>
>>>
>>>On Monday 02 August 2004 02:44 pm, Isen,Ciji wrote:
>>>
>>>
>>>      
>>>
>>>>Hi,
>>>>I am using tomcat-5. I was trying out the connection pooling in it. I
>>>>        
>>>>
>did
>  
>
>>>>things as per their documentation but ended up with this error.
>>>>javax.servlet.ServletException: Cannot create JDBC driver of class ''
>>>>        
>>>>
>for
>  
>
>>>>connect URL 'null', cause: No suitable driver Does anyone have any
>>>>        
>>>>
>idea
>  
>
>>>>what and what this is. I am at loss why after finding the JDNI
>>>>        
>>>>
>resource
>  
>
>>its
>>    
>>
>>>>not able to pick up its parameters.
>>>>
>>>>regards,
>>>>Isen
>>>>
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>    
>>
>
>
>
>
>This e-mail, including any attachments, is a confidential business communication, and
may contain information that is confidential, proprietary and/or privileged.  This e-mail
is intended only for the individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the sender.  Thank you.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message