tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Dean (Zhun)" <Dean.C...@gs.com>
Subject RE: tomcat 4.0.3 and Null datasource
Date Tue, 28 May 2002 14:31:01 GMT
The datasource issue was solved, but I get this: 

java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getDriver(DriverManager.java:243)
        at
tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSource.java:233)
        at
tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSource.java:204)
        at
com.gs.ed.sh.SetsInitializer.getConnection(SetsInitializer.java:83)
        at com.gs.ed.sh.SetsInitializer.reload(SetsInitializer.java:111)
        at com.gs.ed.sh.SetsInitializer.load(SetsInitializer.java:100)
        at com.gs.ed.sh.SetsInitializer.init(SetsInitializer.java:61)
        at javax.servlet.GenericServlet.init(GenericServlet.java:258)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
6)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3266)
        at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:2479)
        at
org.apache.catalina.loader.WebappContextNotifier.run(WebappLoader.java:1329)
        at java.lang.Thread.run(Thread.java:536)

I'm using jconn2.jar, file size is 760KB, I put it in
CATALINA_HOME/common/lib. Are there any files I'm missing? 
Also, people mentioned putting these files in the same directory, ie: DBCP,
collections and pool, what do I need these files for?

Thanks,

Dean Chen


-----Original Message-----
From: Chen, Dean (Zhun) 
Sent: Tuesday, May 28, 2002 10:09 AM
To: 'Tomcat Users List'
Subject: RE: tomcat 4.0.3 and Null datasource


Thanks,
I can't believe that was it, I was concentrating on the first "D" and
totalling ignored the "S". Thanks again. This is what I get for coding on
Friday! :-)

Dean Chen



-----Original Message-----
From: Phillip Morelock [mailto:subscriptions@phillipmorelock.com]
Sent: Friday, May 24, 2002 6:06 PM
To: Tomcat Users List
Subject: Re: tomcat 4.0.3 and Null datasource


just reading your email, i think you should look at how you spell each
instance of this word:

> setsDatasource


in some places it's setsDataSource

cheers
fillup

----------
Hi,

I am having trouble obtain datasource to get a connection, I've looked over
the mailing archives and followed the directions, but still can't get it to
work.

I'm using I'm using Tomcat 4.0.3 and Sybase jconn2.jar

I have a method that has this

            Context ctx = new InitialContext();
            Context envCtx = (Context) ctx.lookup("java:comp/env/");
    DataSource ds = (DataSource) envCtx.lookup("jdbc/setsDataSource");
    
    however, if I check for  if (ds == null), that is true, so the get
Connection that follows doesn't work.


I have tried different approaches, I've put jconn2.jar in my Web-inf/lib, I
have tried putting jconn2.jar in %tomcat%/common/lib, still doesn't work.

My settings are as follows
server.xml
      <Resource name="jdbc/setsDatasource" auth="Container"
            type="javax.sql.DataSource"/>
          <ResourceParams name="jdbc/setsDatasource">
            <parameter><name>driverClassName</name>
              <value>com.sybase.jdbc2.jdbc.SybDriver</value>
            </parameter>
            <parameter><name>url</name>
              <value>jdbc:sybase:Tds:servername:4946/database</value>
            </parameter>
            <parameter><name>user</name><value>username</value></parameter>
 
<parameter><name>password</name><value>password</value></parameter>
          </ResourceParams>

web.xml
  <resource-ref>
        <description>Sets Database</description>
        <res-ref-name>jdbc/setsDataSource</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
  </resource-ref>

Any ideas would be appreciated, thanks.

Dean




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



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

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

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


Mime
View raw message