Re: Tomcat 5.5.8 Postgresql 7.4.6 No suitable driver exception

2005-03-05 Thread Ole Ersoy
Thanks Doug!

For the rest of us, here are the steps I used to
resolve this, per Doug's info:

First I was missing some very important posgresql
configuration steps.

These can be found here:
http://www.fankhausers.com/postgresql/jdbc/

Summary:
- Needed to enable tcp/ip connection to the database
  located in var/lib/pgsql/data/postresql.conf
- Needed to allow access to the database (pg_hba.conf)

After this I left server.xml in its original state (as
it comes with tomcat) and put the application context
descriptor containing the connection pool in
$CATALINA_HOME/conf/Catalina/localhost

and . IT WORKS

Thanks again,
- Ole 

--- Parsons Technical Services
<[EMAIL PROTECTED]> wrote:

> Your update to the server.xml must be one of two
> way.
> 
> Declare it in a context tag set or in a
> GlobalResource tag set.
> 
> If done in a GlobalResource then a ResourceLink is
> also needed.
> 
> If you don't declare your context in the server.xml,
> you can declare your 
> resource in your context tag that resides in your
> app. This will make it 
> available to your app only.
> 
> I think there is a typo on the page. I believe that
> it must be declared 
> inside a context pair. The page text lead one to
> think it only has to be 
> inside the host tags.
> 
>
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations
> 
> Doug
> 
> - Original Message - 
> From: "Ole Ersoy" <[EMAIL PROTECTED]>
> To: "Tomcat Users List"
> 
> Sent: Friday, March 04, 2005 9:45 AM
> Subject: Re: Tomcat 5.5.8 Postgresql 7.4.6 No
> suitable driver exception
> 
> 
> > Sorry - wrong wget lines - I meant to provide this
> > statement:
> > wget
> >
>
http://jdbc.postgresql.org/download/pg74.215.jdbc2.jar
> >
> > I then untarred it in the common lib directory.  I
> > tried both the type 2 and type 3 driver.
> >
> > Thanks,
> > - Ole
> > --- Ole Ersoy <[EMAIL PROTECTED]> wrote:
> >
> >> David,
> >>
> >> I downloaded it and un-zipped it here:
> >>
> >> > cd /usr/local/jakarta-tomcat-5.5.7/common/lib
> >> >- wget
> >>
>
>>http://cvs.apache.org/builds/jakarta-taglibs/nightly/jakarta-taglibs-20050303.tar.gz
> >> >- tar xzf jakarta-taglibs-20050303.tar.gz
> >>
> >> I've tried both type two and type 3 drivers,
> since
> >> the
> >> example was a bit vague on which driver is
> currently
> >> supported by DBCP.
> >>
> >> Thanks though,
> >> - Ole
> >> --- David Smith <[EMAIL PROTECTED]> wrote:
> >>
> >> > One of the only things I don't see here -- and
> >> it's
> >> > a big one -- no
> >> > postgresql jdbc driver in common/lib.  Tomcat
> >> > doesn't come with it by
> >> > default.  You have to download the latest and
> >> > install it before this
> >> > will work.
> >> >
> >> > --David
> >> >
> >> > Ole Ersoy wrote:
> >> >
> >> > >Hi everybody,
> >> > >
> >> > >I'm attempting to get the JNDI Datasource How
> To
> >> > >example for Postgresql to work.
> >> > >
> >> > >Here is the URL for the example:
> >> >
> >>
>
>>http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
> >> > >
> >> > >After completing the listed steps the test.jsp
> >> > error
> >> > >page reports:
> >> > >"java.sql.SQLException: No suitable driver"
> >> > >
> >> > >Here are all my configuration steps, including
> >> the
> >> > >files:
> >> > >- On Fedora Core 3 - adduser postgres
> >> > >- passwd postgres (set to postgres)
> >> > >- chown postgres /var/lib/pqsql/data
> >> > >- /usr/bin/initdb -D /var/lib/pgsql/data
> >> > >- /usr/bin/postmaster -D /var/lib/pgsql/data
> >> > >logfile
> >> > >2>&1 &
> >> > >- createdb test postgres
> >> > >- psql test
> >> > >create table testdata (id int not null primary
> >> key,
> >> > >foo varchar(25), bar int);
> >> > >insert into testdata values(1, 'hello',
> 12345);
> >> > >- Update server.xml with this under the
> 
> >> > tag:
> >&

Re: Tomcat 5.5.8 Postgresql 7.4.6 No suitable driver exception

2005-03-04 Thread Parsons Technical Services
Your update to the server.xml must be one of two way.
Declare it in a context tag set or in a GlobalResource tag set.
If done in a GlobalResource then a ResourceLink is also needed.
If you don't declare your context in the server.xml, you can declare your 
resource in your context tag that resides in your app. This will make it 
available to your app only.

I think there is a typo on the page. I believe that it must be declared 
inside a context pair. The page text lead one to think it only has to be 
inside the host tags.

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations
Doug
- Original Message - 
From: "Ole Ersoy" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Friday, March 04, 2005 9:45 AM
Subject: Re: Tomcat 5.5.8 Postgresql 7.4.6 No suitable driver exception


Sorry - wrong wget lines - I meant to provide this
statement:
wget
http://jdbc.postgresql.org/download/pg74.215.jdbc2.jar
I then untarred it in the common lib directory.  I
tried both the type 2 and type 3 driver.
Thanks,
- Ole
--- Ole Ersoy <[EMAIL PROTECTED]> wrote:
David,
I downloaded it and un-zipped it here:
> cd /usr/local/jakarta-tomcat-5.5.7/common/lib
>- wget
http://cvs.apache.org/builds/jakarta-taglibs/nightly/jakarta-taglibs-20050303.tar.gz
>- tar xzf jakarta-taglibs-20050303.tar.gz
I've tried both type two and type 3 drivers, since
the
example was a bit vague on which driver is currently
supported by DBCP.
Thanks though,
- Ole
--- David Smith <[EMAIL PROTECTED]> wrote:
> One of the only things I don't see here -- and
it's
> a big one -- no
> postgresql jdbc driver in common/lib.  Tomcat
> doesn't come with it by
> default.  You have to download the latest and
> install it before this
> will work.
>
> --David
>
> Ole Ersoy wrote:
>
> >Hi everybody,
> >
> >I'm attempting to get the JNDI Datasource How To
> >example for Postgresql to work.
> >
> >Here is the URL for the example:
>
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
> >
> >After completing the listed steps the test.jsp
> error
> >page reports:
> >"java.sql.SQLException: No suitable driver"
> >
> >Here are all my configuration steps, including
the
> >files:
> >- On Fedora Core 3 - adduser postgres
> >- passwd postgres (set to postgres)
> >- chown postgres /var/lib/pqsql/data
> >- /usr/bin/initdb -D /var/lib/pgsql/data
> >- /usr/bin/postmaster -D /var/lib/pgsql/data
> >logfile
> >2>&1 &
> >- createdb test postgres
> >- psql test
> >create table testdata (id int not null primary
key,
> >foo varchar(25), bar int);
> >insert into testdata values(1, 'hello', 12345);
> >- Update server.xml with this under the 
> tag:
> > >  type="javax.sql.DataSource"
> >driverClassName="org.postgresql.Driver"
> >
> url="jdbc:postgresql://127.0.0.1:5432/mydb"
> >  username="postgres" password="postgres"
> >maxActive="20" maxIdle="10" maxWait="-1"/>
> >
> > cd /usr/local/jakarta-tomcat-5.5.7/common/lib
> >- wget
>
http://cvs.apache.org/builds/jakarta-taglibs/nightly/jakarta-taglibs-20050303.tar.gz
> >- tar xzf jakarta-taglibs-20050303.tar.gz
> >- mkdir /var/www/webapps/dbtest
> >- vi /var/www/webapps/dbtest/test.jsp (I put the
> >example code here)
> >Here it is just in case:
> >
> >
> ><%@ taglib uri="http://java.sun.com/jsp/jstl/sql";
> >prefix="sql" %>
> ><%@ taglib
uri="http://java.sun.com/jsp/jstl/core";
> >prefix="c" %>
> >
> >
> >select id, foo, bar from testdata
> >
> >
> >
> >  
> >DB Test
> >  
> >  
> >
> >  Results
> >
> >
> >Foo ${row.foo}
> >Bar ${row.bar}
> >
> >
> >  
> >
> >
> >- mkdir /var/www/webapps/dbtest/WEB-INF/
> >- vi /var/www/webapps/dbtest/WEB-INF/web.xml
> >
> >I have the following in web.xml
> >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";
> >version="2.4">
> >  Postgre Test App
> >  
> >  DB Connection
> >  jdbc/test
> >  javax.sql.DataSource
> >  Container
> >  
> >
> >
> >I now copy th

Re: Tomcat 5.5.8 Postgresql 7.4.6 No suitable driver exception

2005-03-04 Thread Ole Ersoy
Sorry - wrong wget lines - I meant to provide this
statement:
wget
http://jdbc.postgresql.org/download/pg74.215.jdbc2.jar

I then untarred it in the common lib directory.  I
tried both the type 2 and type 3 driver.

Thanks,
- Ole
--- Ole Ersoy <[EMAIL PROTECTED]> wrote:

> David,
> 
> I downloaded it and un-zipped it here:
> 
> > cd /usr/local/jakarta-tomcat-5.5.7/common/lib
> >- wget
>
>http://cvs.apache.org/builds/jakarta-taglibs/nightly/jakarta-taglibs-20050303.tar.gz
> >- tar xzf jakarta-taglibs-20050303.tar.gz
> 
> I've tried both type two and type 3 drivers, since
> the
> example was a bit vague on which driver is currently
> supported by DBCP.
> 
> Thanks though,
> - Ole
> --- David Smith <[EMAIL PROTECTED]> wrote:
> 
> > One of the only things I don't see here -- and
> it's
> > a big one -- no 
> > postgresql jdbc driver in common/lib.  Tomcat
> > doesn't come with it by 
> > default.  You have to download the latest and
> > install it before this 
> > will work.
> > 
> > --David
> > 
> > Ole Ersoy wrote:
> > 
> > >Hi everybody,
> > >
> > >I'm attempting to get the JNDI Datasource How To
> > >example for Postgresql to work.
> > >
> > >Here is the URL for the example:
> >
>
>http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
> > >
> > >After completing the listed steps the test.jsp
> > error
> > >page reports:
> > >"java.sql.SQLException: No suitable driver"
> > >
> > >Here are all my configuration steps, including
> the
> > >files:
> > >- On Fedora Core 3 - adduser postgres
> > >- passwd postgres (set to postgres)
> > >- chown postgres /var/lib/pqsql/data
> > >- /usr/bin/initdb -D /var/lib/pgsql/data
> > >- /usr/bin/postmaster -D /var/lib/pgsql/data
> > >logfile
> > >2>&1 &
> > >- createdb test postgres
> > >- psql test
> > >create table testdata (id int not null primary
> key,
> > >foo varchar(25), bar int);
> > >insert into testdata values(1, 'hello', 12345);
> > >- Update server.xml with this under the 
> > tag:
> > > > >  type="javax.sql.DataSource"
> > >driverClassName="org.postgresql.Driver"
> > > 
> > url="jdbc:postgresql://127.0.0.1:5432/mydb"
> > >  username="postgres" password="postgres"
> > >maxActive="20" maxIdle="10" maxWait="-1"/>
> > >
> > > cd /usr/local/jakarta-tomcat-5.5.7/common/lib
> > >- wget
> >
>
>http://cvs.apache.org/builds/jakarta-taglibs/nightly/jakarta-taglibs-20050303.tar.gz
> > >- tar xzf jakarta-taglibs-20050303.tar.gz
> > >- mkdir /var/www/webapps/dbtest
> > >- vi /var/www/webapps/dbtest/test.jsp (I put the
> > >example code here)
> > >Here it is just in case:
> > >   
> > >
> > ><%@ taglib uri="http://java.sun.com/jsp/jstl/sql";
> > >prefix="sql" %>
> > ><%@ taglib
> uri="http://java.sun.com/jsp/jstl/core";
> > >prefix="c" %>
> > >
> > >
> > >select id, foo, bar from testdata
> > >
> > >
> > >
> > >  
> > >DB Test
> > >  
> > >  
> > >
> > >  Results
> > >  
> > >
> > >Foo ${row.foo}
> > >Bar ${row.bar}
> > >
> > >
> > >  
> > >
> > >
> > >- mkdir /var/www/webapps/dbtest/WEB-INF/
> > >- vi /var/www/webapps/dbtest/WEB-INF/web.xml
> > >
> > >I have the following in web.xml
> > >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";
> > >version="2.4">
> > >  Postgre Test App
> > >  
> > >  DB Connection
> > >  jdbc/test
> > >  javax.sql.DataSource
> > >  Container
> > >  
> > >
> > >
> > >I now copy the necessary tag libraries over to
> the
> > >application directory:
> > >- mkdir /var/www/webapps/dbtest/WEB-INF/lib
> > >- cp
> >
>
>/usr/local/jakarta-tomcat-5.5.7

Re: Tomcat 5.5.8 Postgresql 7.4.6 No suitable driver exception

2005-03-04 Thread Ole Ersoy
David,

I downloaded it and un-zipped it here:

> cd /usr/local/jakarta-tomcat-5.5.7/common/lib
>- wget
>http://cvs.apache.org/builds/jakarta-taglibs/nightly/jakarta-taglibs-20050303.tar.gz
>- tar xzf jakarta-taglibs-20050303.tar.gz

I've tried both type two and type 3 drivers, since the
example was a bit vague on which driver is currently
supported by DBCP.

Thanks though,
- Ole
--- David Smith <[EMAIL PROTECTED]> wrote:

> One of the only things I don't see here -- and it's
> a big one -- no 
> postgresql jdbc driver in common/lib.  Tomcat
> doesn't come with it by 
> default.  You have to download the latest and
> install it before this 
> will work.
> 
> --David
> 
> Ole Ersoy wrote:
> 
> >Hi everybody,
> >
> >I'm attempting to get the JNDI Datasource How To
> >example for Postgresql to work.
> >
> >Here is the URL for the example:
>
>http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
> >
> >After completing the listed steps the test.jsp
> error
> >page reports:
> >"java.sql.SQLException: No suitable driver"
> >
> >Here are all my configuration steps, including the
> >files:
> >- On Fedora Core 3 - adduser postgres
> >- passwd postgres (set to postgres)
> >- chown postgres /var/lib/pqsql/data
> >- /usr/bin/initdb -D /var/lib/pgsql/data
> >- /usr/bin/postmaster -D /var/lib/pgsql/data
> >logfile
> >2>&1 &
> >- createdb test postgres
> >- psql test
> >create table testdata (id int not null primary key,
> >foo varchar(25), bar int);
> >insert into testdata values(1, 'hello', 12345);
> >- Update server.xml with this under the 
> tag:
> > >  type="javax.sql.DataSource"
> >driverClassName="org.postgresql.Driver"
> > 
> url="jdbc:postgresql://127.0.0.1:5432/mydb"
> >  username="postgres" password="postgres"
> >maxActive="20" maxIdle="10" maxWait="-1"/>
> >
> > cd /usr/local/jakarta-tomcat-5.5.7/common/lib
> >- wget
>
>http://cvs.apache.org/builds/jakarta-taglibs/nightly/jakarta-taglibs-20050303.tar.gz
> >- tar xzf jakarta-taglibs-20050303.tar.gz
> >- mkdir /var/www/webapps/dbtest
> >- vi /var/www/webapps/dbtest/test.jsp (I put the
> >example code here)
> >Here it is just in case:
> > 
> >
> ><%@ taglib uri="http://java.sun.com/jsp/jstl/sql";
> >prefix="sql" %>
> ><%@ taglib uri="http://java.sun.com/jsp/jstl/core";
> >prefix="c" %>
> >
> >
> >select id, foo, bar from testdata
> >
> >
> >
> >  
> >DB Test
> >  
> >  
> >
> >  Results
> >  
> >
> >Foo ${row.foo}
> >Bar ${row.bar}
> >
> >
> >  
> >
> >
> >- mkdir /var/www/webapps/dbtest/WEB-INF/
> >- vi /var/www/webapps/dbtest/WEB-INF/web.xml
> >
> >I have the following in web.xml
> >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";
> >version="2.4">
> >  Postgre Test App
> >  
> >  DB Connection
> >  jdbc/test
> >  javax.sql.DataSource
> >  Container
> >  
> >
> >
> >I now copy the necessary tag libraries over to the
> >application directory:
> >- mkdir /var/www/webapps/dbtest/WEB-INF/lib
> >- cp
>
>/usr/local/jakarta-tomcat-5.5.7/common/lib/jakarta-taglibs/standard/lib/jstl.jar
> >standard.jar /var/www/webapps/dbtest/WEB-INF/lib
> >- cp
>
>/usr/local/jakarta-tomcat-5.5.7/common/lib/jakarta-taglibs/standard/tld/*
> >/var/www/webapps/dbtest/WEB-INF
> >
> >- catalina.sh run
> >- http://localhost:8080/dbtest/test.jsp
> >- And the console gives the following:
> >
> >[EMAIL PROTECTED] local]# catalina.sh run
> >Using CATALINA_BASE:  
> /usr/local/jakarta-tomcat-5.5.7
> >Using CATALINA_HOME:  
> /usr/local/jakarta-tomcat-5.5.7
> >Using CATALINA_TMPDIR:
> >/usr/local/jakarta-tomcat-5.5.7/temp
> >Using JRE_HOME:   /usr/java/jdk1.5.0
> >Mar 3, 2005 10:22:45 PM
> >org.apache.coyote.http11.Http11Protocol init
> >INFO: Initializing Coyote HTTP/1.1 on http-8080
> >Mar 3, 2005 10:22:45 PM
> >org.apache.catalina.startup.Catalina load
> >INFO: Initializ

Re: Tomcat 5.5.8 Postgresql 7.4.6 No suitable driver exception

2005-03-04 Thread David Smith
One of the only things I don't see here -- and it's a big one -- no 
postgresql jdbc driver in common/lib.  Tomcat doesn't come with it by 
default.  You have to download the latest and install it before this 
will work.

--David
Ole Ersoy wrote:
Hi everybody,
I'm attempting to get the JNDI Datasource How To
example for Postgresql to work.
Here is the URL for the example:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
After completing the listed steps the test.jsp error
page reports:
"java.sql.SQLException: No suitable driver"
Here are all my configuration steps, including the
files:
- On Fedora Core 3 - adduser postgres
- passwd postgres (set to postgres)
- chown postgres /var/lib/pqsql/data
- /usr/bin/initdb -D /var/lib/pgsql/data
- /usr/bin/postmaster -D /var/lib/pgsql/data >logfile
2>&1 &
- createdb test postgres
- psql test
create table testdata (id int not null primary key,
foo varchar(25), bar int);
insert into testdata values(1, 'hello', 12345);
- Update server.xml with this under the  tag:


cd /usr/local/jakarta-tomcat-5.5.7/common/lib
- wget
http://cvs.apache.org/builds/jakarta-taglibs/nightly/jakarta-taglibs-20050303.tar.gz
- tar xzf jakarta-taglibs-20050303.tar.gz
- mkdir /var/www/webapps/dbtest
- vi /var/www/webapps/dbtest/test.jsp (I put the
example code here)
Here it is just in case:

<%@ taglib uri="http://java.sun.com/jsp/jstl/sql";
prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core";
prefix="c" %>

select id, foo, bar from testdata


 
   DB Test
 
 
 Results
 

   Foo ${row.foo}
   Bar ${row.bar}


 

- mkdir /var/www/webapps/dbtest/WEB-INF/
- vi /var/www/webapps/dbtest/WEB-INF/web.xml
I have the following in web.xml
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";
   version="2.4">
 Postgre Test App
 
 DB Connection
 jdbc/test
 javax.sql.DataSource
 Container
 


I now copy the necessary tag libraries over to the
application directory:
- mkdir /var/www/webapps/dbtest/WEB-INF/lib
- cp
/usr/local/jakarta-tomcat-5.5.7/common/lib/jakarta-taglibs/standard/lib/jstl.jar
standard.jar /var/www/webapps/dbtest/WEB-INF/lib
- cp
/usr/local/jakarta-tomcat-5.5.7/common/lib/jakarta-taglibs/standard/tld/*
/var/www/webapps/dbtest/WEB-INF
- catalina.sh run
- http://localhost:8080/dbtest/test.jsp
- And the console gives the following:
[EMAIL PROTECTED] local]# catalina.sh run
Using CATALINA_BASE:   /usr/local/jakarta-tomcat-5.5.7
Using CATALINA_HOME:   /usr/local/jakarta-tomcat-5.5.7
Using CATALINA_TMPDIR:
/usr/local/jakarta-tomcat-5.5.7/temp
Using JRE_HOME:   /usr/java/jdk1.5.0
Mar 3, 2005 10:22:45 PM
org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Mar 3, 2005 10:22:45 PM
org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1106 ms
Mar 3, 2005 10:22:45 PM
org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 3, 2005 10:22:45 PM
org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.7
Mar 3, 2005 10:22:45 PM
org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Mar 3, 2005 10:22:46 PM
org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 3, 2005 10:22:46 PM
org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Mar 3, 2005 10:22:46 PM org.apache.jk.server.JkMain
start
INFO: Jk running ID=0 time=0/142  config=null
Mar 3, 2005 10:22:47 PM
org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath
resource
Mar 3, 2005 10:22:47 PM
org.apache.catalina.startup.Catalina start
INFO: Server startup in 1701 ms
Mar 3, 2005 10:23:29 PM
org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw
exception
javax.servlet.jsp.JspException: Unable to get
connection, DataSource invalid:
"java.sql.SQLException: No suitable driver"
   at
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unknown
Source)
   at
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknown
Source)
   at
org.apache.jsp.test_jsp._jspx_meth_sql_query_0(org.apache.jsp.test_jsp:101)
   at
org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:58)
   at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
   at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
   at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
  

Tomcat 5.5.8 Postgresql 7.4.6 No suitable driver exception

2005-03-03 Thread Ole Ersoy
Hi everybody,

I'm attempting to get the JNDI Datasource How To
example for Postgresql to work.

Here is the URL for the example:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html

After completing the listed steps the test.jsp error
page reports:
"java.sql.SQLException: No suitable driver"

Here are all my configuration steps, including the
files:
- On Fedora Core 3 - adduser postgres
- passwd postgres (set to postgres)
- chown postgres /var/lib/pqsql/data
- /usr/bin/initdb -D /var/lib/pgsql/data
- /usr/bin/postmaster -D /var/lib/pgsql/data >logfile
2>&1 &
- createdb test postgres
- psql test
create table testdata (id int not null primary key,
foo varchar(25), bar int);
insert into testdata values(1, 'hello', 12345);
- Update server.xml with this under the  tag:


 cd /usr/local/jakarta-tomcat-5.5.7/common/lib
- wget
http://cvs.apache.org/builds/jakarta-taglibs/nightly/jakarta-taglibs-20050303.tar.gz
- tar xzf jakarta-taglibs-20050303.tar.gz
- mkdir /var/www/webapps/dbtest
- vi /var/www/webapps/dbtest/test.jsp (I put the
example code here)
Here it is just in case:


<%@ taglib uri="http://java.sun.com/jsp/jstl/sql";
prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core";
prefix="c" %>


select id, foo, bar from testdata



  
DB Test
  
  

  Results
  

Foo ${row.foo}
Bar ${row.bar}


  


- mkdir /var/www/webapps/dbtest/WEB-INF/
- vi /var/www/webapps/dbtest/WEB-INF/web.xml

I have the following in web.xml
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";
version="2.4">
  Postgre Test App
  
  DB Connection
  jdbc/test
  javax.sql.DataSource
  Container
  


I now copy the necessary tag libraries over to the
application directory:
- mkdir /var/www/webapps/dbtest/WEB-INF/lib
- cp
/usr/local/jakarta-tomcat-5.5.7/common/lib/jakarta-taglibs/standard/lib/jstl.jar
standard.jar /var/www/webapps/dbtest/WEB-INF/lib
- cp
/usr/local/jakarta-tomcat-5.5.7/common/lib/jakarta-taglibs/standard/tld/*
/var/www/webapps/dbtest/WEB-INF

- catalina.sh run
- http://localhost:8080/dbtest/test.jsp
- And the console gives the following:

[EMAIL PROTECTED] local]# catalina.sh run
Using CATALINA_BASE:   /usr/local/jakarta-tomcat-5.5.7
Using CATALINA_HOME:   /usr/local/jakarta-tomcat-5.5.7
Using CATALINA_TMPDIR:
/usr/local/jakarta-tomcat-5.5.7/temp
Using JRE_HOME:   /usr/java/jdk1.5.0
Mar 3, 2005 10:22:45 PM
org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Mar 3, 2005 10:22:45 PM
org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1106 ms
Mar 3, 2005 10:22:45 PM
org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 3, 2005 10:22:45 PM
org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.7
Mar 3, 2005 10:22:45 PM
org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Mar 3, 2005 10:22:46 PM
org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 3, 2005 10:22:46 PM
org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Mar 3, 2005 10:22:46 PM org.apache.jk.server.JkMain
start
INFO: Jk running ID=0 time=0/142  config=null
Mar 3, 2005 10:22:47 PM
org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath
resource
Mar 3, 2005 10:22:47 PM
org.apache.catalina.startup.Catalina start
INFO: Server startup in 1701 ms
Mar 3, 2005 10:23:29 PM
org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw
exception
javax.servlet.jsp.JspException: Unable to get
connection, DataSource invalid:
"java.sql.SQLException: No suitable driver"
at
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unknown
Source)
at
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknown
Source)
at
org.apache.jsp.test_jsp._jspx_meth_sql_query_0(org.apache.jsp.test_jsp:101)
at
org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:58)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli

Re: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver

2004-08-02 Thread Isen,Ciji
Thanks a lot!!!
cheers,
Isen
Shapira, Yoav wrote:
Hi,
If it's inside GlobalNamingResources, you need a  to it in
your Context.
You should also place a  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:[EMAIL PROTECTED]
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.
<[EMAIL PROTECTED] contentType="text/html"%>
<%@ page import="java.util.*" %>

JSP Page

<%
  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");
  }
  %>


Pasted below is the server.xml files part that i added.

  

  url
jdbc:mysql://localhost:3306/EconDollars?autoReconnect=true
   

e>
 



  validationQuery
  select * from major


  maxIdle
  5


  maxActive
  20


  driverClassName
  com.mysql.jdbc.Driver


  maxWait
  1


  username
  asdf


  factory
  org.apache.commons.dbcp.BasicDataSourceFactory


  password
  asdf

  
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 

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



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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

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


Re: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver

2004-08-02 Thread Isen,Ciji
Oh ya. That was the problem. :-)) It was searching for the resource in 
the context. But i am surprised that its not able to access a Global 
resource. Logically the top level resource ought to be available at the 
lower levels too.

regards,
Isen
Shapira, Yoav wrote:
Hi,
If it's inside GlobalNamingResources, you need a  to it in
your Context.
You should also place a  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:[EMAIL PROTECTED]
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.
<[EMAIL PROTECTED] contentType="text/html"%>
<%@ page import="java.util.*" %>

JSP Page

<%
  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");
  }
  %>


Pasted below is the server.xml files part that i added.

  

  url
jdbc:mysql://localhost:3306/EconDollars?autoReconnect=true
   

e>
 



  validationQuery
  select * from major


  maxIdle
  5


  maxActive
  20


  driverClassName
  com.mysql.jdbc.Driver


  maxWait
  1


  username
  asdf


  factory
  org.apache.commons.dbcp.BasicDataSourceFactory


  password
  asdf

  
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 

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



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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

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


RE: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver

2004-08-02 Thread Shapira, Yoav

Hi,
If it's inside GlobalNamingResources, you need a  to it in
your Context.

You should also place a  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:[EMAIL PROTECTED]
>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.
>
><[EMAIL PROTECTED] contentType="text/html"%>
>
><%@ page import="java.util.*" %>
>
>
>JSP Page
>
>
><%
>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");
>}
>%>
>
>
>
>Pasted below is the server.xml files part that i added.
> type="javax.sql.DataSource"/>
>
>  
>url
>
>jdbc:mysql://localhost:3306/EconDollars?autoReconnect=true
>  
>  
>validationQuery
>select * from major
>  
>  
>maxIdle
>5
>  
>  
>maxActive
>20
>  
>  
>driverClassName
>com.mysql.jdbc.Driver
>  
>  
>maxWait
>1
>  
>  
>username
>asdf
>  
>  
>factory
>org.apache.commons.dbcp.BasicDataSourceFactory
>  
> 
>password
>asdf
>  
>
>
>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: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver

2004-08-02 Thread Isen,Ciji
I had tried that. It used to be in commons but felt may be its not able 
to find the driver and so tried to move it to common.lib. But that too 
didnt help!! :-(((

Isen
Shapira, Yoav wrote:
Hi,
Is the driver in the common/lib directory?
Yoav Shapira
Millennium Research Informatics
 

-Original Message-
From: Robert Bateman [mailto:[EMAIL PROTECTED]
Sent: Monday, August 02, 2004 3:02 PM
To: Tomcat Users List
Subject: Re: javax.servlet.ServletException: Cannot create JDBC driver
   

of
 

class '' for connect URL 'null', cause: No suitable driver
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   



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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

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


Re: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver

2004-08-02 Thread Isen,Ciji
I wanted to tinker around hence i decide to just test using a jsp. The 
jsp code is pasted below.

<[EMAIL PROTECTED] contentType="text/html"%>
<%@ page import="java.util.*" %>

JSP Page

<%
   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");
   }
   %>



Pasted below is the server.xml files part that i added.

   
 
   url
   
jdbc:mysql://localhost:3306/EconDollars?autoReconnect=true
 
 
   validationQuery
   select * from major
 
 
   maxIdle
   5
 
 
   maxActive
   20
 
 
   driverClassName
   com.mysql.jdbc.Driver
 
 
   maxWait
   1
 
 
   username
   asdf
 
 
   factory
   org.apache.commons.dbcp.BasicDataSourceFactory
 

   password
   asdf
 
   

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

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


Re: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver

2004-08-02 Thread David Smith
Hi Isen.
This is a common problem and usually means your JNDI naming is 
inconsistent or your missing config info in one or more of the following 
files:

server.xml ( if you defined your JDBC resource here )
[context].xml
web.xml
Java code
Essentially make sure there are no spelling/capitalization mistakes and 
all the necessary parts are there, including the JDBC driver jar file in 
the common/lib directory.  The JNDI howtos on the Jakarta site is a good 
place to look:

(these are for tomcat 5, there should be equivalents for tomcat 4)
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
If you're still running into brick walls, post appropriate sections of 
all the above files replacing security sensitive sections (database 
username, password) with *'s or something.

--David
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver

2004-08-02 Thread Shapira, Yoav

Hi,
Is the driver in the common/lib directory?

Yoav Shapira
Millennium Research Informatics


>-Original Message-
>From: Robert Bateman [mailto:[EMAIL PROTECTED]
>Sent: Monday, August 02, 2004 3:02 PM
>To: Tomcat Users List
>Subject: Re: javax.servlet.ServletException: Cannot create JDBC driver
of
>class '' for connect URL 'null', cause: No suitable driver
>
>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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver

2004-08-02 Thread Robert Bateman
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver

2004-08-02 Thread Isen,Ciji
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Tomcat -> MySQL = No suitable driver ERROR

2004-07-02 Thread Jan Behrens
Good to hear that it is finally working. I am sorry, but I have never used
any sql tag-lib so I can't really help you with this problem. I would
suggest though, to google for a simple example - if that doesn't help open a
new thread here in the list and ask specifically for help with your new
problem. I am sure that someone will know...

Jan

-Original Message-
From: Briggs, Patrick [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 02, 2004 6:36 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat -> MySQL = No suitable driver ERROR


David had me do this following proceedure and that seemed to work, but my
JSP does not return any data so far.  The database finally connected though.

When I view this JSP page, all it prints is:

${row.foo} ${row.bar}

instead of the data that should be contained inside those variables.

test.jsp:

<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %> <%@ taglib
uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>


select * from testdata



  
DB Test
  
  

  Results
  





  



>From David:

Here's first what should be in 
{TOMCAT_HOME}/conf/Catalina/localhost/DBTest.xml:



  

  



  factory
  org.apache.commons.dbcp.BasicDataSourceFactory



  maxActive
  100



  maxIdle
  30



  maxWait
  10




  username
  DBTestUser




  password
  *


  driverClassName
  com.mysql.jdbc.Driver




  url
  jdbc:mysql://localhost:3306/DBTest?autoReconnect=true

  



-
Ok, now what should be in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml:



http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>


  DbTest Application

  

  
  
DBTest Database
jdbc/DbTest
javax.sql.DataSource
Container
  



-
This exact formula has worked for me in I can't even count how many apps 
I've setup.

--David

-Original Message-
From: Jan Behrens [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 1:50 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat -> MySQL = No suitable driver ERROR


yes patrick,

i guess that is what david and i want so your dbtest works. allthough the
posted contents of web.xml lack a doctype or schema definition (see hassans
post). now, have you tried this?

cheers, jan

This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential or privileged
information.  Any unauthorized review, use, disclosure or distribution is
prohibited.  If you are not the intended recipient, please contact the
sender by reply e-mail and destroy the message.


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



RE: Tomcat -> MySQL = No suitable driver ERROR

2004-07-02 Thread Briggs, Patrick
David had me do this following proceedure and that seemed to work, but my
JSP does not return any data so far.  The database finally connected though.

When I view this JSP page, all it prints is:

${row.foo} ${row.bar}

instead of the data that should be contained inside those variables.

test.jsp:

<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>


select * from testdata



  
DB Test
  
  

  Results
  





  



>From David:

Here's first what should be in 
{TOMCAT_HOME}/conf/Catalina/localhost/DBTest.xml:



  

  



  factory
  org.apache.commons.dbcp.BasicDataSourceFactory



  maxActive
  100



  maxIdle
  30



  maxWait
  10




  username
  DBTestUser




  password
  *


  driverClassName
  com.mysql.jdbc.Driver




  url
  jdbc:mysql://localhost:3306/DBTest?autoReconnect=true

  



-
Ok, now what should be in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml:



http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>


  DbTest Application

  

  
  
DBTest Database
jdbc/DbTest
javax.sql.DataSource
Container
  



-
This exact formula has worked for me in I can't even count how many apps 
I've setup.

--David

-Original Message-
From: Jan Behrens [mailto:[EMAIL PROTECTED]
Sent: Friday, July 02, 2004 1:50 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat -> MySQL = No suitable driver ERROR


yes patrick,

i guess that is what david and i want so your dbtest works. allthough the
posted contents of web.xml lack a doctype or schema definition (see hassans
post). now, have you tried this?

cheers, jan

This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential or privileged
information.  Any unauthorized review, use, disclosure or distribution is
prohibited.  If you are not the intended recipient, please contact the
sender by reply e-mail and destroy the message.


RE: Tomcat -> MySQL = No suitable driver ERROR

2004-07-02 Thread Jan Behrens
yes patrick,

i guess that is what david and i want so your dbtest works. allthough the
posted contents of web.xml lack a doctype or schema definition (see hassans
post). now, have you tried this?

cheers, jan

-Original Message-
From: Briggs, Patrick [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 01, 2004 7:59 PM
To: 'Tomcat Users List'
Cc: '[EMAIL PROTECTED]'
Subject: RE: Tomcat -> MySQL = No suitable driver ERROR


Ok, the contents of {TOMCAT_HOME}/conf/Catalina/localhost/DBTest.xml is:



  
  

  url
jdbc:mysql://cir-ops:3306/javatest?autoReconnect=true


  maxIdle
  15


  maxActive
  50


  driverClassName
  com.mysql.jdbc.Driver


  maxWait
  1


  removeAbandoned
  true


  username
  javauser


  factory
  org.apache.commons.dbcp.BasicDataSourceFactory


  removeAbandonedTimeout
  60


  password
  javadude

  


Contents of {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml is:


  MySQL Test App
  
  DB Connection
  jdbc/DBTest
  javax.sql.DataSource
  Container
  


Is this what you wanted?



-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 01, 2004 10:25 AM
To: Tomcat Users List
Subject: Re: Tomcat -> MySQL = No suitable driver ERROR


Hold on a minute.  I think we have a communication problem here.  I 
wasn't recommending you do that.  Slow down, take a breath and read my 
posts VERY carefully.

We are looking at two different files here.  DBTest.xml as a file 
containing the ... stuff should be in 
{TOMCAT_HOME}/conf/Catalina/localhost.  Leave that alone.

I was recommending you take the ... stuff 
you put in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/DBTest.xml and put that 
in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml.

Both files are needed with their respective parts.  The context 
definition needs to have the  and 
... sections to define a connection 
pool and make it available in tomcat's JNDI name space.  web.xml needs 
the ... stuff to make the connection pool 
avialable to your application.

--David

Briggs, Patrick wrote:

>Ok, I tried as you suggested, I deleted DBTest.xml out of the 
>conf/Catalina/localhost directory and placed it inside my web.xml for 
>the webapp itself.  I rebooted my machine, restarted Tomcat, same 
>error.  Still nothing.
>
>Here is what my web.xml looks like now:
>
>
>Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>
>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";
>version="2.4">
>  MySQL Test App
>  
>  DB Connection
>  jdbc/DBTest
>  javax.sql.DataSource
>  Container
>  
>
>reloadable="true" workDir="work\Catalina\localhost\DBTest">
>
>  type="javax.sql.DataSource"/>
>  
>
>  url
>   
>jdbc:mysql://cir-ops:3306/javatest?autoReconnect=true
>
>
>  maxIdle
>  15
>
>
>  maxActive
>  50
>
>
>  driverClassName
>  com.mysql.jdbc.Driver
>
>
>  maxWait
>  1
>
>
>  removeAbandoned
>  true
>
>
>  username
>  javauser
>
>
>  factory
>  org.apache.commons.dbcp.BasicDataSourceFactory
>
>
>  removeAbandonedTimeout
>  60
>
>
>  password
>  javadude
>
>  
>
>  
>
>-Original Message-
>From: David Smith [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, June 30, 2004 6:56 PM
>To: Tomcat Users List
>Subject: Re: Tomcat -> MySQL = No suitable driver ERROR
>
>
>Ok.  I think I'm seeing your trouble.  The stuff you have in
>WEB-INF/DB-Test.xml should be in web.xml instead.  In mine, the 
>... stuff is at the end of the file just 
>before the closing  tag.  In tomcat versions 3 and 4, the 
>order of elements in web.xml was important.  I believe that requirement 
>has been lifted in tomcat 5.
>
>--David
>
>Try that and see what happens.
>
>--David
>
>Briggs, Patrick wrote:
>
>  
>
>>I'm using an example someone else on this list gave me.
>>
>>So inside of {CATALINA_HOME}/conf/Catalina/localhost/DBTest.xml
>>
>>
>>>path="/DBtest" reloadable="true" 
>>workDir="work\Catalina\localhost\DBTest">
>>
>> >type="javax.sql.DataSource"/>  
>>   
>> url
>>  jdbc:mysq

RE: Tomcat -> MySQL = No suitable driver ERROR

2004-07-01 Thread Briggs, Patrick
Ok, the contents of {TOMCAT_HOME}/conf/Catalina/localhost/DBTest.xml is:



  
  

  url
jdbc:mysql://cir-ops:3306/javatest?autoReconnect=true


  maxIdle
  15


  maxActive
  50


  driverClassName
  com.mysql.jdbc.Driver


  maxWait
  1


  removeAbandoned
  true


  username
  javauser


  factory
  org.apache.commons.dbcp.BasicDataSourceFactory


  removeAbandonedTimeout
  60


  password
  javadude

  


Contents of {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml is:


  MySQL Test App
  
  DB Connection
  jdbc/DBTest
  javax.sql.DataSource
  Container
  


Is this what you wanted?



-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 01, 2004 10:25 AM
To: Tomcat Users List
Subject: Re: Tomcat -> MySQL = No suitable driver ERROR


Hold on a minute.  I think we have a communication problem here.  I 
wasn't recommending you do that.  Slow down, take a breath and read my 
posts VERY carefully.

We are looking at two different files here.  DBTest.xml as a file 
containing the ... stuff should be in 
{TOMCAT_HOME}/conf/Catalina/localhost.  Leave that alone.

I was recommending you take the ... stuff 
you put in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/DBTest.xml and put that 
in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml.

Both files are needed with their respective parts.  The context 
definition needs to have the  and 
... sections to define a connection 
pool and make it available in tomcat's JNDI name space.  web.xml needs 
the ... stuff to make the connection pool 
avialable to your application.

--David

Briggs, Patrick wrote:

>Ok, I tried as you suggested, I deleted DBTest.xml out of the
>conf/Catalina/localhost directory and placed it inside my web.xml for the
>webapp itself.  I rebooted my machine, restarted Tomcat, same error.  Still
>nothing.
>
>Here is what my web.xml looks like now:
>
>
>2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>
>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";
>version="2.4">
>  MySQL Test App
>  
>  DB Connection
>  jdbc/DBTest
>  javax.sql.DataSource
>  Container
>  
>
>path="/DBtest" reloadable="true"
>workDir="work\Catalina\localhost\DBTest">
>
>  type="javax.sql.DataSource"/>
>  
>
>  url
>   
>jdbc:mysql://cir-ops:3306/javatest?autoReconnect=true
>
>
>  maxIdle
>  15
>
>
>  maxActive
>  50
>
>
>  driverClassName
>  com.mysql.jdbc.Driver
>
>
>  maxWait
>  1
>
>
>  removeAbandoned
>  true
>
>
>  username
>  javauser
>
>
>  factory
>  org.apache.commons.dbcp.BasicDataSourceFactory
>
>
>  removeAbandonedTimeout
>  60
>
>
>  password
>  javadude
>
>  
>
>  
>
>-Original Message-
>From: David Smith [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, June 30, 2004 6:56 PM
>To: Tomcat Users List
>Subject: Re: Tomcat -> MySQL = No suitable driver ERROR
>
>
>Ok.  I think I'm seeing your trouble.  The stuff you have in 
>WEB-INF/DB-Test.xml should be in web.xml instead.  In mine, the 
>... stuff is at the end of the file just 
>before the closing  tag.  In tomcat versions 3 and 4, the 
>order of elements in web.xml was important.  I believe that requirement 
>has been lifted in tomcat 5.
>
>--David
>
>Try that and see what happens.
>
>--David
>
>Briggs, Patrick wrote:
>
>  
>
>>I'm using an example someone else on this list gave me. 
>>
>>So inside of {CATALINA_HOME}/conf/Catalina/localhost/DBTest.xml
>>
>>
>>>path="/DBtest" reloadable="true"
>>workDir="work\Catalina\localhost\DBTest">
>>
>> >type="javax.sql.DataSource"/>
>> 
>>   
>> url
>>  jdbc:mysql://cir-ops:3306/javatest?autoReconnect=true
>>   
>>   
>> maxIdle
>> 15
>>   
>>   
>> maxActive
>> 50
>>   
>>   
>> driverClassName
>> com.mysql.jdbc.Driver
>>   
>>   
>> maxWait
>> 1
>>   
>>   
>> removeAbandoned
>> true
>>   
>>   
>>

Re: Tomcat -> MySQL = No suitable driver ERROR

2004-07-01 Thread Hassan Schroeder
David Smith wrote:
I was recommending you take the ... stuff 
you put in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/DBTest.xml and put that 
in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml.
Yes, and in addition --
Here is what my web.xml looks like now:

http://java.sun.com/dtd/web-app_2_3.dtd";>
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";
   version="2.4">
 MySQL Test App
?! You've got a 2.3 DOCTYPE and a 2.4 schema reference in the same
file, which is /seriously/ wrong. :-)  You want one or the other.
FWIW!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

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


Re: Tomcat -> MySQL = No suitable driver ERROR

2004-07-01 Thread David Smith
Hold on a minute.  I think we have a communication problem here.  I 
wasn't recommending you do that.  Slow down, take a breath and read my 
posts VERY carefully.

We are looking at two different files here.  DBTest.xml as a file 
containing the ... stuff should be in 
{TOMCAT_HOME}/conf/Catalina/localhost.  Leave that alone.

I was recommending you take the ... stuff 
you put in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/DBTest.xml and put that 
in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml.

Both files are needed with their respective parts.  The context 
definition needs to have the  and 
... sections to define a connection 
pool and make it available in tomcat's JNDI name space.  web.xml needs 
the ... stuff to make the connection pool 
avialable to your application.

--David
Briggs, Patrick wrote:
Ok, I tried as you suggested, I deleted DBTest.xml out of the
conf/Catalina/localhost directory and placed it inside my web.xml for the
webapp itself.  I rebooted my machine, restarted Tomcat, same error.  Still
nothing.
Here is what my web.xml looks like now:

http://java.sun.com/dtd/web-app_2_3.dtd";>
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";
   version="2.4">
 MySQL Test App
 
 DB Connection
 jdbc/DBTest
 javax.sql.DataSource
 Container
 

 
 
   
 url

jdbc:mysql://cir-ops:3306/javatest?autoReconnect=true
   
   
 maxIdle
 15
   
   
 maxActive
 50
   
   
 driverClassName
 com.mysql.jdbc.Driver
   
   
 maxWait
 1
   
   
 removeAbandoned
 true
   
   
 username
 javauser
   
   
 factory
 org.apache.commons.dbcp.BasicDataSourceFactory
   
   
 removeAbandonedTimeout
 60
   
   
 password
 javadude
   
 

 
-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 6:56 PM
To: Tomcat Users List
Subject: Re: Tomcat -> MySQL = No suitable driver ERROR
Ok.  I think I'm seeing your trouble.  The stuff you have in 
WEB-INF/DB-Test.xml should be in web.xml instead.  In mine, the 
... stuff is at the end of the file just 
before the closing  tag.  In tomcat versions 3 and 4, the 
order of elements in web.xml was important.  I believe that requirement 
has been lifted in tomcat 5.

--David
Try that and see what happens.
--David
Briggs, Patrick wrote:
 

I'm using an example someone else on this list gave me. 

So inside of {CATALINA_HOME}/conf/Catalina/localhost/DBTest.xml




  
url
jdbc:mysql://cir-ops:3306/javatest?autoReconnect=true
  
  
maxIdle
15
  
  
maxActive
50
  
  
driverClassName
com.mysql.jdbc.Driver
  
  
maxWait
1
  
  
removeAbandoned
true
  
  
username
javauser
  
  
factory
org.apache.commons.dbcp.BasicDataSourceFactory
  
  
removeAbandonedTimeout
60
  
  
password
javadude
  


The contents of {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml

http://java.sun.com/dtd/web-app_2_3.dtd";>
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";
  version="2.4">
MySQL Test App

DB Connection
jdbc/DBTest
javax.sql.DataSource
Container


Contents of {Catalina_Home/webapps/DBTest/test.jsp:
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>

select id, foo, bar from testdata



  DB Test


Results

  Foo ${row.foo}
  Bar ${row.bar}



The error message displayed on the web-broser for the URL:
http://localhost:8080/DBTest/test.jsp
javax.servlet.ServletException: Unable to get connection, DataSource
invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null', cause: No suitable driver"
	
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContext
   

I
 

mpl.java:825)
	
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm
   

p
 

l.java:758)
	org.apache.jsp.test_jsp._jspService(test_jsp.java:81)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
   

2
 

98)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
root cause 

javax.servlet

RE: Tomcat -> MySQL = No suitable driver ERROR

2004-07-01 Thread Briggs, Patrick
Why does it have to be so difficult?  Pretty soon I'll have to give up and
go back to PHP.  What I really want to do is try out Javaserver Faces.

-Original Message-
From: Robert Harper [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 01, 2004 9:38 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat -> MySQL = No suitable driver ERROR


I have seen this one too many times. It usually has to do with the naming
lookup. I have had to keep "playing" with the form of the name until it
worked.

Robert S. Harper
801.265.8800 ex. 255

> -Original Message-
> From: Briggs, Patrick [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 01, 2004 10:20 AM
> To: 'Tomcat Users List'
> Subject: RE: Tomcat -> MySQL = No suitable driver ERROR
> 
> Yeah, I just tried that and still no go.  Still getting:
> 
> javax.servlet.ServletException: Unable to get connection, DataSource
> invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
> driver of class '' for connect URL 'null', cause: No suitable driver"
> 
> -Original Message-
> From: Jan Behrens [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 01, 2004 1:04 AM
> To: 'Tomcat Users List'
> Subject: RE: Tomcat -> MySQL = No suitable driver ERROR
> 
> 
> David is right,
> 
> you will need to rename {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml
to
> {Catalina_Home}/webapps/DBTest/WEB-INF/web.xml and hopefully all will be
up
> and running.
> 
> Jan
> 
> -Original Message-
[snip]



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

This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential or privileged
information.  Any unauthorized review, use, disclosure or distribution is
prohibited.  If you are not the intended recipient, please contact the
sender by reply e-mail and destroy the message.


RE: Tomcat -> MySQL = No suitable driver ERROR

2004-07-01 Thread Robert Harper
I have seen this one too many times. It usually has to do with the naming
lookup. I have had to keep "playing" with the form of the name until it worked.

Robert S. Harper
801.265.8800 ex. 255

> -Original Message-
> From: Briggs, Patrick [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 01, 2004 10:20 AM
> To: 'Tomcat Users List'
> Subject: RE: Tomcat -> MySQL = No suitable driver ERROR
> 
> Yeah, I just tried that and still no go.  Still getting:
> 
> javax.servlet.ServletException: Unable to get connection, DataSource
> invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
> driver of class '' for connect URL 'null', cause: No suitable driver"
> 
> -Original Message-
> From: Jan Behrens [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 01, 2004 1:04 AM
> To: 'Tomcat Users List'
> Subject: RE: Tomcat -> MySQL = No suitable driver ERROR
> 
> 
> David is right,
> 
> you will need to rename {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml to
> {Catalina_Home}/webapps/DBTest/WEB-INF/web.xml and hopefully all will be up
> and running.
> 
> Jan
> 
> -Original Message-
[snip]



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



RE: Tomcat -> MySQL = No suitable driver ERROR

2004-07-01 Thread Briggs, Patrick
Yeah, I just tried that and still no go.  Still getting:

javax.servlet.ServletException: Unable to get connection, DataSource
invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null', cause: No suitable driver"

-Original Message-
From: Jan Behrens [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 01, 2004 1:04 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat -> MySQL = No suitable driver ERROR


David is right, 

you will need to rename {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml to
{Catalina_Home}/webapps/DBTest/WEB-INF/web.xml and hopefully all will be up
and running.

Jan

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 01, 2004 3:56 AM
To: Tomcat Users List
Subject: Re: Tomcat -> MySQL = No suitable driver ERROR


Ok.  I think I'm seeing your trouble.  The stuff you have in 
WEB-INF/DB-Test.xml should be in web.xml instead.  In mine, the 
... stuff is at the end of the file just 
before the closing  tag.  In tomcat versions 3 and 4, the 
order of elements in web.xml was important.  I believe that requirement 
has been lifted in tomcat 5.

--David

Try that and see what happens.

--David

Briggs, Patrick wrote:

>I'm using an example someone else on this list gave me.
>
>So inside of {CATALINA_HOME}/conf/Catalina/localhost/DBTest.xml
>
>
>reloadable="true" workDir="work\Catalina\localhost\DBTest">
>
>  type="javax.sql.DataSource"/>
>  
>
>  url
>   jdbc:mysql://cir-ops:3306/javatest?autoReconnect=true
>
>
>  maxIdle
>  15
>
>
>  maxActive
>  50
>
>
>  driverClassName
>  com.mysql.jdbc.Driver
>
>
>  maxWait
>  1
>
>
>  removeAbandoned
>  true
>
>
>  username
>  javauser
>
>
>  factory
>  org.apache.commons.dbcp.BasicDataSourceFactory
>
>
>  removeAbandonedTimeout
>  60
>
>
>  password
>  javadude
>
>  
>
>
>The contents of {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml
>
>
>Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>
>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";
>version="2.4">
>  MySQL Test App
>  
>  DB Connection
>  jdbc/DBTest
>  javax.sql.DataSource
>  Container
>  
> 
>  
>
>Contents of {Catalina_Home/webapps/DBTest/test.jsp:
>
><%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %> <%@ 
>taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
>
>
>select id, foo, bar from testdata
>
>
>
>  
>DB Test
>  
>  
>
>  Results
>  
>
>Foo ${row.foo}
>Bar ${row.bar}
>
>
>  
>
>
>The error message displayed on the web-broser for the URL: 
>http://localhost:8080/DBTest/test.jsp
>
>javax.servlet.ServletException: Unable to get connection, DataSource
>invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create 
>JDBC driver of class '' for connect URL 'null', cause: No suitable 
>driver"
>   
>org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCon
>textI
>mpl.java:825)
>   
>org.apache.jasper.runtime.PageContextImpl.handlePageException(PageConte
>xtImp
>l.java:758)
>   org.apache.jsp.test_jsp._jspService(test_jsp.java:81)
>   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>   
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j
>ava:2
>98)
>   
>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
>   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>
>
>root cause
>
>javax.servlet.jsp.JspException: Unable to get connection, DataSource
>invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create 
>JDBC driver of class '' for connect URL 'null', cause: No suitable 
>driver"
>   
>org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnectio
>n(Unk
>nown Source)
>   
>org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(U
>nknow
>n Source)
&

RE: Tomcat -> MySQL = No suitable driver ERROR

2004-07-01 Thread Briggs, Patrick
Ok, I tried as you suggested, I deleted DBTest.xml out of the
conf/Catalina/localhost directory and placed it inside my web.xml for the
webapp itself.  I rebooted my machine, restarted Tomcat, same error.  Still
nothing.

Here is what my web.xml looks like now:


http://java.sun.com/dtd/web-app_2_3.dtd";>
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";
version="2.4">
  MySQL Test App
  
  DB Connection
  jdbc/DBTest
  javax.sql.DataSource
  Container
  



  
  

  url

jdbc:mysql://cir-ops:3306/javatest?autoReconnect=true


  maxIdle
  15


  maxActive
  50


  driverClassName
  com.mysql.jdbc.Driver


  maxWait
  1


  removeAbandoned
  true


  username
  javauser


  factory
  org.apache.commons.dbcp.BasicDataSourceFactory


  removeAbandonedTimeout
  60


  password
  javadude

  

  

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 6:56 PM
To: Tomcat Users List
Subject: Re: Tomcat -> MySQL = No suitable driver ERROR


Ok.  I think I'm seeing your trouble.  The stuff you have in 
WEB-INF/DB-Test.xml should be in web.xml instead.  In mine, the 
... stuff is at the end of the file just 
before the closing  tag.  In tomcat versions 3 and 4, the 
order of elements in web.xml was important.  I believe that requirement 
has been lifted in tomcat 5.

--David

Try that and see what happens.

--David

Briggs, Patrick wrote:

>I'm using an example someone else on this list gave me. 
>
>So inside of {CATALINA_HOME}/conf/Catalina/localhost/DBTest.xml
>
>
>path="/DBtest" reloadable="true"
>workDir="work\Catalina\localhost\DBTest">
>
>  type="javax.sql.DataSource"/>
>  
>
>  url
>   jdbc:mysql://cir-ops:3306/javatest?autoReconnect=true
>
>
>  maxIdle
>  15
>
>
>  maxActive
>  50
>
>
>  driverClassName
>  com.mysql.jdbc.Driver
>
>
>  maxWait
>  1
>
>
>  removeAbandoned
>  true
>
>
>  username
>  javauser
>
>
>  factory
>  org.apache.commons.dbcp.BasicDataSourceFactory
>
>
>  removeAbandonedTimeout
>  60
>
>
>  password
>  javadude
>
>  
>
>
>The contents of {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml
>
>
>2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>
>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";
>version="2.4">
>  MySQL Test App
>  
>  DB Connection
>  jdbc/DBTest
>  javax.sql.DataSource
>  Container
>  
> 
>  
>
>Contents of {Catalina_Home/webapps/DBTest/test.jsp:
>
><%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
><%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
>
>
>select id, foo, bar from testdata
>
>
>
>  
>DB Test
>  
>  
>
>  Results
>  
>
>Foo ${row.foo}
>Bar ${row.bar}
>
>
>  
>
>
>The error message displayed on the web-broser for the URL:
>http://localhost:8080/DBTest/test.jsp
>
>javax.servlet.ServletException: Unable to get connection, DataSource
>invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
>driver of class '' for connect URL 'null', cause: No suitable driver"
>   
>org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContext
I
>mpl.java:825)
>   
>org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm
p
>l.java:758)
>   org.apache.jsp.test_jsp._jspService(test_jsp.java:81)
>   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>   
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
2
>98)
>   
>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
>   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>
>
>root cause

RE: Tomcat -> MySQL = No suitable driver ERROR

2004-07-01 Thread Jan Behrens
David is right, 

you will need to rename {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml to
{Catalina_Home}/webapps/DBTest/WEB-INF/web.xml and hopefully all will be up
and running.

Jan

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 01, 2004 3:56 AM
To: Tomcat Users List
Subject: Re: Tomcat -> MySQL = No suitable driver ERROR


Ok.  I think I'm seeing your trouble.  The stuff you have in 
WEB-INF/DB-Test.xml should be in web.xml instead.  In mine, the 
... stuff is at the end of the file just 
before the closing  tag.  In tomcat versions 3 and 4, the 
order of elements in web.xml was important.  I believe that requirement 
has been lifted in tomcat 5.

--David

Try that and see what happens.

--David

Briggs, Patrick wrote:

>I'm using an example someone else on this list gave me.
>
>So inside of {CATALINA_HOME}/conf/Catalina/localhost/DBTest.xml
>
>
>reloadable="true" workDir="work\Catalina\localhost\DBTest">
>
>  type="javax.sql.DataSource"/>
>  
>
>  url
>   jdbc:mysql://cir-ops:3306/javatest?autoReconnect=true
>
>
>  maxIdle
>  15
>
>
>  maxActive
>  50
>
>
>  driverClassName
>  com.mysql.jdbc.Driver
>
>
>  maxWait
>  1
>
>
>  removeAbandoned
>  true
>
>
>  username
>  javauser
>
>
>  factory
>  org.apache.commons.dbcp.BasicDataSourceFactory
>
>
>  removeAbandonedTimeout
>  60
>
>
>  password
>  javadude
>
>  
>
>
>The contents of {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml
>
>
>Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>
>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";
>version="2.4">
>  MySQL Test App
>  
>  DB Connection
>  jdbc/DBTest
>  javax.sql.DataSource
>  Container
>  
> 
>  
>
>Contents of {Catalina_Home/webapps/DBTest/test.jsp:
>
><%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %> <%@ 
>taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
>
>
>select id, foo, bar from testdata
>
>
>
>  
>    DB Test
>  
>  
>
>  Results
>  
>
>Foo ${row.foo}
>Bar ${row.bar}
>
>
>  
>
>
>The error message displayed on the web-broser for the URL: 
>http://localhost:8080/DBTest/test.jsp
>
>javax.servlet.ServletException: Unable to get connection, DataSource
>invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create 
>JDBC driver of class '' for connect URL 'null', cause: No suitable 
>driver"
>   
>org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCon
>textI
>mpl.java:825)
>   
>org.apache.jasper.runtime.PageContextImpl.handlePageException(PageConte
>xtImp
>l.java:758)
>   org.apache.jsp.test_jsp._jspService(test_jsp.java:81)
>   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>       
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j
>ava:2
>98)
>   
>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
>   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>
>
>root cause
>
>javax.servlet.jsp.JspException: Unable to get connection, DataSource
>invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create 
>JDBC driver of class '' for connect URL 'null', cause: No suitable 
>driver"
>   
>org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnectio
>n(Unk
>nown Source)
>   
>org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(U
>nknow
>n Source)
>   org.apache.jsp.test_jsp._jspx_meth_sql_query_0(test_jsp.java:100)
>   org.apache.jsp.test_jsp._jspService(test_jsp.java:58)
>   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>   
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j
>ava:2
>98)
>   
>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
>   org.a

Re: Tomcat -> MySQL = No suitable driver ERROR

2004-06-30 Thread David Smith
Ok, I stand corrected.  If the jar works in shared/lib, then cool.  I 
never argue with what works.  I also stop experimenting when it starts 
working, so I've never tried it there.   Thanks for the info.

--David
Jan Behrens wrote:
Hi Patrick,
shared/lib is quite ok - that is where mine resides and everything works
just fine... The content of myWebApp,xml is straight out of my one two and
my db connection works just fine. The question would be when and where you
actually get that error. Have you turned on logging for your webapp and
ensured that the jndi ressource is really there? There should be an entry
(depending on your logging level) like this there:
2004-06-30 14:59:06 NamingContextListener[/Catalina/localhost/myWebApp]:
Adding resource ref jdbc/myWebApp
2004-06-30 14:59:06 NamingContextListener[/Catalina/localhost/myWebApp]:
ResourceRef[className=javax.sql.DataSource,factoryClassLocation=null,factory
ClassName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Shar
eable},{type=auth,content=Container},{type=url,content=jdbc:mysql://loalhost
:3306/myWebApp?autoReconnect=true},{type=maxIdle,content=15},{type=maxActive
,content=50},{type=driverClassName,content=com.mysql.jdbc.Driver},{type=maxW
ait,content=1},{type=removeAbandoned,content=true},{type=username,conten
t=myWebApp},{type=factory,content=org.apache.commons.dbcp.BasicDataSourceFac
tory},{type=removeAbandonedTimeout,content=60},{type=password,content=secret
}]
If that does not help, add the following inside  of your web.xml
(should be in webapps WEB-INF dir). 

 
 DB Connection
 jdbc/myWebApp 
 javax.sql.DataSource
 Container
 
Best you then delete all contents of
{CATALINA_HOME}\work\localhost\myWebApp\ and restart Tomcat. Then check your
logs and see whether it finds and intializes the ressource.
HTH, Jan
-Original Message-
From: Briggs, Patrick [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 30, 2004 9:47 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat -> MySQL = No suitable driver ERROR

Ok, I have it in the common/lib directory, but that didn't make a
difference.  You'd think there would be a lot easier way to setup stuff like
this.  Editing XML files is pretty tricky business.
-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 12:19 PM
To: Tomcat Users List
Subject: Re: Tomcat -> MySQL = No suitable driver ERROR
Wrong place for mysql jar file.  It should be in 
{TOMCAT_HOME}/common/lib right along side the DBCP jar file.

--David
Briggs, Patrick wrote:
 

If the webapps.xml file is supposed to be located in 
Catalina\localhost,
   

the
 

apache's own website documentation JDBC-HOWTO needs to be updated to
   

reflect
 

that new situation.  I'm surprised they haven't updated it because I'm 
sure a lot of other people are going to be having the same problems I 
am.

I have made all of the changes you have suggest.  the mysql.jar file 
has been deleted everywhere except for {CATALINA_HOME}/shared/lib where 
I have now placed it.

I have created a file called DBTest.xml over in 
/conf/Catalina/localhost/DBTest.xml

I used your template for the XML find changing it where it needs 
changes
   

for
 

URL and username/password.
Still getting the same error message :(
So now what could it be?
-Original Message-
From: Jan Behrens [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 1:58 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat -> MySQL = No suitable driver ERROR
Hi Patrick,
the problem might be that in Tomcat 5.x the storage of the context 
related configuration changed from server.xml to a sepparate file for 
each webapp. This file should be stored under 
{Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml where 
Catalina_Home points to your Tomcat installation dir and domain_name
   

usually
 

would be localhost in a dev-environment.
If you have a webapp called myWebApp and want to setup a datastore via 
jndi for same to use in Tomcat 5 you could use the following as a basis 
for a myWebApp.xml file stored under
{Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml:






  
url

jdbc:mysql://NAME_OR_IP_OF_MYSQL_SERVER:3306/NAME_OF_DATABASE?au
toRe
   

c
 

onnect=true
  
  
maxIdle
15
  
  
maxActive
50
  
  
driverClassName
com.mysql.jdbc.Driver
  
  
maxWait
1
  
  
removeAbandoned
true
  
  
username
USERNAME
  
  
factory
org.apache.commons.dbcp.BasicDataSourceFactory
  
  
removeAbandonedTimeout
60
  
  
password
PASSWORD
  


The MySQL driver does have to go under {Catalina_Home}\shared\lib! 
Delete any other copies you might have placed in your WEB-INF\lib or 
anywhere
   

else.
 

You should also remove the  you inserted in 
server.xml as this should all go in the myWebApp.xml file.

If you ever deploy your webapp you then only have to copy your 
myWebApp.

Re: Tomcat -> MySQL = No suitable driver ERROR

2004-06-30 Thread David Smith
Ok.  I think I'm seeing your trouble.  The stuff you have in 
WEB-INF/DB-Test.xml should be in web.xml instead.  In mine, the 
... stuff is at the end of the file just 
before the closing  tag.  In tomcat versions 3 and 4, the 
order of elements in web.xml was important.  I believe that requirement 
has been lifted in tomcat 5.

--David
Try that and see what happens.
--David
Briggs, Patrick wrote:
I'm using an example someone else on this list gave me. 

So inside of {CATALINA_HOME}/conf/Catalina/localhost/DBTest.xml


 
 
   
 url
jdbc:mysql://cir-ops:3306/javatest?autoReconnect=true
   
   
 maxIdle
 15
   
   
 maxActive
 50
   
   
 driverClassName
 com.mysql.jdbc.Driver
   
   
 maxWait
 1
   
   
 removeAbandoned
 true
   
   
 username
 javauser
   
   
 factory
 org.apache.commons.dbcp.BasicDataSourceFactory
   
   
 removeAbandonedTimeout
 60
   
   
 password
 javadude
   
 

The contents of {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml

http://java.sun.com/dtd/web-app_2_3.dtd";>
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";
   version="2.4">
 MySQL Test App
 
 DB Connection
 jdbc/DBTest
 javax.sql.DataSource
 Container
 
 
Contents of {Catalina_Home/webapps/DBTest/test.jsp:
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>

select id, foo, bar from testdata


 
   DB Test
 
 
 Results
 

   Foo ${row.foo}
   Bar ${row.bar}


 

The error message displayed on the web-broser for the URL:
http://localhost:8080/DBTest/test.jsp
javax.servlet.ServletException: Unable to get connection, DataSource
invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null', cause: No suitable driver"

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
mpl.java:825)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:758)
org.apache.jsp.test_jsp._jspService(test_jsp.java:81)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
98)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
root cause 

javax.servlet.jsp.JspException: Unable to get connection, DataSource
invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null', cause: No suitable driver"

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unk
nown Source)

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknow
n Source)
org.apache.jsp.test_jsp._jspx_meth_sql_query_0(test_jsp.java:100)
org.apache.jsp.test_jsp._jspService(test_jsp.java:58)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
98)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 1:33 PM
To: Tomcat Users List
Subject: Re: Tomcat -> MySQL = No suitable driver ERROR
I've set this up I don't know how many times and only ever had problems 
when I've mispelled the JNDI name I gave it somewhere in the 4 places it 
was specified.  Others have had issue with the order of parameters in 
the ResourceParams block.  To be on the safe side, follow the order of 
parameters given in the jndi-datasource-howto.html page you were 
following.  That's the same page I followed when I did this for the 
first time.

I take it you've:
1)  defined a  and  block in your 
{context}.xml file that's stored in the 
{TOMCAT_HOME}/conf/Catalina/localhost folder.  Both  and 
... sections have the same JNDI name in 
their name attributes.  I'd recommend all lower case since case is 
important in java.

2) Placed a ... in your WEB-INF/web.xml 
file with the ... tag specifying the same 
JNDI name specified in the {context}.xml file abo

RE: Tomcat -> MySQL = No suitable driver ERROR

2004-06-30 Thread Briggs, Patrick
I'm using an example someone else on this list gave me. 

So inside of {CATALINA_HOME}/conf/Catalina/localhost/DBTest.xml




  
  

  url
jdbc:mysql://cir-ops:3306/javatest?autoReconnect=true


  maxIdle
  15


  maxActive
  50


  driverClassName
  com.mysql.jdbc.Driver


  maxWait
  1


  removeAbandoned
  true


  username
  javauser


  factory
  org.apache.commons.dbcp.BasicDataSourceFactory


  removeAbandonedTimeout
  60


  password
  javadude

  


The contents of {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml


http://java.sun.com/dtd/web-app_2_3.dtd";>
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";
version="2.4">
  MySQL Test App
  
  DB Connection
  jdbc/DBTest
  javax.sql.DataSource
  Container
  
 
  

Contents of {Catalina_Home/webapps/DBTest/test.jsp:

<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>


select id, foo, bar from testdata



  
DB Test
  
  

  Results
  

Foo ${row.foo}
Bar ${row.bar}


  


The error message displayed on the web-broser for the URL:
http://localhost:8080/DBTest/test.jsp

javax.servlet.ServletException: Unable to get connection, DataSource
invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null', cause: No suitable driver"

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
mpl.java:825)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:758)
org.apache.jsp.test_jsp._jspService(test_jsp.java:81)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
98)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)


root cause 

javax.servlet.jsp.JspException: Unable to get connection, DataSource
invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null', cause: No suitable driver"

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unk
nown Source)

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknow
n Source)
org.apache.jsp.test_jsp._jspx_meth_sql_query_0(test_jsp.java:100)
org.apache.jsp.test_jsp._jspService(test_jsp.java:58)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
98)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)


-----Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 1:33 PM
To: Tomcat Users List
Subject: Re: Tomcat -> MySQL = No suitable driver ERROR


I've set this up I don't know how many times and only ever had problems 
when I've mispelled the JNDI name I gave it somewhere in the 4 places it 
was specified.  Others have had issue with the order of parameters in 
the ResourceParams block.  To be on the safe side, follow the order of 
parameters given in the jndi-datasource-howto.html page you were 
following.  That's the same page I followed when I did this for the 
first time.

I take it you've:

1)  defined a  and  block in your 
{context}.xml file that's stored in the 
{TOMCAT_HOME}/conf/Catalina/localhost folder.  Both  and 
... sections have the same JNDI name in 
their name attributes.  I'd recommend all lower case since case is 
important in java.

2) Placed a ... in your WEB-INF/web.xml 
file with the ... tag specifying the same 
JNDI name specified in the {context}.xml file above.  I keep harping on 
the same JNDI name because this is where I've been messed up before.

3) Did a lookup for java:comp/env/{your JNDI name here} in your java code.

4) Restarted the tomcat service after putting the mysql jar file in 
common/lib so the tomcat classloaders can see it.

Can you post what you do have in

RE: Tomcat -> MySQL = No suitable driver ERROR

2004-06-30 Thread Jan Behrens
Hi Patrick,

shared/lib is quite ok - that is where mine resides and everything works
just fine... The content of myWebApp,xml is straight out of my one two and
my db connection works just fine. The question would be when and where you
actually get that error. Have you turned on logging for your webapp and
ensured that the jndi ressource is really there? There should be an entry
(depending on your logging level) like this there:

2004-06-30 14:59:06 NamingContextListener[/Catalina/localhost/myWebApp]:
Adding resource ref jdbc/myWebApp
2004-06-30 14:59:06 NamingContextListener[/Catalina/localhost/myWebApp]:
ResourceRef[className=javax.sql.DataSource,factoryClassLocation=null,factory
ClassName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Shar
eable},{type=auth,content=Container},{type=url,content=jdbc:mysql://loalhost
:3306/myWebApp?autoReconnect=true},{type=maxIdle,content=15},{type=maxActive
,content=50},{type=driverClassName,content=com.mysql.jdbc.Driver},{type=maxW
ait,content=1},{type=removeAbandoned,content=true},{type=username,conten
t=myWebApp},{type=factory,content=org.apache.commons.dbcp.BasicDataSourceFac
tory},{type=removeAbandonedTimeout,content=60},{type=password,content=secret
}]

If that does not help, add the following inside  of your web.xml
(should be in webapps WEB-INF dir). 

  
  DB Connection
  jdbc/myWebApp 
  javax.sql.DataSource
  Container
  

Best you then delete all contents of
{CATALINA_HOME}\work\localhost\myWebApp\ and restart Tomcat. Then check your
logs and see whether it finds and intializes the ressource.

HTH, Jan

-Original Message-
From: Briggs, Patrick [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 30, 2004 9:47 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat -> MySQL = No suitable driver ERROR


Ok, I have it in the common/lib directory, but that didn't make a
difference.  You'd think there would be a lot easier way to setup stuff like
this.  Editing XML files is pretty tricky business.

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 12:19 PM
To: Tomcat Users List
Subject: Re: Tomcat -> MySQL = No suitable driver ERROR


Wrong place for mysql jar file.  It should be in 
{TOMCAT_HOME}/common/lib right along side the DBCP jar file.

--David

Briggs, Patrick wrote:

>If the webapps.xml file is supposed to be located in 
>Catalina\localhost,
the
>apache's own website documentation JDBC-HOWTO needs to be updated to
reflect
>that new situation.  I'm surprised they haven't updated it because I'm 
>sure a lot of other people are going to be having the same problems I 
>am.
>
>I have made all of the changes you have suggest.  the mysql.jar file 
>has been deleted everywhere except for {CATALINA_HOME}/shared/lib where 
>I have now placed it.
>
>I have created a file called DBTest.xml over in 
>/conf/Catalina/localhost/DBTest.xml
>
>I used your template for the XML find changing it where it needs 
>changes
for
>URL and username/password.
>
>Still getting the same error message :(
>So now what could it be?
>
>-Original Message-
>From: Jan Behrens [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, June 30, 2004 1:58 AM
>To: 'Tomcat Users List'
>Subject: RE: Tomcat -> MySQL = No suitable driver ERROR
>
>
>Hi Patrick,
>
>the problem might be that in Tomcat 5.x the storage of the context 
>related configuration changed from server.xml to a sepparate file for 
>each webapp. This file should be stored under 
>{Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml where 
>Catalina_Home points to your Tomcat installation dir and domain_name
usually
>would be localhost in a dev-environment.
>
>If you have a webapp called myWebApp and want to setup a datastore via 
>jndi for same to use in Tomcat 5 you could use the following as a basis 
>for a myWebApp.xml file stored under
>{Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml:
>
>
>
>path="/myWebApp" reloadable="true" 
>workDir="work\Catalina\localhost\myWebApp">
>
>  type="javax.sql.DataSource"/>
>  
>
>  url
> 
>jdbc:mysql://NAME_OR_IP_OF_MYSQL_SERVER:3306/NAME_OF_DATABASE?au
>toRe
c
>onnect=true
>
>
>  maxIdle
>  15
>
>
>  maxActive
>  50
>
>
>  driverClassName
>  com.mysql.jdbc.Driver
>
>
>  maxWait
>  1
>
>
>  removeAbandoned
>  true
>
>
>  username
>  USERNAME
>
>
>  factory
>  org.apache.commons.dbcp.BasicDataSourceFactory
>
>
>  removeAbandonedTimeout
>  60
>
>
>  password
>  PASSWORD
> 

Re: Tomcat -> MySQL = No suitable driver ERROR

2004-06-30 Thread David Smith
I've set this up I don't know how many times and only ever had problems 
when I've mispelled the JNDI name I gave it somewhere in the 4 places it 
was specified.  Others have had issue with the order of parameters in 
the ResourceParams block.  To be on the safe side, follow the order of 
parameters given in the jndi-datasource-howto.html page you were 
following.  That's the same page I followed when I did this for the 
first time.

I take it you've:
1)  defined a  and  block in your 
{context}.xml file that's stored in the 
{TOMCAT_HOME}/conf/Catalina/localhost folder.  Both  and 
... sections have the same JNDI name in 
their name attributes.  I'd recommend all lower case since case is 
important in java.

2) Placed a ... in your WEB-INF/web.xml 
file with the ... tag specifying the same 
JNDI name specified in the {context}.xml file above.  I keep harping on 
the same JNDI name because this is where I've been messed up before.

3) Did a lookup for java:comp/env/{your JNDI name here} in your java code.
4) Restarted the tomcat service after putting the mysql jar file in 
common/lib so the tomcat classloaders can see it.

Can you post what you do have in {context}.xml and web.xml and just omit 
the username and password for the database or put in bogus ones for the 
purposes of posting to the list?  An excerpt of your java code where you 
attempt to access the db would be good as well.

--David
Briggs, Patrick wrote:
Ok, I have it in the common/lib directory, but that didn't make a
difference.  You'd think there would be a lot easier way to setup stuff like
this.  Editing XML files is pretty tricky business.
-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 12:19 PM
To: Tomcat Users List
Subject: Re: Tomcat -> MySQL = No suitable driver ERROR
Wrong place for mysql jar file.  It should be in 
{TOMCAT_HOME}/common/lib right along side the DBCP jar file.

--David
Briggs, Patrick wrote:
 

If the webapps.xml file is supposed to be located in Catalina\localhost,
   

the
 

apache's own website documentation JDBC-HOWTO needs to be updated to
   

reflect
 

that new situation.  I'm surprised they haven't updated it because I'm sure
a lot of other people are going to be having the same problems I am.
I have made all of the changes you have suggest.  the mysql.jar file has
been deleted everywhere except for {CATALINA_HOME}/shared/lib where I have
now placed it.
I have created a file called DBTest.xml over in
/conf/Catalina/localhost/DBTest.xml
I used your template for the XML find changing it where it needs changes
   

for
 

URL and username/password.
Still getting the same error message :(
So now what could it be?
-Original Message-
From: Jan Behrens [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 1:58 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat -> MySQL = No suitable driver ERROR
Hi Patrick,
the problem might be that in Tomcat 5.x the storage of the context related
configuration changed from server.xml to a sepparate file for each webapp.
This file should be stored under
{Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml where
Catalina_Home points to your Tomcat installation dir and domain_name
   

usually
 

would be localhost in a dev-environment. 

If you have a webapp called myWebApp and want to setup a datastore via jndi
for same to use in Tomcat 5 you could use the following as a basis for a
myWebApp.xml file stored under
{Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml:




  
url
jdbc:mysql://NAME_OR_IP_OF_MYSQL_SERVER:3306/NAME_OF_DATABASE?autoRe
   

c
 

onnect=true
  
  
maxIdle
15
  
  
maxActive
50
  
  
driverClassName
com.mysql.jdbc.Driver
  
  
maxWait
1
  
  
removeAbandoned
true
  
  
username
USERNAME
  
  
factory
org.apache.commons.dbcp.BasicDataSourceFactory
  
  
removeAbandonedTimeout
60
  
  
password
PASSWORD
  


The MySQL driver does have to go under {Catalina_Home}\shared\lib! Delete
any other copies you might have placed in your WEB-INF\lib or anywhere
   

else.
 

You should also remove the  you inserted in
server.xml as this should all go in the myWebApp.xml file. 

If you ever deploy your webapp you then only have to copy your myWebApp.xml
to the Manifest dir in your webapp root dir before creating the war-file
   

and
 

Tomcat will automatically create the correct context for your webapp.
HTH, Jan
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential or privileged
information.  Any unauthorized review, use, disclosure or distribution is
prohibited.  If you are not the intended recipient, please contact the
sender by reply e-mail and destroy the message.

   

-
To unsubscr

RE: Tomcat -> MySQL = No suitable driver ERROR

2004-06-30 Thread Briggs, Patrick
Ok, I have it in the common/lib directory, but that didn't make a
difference.  You'd think there would be a lot easier way to setup stuff like
this.  Editing XML files is pretty tricky business.

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 12:19 PM
To: Tomcat Users List
Subject: Re: Tomcat -> MySQL = No suitable driver ERROR


Wrong place for mysql jar file.  It should be in 
{TOMCAT_HOME}/common/lib right along side the DBCP jar file.

--David

Briggs, Patrick wrote:

>If the webapps.xml file is supposed to be located in Catalina\localhost,
the
>apache's own website documentation JDBC-HOWTO needs to be updated to
reflect
>that new situation.  I'm surprised they haven't updated it because I'm sure
>a lot of other people are going to be having the same problems I am.
>
>I have made all of the changes you have suggest.  the mysql.jar file has
>been deleted everywhere except for {CATALINA_HOME}/shared/lib where I have
>now placed it.
>
>I have created a file called DBTest.xml over in
>/conf/Catalina/localhost/DBTest.xml
>
>I used your template for the XML find changing it where it needs changes
for
>URL and username/password.
>
>Still getting the same error message :(
>So now what could it be?
>
>-Original Message-
>From: Jan Behrens [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, June 30, 2004 1:58 AM
>To: 'Tomcat Users List'
>Subject: RE: Tomcat -> MySQL = No suitable driver ERROR
>
>
>Hi Patrick,
>
>the problem might be that in Tomcat 5.x the storage of the context related
>configuration changed from server.xml to a sepparate file for each webapp.
>This file should be stored under
>{Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml where
>Catalina_Home points to your Tomcat installation dir and domain_name
usually
>would be localhost in a dev-environment. 
>
>If you have a webapp called myWebApp and want to setup a datastore via jndi
>for same to use in Tomcat 5 you could use the following as a basis for a
>myWebApp.xml file stored under
>{Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml:
>
>
>
>path="/myWebApp" reloadable="true"
>workDir="work\Catalina\localhost\myWebApp">
>
>  type="javax.sql.DataSource"/>
>  
>
>  url
> 
>jdbc:mysql://NAME_OR_IP_OF_MYSQL_SERVER:3306/NAME_OF_DATABASE?autoRe
c
>onnect=true
>
>
>  maxIdle
>  15
>
>
>  maxActive
>  50
>
>
>  driverClassName
>  com.mysql.jdbc.Driver
>
>
>  maxWait
>  1
>
>
>  removeAbandoned
>  true
>
>
>  username
>  USERNAME
>
>
>  factory
>  org.apache.commons.dbcp.BasicDataSourceFactory
>
>
>  removeAbandonedTimeout
>  60
>
>
>  password
>  PASSWORD
>
>  
>
>
>The MySQL driver does have to go under {Catalina_Home}\shared\lib! Delete
>any other copies you might have placed in your WEB-INF\lib or anywhere
else.
>You should also remove the  you inserted in
>server.xml as this should all go in the myWebApp.xml file. 
>
>If you ever deploy your webapp you then only have to copy your myWebApp.xml
>to the Manifest dir in your webapp root dir before creating the war-file
and
>Tomcat will automatically create the correct context for your webapp.
>
>HTH, Jan
>
>
>This e-mail message, including any attachments, is for the sole use of the
>intended recipient(s) and may contain confidential or privileged
>information.  Any unauthorized review, use, disclosure or distribution is
>prohibited.  If you are not the intended recipient, please contact the
>sender by reply e-mail and destroy the message.
>
>  
>

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

This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential or privileged
information.  Any unauthorized review, use, disclosure or distribution is
prohibited.  If you are not the intended recipient, please contact the
sender by reply e-mail and destroy the message.


Re: Tomcat -> MySQL = No suitable driver ERROR

2004-06-30 Thread David Smith
Wrong place for mysql jar file.  It should be in 
{TOMCAT_HOME}/common/lib right along side the DBCP jar file.

--David
Briggs, Patrick wrote:
If the webapps.xml file is supposed to be located in Catalina\localhost, the
apache's own website documentation JDBC-HOWTO needs to be updated to reflect
that new situation.  I'm surprised they haven't updated it because I'm sure
a lot of other people are going to be having the same problems I am.
I have made all of the changes you have suggest.  the mysql.jar file has
been deleted everywhere except for {CATALINA_HOME}/shared/lib where I have
now placed it.
I have created a file called DBTest.xml over in
/conf/Catalina/localhost/DBTest.xml
I used your template for the XML find changing it where it needs changes for
URL and username/password.
Still getting the same error message :(
So now what could it be?
-Original Message-
From: Jan Behrens [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 1:58 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat -> MySQL = No suitable driver ERROR
Hi Patrick,
the problem might be that in Tomcat 5.x the storage of the context related
configuration changed from server.xml to a sepparate file for each webapp.
This file should be stored under
{Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml where
Catalina_Home points to your Tomcat installation dir and domain_name usually
would be localhost in a dev-environment. 

If you have a webapp called myWebApp and want to setup a datastore via jndi
for same to use in Tomcat 5 you could use the following as a basis for a
myWebApp.xml file stored under
{Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml:


 
 
   
 url
jdbc:mysql://NAME_OR_IP_OF_MYSQL_SERVER:3306/NAME_OF_DATABASE?autoRec
onnect=true
   
   
 maxIdle
 15
   
   
 maxActive
 50
   
   
 driverClassName
 com.mysql.jdbc.Driver
   
   
 maxWait
 1
   
   
 removeAbandoned
 true
   
   
 username
 USERNAME
   
   
 factory
 org.apache.commons.dbcp.BasicDataSourceFactory
   
   
 removeAbandonedTimeout
 60
   
   
 password
 PASSWORD
   
 

The MySQL driver does have to go under {Catalina_Home}\shared\lib! Delete
any other copies you might have placed in your WEB-INF\lib or anywhere else.
You should also remove the  you inserted in
server.xml as this should all go in the myWebApp.xml file. 

If you ever deploy your webapp you then only have to copy your myWebApp.xml
to the Manifest dir in your webapp root dir before creating the war-file and
Tomcat will automatically create the correct context for your webapp.
HTH, Jan
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential or privileged
information.  Any unauthorized review, use, disclosure or distribution is
prohibited.  If you are not the intended recipient, please contact the
sender by reply e-mail and destroy the message.
 

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


RE: Tomcat -> MySQL = No suitable driver ERROR

2004-06-30 Thread Briggs, Patrick
If the webapps.xml file is supposed to be located in Catalina\localhost, the
apache's own website documentation JDBC-HOWTO needs to be updated to reflect
that new situation.  I'm surprised they haven't updated it because I'm sure
a lot of other people are going to be having the same problems I am.

I have made all of the changes you have suggest.  the mysql.jar file has
been deleted everywhere except for {CATALINA_HOME}/shared/lib where I have
now placed it.

I have created a file called DBTest.xml over in
/conf/Catalina/localhost/DBTest.xml

I used your template for the XML find changing it where it needs changes for
URL and username/password.

Still getting the same error message :(
So now what could it be?

-Original Message-
From: Jan Behrens [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 1:58 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat -> MySQL = No suitable driver ERROR


Hi Patrick,

the problem might be that in Tomcat 5.x the storage of the context related
configuration changed from server.xml to a sepparate file for each webapp.
This file should be stored under
{Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml where
Catalina_Home points to your Tomcat installation dir and domain_name usually
would be localhost in a dev-environment. 

If you have a webapp called myWebApp and want to setup a datastore via jndi
for same to use in Tomcat 5 you could use the following as a basis for a
myWebApp.xml file stored under
{Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml:





  
  

  url
 
jdbc:mysql://NAME_OR_IP_OF_MYSQL_SERVER:3306/NAME_OF_DATABASE?autoRec
onnect=true


  maxIdle
  15


  maxActive
  50


  driverClassName
  com.mysql.jdbc.Driver


  maxWait
  1


  removeAbandoned
  true


  username
  USERNAME


  factory
  org.apache.commons.dbcp.BasicDataSourceFactory


  removeAbandonedTimeout
  60


  password
  PASSWORD

  


The MySQL driver does have to go under {Catalina_Home}\shared\lib! Delete
any other copies you might have placed in your WEB-INF\lib or anywhere else.
You should also remove the  you inserted in
server.xml as this should all go in the myWebApp.xml file. 

If you ever deploy your webapp you then only have to copy your myWebApp.xml
to the Manifest dir in your webapp root dir before creating the war-file and
Tomcat will automatically create the correct context for your webapp.

HTH, Jan


This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential or privileged
information.  Any unauthorized review, use, disclosure or distribution is
prohibited.  If you are not the intended recipient, please contact the
sender by reply e-mail and destroy the message.


RE: Tomcat -> MySQL = No suitable driver ERROR

2004-06-30 Thread Jan Behrens
Hi Patrick,

the problem might be that in Tomcat 5.x the storage of the context related
configuration changed from server.xml to a sepparate file for each webapp.
This file should be stored under
{Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml where
Catalina_Home points to your Tomcat installation dir and domain_name usually
would be localhost in a dev-environment. 

If you have a webapp called myWebApp and want to setup a datastore via jndi
for same to use in Tomcat 5 you could use the following as a basis for a
myWebApp.xml file stored under
{Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml:





  
  

  url
 
jdbc:mysql://NAME_OR_IP_OF_MYSQL_SERVER:3306/NAME_OF_DATABASE?autoRec
onnect=true


  maxIdle
  15


  maxActive
  50


  driverClassName
  com.mysql.jdbc.Driver


  maxWait
  1


  removeAbandoned
  true


  username
  USERNAME


  factory
  org.apache.commons.dbcp.BasicDataSourceFactory


  removeAbandonedTimeout
  60


  password
  PASSWORD

  


The MySQL driver does have to go under {Catalina_Home}\shared\lib! Delete
any other copies you might have placed in your WEB-INF\lib or anywhere else.
You should also remove the  you inserted in
server.xml as this should all go in the myWebApp.xml file. 

If you ever deploy your webapp you then only have to copy your myWebApp.xml
to the Manifest dir in your webapp root dir before creating the war-file and
Tomcat will automatically create the correct context for your webapp.

HTH, Jan


-Original Message-
From: Briggs, Patrick [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 30, 2004 12:01 AM
To: '[EMAIL PROTECTED]'
Subject: Tomcat -> MySQL = No suitable driver ERROR


I'm trying to setup Tomcat 5.0.25 to talk to a MySQL database and I've had
no luck after several days of fighting with this thing.  I'm following along
the documentation at this URI:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-how
to.html

The example says to edit server.xml "Add this in between the  tag
of the examples context and the  tag closing the localhost
definition. 
So far I've not found any  example in server.xml.  So that doesn't
appear to exist.  However, I have placed it before the  tag and have
also tried putting it in the  as well, but that
didn't make any difference for me. I have placed the
mysql-connector-java-3.0.14-production-bin.jar file in /tomcat/common/lib as
instructed.  I have also tried placing it WEB-INF/lib, that didn't work.
Also tried putting it in tomcat/server/lib and that didn't help either. I
have the impressiont that the datasource-examples-howto is somehow out of
date, hasn't been really tested much, or is just plain incorrect because
I've found numerous other hits on GOOGLE.COM about this problem, but nobody
really has much of a solution.  Seems to me that setting this up shouldn't
be this complicated. The error message I keep getting all the time is:
javax.servlet.ServletException: Unable to get connection, DataSource
invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null', cause: No suitable driver"

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
mpl.java:825)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:758)
org.apache.jsp.test_jsp._jspService(test_jsp.java:81)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
98)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

Root Cause:
javax.servlet.jsp.JspException: Unable to get connection, DataSource
invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null', cause: No suitable driver"

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unk
nown Source)

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknow
n Source)
org.apache.jsp.test_jsp._jspx_meth_sql_query_0(test_jsp.java:100)
org.apache.jsp.test_jsp._jspService(test_jsp.java:58)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
98)

org.apache.j

RE: Tomcat -> MySQL = No suitable driver ERROR

2004-06-29 Thread FRANCOIS Dufour
here maybee it could help you! im using mysql database whit Tomcat4.0 and 
the config look like this!
first
download mysql-connector-java-3.0.10-stable-bin read install instruction (or 
simply copy the file under
Tomcat_home/comon/lib)
the conection acess to database ! xml
com.mysql.jdbc.Driver
jdbc:mysql://localhost:port/database name
root
 the pasword is not neded if you use localhost

hope it help you friendly frank
[EMAIL PROTECTED]
administrateur http://entre-nous.qc.tc


From: "Briggs, Patrick" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: Tomcat -> MySQL = No suitable driver ERROR
Date: Tue, 29 Jun 2004 15:00:59 -0700
I'm trying to setup Tomcat 5.0.25 to talk to a MySQL database and I've had
no luck after several days of fighting with this thing.  I'm following 
along
the documentation at this URI:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-how
to.html

The example says to edit server.xml "Add this in between the  tag
of the examples context and the  tag closing the localhost
definition.
So far I've not found any  example in server.xml.  So that doesn't
appear to exist.  However, I have placed it before the  tag and have
also tried putting it in the  as well, but that
didn't make any difference for me.
I have placed the mysql-connector-java-3.0.14-production-bin.jar file in
/tomcat/common/lib as instructed.  I have also tried placing it 
WEB-INF/lib,
that didn't work.  Also tried putting it in tomcat/server/lib and that
didn't help either.
I have the impressiont that the datasource-examples-howto is somehow out of
date, hasn't been really tested much, or is just plain incorrect because
I've found numerous other hits on GOOGLE.COM about this problem, but nobody
really has much of a solution.  Seems to me that setting this up shouldn't
be this complicated.
The error message I keep getting all the time is:
javax.servlet.ServletException: Unable to get connection, DataSource
invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null', cause: No suitable driver"

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
mpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:758)
org.apache.jsp.test_jsp._jspService(test_jsp.java:81)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
98)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
Root Cause:
javax.servlet.jsp.JspException: Unable to get connection, DataSource
invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null', cause: No suitable driver"
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unk
nown Source)
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknow
n Source)
org.apache.jsp.test_jsp._jspx_meth_sql_query_0(test_jsp.java:100)
org.apache.jsp.test_jsp._jspService(test_jsp.java:58)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
98)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
server.xml:




  
  
  
  
  
  






  
factory
org.apache.catalina.users.MemoryUserDatabaseFactory
  
  
pathname
conf/tomcat-users.xml
  
  
  
 
  

  factory
  org.apache.commons.dbcp.BasicDataSourceFactory



  maxActive
  100



  maxIdle
  30



  maxWait
  1



 user
 javauser


 password
 javadude





   driverClassName
   com.mysql.jdbc.Driver



  url
  jdbc:mysql://cir-ops/javatest

  

  
  
  
  



port="8080"   maxThreads="150" minSpare

Tomcat -> MySQL = No suitable driver ERROR

2004-06-29 Thread Briggs, Patrick
I'm trying to setup Tomcat 5.0.25 to talk to a MySQL database and I've had
no luck after several days of fighting with this thing.  I'm following along
the documentation at this URI:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-how
to.html

The example says to edit server.xml "Add this in between the  tag
of the examples context and the  tag closing the localhost
definition. 
So far I've not found any  example in server.xml.  So that doesn't
appear to exist.  However, I have placed it before the  tag and have
also tried putting it in the  as well, but that
didn't make any difference for me.
I have placed the mysql-connector-java-3.0.14-production-bin.jar file in
/tomcat/common/lib as instructed.  I have also tried placing it WEB-INF/lib,
that didn't work.  Also tried putting it in tomcat/server/lib and that
didn't help either.
I have the impressiont that the datasource-examples-howto is somehow out of
date, hasn't been really tested much, or is just plain incorrect because
I've found numerous other hits on GOOGLE.COM about this problem, but nobody
really has much of a solution.  Seems to me that setting this up shouldn't
be this complicated.
The error message I keep getting all the time is:
javax.servlet.ServletException: Unable to get connection, DataSource
invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null', cause: No suitable driver"

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
mpl.java:825)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:758)
org.apache.jsp.test_jsp._jspService(test_jsp.java:81)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
98)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

Root Cause:
javax.servlet.jsp.JspException: Unable to get connection, DataSource
invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null', cause: No suitable driver"

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unk
nown Source)

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknow
n Source)
org.apache.jsp.test_jsp._jspx_meth_sql_query_0(test_jsp.java:100)
org.apache.jsp.test_jsp._jspService(test_jsp.java:58)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
98)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)


server.xml:









  
  
  
  

  
  








  
factory
org.apache.catalina.users.MemoryUserDatabaseFactory
  
  
pathname
conf/tomcat-users.xml
  
  

  

 

  

  factory
  org.apache.commons.dbcp.BasicDataSourceFactory




  maxActive
  100




  maxIdle
  30




  maxWait
  1




 user
 javauser


 password
 javadude






   driverClassName
   com.mysql.jdbc.Driver




  url
  jdbc:mysql://cir-ops/javatest

  
  
  
  

  

  
  





















 
 



  
  

  
  

  

  
  

  
  

  

  

  

  

  
  

 















  



  



web.xml:


http://java.sun.com/dtd/web-app_2_3.dtd";>
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";
version="2.4">
  MySQL Test App
  
  DB Connection
  jdbc/DBTest
  javax.sql.DataSource
  Container
  
 
  

test.jsp:

<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="

Re: No Suitable Driver Problem

2004-04-09 Thread Parsons Technical Services
Sohil,

At what line in your code is it blowing up?

As a follow up, once you have it all fixed would try the username back at
the bottom to see if it breaks it again?

I'm running MySQL so I didn't spot the error, sorry.

Doug
- Original Message - 
From: "MARU, SOHIL (SBCSI)" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, April 09, 2004 12:25 PM
Subject: RE: No Suitable Driver Problem


Hi Daniel,
I managed to solve this one, my database url was missing the schema
name, that was causing the problem. I changed it from
jdbc:oracle:[EMAIL PROTECTED] To jdbc:oracle:thin:[EMAIL PROTECTED] But it is still
throwing an exception though a different one. Any pointers?

java.lang.NullPointerException
at
org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnecti
on.java:195)
at
org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnec
tion.java:129)
at
org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(Poola
bleConnectionFactory.java:311)
at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas
icDataSource.java:842)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:821)
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

-Original Message-
From: Daniel Huang [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 11:22 AM
To: Tomcat Users List
Subject: RE: No Suitable Driver Problem


Please double check and make sure your ojdbc.jar is in
$CATALINA_HOME/common/lib.

-Original Message-
From: MARU, SOHIL (SBCSI) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 8:02 AM
To: [EMAIL PROTECTED]
Subject: No Suitable Driver Problem

Hey Doug,
   I tried moving the username up, still does not work, any other clues,
am still stumped.
Thanks,
Sohil


Server.xml



.
.
.
.


password

databasepassword


url

jdbc:oracle:[EMAIL PROTECTED]:1521:[sid]



driverClassName

oracle.jdbc.driver.OracleDriver



username

user



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 a

RE: No Suitable Driver Problem

2004-04-09 Thread MARU, SOHIL (SBCSI)
Never mind, even though I am using jdk1.4 and tomcat5.0, I had to
replace ojdbc14.jar with classes version to get it to work.

-Original Message-
From: MARU, SOHIL (SBCSI) 
Sent: Friday, April 09, 2004 11:26 AM
To: 'Tomcat Users List'
Subject: RE: No Suitable Driver Problem


Hi Daniel, 
I managed to solve this one, my database url was missing the schema
name, that was causing the problem. I changed it from
jdbc:oracle:[EMAIL PROTECTED] To jdbc:oracle:thin:[EMAIL PROTECTED] But it is still
throwing an exception though a different one. Any pointers?

java.lang.NullPointerException
at
org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnecti
on.java:195)
at
org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnec
tion.java:129)
at
org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(Poola
bleConnectionFactory.java:311)
at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas
icDataSource.java:842)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:821)
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

-Original Message-
From: Daniel Huang [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 09, 2004 11:22 AM
To: Tomcat Users List
Subject: RE: No Suitable Driver Problem


Please double check and make sure your ojdbc.jar is in
$CATALINA_HOME/common/lib.

-Original Message-
From: MARU, SOHIL (SBCSI) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 8:02 AM
To: [EMAIL PROTECTED]
Subject: No Suitable Driver Problem

Hey Doug,
   I tried moving the username up, still does not work, any other clues,
am still stumped.
Thanks,
Sohil


Server.xml



.
.
.
.


password

databasepassword


url

jdbc:oracle:[EMAIL PROTECTED]:1521:[sid]



driverClassName

oracle.jdbc.driver.OracleDriver



username

user



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 or

RE: No Suitable Driver Problem

2004-04-09 Thread MARU, SOHIL (SBCSI)
Hi Daniel, 
I managed to solve this one, my database url was missing the schema
name, that was causing the problem. I changed it from
jdbc:oracle:[EMAIL PROTECTED] To jdbc:oracle:thin:[EMAIL PROTECTED] But it is still
throwing an exception though a different one. Any pointers?

java.lang.NullPointerException
at
org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnecti
on.java:195)
at
org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnec
tion.java:129)
at
org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(Poola
bleConnectionFactory.java:311)
at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas
icDataSource.java:842)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:821)
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

-Original Message-
From: Daniel Huang [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 09, 2004 11:22 AM
To: Tomcat Users List
Subject: RE: No Suitable Driver Problem


Please double check and make sure your ojdbc.jar is in
$CATALINA_HOME/common/lib.

-Original Message-
From: MARU, SOHIL (SBCSI) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 8:02 AM
To: [EMAIL PROTECTED]
Subject: No Suitable Driver Problem

Hey Doug,
   I tried moving the username up, still does not work, any other clues,
am still stumped.
Thanks,
Sohil


Server.xml



.
.
.
.


password

databasepassword


url

jdbc:oracle:[EMAIL PROTECTED]:1521:[sid]



driverClassName

oracle.jdbc.driver.OracleDriver



username

user



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.

RE: No Suitable Driver Problem

2004-04-09 Thread Daniel Huang
Please double check and make sure your ojdbc.jar is in
$CATALINA_HOME/common/lib.

-Original Message-
From: MARU, SOHIL (SBCSI) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 8:02 AM
To: [EMAIL PROTECTED]
Subject: No Suitable Driver Problem

Hey Doug,
   I tried moving the username up, still does not work, any other clues,
am still stumped.
Thanks,
Sohil


Server.xml



.
.
.
.


password

databasepassword


url

jdbc:oracle:[EMAIL PROTECTED]:1521:[sid]



driverClassName

oracle.jdbc.driver.OracleDriver



username

user



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]


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



No Suitable Driver Problem

2004-04-09 Thread MARU, SOHIL (SBCSI)
Hey Doug,
   I tried moving the username up, still does not work, any other clues,
am still stumped.
Thanks,
Sohil


Server.xml



.
.
.
.


password

databasepassword


url

jdbc:oracle:[EMAIL PROTECTED]:1521:[sid]



driverClassName

oracle.jdbc.driver.OracleDriver



username

user



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]



Re: No suitable driver

2004-03-29 Thread Todd H. Siegel
That is exactly how my web.xml is.  I tested it and it works.

I even removed it like you just suggested and that worked too.

As long as long as Tomcat is ignoring it, I'll keep it that way so the war
remains portable.  I am only using SQLServer for prototyping.  I do not plan to
stick with it long-term.

Thanks again,
Todd


--- Parsons Technical Services <[EMAIL PROTECTED]> wrote:
> Todd,
> 
> One correction to your notes (I think).
> 
> The web.xml type should also change. Unless you have tested it otherwise,
> the reason it works is that Tomcat is not using the resource info from the
> web.xml when it's in the server.xml . You can confirm this by removing it.
> 
> But otherwise I'm glad you got it working.
> 
> Doug
> 
> - Original Message - 
> From: "Todd H. Siegel" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, March 29, 2004 8:12 PM
> Subject: Re: No suitable driver
> 
> 
> > Success!
> >
> > Thanks for your help Doug.  I am going to submit this to the developer
> list to
> > be added to the Tomcat docs.
> >
> > The winning configuration for MS SQLServer is as follows:
> >
> > server.xml:
> >
> > 
> >  >   auth="Container"
> >   type="com.microsoft.jdbcx.sqlserver.SQLServerDataSource"/>
> >
> > 
> >   
> >   factory
> >
> > com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory
> >   
> >   
> >   maxActive
> >   100
> >   
> >
> >   
> >   
> >   serverName
> >   localhost
> >   
> >
> >   
> >   maxIdle
> >   30
> >   
> >
> >   
> >   maxWait
> >   1
> >   
> >
> >   
> >   url
> >   jdbc:microsoft:sqlserver://localhost\databaseName
> >   
> >
> >   
> >   
> >   user
> >   username
> >   
> >   
> >   password
> >   password
> >   
> >
> >   
> >   driverClassName
> >   com.microsoft.jdbcx.sqlserver.SQLServerDataSource
> >   
> > 
> >
> > In the  element in webappname.xml:
> >
> >> global="jdbc/dbName"
> > type="com.microsoft.jdbcx.sqlserver.SQLServerDataSource"
> />
> >
> > In the web.xml:
> >
> >   
> >   DB Connection
> >   jdbc/dbName
> >   
> >   javax.sql.DataSource
> >   Container
> >   
> >
> > Thanks again,
> > Todd
> >
> >
> > --- Parsons Technical Services <[EMAIL PROTECTED]> wrote:
> > > Todd,
> > >
> > > Should have known that MS would do something screwy with their setup.
> Check
> > > out this page from the archives.
> > >
> >
>
http://archives.real-time.com/pipermail/tomcat-users/2002-December/088536.html
> > >
> > > Notice also that the type is set to a different name and yes they do
> have
> > > the factory in there. Give it a try and let us know.
> > >
> > > Doug
> > >
> > >
> > > - Original Message - 
> > > From: "Todd H. Siegel" <[EMAIL PROTECTED]>
> > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > Sent: Saturday, March 27, 2004 6:39 PM
> > > Subject: Re: No suitable driver
> > >
> > >
> > > > Doug,
> > > >
> > > > I made those changes and I still have the same problem.
> > > >
> > > > org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
> of
> > > class
> > > > 'com.microsoft.jdbcx.sqlserver.SQLServerDataSource' for connect URL
> > > >
> > >
> 'jdbc:microsoft:sqlserver://localhost\dbname;user=username;password=password
> > > ',
> > > > cause: No suitable driver
> > > >
> > > > Here's my config info:
> > > >
> > > > From server.xml:
> > > >
> > > >   
> > > >  > > >   auth="Container"
> > > >   type="javax.sql.DataSource"/>
> > > >
> > > > 
> > > >   
> > > >

Re: No suitable driver

2004-03-29 Thread Parsons Technical Services
Todd,

One correction to your notes (I think).

The web.xml type should also change. Unless you have tested it otherwise,
the reason it works is that Tomcat is not using the resource info from the
web.xml when it's in the server.xml . You can confirm this by removing it.

But otherwise I'm glad you got it working.

Doug

- Original Message - 
From: "Todd H. Siegel" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, March 29, 2004 8:12 PM
Subject: Re: No suitable driver


> Success!
>
> Thanks for your help Doug.  I am going to submit this to the developer
list to
> be added to the Tomcat docs.
>
> The winning configuration for MS SQLServer is as follows:
>
> server.xml:
>
> 
>auth="Container"
>   type="com.microsoft.jdbcx.sqlserver.SQLServerDataSource"/>
>
> 
>   
>   factory
>
> com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory
>   
>   
>   maxActive
>   100
>   
>
>   
>   
>   serverName
>   localhost
>   
>
>   
>   maxIdle
>   30
>   
>
>   
>   maxWait
>   1
>   
>
>   
>   url
>   jdbc:microsoft:sqlserver://localhost\databaseName
>   
>
>   
>   
>   user
>   username
>   
>   
>   password
>   password
>   
>
>   
>   driverClassName
>   com.microsoft.jdbcx.sqlserver.SQLServerDataSource
>   
> 
>
> In the  element in webappname.xml:
>
>global="jdbc/dbName"
> type="com.microsoft.jdbcx.sqlserver.SQLServerDataSource"
/>
>
> In the web.xml:
>
>   
>   DB Connection
>   jdbc/dbName
>   
>   javax.sql.DataSource
>   Container
>   
>
> Thanks again,
> Todd
>
>
> --- Parsons Technical Services <[EMAIL PROTECTED]> wrote:
> > Todd,
> >
> > Should have known that MS would do something screwy with their setup.
Check
> > out this page from the archives.
> >
>
http://archives.real-time.com/pipermail/tomcat-users/2002-December/088536.html
> >
> > Notice also that the type is set to a different name and yes they do
have
> > the factory in there. Give it a try and let us know.
> >
> > Doug
> >
> >
> > - Original Message - 
> > From: "Todd H. Siegel" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Saturday, March 27, 2004 6:39 PM
> > Subject: Re: No suitable driver
> >
> >
> > > Doug,
> > >
> > > I made those changes and I still have the same problem.
> > >
> > > org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
of
> > class
> > > 'com.microsoft.jdbcx.sqlserver.SQLServerDataSource' for connect URL
> > >
> >
'jdbc:microsoft:sqlserver://localhost\dbname;user=username;password=password
> > ',
> > > cause: No suitable driver
> > >
> > > Here's my config info:
> > >
> > > From server.xml:
> > >
> > >   
> > >  > >   auth="Container"
> > >   type="javax.sql.DataSource"/>
> > >
> > > 
> > >   
> > >   maxActive
> > >   100
> > >   
> > >
> > >   
> > >   maxIdle
> > >   30
> > >   
> > >
> > >   
> > >   maxWait
> > >   1
> > >   
> > >
> > >   
> > >   url
> > >
> >
jdbc:microsoft:sqlserver://localhost\dbName;user=username;password=pa
> > ssword
> > >   
> > >
> > >   
> > >   driverClassName
> > >
com.microsoft.jdbcx.sqlserver.SQLServerDataSource
> > >   
> > > 
> > >   
> > >
> > > From $TOMCAT_HOME/conf/Catalina/localhost/webappname.xml:
> > >
> > >  > >  docBase="webappname"
> > >  debug="5"
> > >  reloadable="true"
> > >  crossContext="true">
> > >
> > >> > global="jdbc/dbName"
> > >

Re: No suitable driver

2004-03-29 Thread Todd H. Siegel
Success!

Thanks for your help Doug.  I am going to submit this to the developer list to
be added to the Tomcat docs.

The winning configuration for MS SQLServer is as follows:

server.xml:


 


  
  factory
 
com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory
  
  
  maxActive
  100
  

  
  
  serverName
  localhost
  

  
  maxIdle
  30
  

  
  maxWait
  1
  
  
  
  url
  jdbc:microsoft:sqlserver://localhost\databaseName
  

  
  
  user
  username
  
  
  password
  password
  

  
  driverClassName
  com.microsoft.jdbcx.sqlserver.SQLServerDataSource
  


In the  element in webappname.xml:

  

In the web.xml:

  
  DB Connection
  jdbc/dbName
  
  javax.sql.DataSource
  Container
  

Thanks again,
Todd


--- Parsons Technical Services <[EMAIL PROTECTED]> wrote:
> Todd,
> 
> Should have known that MS would do something screwy with their setup. Check
> out this page from the archives.
>
http://archives.real-time.com/pipermail/tomcat-users/2002-December/088536.html
> 
> Notice also that the type is set to a different name and yes they do have
> the factory in there. Give it a try and let us know.
> 
> Doug
> 
> 
> - Original Message - 
> From: "Todd H. Siegel" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Saturday, March 27, 2004 6:39 PM
> Subject: Re: No suitable driver
> 
> 
> > Doug,
> >
> > I made those changes and I still have the same problem.
> >
> > org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
> class
> > 'com.microsoft.jdbcx.sqlserver.SQLServerDataSource' for connect URL
> >
> 'jdbc:microsoft:sqlserver://localhost\dbname;user=username;password=password
> ',
> > cause: No suitable driver
> >
> > Here's my config info:
> >
> > From server.xml:
> >
> >   
> >  >   auth="Container"
> >   type="javax.sql.DataSource"/>
> >
> > 
> >   
> >   maxActive
> >   100
> >   
> >
> >   
> >   maxIdle
> >   30
> >   
> >
> >   
> >   maxWait
> >   1
> >   
> >
> >   
> >   url
> >
> jdbc:microsoft:sqlserver://localhost\dbName;user=username;password=pa
> ssword
> >   
> >
> >   
> >   driverClassName
> >   com.microsoft.jdbcx.sqlserver.SQLServerDataSource
> >   
> > 
> >   
> >
> > From $TOMCAT_HOME/conf/Catalina/localhost/webappname.xml:
> >
> >  >  docBase="webappname"
> >  debug="5"
> >  reloadable="true"
> >  crossContext="true">
> >
> >> global="jdbc/dbName"
> > type="javax.sql.DataSource" />
> > 
> >
> > From web.xml:
> >
> >   
> >   DB Connection
> >   jdbc/dbName
> >   javax.sql.DataSource
> >   Container
> >   
> >
> > The code:
> >
> > Context context = new InitialContext();
> > DataSource dataSource =
> > (DataSource)context.lookup("java:comp/env/jdbc/dbName");
> > return dataSource.getConnection();
> >
> > Also, this is Tomcat 5.0.16 on Win2k.
> >
> > And as for:  factory
> > org.apache.commons.dbcp.BasicDataSourceFactory 
> > this  was straight out of the Tomcat docs, but removing it doesn't seem to
> make
> > a difference.
> >
> > Thanks again,
> > Todd
> >
> > --- Parsons Technical Services <[EMAIL PROTECTED]> wrote:
> > > Todd,
> > >
> > > This:
> > > >  > > > type="javax.sql.DataSource"/>
> > > >
> > >
> > > This:
> > > > 
> > >
> > > This:
> > > > > > >  global="resourceName"
> > > >  type="javax.sql.DataSource" />
> > >
> > > This:
> > >
> > > >   
> > > >   DB Connection
> > > >   jdbc/dbname

Re: No suitable driver

2004-03-27 Thread Parsons Technical Services
Todd,

Should have known that MS would do something screwy with their setup. Check
out this page from the archives.
http://archives.real-time.com/pipermail/tomcat-users/2002-December/088536.html

Notice also that the type is set to a different name and yes they do have
the factory in there. Give it a try and let us know.

Doug


- Original Message - 
From: "Todd H. Siegel" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Saturday, March 27, 2004 6:39 PM
Subject: Re: No suitable driver


> Doug,
>
> I made those changes and I still have the same problem.
>
> org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class
> 'com.microsoft.jdbcx.sqlserver.SQLServerDataSource' for connect URL
>
'jdbc:microsoft:sqlserver://localhost\dbname;user=username;password=password
',
> cause: No suitable driver
>
> Here's my config info:
>
> From server.xml:
>
>   
>auth="Container"
>   type="javax.sql.DataSource"/>
>
> 
>   
>   maxActive
>   100
>   
>
>   
>   maxIdle
>   30
>   
>
>   
>   maxWait
>   1
>   
>
>   
>   url
>
jdbc:microsoft:sqlserver://localhost\dbName;user=username;password=pa
ssword
>   
>
>   
>   driverClassName
>   com.microsoft.jdbcx.sqlserver.SQLServerDataSource
>   
> 
>   
>
> From $TOMCAT_HOME/conf/Catalina/localhost/webappname.xml:
>
>   docBase="webappname"
>  debug="5"
>  reloadable="true"
>  crossContext="true">
>
>global="jdbc/dbName"
> type="javax.sql.DataSource" />
> 
>
> From web.xml:
>
>   
>   DB Connection
>   jdbc/dbName
>   javax.sql.DataSource
>   Container
>   
>
> The code:
>
> Context context = new InitialContext();
> DataSource dataSource =
> (DataSource)context.lookup("java:comp/env/jdbc/dbName");
> return dataSource.getConnection();
>
> Also, this is Tomcat 5.0.16 on Win2k.
>
> And as for:  factory
> org.apache.commons.dbcp.BasicDataSourceFactory 
> this  was straight out of the Tomcat docs, but removing it doesn't seem to
make
> a difference.
>
> Thanks again,
> Todd
>
> --- Parsons Technical Services <[EMAIL PROTECTED]> wrote:
> > Todd,
> >
> > This:
> > >  > > type="javax.sql.DataSource"/>
> > >
> >
> > This:
> > > 
> >
> > This:
> > > > >  global="resourceName"
> > >  type="javax.sql.DataSource" />
> >
> > This:
> >
> > >   
> > >   DB Connection
> > >   jdbc/dbname
> > >   javax.sql.DataSource
> > >   Container
> > >   
> >
> > And this after "java:/comp/env/":
> > > > (DataSource)initContext.lookup("java:/comp/env/jdbc/*DbName*");
> >
> > Set all to have the same name as well as global.. (It's easier)
> >
> > >
> > > 
> > > factory
> > >
> > > org.apache.commons.dbcp.BasicDataSourceFactory
> > > 
> >
> > Mine does not use this. I am not a 100%  on this but I don't think this
is
> > neccesary or legit to have it here.
> > IE just remove or comment it out until you get things workin.
> >
> >
> > >
> > > 
> > > maxActive
> > > 100
> > > 
> > >
> > > 
> > > maxIdle
> > > 30
> > > 
> > >
> > > 
> > > maxWait
> > > 1
> > > 
> > >
> > > 
> > > url
> > > jdbc:microsoft:sqlserver://hostname
> > > 
> > >
> > > 
> > > DatabaseName
> > > dbname
> > > 
> > Most people put this as part of the URL. I am pretty sure that this is
ok
> > but the name should be databaseNa

Re: No suitable driver

2004-03-27 Thread Todd H. Siegel
Doug,

I made those changes and I still have the same problem.  

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class
'com.microsoft.jdbcx.sqlserver.SQLServerDataSource' for connect URL
'jdbc:microsoft:sqlserver://localhost\dbname;user=username;password=password',
cause: No suitable driver

Here's my config info:

>From server.xml:

  
 


  
  maxActive
  100
  

  
  maxIdle
  30
  

  
  maxWait
  1
  
  
  
  url
jdbc:microsoft:sqlserver://localhost\dbName;user=username;password=password
  

  
  driverClassName
  com.microsoft.jdbcx.sqlserver.SQLServerDataSource
  

  

>From $TOMCAT_HOME/conf/Catalina/localhost/webappname.xml:



  


>From web.xml:

  
  DB Connection
  jdbc/dbName
  javax.sql.DataSource
  Container
  

The code:

Context context = new InitialContext();
DataSource dataSource =
(DataSource)context.lookup("java:comp/env/jdbc/dbName");
return dataSource.getConnection();

Also, this is Tomcat 5.0.16 on Win2k.

And as for:  factory
org.apache.commons.dbcp.BasicDataSourceFactory  
this  was straight out of the Tomcat docs, but removing it doesn't seem to make
a difference.

Thanks again,
Todd

--- Parsons Technical Services <[EMAIL PROTECTED]> wrote:
> Todd,
> 
> This:
> >  > type="javax.sql.DataSource"/>
> >
> 
> This:
> > 
> 
> This:
> > >  global="resourceName"
> >  type="javax.sql.DataSource" />
> 
> This:
> 
> >   
> >   DB Connection
> >   jdbc/dbname
> >   javax.sql.DataSource
> >   Container
> >   
> 
> And this after "java:/comp/env/":
> > > (DataSource)initContext.lookup("java:/comp/env/jdbc/*DbName*");
> 
> Set all to have the same name as well as global.. (It's easier)
> 
> >
> > 
> > factory
> >
> > org.apache.commons.dbcp.BasicDataSourceFactory
> > 
> 
> Mine does not use this. I am not a 100%  on this but I don't think this is
> neccesary or legit to have it here.
> IE just remove or comment it out until you get things workin.
> 
> 
> >
> > 
> > maxActive
> > 100
> > 
> >
> > 
> > maxIdle
> > 30
> > 
> >
> > 
> > maxWait
> > 1
> > 
> >
> > 
> > url
> > jdbc:microsoft:sqlserver://hostname
> > 
> >
> > 
> > DatabaseName
> > dbname
> > 
> Most people put this as part of the URL. I am pretty sure that this is ok
> but the name should be databaseName.
> 
> >
> > 
> > User
> > username
> > 
> Set User to user.
> 
> >
> > 
> > Password
> > password
> > 
> Set Password to password.
> 
> 
> is all I see at the moment.
> 
> 
> Doug
> 
> PS yes I know that you can set the names different, but it can cause more
> headaches than its worth if you don't have it just right..
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 




__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



Re: No suitable driver

2004-03-26 Thread Parsons Technical Services
Todd,

This:
>  type="javax.sql.DataSource"/>
>

This:
> 

This:
>  global="resourceName"
>  type="javax.sql.DataSource" />

This:

>   
>   DB Connection
>   jdbc/dbname
>   javax.sql.DataSource
>   Container
>   

And this after "java:/comp/env/":
> > (DataSource)initContext.lookup("java:/comp/env/jdbc/*DbName*");

Set all to have the same name as well as global.. (It's easier)

>
> 
> factory
>
> org.apache.commons.dbcp.BasicDataSourceFactory
> 

Mine does not use this. I am not a 100%  on this but I don't think this is
neccesary or legit to have it here.
IE just remove or comment it out until you get things workin.


>
> 
> maxActive
> 100
> 
>
> 
> maxIdle
> 30
> 
>
> 
> maxWait
> 1
> 
>
> 
> url
> jdbc:microsoft:sqlserver://hostname
> 
>
> 
> DatabaseName
> dbname
> 
Most people put this as part of the URL. I am pretty sure that this is ok
but the name should be databaseName.

>
> 
> User
> username
> 
Set User to user.

>
> 
> Password
> password
> 
Set Password to password.


is all I see at the moment.


Doug

PS yes I know that you can set the names different, but it can cause more
headaches than its worth if you don't have it just right..



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



Re: No suitable driver

2004-03-26 Thread Todd H. Siegel
Doug,

Yes, I am using TC5, the drivers work when I connect directly via DriverManager
and are in common/lib.

Here are the relevant parts of my server.xml:

  








 




factory
   
org.apache.commons.dbcp.BasicDataSourceFactory



maxActive
100



maxIdle
30



maxWait
1



url
jdbc:microsoft:sqlserver://hostname



DatabaseName
dbname



User
username



Password
password



driverClassName
   
com.microsoft.jdbcx.sqlserver.SQLServerDataSource





  
factory
org.apache.catalina.users.MemoryUserDatabaseFactory
  
  
pathname
conf/tomcat-users.xml
  


  


>From $TOMCAT_HOME/conf/Catalina/localhost/webappname.xml:



   

   




And from web.xml:

  
  DB Connection
  jdbc/dbname
  javax.sql.DataSource
  Container
  

The code snippet is below, in the original email.

Thank you,
Todd

--- Parsons Technical Services <[EMAIL PROTECTED]> wrote:
> Todd,
> 
> I assume you are running TC5?
> Please post your configs from the server.xml, web.xml, context.xml and code
> snippet you use to get a connection.
> 
> Because you are getting a driver it is at least seeing some of your config.
> 
> Are you using the correct drivers?
> Are they current?
> Are they corrupted?
> 
> Driver jar goes in common/lib.
> 
> Doug
> 
> - Original Message - 
> From: "Todd H. Siegel" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 24, 2004 10:12 PM
> Subject: No suitable driver
> 
> 
> > All,
> >
> > I know that this issue has been posted many times, I have read many of
> them and
> > and the Tomcat docs but to no avail...
> >
> > The names between the '*'s have been sanitized.
> >
> > The following code:
> >
> > Context initContext = new InitialContext();
> > DataSource ds =
> (DataSource)initContext.lookup("java:/comp/env/jdbc/*DbName*");
> > Connection conn = ds.getConnection();
> >
> > produces the following results:
> >
> > java.lang.Exception: org.apache.commons.dbcp.SQLNestedException: Cannot
> create
> > JDBC driver of class 'com.microsoft.jdbcx.sqlserver.SQLServerDataSource'
> for
> > connect URL 'jdbc:microsoft:sqlserver://*hostname*', cause: No suitable
> driver
> >
> > In the interest of keeping this brief I won't include all of the config,
> but
> > I've tried putting the  &  definitions in the
> >  element for the webapp in server.xml.
> >
> > I've also put the  &  definitions in the
> >  in the server.xml with a  in the
> >  element in $CATALINA_HOME/*webapp*.xml.  I've also tried this
> with a
> > context.xml in the META-INF directory of the webapp.
> >
> > The jars for the driver are in common\lib, but I've also tried putting
> them in
> > every other imaginable lib directory too.
> >
> > I would greatly appreciate any help.
> >
> > Thank you,
> > Todd
> >
> >
> > __
> > Do you Yahoo!?
> > Yahoo! Finance Tax Center - File online. File on time.
> > http://taxes.yahoo.com/filing.html
> >
> > -
> > 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]
> 

__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



Re: No suitable driver

2004-03-25 Thread Parsons Technical Services
Todd,

I assume you are running TC5?
Please post your configs from the server.xml, web.xml, context.xml and code
snippet you use to get a connection.

Because you are getting a driver it is at least seeing some of your config.

Are you using the correct drivers?
Are they current?
Are they corrupted?

Driver jar goes in common/lib.

Doug

- Original Message - 
From: "Todd H. Siegel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 24, 2004 10:12 PM
Subject: No suitable driver


> All,
>
> I know that this issue has been posted many times, I have read many of
them and
> and the Tomcat docs but to no avail...
>
> The names between the '*'s have been sanitized.
>
> The following code:
>
> Context initContext = new InitialContext();
> DataSource ds =
(DataSource)initContext.lookup("java:/comp/env/jdbc/*DbName*");
> Connection conn = ds.getConnection();
>
> produces the following results:
>
> java.lang.Exception: org.apache.commons.dbcp.SQLNestedException: Cannot
create
> JDBC driver of class 'com.microsoft.jdbcx.sqlserver.SQLServerDataSource'
for
> connect URL 'jdbc:microsoft:sqlserver://*hostname*', cause: No suitable
driver
>
> In the interest of keeping this brief I won't include all of the config,
but
> I've tried putting the  &  definitions in the
>  element for the webapp in server.xml.
>
> I've also put the  &  definitions in the
>  in the server.xml with a  in the
>  element in $CATALINA_HOME/*webapp*.xml.  I've also tried this
with a
> context.xml in the META-INF directory of the webapp.
>
> The jars for the driver are in common\lib, but I've also tried putting
them in
> every other imaginable lib directory too.
>
> I would greatly appreciate any help.
>
> Thank you,
> Todd
>
>
> __
> Do you Yahoo!?
> Yahoo! Finance Tax Center - File online. File on time.
> http://taxes.yahoo.com/filing.html
>
> -
> 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]



No suitable driver

2004-03-24 Thread Todd H. Siegel
All,

I know that this issue has been posted many times, I have read many of them and
and the Tomcat docs but to no avail...

The names between the '*'s have been sanitized.

The following code:

Context initContext = new InitialContext();
DataSource ds = (DataSource)initContext.lookup("java:/comp/env/jdbc/*DbName*");
Connection conn = ds.getConnection();

produces the following results:

java.lang.Exception: org.apache.commons.dbcp.SQLNestedException: Cannot create
JDBC driver of class 'com.microsoft.jdbcx.sqlserver.SQLServerDataSource' for
connect URL 'jdbc:microsoft:sqlserver://*hostname*', cause: No suitable driver

In the interest of keeping this brief I won't include all of the config, but
I've tried putting the  &  definitions in the
 element for the webapp in server.xml.

I've also put the  &  definitions in the
 in the server.xml with a  in the
 element in $CATALINA_HOME/*webapp*.xml.  I've also tried this with a
context.xml in the META-INF directory of the webapp.

The jars for the driver are in common\lib, but I've also tried putting them in
every other imaginable lib directory too.

I would greatly appreciate any help.

Thank you,
Todd


__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



Re: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver

2004-02-13 Thread Andreas Schildbach
Hello Dan,

I finally got it to work.

The problem is that for directories in "webapps" a Context is 
automatically created, even if it is already declared in server.xml. The 
automatically created Contexts do NOT contain the context specific 
configuration of server.xml. The outcome is that a) a context is created 
twice and b) for the second instance the resources are not found.

The addition of deployOnStartup="false" on all of my Host elements 
solved my problem.

Thanks for your help.

Regards,

Andreas

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


Re: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver

2004-02-12 Thread Dan
Andreas,

Not sure if you got a response yet. Generally, when I have seen the 
error above, it seemed to be coming from the web app saying that it 
didn't get the parameters. I am fighting this same error. Strange 
enough, though, I had it working as you have yours setup. Another thing 
is that the order that the XML elements are in is critical...i.e. it 
needs to follow the dtd. This means that  elements need to 
be in the right order relative to the other elements(like  and 
).

Anyway, if it was a driver problem like the jar was in the wrong place, 
the log would have told you it can't find the class.

If you have figured out how to get this working or if you have gotten it 
to work with the gloabal jndi resource context, please let me know. I 
will check back later and I will help you figure it out as I will be 
working on it too.

Dan



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


Re: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver

2004-02-11 Thread Andreas Schildbach
[EMAIL PROTECTED] wrote:

where did u put the jar?
thats what got me.
it needs to go in common\lib in your tomcat dir
Here is the content of common/lib

xxx:/opt/tomcat5# ls -la common/lib
total 3376
drwxr-xr-x2 tomcat5  nogroup  4096 Feb 11 17:07 .
drwxr-xr-x5 tomcat5  nogroup  4096 Jan 15 18:24 ..
-rw-r--r--1 tomcat5  nogroup 54665 Feb 11 10:24 activation.jar
-rw-r--r--1 tomcat5  nogroup952104 Jan 15 18:24 ant.jar
-rw-r--r--1 tomcat5  nogroup165119 Jan 15 18:24 
commons-collections.jar
-rw-r--r--1 tomcat5  nogroup100776 Jan 15 18:24 commons-dbcp-1.1.jar
-rw-r--r--1 tomcat5  nogroup112341 Jan 15 18:24 commons-el.jar
-rw-r--r--1 tomcat5  nogroup 39523 Jan 15 18:24 commons-pool-1.1.jar
-rw-r--r--1 tomcat5  nogroup342455 Jan 15 18:24 jasper-compiler.jar
-rw-r--r--1 tomcat5  nogroup100925 Jan 15 18:24 jasper-runtime.jar
-rw-r--r--1 tomcat5  nogroup188231 Jan 15 18:24 jmx-remote-tools.jar
-rw-r--r--1 tomcat5  nogroup168008 Jan 15 18:24 jmx-remote.jar
-rw-r--r--1 tomcat5  nogroup365858 Jan 15 18:24 jmx.jar
-rw-r--r--1 tomcat5  nogroup 48725 Jan 15 18:24 jsp-api.jar
-rw-r--r--1 tomcat5  nogroup327603 Feb 11 10:24 mail.jar
-rw-r--r--1 tomcat5  nogroup215441 Feb 11 17:07 
mysql-connector-java-3.0.10-stable-bin.jar
-rw-r--r--1 tomcat5  nogroup 28015 Jan 15 18:24 naming-common.jar
-rw-r--r--1 tomcat5  nogroup 14862 Jan 15 18:24 naming-factory.jar
-rw-r--r--1 tomcat5  nogroup  2068 Jan 15 18:24 naming-java.jar
-rw-r--r--1 tomcat5  nogroup 41669 Jan 15 18:24 naming-resources.jar
-rw-r--r--1 tomcat5  nogroup 91627 Jan 15 18:24 servlet-api.jar

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


Re: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver

2004-02-11 Thread daniel
where did u put the jar?
thats what got me.
it needs to go in common\lib in your tomcat dir

Daniel Schulken
- Original Message - 
From: "Andreas Schildbach" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 11, 2004 2:51 PM
Subject: Re: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null', cause: java.sql.SQLException: No
suitable driver


> Andreas Schildbach wrote:
>
> > I get this error using Tomcat 5.0.18 under Debian/Linux. Using the same
> > configuration under Windows XP, there is no problem. Using the same
> > application under Tomcat 4.1.27, there is no problem (either Linux or
> > Windows).
>
> >  > auth="Container" type="javax.sql.DataSource"/>
> >  > name="jdbc/schildbach">
>   ^^
>
> of course, this is also jdbc/xxx (changed it for the post)
>
> Regards,
>
> Andreas
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.581 / Virus Database: 368 - Release Date: 2/9/2004


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



Re: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver

2004-02-11 Thread Andreas Schildbach
Andreas Schildbach wrote:

I get this error using Tomcat 5.0.18 under Debian/Linux. Using the same 
configuration under Windows XP, there is no problem. Using the same 
application under Tomcat 4.1.27, there is no problem (either Linux or 
Windows).



 ^^

of course, this is also jdbc/xxx (changed it for the post)

Regards,

Andreas

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


org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver

2004-02-11 Thread Andreas Schildbach
I get this error using Tomcat 5.0.18 under Debian/Linux. Using the same 
configuration under Windows XP, there is no problem. Using the same 
application under Tomcat 4.1.27, there is no problem (either Linux or 
Windows).

As you can see from the included stack trace, I am using Hibernate which 
is accessing the configured DataSource in a Servlet Filter at 
application startup.

I have searched for this problem on this Mailing List, but got no clue. 
I am using a Context local DataSource (no Global), and have everything 
strictly setup as described in the JNDI HowTo. Given the number of 
people that could not solve the problem, maybe there is a bug in Tomcat5?

Regards,

Andreas

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of 
class '' for connect URL 'null', cause:
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:243)
at 
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
at 
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
at 
net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
at 
net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
at 
net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1119)
at 
net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:748)
at 
de.schildbach.integration.HibernatePersistance.init(HibernatePersistance.java:41)
at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:272)
at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:355)
at 
org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:126)
at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3646)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4275)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:320)
at 
org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:727)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)
at 
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
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:519)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
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(DelegatingMethodAccessorImpl.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)

My server.xml:






factoryorg.apache.commons.dbcp.BasicDataSourceFactory

maxActive5

maxIdle0

maxWait1

usernamexxx

passwordxxx

driverClassNamecom.mysql.jdbc.Driver

urljdbc:mysql://localhost/xxx?autoReconnect=true&relaxAutoCommit=true



My web.xml:


jdbc/xxx
javax.sql.DataSource
Container

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


Re: No Suitable Driver Error -- Still No Success

2004-02-03 Thread fachhochschule.burkhart




> Hi ,
>
> I am getting the following error in JDBC connection pooling. Error log
> and other details are as follows:
>
> Please help !!
>
> Regards
> Abhay
>
> Caught while creating a connection in EPP
> dB:=org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
> driver of class '' for connect URL 'null', cause: No suitable driver


Hi Abhay,
here I had the same problem some time ago. I can't reproduce exactly
how we solved the problem, but we solved it ;-)

Here's a Context from my server.xml:


  
  
 maxWait 5000 
 maxActive 40 
 password  

  url
  jdbc:postgresql://127.0.0.1/idp


  driverClassName
  org.postgresql.Driver

 maxIdle 2 
 username stnt1 
  


and here's the according resource-ref from the web.xml:


  jdbc/idp
  javax.sql.DataSource
  Container


The postgresql.jar with the driver class resides in
$CATALINA_HOME/common/lib .

Good luck,
B. Burkhart


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



RE: No Suitable Driver Error -- Still No Success

2004-02-03 Thread Mike Curwen
It's been a while since I did Oracle jdbc urls...
jdbc:oracle:thin:@oswego.comm.mot.com:1521:remedydb
 
is remedydb your sid?
how about your schema?
I'm thinking there's something missing between :thin: and the @ symbol.
 
But it might not always be required... ?

> -Original Message-
> From: Kumar Abhay-CAK203C [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 03, 2004 10:11 AM
> To: 'Tomcat Users List'
> Subject: RE: No Suitable Driver Error -- Still No Success
> Importance: High
> 
> 
> This is my Web.xml
> 
> 
>   jdbc/estimation
>   javax.sql.DataSource
>   Container
> 
> 
> Abhay
> 
> 
> -Original Message-
> From: Mike Curwen [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 03, 2004 10:03 AM
> To: 'Tomcat Users List'
> Subject: RE: No Suitable Driver Error -- Still No Success
> 
> 
> What does your web.xml look like?  Read step 3 on this page: 
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasourc
e-examples
-howto.html
 


> -Original Message-
> From: Kumar Abhay-CAK203C [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 03, 2004 9:46 AM
> To: [EMAIL PROTECTED]
> Subject: No Suitable Driver Error -- Still No Success
> Importance: High
> 
> 
> Hi ,
> 
> I am getting the following error in JDBC connection pooling. Error log

> and other details are as follows:
> 
> Please help !!
> 
> Regards
> Abhay


-
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]


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



RE: No Suitable Driver Error -- Still No Success

2004-02-03 Thread Kumar Abhay-CAK203C
This is my Web.xml


jdbc/estimation
javax.sql.DataSource
Container


Abhay


-Original Message-
From: Mike Curwen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 03, 2004 10:03 AM
To: 'Tomcat Users List'
Subject: RE: No Suitable Driver Error -- Still No Success


What does your web.xml look like?  Read step 3 on this page: 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples
-howto.html
 


> -Original Message-
> From: Kumar Abhay-CAK203C [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 03, 2004 9:46 AM
> To: [EMAIL PROTECTED]
> Subject: No Suitable Driver Error -- Still No Success
> Importance: High
> 
> 
> Hi ,
> 
> I am getting the following error in JDBC connection pooling.
> Error log and other details are as follows:
> 
> Please help !!
> 
> Regards
> Abhay


-
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]



RE: No Suitable Driver Error -- Still No Success

2004-02-03 Thread Burgess, Jay S
Having just gone through a similar issue last week, I can recommend
searching the archives (and maybe the bug database).  You'll probably
find your solution.

If you're getting this error when you start up Tomcat, then it's
probably fixable (you may have a JAR in the wrong place, etc.)  If
you're getting this error after doing a hot redeploy, then you may not
get it to work TC4.  At least, that's the conclusion I've reached.

Note that two responses to my issue said that their problems went away
with TC5, but after making the switch yesterday, I still don't have
Tomcat re-recognizing the resource after a hot redeploy.  I'm still
working on it...

Jay
 
-Original Message-
From: Kumar Abhay-CAK203C [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 03, 2004 9:46 AM
To: [EMAIL PROTECTED]
Subject: No Suitable Driver Error -- Still No Success
Importance: High

Hi ,

I am getting the following error in JDBC connection pooling. Error log
and other details are as follows:

Please help !!

Regards
Abhay

-
I am using :== 
Apache Tomcat/4.1.29 
SQL*Plus: Release 9.0.1.4.0 - Production on Mon Feb 2 09:39:33 2004 
Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production 
j2sdk1.4.2_03 
ojdbc14.jar 
---ERROR
-
Feb 3, 2004 9:36:40 AM org.apache.struts.util.PropertyMessageResources

INFO: Initializing,
config='org.apache.webapp.admin.ApplicationResources', returnNull=true
Looking up jdbc/estimation
Found
Feb 3, 2004 9:36:52 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 80
Feb 3, 2004 9:36:53 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Feb 3, 2004 9:36:53 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=40/270
config=C:\Tomcat\bin\..\conf\jk2.properties
2004-02-03 09:37:29,921 [http80-Processor4] DEBUG (class
com.mot.iDEN.webapp.oes.tags.GetCurrListTag
) - -->-->GetCurrListTag.doStartTag()
2004-02-03 09:37:29,941 [http80-Processor4] DEBUG (class
com.mot.iDEN.webapp.oes.tags.GetCurrListTag
) - -->-->GetCurrListTag.getTestData()
2004-02-03 09:37:30,081 [http80-Processor4] DEBUG (class
com.mot.iDEN.webapp.oes.factory.AdminFactor
y) - -->-->AdminFactory.getTestData()
**1**
**2**
**3**
Caught while creating a connection in EPP
dB:=org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null', cause: No suitable driver
2004-02-03 09:37:30,161 [http80-Processor4] ERROR (class
com.mot.iDEN.webapp.oes.factory.AdminFactor
y) - AdminFactory.getTestData
java.lang.NullPointerException
at
com.mot.iDEN.webapp.oes.config.EstimationConfigurator.getEstimationConne
ction(EstimationC
onfigurator.java:193)
at
com.mot.iDEN.webapp.oes.factory.AdminFactory.getTestData(AdminFactory.ja
va:3492)
at
com.mot.iDEN.webapp.oes.tags.GetCurrListTag.getTestData(GetCurrListTag.j
ava:1268)
at
com.mot.iDEN.webapp.oes.tags.GetCurrListTag.doStartTag(GetCurrListTag.ja
va:745)
at
org.apache.jsp.oes_db_test_jsp._jspService(oes_db_test_jsp.java:73)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:210)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.j
ava:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(Standar
dPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(Standar
dPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
7)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
at
org.apache.catali

RE: No Suitable Driver Error -- Still No Success

2004-02-03 Thread Mike Curwen
What does your web.xml look like?  Read step 3 on this page:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples
-howto.html
 


> -Original Message-
> From: Kumar Abhay-CAK203C [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 03, 2004 9:46 AM
> To: [EMAIL PROTECTED]
> Subject: No Suitable Driver Error -- Still No Success
> Importance: High
> 
> 
> Hi ,
> 
> I am getting the following error in JDBC connection pooling. 
> Error log and other details are as follows:
> 
> Please help !!
> 
> Regards
> Abhay


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



No Suitable Driver Error -- Still No Success

2004-02-03 Thread Kumar Abhay-CAK203C
Hi ,

I am getting the following error in JDBC connection pooling. Error log and other 
details are as follows:

Please help !!

Regards
Abhay
-
I am using :== 
Apache Tomcat/4.1.29 
SQL*Plus: Release 9.0.1.4.0 - Production on Mon Feb 2 09:39:33 2004 
Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production 
j2sdk1.4.2_03 
ojdbc14.jar 
---ERROR-
Feb 3, 2004 9:36:40 AM org.apache.struts.util.PropertyMessageResources 
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', 
returnNull=true
Looking up jdbc/estimation
Found
Feb 3, 2004 9:36:52 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 80
Feb 3, 2004 9:36:53 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Feb 3, 2004 9:36:53 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=40/270  config=C:\Tomcat\bin\..\conf\jk2.properties
2004-02-03 09:37:29,921 [http80-Processor4] DEBUG (class 
com.mot.iDEN.webapp.oes.tags.GetCurrListTag
) - -->-->GetCurrListTag.doStartTag()
2004-02-03 09:37:29,941 [http80-Processor4] DEBUG (class 
com.mot.iDEN.webapp.oes.tags.GetCurrListTag
) - -->-->GetCurrListTag.getTestData()
2004-02-03 09:37:30,081 [http80-Processor4] DEBUG (class 
com.mot.iDEN.webapp.oes.factory.AdminFactor
y) - -->-->AdminFactory.getTestData()
**1**
**2**
**3**
Caught while creating a connection in EPP 
dB:=org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' 
for connect URL 'null', cause: No suitable driver
2004-02-03 09:37:30,161 [http80-Processor4] ERROR (class 
com.mot.iDEN.webapp.oes.factory.AdminFactor
y) - AdminFactory.getTestData
java.lang.NullPointerException
at 
com.mot.iDEN.webapp.oes.config.EstimationConfigurator.getEstimationConnection(EstimationC
onfigurator.java:193)
at 
com.mot.iDEN.webapp.oes.factory.AdminFactory.getTestData(AdminFactory.java:3492)
at 
com.mot.iDEN.webapp.oes.tags.GetCurrListTag.getTestData(GetCurrListTag.java:1268)
at 
com.mot.iDEN.webapp.oes.tags.GetCurrListTag.doStartTag(GetCurrListTag.java:745)
at org.apache.jsp.oes_db_test_jsp._jspService(oes_db_test_jsp.java:73)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar
dPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar
dPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar
dPipeline.java:643)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar
dPipeline.java:641)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar
dPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i

RE: Database connection "No suitable driver"? SOLVED

2003-06-04 Thread Terje Hopsø
And crossContext="true" that I also had set to false.

- Terje


-Original Message-
From: Terje Hopsø [mailto:[EMAIL PROTECTED] 
Sent: 3. juni 2003 22:22
To: 'Tomcat Users List'
Subject: RE: Database connection "No suitable driver"? SOLVED


It seems that the problem was in   I had
it false. Now it works fine in taglibs too.

Thanks for all help.

- Terje



-Original Message-
From: Terje Hopsø [mailto:[EMAIL PROTECTED] 
Sent: 3. juni 2003 22:05
To: 'Tomcat Users List'
Subject: RE: Database connection "No suitable driver"? 


I found an example on www.sybase.com, searching for "tomcat" the first hit
was an example about jconnect for JDBC not using taglib and I got it working
properly.

So now I will try to find out why taglib is not working properly.

- Terje

-Original Message-
From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] 
Sent: 3. juni 2003 14:51
To: Tomcat Users List
Subject: Re: Database connection "No suitable driver"? 


> Yes.

Then there is something wrong with JDBC URL you're using to connect. That
message is actually from DriverManager/DataSource code.

Nix.


-
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]



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



RE: Database connection "No suitable driver"? SOLVED

2003-06-04 Thread Terje Hopsø
It seems that the problem was in   I had
it false. Now it works fine in taglibs too.

Thanks for all help.

- Terje



-Original Message-
From: Terje Hopsø [mailto:[EMAIL PROTECTED] 
Sent: 3. juni 2003 22:05
To: 'Tomcat Users List'
Subject: RE: Database connection "No suitable driver"? 


I found an example on www.sybase.com, searching for "tomcat" the first hit
was an example about jconnect for JDBC not using taglib and I got it working
properly.

So now I will try to find out why taglib is not working properly.

- Terje

-Original Message-
From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] 
Sent: 3. juni 2003 14:51
To: Tomcat Users List
Subject: Re: Database connection "No suitable driver"? 


> Yes.

Then there is something wrong with JDBC URL you're using to connect. That
message is actually from DriverManager/DataSource code.

Nix.


-
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]



RE: Database connection "No suitable driver"?

2003-06-04 Thread Terje Hopsø
I found an example on www.sybase.com, searching for "tomcat" the first hit
was an example about jconnect for JDBC not using taglib and I got it working
properly.

So now I will try to find out why taglib is not working properly.

- Terje

-Original Message-
From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] 
Sent: 3. juni 2003 14:51
To: Tomcat Users List
Subject: Re: Database connection "No suitable driver"? 


> Yes.

Then there is something wrong with JDBC URL you're using to connect. That
message is actually from DriverManager/DataSource code.

Nix.


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



Re: Database connection "No suitable driver"?

2003-06-03 Thread Nikola Milutinovic
> Yes.

Then there is something wrong with JDBC URL you're using to connect. That message is 
actually from DriverManager/DataSource code.

Nix.


RE: Database connection "No suitable driver"?

2003-06-03 Thread Terje Hopsø
I tried this now but I still get the same error.

- Terje


-Original Message-
From: John Moore [mailto:[EMAIL PROTECTED] 
Sent: 3. juni 2003 00:41
To: 'Tomcat Users List'
Subject: RE: Database connection "No suitable driver"?



One other idea, we have the Resource and ResourceParams in the
GlobalNamingResources and a ResourceLink in the application context.   Using
4.1.24LE.  We also had to put commons-dbcp and commons-pool into
commons/lib, these are not included in LE.

John


-Original Message-
From: Terje Hopsø [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 3:12 PM
To: 'Tomcat Users List'
Subject: RE: Database connection "No suitable driver"?


It is there. 

Tomcat version is 4.1.24.

- Terje


-Original Message-
From: John Moore [mailto:[EMAIL PROTECTED] 
Sent: 3. juni 2003 00:05
To: 'Tomcat Users List'
Subject: RE: Database connection "No suitable driver"?




We also put jdbc2_0-stdext.jar in the common/lib directy.   

-Original Message-
From: Terje Hopsø [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 2:54 PM
To: 'Tomcat Users List'
Subject: Database connection "No suitable driver"?


Hello,
 
I have to ask you once again. I have tried to get a connection to my
Sybaseserver. I get "no suitable driver" when trying to connect. Do anyone
have a suggestion on what is wrong. Sybase driver file jconn2.jar is placed
under $CATALINA/common/lib.
 
It is a long mail but I hope anyone will look at it.
 
- Terje
 
 
org.apache.jasper.JasperException: Unable to get connection, DataSource
invalid: "No suitable driver"
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
54)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
.
 
I have an example that is working:
...
<%@ page language="java" %>
<%@ page import="java.lang.*" %>
<%@ page import="java.util.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql"; %>
 
  
  
   select Initialer 
   from Skytter
  
 
Liste :
  
   
  
 

-
And one that is not working. 
.
<%@ page language="java" %>
<%@ page import="java.lang.*" %>
<%@ page import="java.util.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql"; %>
 
  
  
   select Initialer 
   from Skytter
  
  
   
  
---
 
My web.xml is lik this.
 
 
  
   javax.sql.DataSource
  
  
  jdbc:sybase:Tds:xx:,com.sybase.jdbc2.jdbc.SybDriver,,pwdpwd
  
 
-- OR LIKE THIS
 
  DB Connection
  jdbc/resDB
  javax.sql.DataSource
  Container
 
--
server.xml
 

  
  

  validationQuery
  


  maxWait
  5000


  maxActive
  4


  password
  pwdpwd


  url
  jdbc:sybase:Tds::


  driverClassName
  com.sybase.jdbc2.jdbc.SybDriver


  maxIdle
  2


  username
  

  

--


-
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]

RE: Database connection "No suitable driver"?

2003-06-03 Thread Terje Hopsø
Yes.

- Terje


-Original Message-
From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] 
Sent: 3. juni 2003 07:24
To: Tomcat Users List
Subject: Re: Database connection "No suitable driver"?


Your config looks fine. Have you placed Sybase's JDBC driver into
"${CATALINA_HOME}/common/lib/"?

Nix.

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

Re: Database connection "No suitable driver"?

2003-06-03 Thread Nikola Milutinovic
Your config looks fine. Have you placed Sybase's JDBC driver into 
"${CATALINA_HOME}/common/lib/"?

Nix.


RE: Database connection "No suitable driver"?

2003-06-03 Thread John Moore

One other idea, we have the Resource and ResourceParams in the
GlobalNamingResources and a ResourceLink in the application context.   Using
4.1.24LE.  We also had to put commons-dbcp and commons-pool into
commons/lib, these are not included in LE.

John


-Original Message-
From: Terje Hopsø [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 3:12 PM
To: 'Tomcat Users List'
Subject: RE: Database connection "No suitable driver"?


It is there. 

Tomcat version is 4.1.24.

- Terje


-Original Message-
From: John Moore [mailto:[EMAIL PROTECTED] 
Sent: 3. juni 2003 00:05
To: 'Tomcat Users List'
Subject: RE: Database connection "No suitable driver"?




We also put jdbc2_0-stdext.jar in the common/lib directy.   

-Original Message-
From: Terje Hopsø [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 2:54 PM
To: 'Tomcat Users List'
Subject: Database connection "No suitable driver"?


Hello,
 
I have to ask you once again. I have tried to get a connection to my
Sybaseserver. I get "no suitable driver" when trying to connect. Do anyone
have a suggestion on what is wrong. Sybase driver file jconn2.jar is placed
under $CATALINA/common/lib.
 
It is a long mail but I hope anyone will look at it.
 
- Terje
 
 
org.apache.jasper.JasperException: Unable to get connection, DataSource
invalid: "No suitable driver"
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
54)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
.
 
I have an example that is working:
...
<%@ page language="java" %>
<%@ page import="java.lang.*" %>
<%@ page import="java.util.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql"; %>
 
  
  
   select Initialer 
   from Skytter
  
 
Liste :
  
   
  
 

-
And one that is not working. 
.
<%@ page language="java" %>
<%@ page import="java.lang.*" %>
<%@ page import="java.util.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql"; %>
 
  
  
   select Initialer 
   from Skytter
  
  
   
  
---
 
My web.xml is lik this.
 
 
  
   javax.sql.DataSource
  
  
  jdbc:sybase:Tds:xx:,com.sybase.jdbc2.jdbc.SybDriver,,pwdpwd
  
 
-- OR LIKE THIS
 
  DB Connection
  jdbc/resDB
  javax.sql.DataSource
  Container
 
--
server.xml
 

  
  

  validationQuery
  


  maxWait
  5000


  maxActive
  4


  password
  pwdpwd


  url
  jdbc:sybase:Tds::


  driverClassName
  com.sybase.jdbc2.jdbc.SybDriver


  maxIdle
  2


  username
  

  

--


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


RE: Database connection "No suitable driver"?

2003-06-03 Thread Terje Hopsø
It is there. 

Tomcat version is 4.1.24.

- Terje


-Original Message-
From: John Moore [mailto:[EMAIL PROTECTED] 
Sent: 3. juni 2003 00:05
To: 'Tomcat Users List'
Subject: RE: Database connection "No suitable driver"?




We also put jdbc2_0-stdext.jar in the common/lib directy.   

-Original Message-
From: Terje Hopsø [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 2:54 PM
To: 'Tomcat Users List'
Subject: Database connection "No suitable driver"?


Hello,
 
I have to ask you once again. I have tried to get a connection to my
Sybaseserver. I get "no suitable driver" when trying to connect. Do anyone
have a suggestion on what is wrong. Sybase driver file jconn2.jar is placed
under $CATALINA/common/lib.
 
It is a long mail but I hope anyone will look at it.
 
- Terje
 
 
org.apache.jasper.JasperException: Unable to get connection, DataSource
invalid: "No suitable driver"
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
54)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
.
 
I have an example that is working:
...
<%@ page language="java" %>
<%@ page import="java.lang.*" %>
<%@ page import="java.util.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql"; %>
 
  
  
   select Initialer 
   from Skytter
  
 
Liste :
  
   
  
 

-
And one that is not working. 
.
<%@ page language="java" %>
<%@ page import="java.lang.*" %>
<%@ page import="java.util.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql"; %>
 
  
  
   select Initialer 
   from Skytter
  
  
   
  
---
 
My web.xml is lik this.
 
 
  
   javax.sql.DataSource
  
  
  jdbc:sybase:Tds:xx:,com.sybase.jdbc2.jdbc.SybDriver,,pwdpwd
  
 
-- OR LIKE THIS
 
  DB Connection
  jdbc/resDB
  javax.sql.DataSource
  Container
 
--
server.xml
 

  
  

  validationQuery
  


  maxWait
  5000


  maxActive
  4


  password
  pwdpwd


  url
  jdbc:sybase:Tds::


  driverClassName
  com.sybase.jdbc2.jdbc.SybDriver


  maxIdle
  2


  username
  

  

--


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



RE: Database connection "No suitable driver"?

2003-06-03 Thread John Moore


We also put jdbc2_0-stdext.jar in the common/lib directy.   

-Original Message-
From: Terje Hopsø [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 2:54 PM
To: 'Tomcat Users List'
Subject: Database connection "No suitable driver"?


Hello,
 
I have to ask you once again. I have tried to get a connection to my
Sybaseserver. I get "no suitable driver" when trying to connect. Do anyone
have a suggestion on what is wrong. Sybase driver file jconn2.jar is placed
under $CATALINA/common/lib.
 
It is a long mail but I hope anyone will look at it.
 
- Terje
 
 
org.apache.jasper.JasperException: Unable to get connection, DataSource
invalid: "No suitable driver"
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
54)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
.
 
I have an example that is working:
...
<%@ page language="java" %>
<%@ page import="java.lang.*" %>
<%@ page import="java.util.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql"; %>
 
  
  
   select Initialer 
   from Skytter
  
 
Liste :
  
   
  
 

-
And one that is not working. 
.
<%@ page language="java" %>
<%@ page import="java.lang.*" %>
<%@ page import="java.util.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql"; %>
 
  
  
   select Initialer 
   from Skytter
  
  
   
  
---
 
My web.xml is lik this.
 
 
  
   javax.sql.DataSource
  
  
  jdbc:sybase:Tds:xx:,com.sybase.jdbc2.jdbc.SybDriver,,pwdpwd
  
 
-- OR LIKE THIS
 
  DB Connection
  jdbc/resDB
  javax.sql.DataSource
  Container
 
--
server.xml
 

  
  

  validationQuery
  


  maxWait
  5000


  maxActive
  4


  password
  pwdpwd


  url
  jdbc:sybase:Tds::


  driverClassName
  com.sybase.jdbc2.jdbc.SybDriver


  maxIdle
  2


  username
  

  

--


Database connection "No suitable driver"?

2003-06-03 Thread Terje Hopsø
Hello,
 
I have to ask you once again. I have tried to get a connection to my
Sybaseserver. I get "no suitable driver" when trying to connect. Do anyone
have a suggestion on what is wrong. Sybase driver file jconn2.jar is placed
under $CATALINA/common/lib.
 
It is a long mail but I hope anyone will look at it.
 
- Terje
 
 
org.apache.jasper.JasperException: Unable to get connection, DataSource
invalid: "No suitable driver"
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
54)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
.
 
I have an example that is working:
...
<%@ page language="java" %>
<%@ page import="java.lang.*" %>
<%@ page import="java.util.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql"; %>
 
  
  
   select Initialer 
   from Skytter
  
 
Liste :
  
   
  
 

-
And one that is not working. 
.
<%@ page language="java" %>
<%@ page import="java.lang.*" %>
<%@ page import="java.util.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql"; %>
 
  
  
   select Initialer 
   from Skytter
  
  
   
  
---
 
My web.xml is lik this.
 
 
  
   javax.sql.DataSource
  
  
  jdbc:sybase:Tds:xx:,com.sybase.jdbc2.jdbc.SybDriver,,pwdpwd
  
 
-- OR LIKE THIS
 
  DB Connection
  jdbc/resDB
  javax.sql.DataSource
  Container
 
--
server.xml
 

  
  

  validationQuery
  


  maxWait
  5000


  maxActive
  4


  password
  pwdpwd


  url
  jdbc:sybase:Tds::


  driverClassName
  com.sybase.jdbc2.jdbc.SybDriver


  maxIdle
  2


  username
  

  

--


Re: DB2 DataSource: No suitable driver

2002-08-28 Thread Vance Christiaanse

Roger,

Actually, I did try that without success (and didn't mention it in my
original email) but thank you! Since I'm not putting the zip file in a "lib"
folder but rather directly into the classpath for catalina, I think it's
okay. When I take the zip file off the classpath, I get a Class Not Found
exception and when I put it back on, that exception goes away.

Is anyone out there successfully accessing DB2 using a DataSource?

Thanks in advance,
Vance

- Original Message -
From: "Whitcomb, Roger" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, August 28, 2002 5:14 PM
Subject: RE: DB2 DataSource: No suitable driver


Try renaming the .zip file to .jar and try again.  Others have suggested
this for the Oracle drivers.

Roger Whitcomb
Computer Associates
Senior Software Engineer
Development
Phone: +1 408 965 8653
FAX: +1 408 965 8805
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>



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




RE: DB2 DataSource: No suitable driver

2002-08-28 Thread Whitcomb, Roger

Try renaming the .zip file to .jar and try again.  Others have suggested this for the 
Oracle drivers.

Roger Whitcomb
Computer Associates
Senior Software Engineer
Development
Phone: +1 408 965 8653
FAX: +1 408 965 8805
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 


-Original Message-
From: Vance Christiaanse [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 2:01 PM
To: [EMAIL PROTECTED]
Subject: DB2 DataSource: No suitable driver


Hello, Tomcat fans,

I am using Tomcat 4.0.4 and can't get a DataSource working
with DB2.

My attempts result in "No suitable driver", as detailed below.

I have tried everything I've seen suggested for
this problem, as the following steps indicate.

Any help would be much appreciated.

Thank you in advance,

Vance Christiaanse

==

1. Applied FixPack 7 (the latest fixpack) to DB2 7.2

2. Successfully ran usejava2 (to convert DB2 to use JDBC 2.0)

3. Added db2java.zip to catalina classpath by editing
   bin\setclasspath.bat

   EVIDENCE THIS MAKES THE DRIVER AVAILABLE TO CATALINA:
   When I omit this step and test the servlet, I get
   "javax.naming.NamingException:
   Exception creating DataSource: COM.ibm.db2.jdbc.app.DB2Driver"

   EVIDENCE THIS MAKES THE DRIVER AVAILABLE TO THE SERVLET:
   When I replace the DataSource code in the servlet with the
   following
   Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
 conn = java.sql.DriverManager.getConnection(
 "jdbc:db2:MYDB" , "USERID", "PASSWORD");
   it works with this step and doesn't work without it.

4. Updated appropriate conf\server.xml Context element to
   include

   
   
 
   driverClassName
   COM.ibm.db2.jdbc.app.DB2Driver
 
 
   driverName
   jdbc:db2:MYDB
 
 
   user
   USERID
 
 
   password
   PASSWORD
 
   

   EVIDENCE THIS STEP IS WORKING:
   If I change the driverClassName to something bogus,
   I get an error relating to the bogus name.
   The driverName, "jdbc:db2:MYDB" does work in
 conn = java.sql.DriverManager.getConnection(
 "jdbc:db2:MYDB" , "USERID", "PASSWORD");

5. Updated appropriate web.xml to include

   
 jdbc/Alpha
 javax.sql.DataSource
 Container
   

   EVIDENCE THIS STEP IS WORKING:
   None. I get the same error with or without this element.

6. Visited servlet containing the following code:

   javax.sql.DataSource ds = (javax.sql.DataSource)
 ctx.lookup("java:comp/env/jdbc/Alpha");
   pw.println("Get here");
   conn = ds.getConnection();
   pw.println("Don't get here");

7. Got

   Get here
   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)




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


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




DB2 DataSource: No suitable driver

2002-08-28 Thread Vance Christiaanse

Hello, Tomcat fans,

I am using Tomcat 4.0.4 and can't get a DataSource working
with DB2.

My attempts result in "No suitable driver", as detailed below.

I have tried everything I've seen suggested for
this problem, as the following steps indicate.

Any help would be much appreciated.

Thank you in advance,

Vance Christiaanse

==

1. Applied FixPack 7 (the latest fixpack) to DB2 7.2

2. Successfully ran usejava2 (to convert DB2 to use JDBC 2.0)

3. Added db2java.zip to catalina classpath by editing
   bin\setclasspath.bat

   EVIDENCE THIS MAKES THE DRIVER AVAILABLE TO CATALINA:
   When I omit this step and test the servlet, I get
   "javax.naming.NamingException:
   Exception creating DataSource: COM.ibm.db2.jdbc.app.DB2Driver"

   EVIDENCE THIS MAKES THE DRIVER AVAILABLE TO THE SERVLET:
   When I replace the DataSource code in the servlet with the
   following
   Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
 conn = java.sql.DriverManager.getConnection(
 "jdbc:db2:MYDB" , "USERID", "PASSWORD");
   it works with this step and doesn't work without it.

4. Updated appropriate conf\server.xml Context element to
   include

   
   
 
   driverClassName
   COM.ibm.db2.jdbc.app.DB2Driver
 
 
   driverName
   jdbc:db2:MYDB
 
 
   user
   USERID
 
 
   password
   PASSWORD
 
   

   EVIDENCE THIS STEP IS WORKING:
   If I change the driverClassName to something bogus,
   I get an error relating to the bogus name.
   The driverName, "jdbc:db2:MYDB" does work in
 conn = java.sql.DriverManager.getConnection(
 "jdbc:db2:MYDB" , "USERID", "PASSWORD");

5. Updated appropriate web.xml to include

   
 jdbc/Alpha
 javax.sql.DataSource
 Container
   

   EVIDENCE THIS STEP IS WORKING:
   None. I get the same error with or without this element.

6. Visited servlet containing the following code:

   javax.sql.DataSource ds = (javax.sql.DataSource)
 ctx.lookup("java:comp/env/jdbc/Alpha");
   pw.println("Get here");
   conn = ds.getConnection();
   pw.println("Don't get here");

7. Got

   Get here
   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)




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




RE: No suitable driver

2002-07-17 Thread The Kelley's

That's what it sounds like. For some reason your bean class can't see the
driver.
Tim


-Original Message-
From: Meichun Li [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17, 2002 12:20 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: No suitable driver

On Wed, 17 Jul 2002, The Kelley's wrote:

> I had a problem somewhat simular to that.
> Make sure you  have access to the driver in the bean class.
> Maybe a required library or something.
> Tim

Thanks for the reply. Could you explain more detail about the access to
the driver?

In my bean class, if using the standard JDBC connection instead of using
the datasource, there is no probelm. Is this mean that my bean class could
access to the driver?

Thanks,

Meichun

>
> -Original Message-
> From: Meichun Li [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 17, 2002 12:01 PM
> To: Tomcat Users List
> Subject: No suitable driver
>
> Hi, I am suing Oreilly books wrapper class for connection pool. It works
> fine in the servlet class while I created a datasource using
> ds = new DataSourceWrapper(jdbcDriverClassName, jdbcURL, dbUserName,
> dbUserPassword);
>
> But it doesn't work in the javabean class using the same code:
> ds = new DataSourceWrapper(jdbcDriverClassName, jdbcURL, dbUserName,
> dbUserPassword);
>
> No problem while compiling. But there is run time error: No suitable
> driver.
> I print the stack error in the end of the message.
>
> There should be no problem in the classpath setting. I tried to find the
> driver in the javabean class and the driver can be found. Related codes:
>try
>{
> Class.forName("org.gjt.mm.mysql.Driver");
>}
>catch ( ClassNotFoundException coe)
>{
>   System.err.println("Class not found " + coe.getMessage());
>}
>
> Why it is working in servlet but not in javabean ? I've searched the
> archive but couldn't find helpful information.
> Any help are greatly  appreciated!
>
> java.sql.SQLException: No suitable driver
> at java.sql.DriverManager.getConnection(DriverManager.java:543)
> at java.sql.DriverManager.getConnection(DriverManager.java:183)
> at org.ibiblio.sql.ConnectionPool.(ConnectionPool.java:38)
> at
> org.ibiblio.sql.DataSourceWrapper.(DataSourceWrapper.java:21)
> at
> org.ibiblio.osprey.DataSourceBean.getMaxID(DataSourceBean.java:34)
> at org.ibiblio.osprey.TestDataSource.main(TestDataSource.java:16)
>
> Regards,
>
> Meichun
>
>
> --
> Meichun Li
> Ibiblio.org
> 919-962-5646
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>

--
Meichun Li
Ibiblio.org
919-962-5646


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


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




RE: No suitable driver

2002-07-17 Thread Meichun Li

On Wed, 17 Jul 2002, The Kelley's wrote:

> I had a problem somewhat simular to that.
> Make sure you  have access to the driver in the bean class.
> Maybe a required library or something.
> Tim

Thanks for the reply. Could you explain more detail about the access to 
the driver?

In my bean class, if using the standard JDBC connection instead of using 
the datasource, there is no probelm. Is this mean that my bean class could 
access to the driver?

Thanks,

Meichun
 
> 
> -Original Message-
> From: Meichun Li [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 17, 2002 12:01 PM
> To: Tomcat Users List
> Subject: No suitable driver
> 
> Hi, I am suing Oreilly books wrapper class for connection pool. It works
> fine in the servlet class while I created a datasource using
> ds = new DataSourceWrapper(jdbcDriverClassName, jdbcURL, dbUserName,
> dbUserPassword);
> 
> But it doesn't work in the javabean class using the same code:
> ds = new DataSourceWrapper(jdbcDriverClassName, jdbcURL, dbUserName,
> dbUserPassword);
> 
> No problem while compiling. But there is run time error: No suitable
> driver.
> I print the stack error in the end of the message.
> 
> There should be no problem in the classpath setting. I tried to find the
> driver in the javabean class and the driver can be found. Related codes:
>try
>{
> Class.forName("org.gjt.mm.mysql.Driver");
>}
>catch ( ClassNotFoundException coe)
>{
>   System.err.println("Class not found " + coe.getMessage());
>}
> 
> Why it is working in servlet but not in javabean ? I've searched the
> archive but couldn't find helpful information.
> Any help are greatly  appreciated!
> 
> java.sql.SQLException: No suitable driver
> at java.sql.DriverManager.getConnection(DriverManager.java:543)
> at java.sql.DriverManager.getConnection(DriverManager.java:183)
> at org.ibiblio.sql.ConnectionPool.(ConnectionPool.java:38)
> at
> org.ibiblio.sql.DataSourceWrapper.(DataSourceWrapper.java:21)
> at
> org.ibiblio.osprey.DataSourceBean.getMaxID(DataSourceBean.java:34)
> at org.ibiblio.osprey.TestDataSource.main(TestDataSource.java:16)
> 
> Regards,
> 
> Meichun
> 
> 
> --
> Meichun Li
> Ibiblio.org
> 919-962-5646
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 

-- 
Meichun Li
Ibiblio.org
919-962-5646


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




RE: No suitable driver

2002-07-17 Thread Meichun Li

On Wed, 17 Jul 2002, Simon Jenkinson wrote:

> have you tried:
> 
> Class.forName("org.gjt.mm.mysql.Driver").newInstance();
> 
> Si

Yes, I have tried it. But I still get the same error: No suitable driver.

Thanks,

Meichun

> 
> -Original Message-
> From: The Kelley's [mailto:[EMAIL PROTECTED]]
> Sent: 17 July 2002 17:17
> To: Tomcat Users List
> Subject: RE: No suitable driver 
> 
> 
> I had a problem somewhat simular to that.
> Make sure you  have access to the driver in the bean class.
> Maybe a required library or something.
> Tim
> 
> 
> -Original Message-
> From: Meichun Li [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 17, 2002 12:01 PM
> To: Tomcat Users List
> Subject: No suitable driver
> 
> Hi, I am suing Oreilly books wrapper class for connection pool. It works
> fine in the servlet class while I created a datasource using
> ds = new DataSourceWrapper(jdbcDriverClassName, jdbcURL, dbUserName,
> dbUserPassword);
> 
> But it doesn't work in the javabean class using the same code:
> ds = new DataSourceWrapper(jdbcDriverClassName, jdbcURL, dbUserName,
> dbUserPassword);
> 
> No problem while compiling. But there is run time error: No suitable
> driver.
> I print the stack error in the end of the message.
> 
> There should be no problem in the classpath setting. I tried to find the
> driver in the javabean class and the driver can be found. Related codes:
>try
>{
> Class.forName("org.gjt.mm.mysql.Driver");
>}
>catch ( ClassNotFoundException coe)
>{
>   System.err.println("Class not found " + coe.getMessage());
>}
> 
> Why it is working in servlet but not in javabean ? I've searched the
> archive but couldn't find helpful information.
> Any help are greatly  appreciated!
> 
> java.sql.SQLException: No suitable driver
> at java.sql.DriverManager.getConnection(DriverManager.java:543)
> at java.sql.DriverManager.getConnection(DriverManager.java:183)
> at org.ibiblio.sql.ConnectionPool.(ConnectionPool.java:38)
> at
> org.ibiblio.sql.DataSourceWrapper.(DataSourceWrapper.java:21)
> at
> org.ibiblio.osprey.DataSourceBean.getMaxID(DataSourceBean.java:34)
> at org.ibiblio.osprey.TestDataSource.main(TestDataSource.java:16)
> 
> Regards,
> 
> Meichun
> 
> 
> --
> Meichun Li
> Ibiblio.org
> 919-962-5646
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 

-- 
Meichun Li
Ibiblio.org
919-962-5646


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




RE: No suitable driver

2002-07-17 Thread Simon Jenkinson

have you tried:

Class.forName("org.gjt.mm.mysql.Driver").newInstance();

Si

-Original Message-
From: The Kelley's [mailto:[EMAIL PROTECTED]]
Sent: 17 July 2002 17:17
To: Tomcat Users List
Subject: RE: No suitable driver 


I had a problem somewhat simular to that.
Make sure you  have access to the driver in the bean class.
Maybe a required library or something.
Tim


-Original Message-
From: Meichun Li [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17, 2002 12:01 PM
To: Tomcat Users List
Subject: No suitable driver

Hi, I am suing Oreilly books wrapper class for connection pool. It works
fine in the servlet class while I created a datasource using
ds = new DataSourceWrapper(jdbcDriverClassName, jdbcURL, dbUserName,
dbUserPassword);

But it doesn't work in the javabean class using the same code:
ds = new DataSourceWrapper(jdbcDriverClassName, jdbcURL, dbUserName,
dbUserPassword);

No problem while compiling. But there is run time error: No suitable
driver.
I print the stack error in the end of the message.

There should be no problem in the classpath setting. I tried to find the
driver in the javabean class and the driver can be found. Related codes:
   try
   {
Class.forName("org.gjt.mm.mysql.Driver");
   }
   catch ( ClassNotFoundException coe)
   {
  System.err.println("Class not found " + coe.getMessage());
   }

Why it is working in servlet but not in javabean ? I've searched the
archive but couldn't find helpful information.
Any help are greatly  appreciated!

java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:543)
at java.sql.DriverManager.getConnection(DriverManager.java:183)
at org.ibiblio.sql.ConnectionPool.(ConnectionPool.java:38)
at
org.ibiblio.sql.DataSourceWrapper.(DataSourceWrapper.java:21)
at
org.ibiblio.osprey.DataSourceBean.getMaxID(DataSourceBean.java:34)
at org.ibiblio.osprey.TestDataSource.main(TestDataSource.java:16)

Regards,

Meichun


--
Meichun Li
Ibiblio.org
919-962-5646


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


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


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




RE: No suitable driver

2002-07-17 Thread The Kelley's

I had a problem somewhat simular to that.
Make sure you  have access to the driver in the bean class.
Maybe a required library or something.
Tim


-Original Message-
From: Meichun Li [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17, 2002 12:01 PM
To: Tomcat Users List
Subject: No suitable driver

Hi, I am suing Oreilly books wrapper class for connection pool. It works
fine in the servlet class while I created a datasource using
ds = new DataSourceWrapper(jdbcDriverClassName, jdbcURL, dbUserName,
dbUserPassword);

But it doesn't work in the javabean class using the same code:
ds = new DataSourceWrapper(jdbcDriverClassName, jdbcURL, dbUserName,
dbUserPassword);

No problem while compiling. But there is run time error: No suitable
driver.
I print the stack error in the end of the message.

There should be no problem in the classpath setting. I tried to find the
driver in the javabean class and the driver can be found. Related codes:
   try
   {
Class.forName("org.gjt.mm.mysql.Driver");
   }
   catch ( ClassNotFoundException coe)
   {
  System.err.println("Class not found " + coe.getMessage());
   }

Why it is working in servlet but not in javabean ? I've searched the
archive but couldn't find helpful information.
Any help are greatly  appreciated!

java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:543)
at java.sql.DriverManager.getConnection(DriverManager.java:183)
at org.ibiblio.sql.ConnectionPool.(ConnectionPool.java:38)
at
org.ibiblio.sql.DataSourceWrapper.(DataSourceWrapper.java:21)
at
org.ibiblio.osprey.DataSourceBean.getMaxID(DataSourceBean.java:34)
at org.ibiblio.osprey.TestDataSource.main(TestDataSource.java:16)

Regards,

Meichun


--
Meichun Li
Ibiblio.org
919-962-5646


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


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




No suitable driver

2002-07-17 Thread Meichun Li

Hi, I am suing Oreilly books wrapper class for connection pool. It works 
fine in the servlet class while I created a datasource using  
ds = new DataSourceWrapper(jdbcDriverClassName, jdbcURL, dbUserName, 
dbUserPassword);

But it doesn't work in the javabean class using the same code: 
ds = new DataSourceWrapper(jdbcDriverClassName, jdbcURL, dbUserName, 
dbUserPassword);

No problem while compiling. But there is run time error: No suitable 
driver.
I print the stack error in the end of the message.

There should be no problem in the classpath setting. I tried to find the 
driver in the javabean class and the driver can be found. Related codes:
   try
   {
Class.forName("org.gjt.mm.mysql.Driver");
   }
   catch ( ClassNotFoundException coe)
   {
  System.err.println("Class not found " + coe.getMessage());
   }

Why it is working in servlet but not in javabean ? I've searched the 
archive but couldn't find helpful information.
Any help are greatly  appreciated!

java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:543)
at java.sql.DriverManager.getConnection(DriverManager.java:183)
at org.ibiblio.sql.ConnectionPool.(ConnectionPool.java:38)
at 
org.ibiblio.sql.DataSourceWrapper.(DataSourceWrapper.java:21)
at 
org.ibiblio.osprey.DataSourceBean.getMaxID(DataSourceBean.java:34)
at org.ibiblio.osprey.TestDataSource.main(TestDataSource.java:16)

Regards,

Meichun


-- 
Meichun Li
Ibiblio.org
919-962-5646


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




RE: tomcat 4.0.4, JNDI, Datasource.getConnection() -> No suitable driver, [Oracle]

2002-07-05 Thread Andrew Conrad

Tomcat 4.1.2 uses the Commons-dbcp connection pool.  You can download it
at 

http://jakarta.apache.org/builds/jakarta-commons/nightly/commons-dbcp/

It does not have a release build yet.


-Andrew

-Original Message-
From: Pedro Salazar [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 05, 2002 7:00 AM
To: [EMAIL PROTECTED]
Subject: tomcat 4.0.4, JNDI, Datasource.getConnection() -> No suitable
driver, [Oracle]


Greetings,

I'm moving a webservice from tomcat 4.1.2 (WSDP 1.0) --> tomcat 4.0.4
because I want to go to production environment and instead of using the
tomcat bundled with WebServiceDevelopmentPack 1.0 (WSDP 1.0), I want to
use a conventional/isolated tomcat. I choose the tomcat 4.0.4 (latest
stable version).

I added a default context in tomcat isolated service section on
conf/server.xml with my jdbc resources, and I deploy my oracle driver
package in common/lib/ directory (renamed as a jar file).

PROBLEM:
--
I'm having problems using a connection manager from JNDI! I'm getting an
exception "java.sql.SQLException: No suitable driver" when I try to get
a connection from datasource:

ds = (DataSource)initCtx.lookup("java:comp/env/jdbc/crumpetdb");
ds.getConnection(); //EXCEPTION!!


It appears that tomcat 4.0.4 uses tyrex connection manager
(tyrex-0.9.7.0.jar). What is connection manager of tomcat 4.1.2 (WSDP
1.0)? I tried the tyrex's latest version (1.0), but still have the same
problem. In tomcat 4.1.2 I didn't have this problem!

Please, anyone figures what is my problem?

PS. By the way, how to insert a zip file with classes to a tomcat's lib
directory but without renaming it to a jar file? What should I change in
catalina startup script?

thanks,
Pedro Salazar





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


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




tomcat 4.0.4, JNDI, Datasource.getConnection() -> No suitable driver,[Oracle]

2002-07-05 Thread Pedro Salazar

Greetings,

I'm moving a webservice from tomcat 4.1.2 (WSDP 1.0) --> tomcat 4.0.4
because I want to go to production environment and instead of using the
tomcat bundled with WebServiceDevelopmentPack 1.0 (WSDP 1.0), I want to
use a conventional/isolated tomcat. I choose the tomcat 4.0.4 (latest
stable version).

I added a default context in tomcat isolated service section on
conf/server.xml with my jdbc resources, and I deploy my oracle driver
package in common/lib/ directory (renamed as a jar file).

PROBLEM:
--
I'm having problems using a connection manager from JNDI! I'm
getting an exception "java.sql.SQLException: No suitable driver" when I
try to get a connection from datasource:

ds = (DataSource)initCtx.lookup("java:comp/env/jdbc/crumpetdb");
ds.getConnection(); //EXCEPTION!!


It appears that tomcat 4.0.4 uses tyrex connection manager
(tyrex-0.9.7.0.jar). What is connection manager of tomcat 4.1.2 (WSDP
1.0)? I tried the tyrex's latest version (1.0), but still have the same
problem. In tomcat 4.1.2 I didn't have this problem!

Please, anyone figures what is my problem?

PS. By the way, how to insert a zip file with classes to a tomcat's lib
directory but without renaming it to a jar file? What should I change in
catalina startup script?

thanks,
Pedro Salazar





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




RE: tomcat 4.0.3 and No suitable driver SQLException - SOLVED

2002-05-29 Thread Chen, Dean (Zhun)

Thanks for your help everyone.

I found the solution:

I am using Tomcat 4.03+ with JDK 1.4 (I've tested with JDK 1.31 and it also
works)

According to this file
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

It states the order in which classes & jars are loaded.
/WEB-INF/classes of your web application 
/WEB-INF/lib/*.jar of your web application 
Bootstrap classes of your JVM 
System class loader classses (described above) 
$CATALINA_HOME/common/classes 
$CATALINA_HOME/common/endorsed/*.jar 
$CATALINA_HOME/common/lib/*.jar 
$CATALINA_HOME/shared/classes 
$CATALINA_HOME/shared/lib/*.jar 

Since jconn2.jar is application wide file, I put it in
$CATALINA_HOME/common/lib (I've also referenced other Tomcat documentations.
Of course since it's constantly being revised, this information is as of
this writing). PS, I'm using JConnect 5.5

You do not need (and probably should not) have a classpath to jconn2.jar. 

The solution lies in server.xml, the parameter user & password should occur
before the other info, and the paramter url has been changed to driverName,
although it might still work.


  
userusername
 
passwordpassword
driverClassName
  com.sybase.jdbc2.jdbc.SybDriver

driverName
  jdbc:sybase:Tds::/

  

Thanks all for your help. I hope this helps in the future.


Dean Chen


-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 28, 2002 8:05 PM
To: Tomcat Users List
Subject: RE: tomcat 4.0.3 and No suitable driver SQLException


Some of the parameter names seem to have changed.  I suggest grabbing a 
recent nightly build of Tomcat 4.1 and following the instructions here:

http://marc.theaimsgroup.com/?l=tomcat-user&m=102242646003357&w=2

There I point to two other messages that I sent to the list and reference
the original email where I found the solution.  I also added a bit of code
to one of the emails so be sure to read them all.

I think the main problem is this.  Compare my configuration to 
yours.  Notice that some of the param names are different and there are 
some that you don't have that you need (such as "factory"):


 
 
 username
 blahuser
 
 
 password
 blahpass
 
 
 driverClassName
 oracle.jdbc.driver.OracleDriver
 
 
 url
 jdbc:oracle:thin:@oracle.mydomain:1521:utasklst
 
 
 factory
 org.apache.commons.dbcp.BasicDataSourceFactory
 
 
 maxActive
 100
 
 
 maxIdle
 3
 
 
 maxWait
 100
 
 
 validationQuery
 SELECT MAX(id) FROM Users
 
 

Jake

At 07:12 PM 5/28/2002 -0400, you wrote:
>I was able to connect by doing:
>
>Class.forName("com.sybase.jdbc2.jdbc.SybDriver");
>conn = DriverManager.getConnection();
>
>However, still doesn't work if I do ds.getConnection();
>
>How can I check to see if the datasource is loaded correctly besides
>checking if it's null or not.
>
>Thanks,
>
>Dean Chen
>
>
>-Original Message-----
>From: Chen, Dean (Zhun)
>Sent: Tuesday, May 28, 2002 1:00 PM
>To: 'Tomcat Users List'
>Subject: tomcat 4.0.3 and No suitable driver SQLException
>
>
>Hi,
>
>I know this has been covered before, and I've searched the archives, but
>none of the solutions posted seemed to work. Am I missing something?
>
>I am using Tomcat 4.03, JDK 1.4, and Sybase JConn 5.5
>
>Here's what I did:
>
>I installed the appropriate applications.
>I put jconn2.jar in CATALINA_HOME/common/lib
>
>My settings are as follows
>server.xml
>type="javax.sql.DataSource"/>
>
>   
> driverClassName
>   com.sybase.jdbc2.jdbc.SybDriver
> 
> url
>   jdbc:sybase:Tds:servername:4946/database
> 
>
userusername
>
passwordpassword
>   
>
>
>web.xml
>   
> Sets Database
> jdbc/setsDataSource
> javax.sql.DataSource
> Container
>   
>
>
>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");
>
> if (ds==null)
> throw new DatasourceUnavailableException("Unable to obtain
>datasource: "+name);
>
>  

AW: tomcat 4.0.3 and No suitable driver SQLException

2002-05-28 Thread Ralph Einfeldt

Are you shure that the url is right ?
jdbc:sybase:Tds:servername:4946/database

I thought it should be
jdbc:sybase:Tds:servername:4946?ServiceName=database

(Although my information might be a bit outdated)

> -Ursprüngliche Nachricht-
> Von: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 28. Mai 2002 19:00
> An: 'Tomcat Users List'
> Betreff: tomcat 4.0.3 and No suitable driver SQLException
> 
>   
> driverClassName
>   com.sybase.jdbc2.jdbc.SybDriver
> 
> url
>   jdbc:sybase:Tds:servername:4946/database
> 
> 

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




RE: tomcat 4.0.3 and No suitable driver SQLException

2002-05-28 Thread Jacob Kjome

Some of the parameter names seem to have changed.  I suggest grabbing a 
recent nightly build of Tomcat 4.1 and following the instructions here:

http://marc.theaimsgroup.com/?l=tomcat-user&m=102242646003357&w=2

There I point to two other messages that I sent to the list and reference
the original email where I found the solution.  I also added a bit of code
to one of the emails so be sure to read them all.

I think the main problem is this.  Compare my configuration to 
yours.  Notice that some of the param names are different and there are 
some that you don't have that you need (such as "factory"):


 
 
 username
 blahuser
 
 
 password
 blahpass
 
 
 driverClassName
 oracle.jdbc.driver.OracleDriver
 
 
 url
 jdbc:oracle:thin:@oracle.mydomain:1521:utasklst
 
 
 factory
 org.apache.commons.dbcp.BasicDataSourceFactory
 
 
 maxActive
 100
 
 
 maxIdle
 3
 
 
 maxWait
 100
 
 
 validationQuery
 SELECT MAX(id) FROM Users
 
 

Jake

At 07:12 PM 5/28/2002 -0400, you wrote:
>I was able to connect by doing:
>
>Class.forName("com.sybase.jdbc2.jdbc.SybDriver");
>conn = DriverManager.getConnection();
>
>However, still doesn't work if I do ds.getConnection();
>
>How can I check to see if the datasource is loaded correctly besides
>checking if it's null or not.
>
>Thanks,
>
>Dean Chen
>
>
>-Original Message-
>From: Chen, Dean (Zhun)
>Sent: Tuesday, May 28, 2002 1:00 PM
>To: 'Tomcat Users List'
>Subject: tomcat 4.0.3 and No suitable driver SQLException
>
>
>Hi,
>
>I know this has been covered before, and I've searched the archives, but
>none of the solutions posted seemed to work. Am I missing something?
>
>I am using Tomcat 4.03, JDK 1.4, and Sybase JConn 5.5
>
>Here's what I did:
>
>I installed the appropriate applications.
>I put jconn2.jar in CATALINA_HOME/common/lib
>
>My settings are as follows
>server.xml
>type="javax.sql.DataSource"/>
>
>   
> driverClassName
>   com.sybase.jdbc2.jdbc.SybDriver
> 
> url
>   jdbc:sybase:Tds:servername:4946/database
> 
> userusername
> passwordpassword
>   
>
>
>web.xml
>   
> Sets Database
> jdbc/setsDataSource
> javax.sql.DataSource
> Container
>   
>
>
>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");
>
>     if (ds==null)
> throw new DatasourceUnavailableException("Unable to obtain
>datasource: "+name);
>
> try {
> conn = ds.getConnection();
> catch { blah blah
>
>
>That getConnection() part throws a SQLException
>
>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)
>
>Thanks in advance.
>
>Dean Chen
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



RE: tomcat 4.0.3 and No suitable driver SQLException

2002-05-28 Thread Chen, Dean (Zhun)

I was able to connect by doing:

Class.forName("com.sybase.jdbc2.jdbc.SybDriver");
conn = DriverManager.getConnection();

However, still doesn't work if I do ds.getConnection();

How can I check to see if the datasource is loaded correctly besides
checking if it's null or not.

Thanks,

Dean Chen


-Original Message-
From: Chen, Dean (Zhun) 
Sent: Tuesday, May 28, 2002 1:00 PM
To: 'Tomcat Users List'
Subject: tomcat 4.0.3 and No suitable driver SQLException


Hi,

I know this has been covered before, and I've searched the archives, but
none of the solutions posted seemed to work. Am I missing something?

I am using Tomcat 4.03, JDK 1.4, and Sybase JConn 5.5

Here's what I did:

I installed the appropriate applications.
I put jconn2.jar in CATALINA_HOME/common/lib

My settings are as follows
server.xml
  

  
driverClassName
  com.sybase.jdbc2.jdbc.SybDriver

url
  jdbc:sybase:Tds:servername:4946/database

userusername
passwordpassword
  


web.xml
  
Sets Database
jdbc/setsDataSource
javax.sql.DataSource
Container
  


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");

if (ds==null)
throw new DatasourceUnavailableException("Unable to obtain
datasource: "+name);

try {
conn = ds.getConnection();  
catch { blah blah


That getConnection() part throws a SQLException

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)

Thanks in advance.

Dean Chen



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

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




tomcat 4.0.3 and No suitable driver SQLException

2002-05-28 Thread Chen, Dean (Zhun)

Hi,

I know this has been covered before, and I've searched the archives, but
none of the solutions posted seemed to work. Am I missing something?

I am using Tomcat 4.03, JDK 1.4, and Sybase JConn 5.5

Here's what I did:

I installed the appropriate applications.
I put jconn2.jar in CATALINA_HOME/common/lib

My settings are as follows
server.xml
  

  
driverClassName
  com.sybase.jdbc2.jdbc.SybDriver

url
  jdbc:sybase:Tds:servername:4946/database

userusername
passwordpassword
  


web.xml
  
Sets Database
jdbc/setsDataSource
javax.sql.DataSource
Container
  


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");

if (ds==null)
throw new DatasourceUnavailableException("Unable to obtain
datasource: "+name);

try {
conn = ds.getConnection();  
catch { blah blah


That getConnection() part throws a SQLException....

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)

Thanks in advance.

Dean Chen



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




No suitable driver under linux Mandrake and classes12.zip HELP !!!!!

2002-02-22 Thread remy.menetrieux

Sorry for the spam,and for my english but after 3 days I have not solution:
Classes12.jar is in common/lib
When I use a datasource for oracle driver, it doesn't works--> No 
suitable Driver . But if I use a classical connection like this:
String url="jdbc:oracle:thin:@**.**.**.***:1521:db8ir3";
 String password="jdev";
 String user="jdev";
 String driver = "oracle.jdbc.driver.OracleDriver";
Class.forName(driver).newInstance();
 Connection conn = DriverManager.getConnection(url,user,password);
it works
My second problem is that if i make a mistake in my server.xml like 
oracle.jdbc.driver.OracleDiver instead of oracle.jdbc.driver.OracleDriver
i obtain a datasource null

Is it a bug of tomcat under linux? have you the same problem?

When i use a database under mysql with the same configuration it's OK...
When i use tomact under widdows all is OK...
know you if it's possible to see the classpath used by tomcat..
At the end of the catalina.sh i add echo "CLASSPATH=$CLASSPATH"
 
CLASSPATH=/usr/local/bin/java/lib/tools.jar:/opt/deverh/jakarta-tomcat-4.0.2/bin/bootstrap.jar

but this classpath not contains jars which are in the common/lib directory

thanks in advance
Remy


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: No suitable driver Datasource Problem

2002-02-19 Thread remy.menetrieux

Thanks it's work...
Remy

Randy Layman wrote:

>   I'm would guess that your JDBC driver is not available to the
>correct class loader.  Try moving the JDBC driver up to the
>TOMCAT_HOME/lib/common directory, restart Tomcat, and see if that works.
>
>   Randy
>
>>-Original Message-
>>From: remy.menetrieux [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, February 19, 2002 7:51 AM
>>To: Tomcat Users List
>>Subject: No suitable driver Datasource Problem
>>
>>
>>When I use a datasource I obtain this error.
>>But when i use same option directly in my servelt all is OK.
>>Have you seen this errors ???
>>regards
>>Remy
>>
>>Java.sql.SQLException: No suitable driver at
>>java.sql.DriverManager.getDriver(DriverManager.java:249) at
>>tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSourc
>>e.java:233) 
>>at
>>tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSourc
>>e.java:204) 
>>at
>>fr.pixelpark.erh.servlets.ApplicantServlet.performTask(Applica
>>ntServlet.java 
>>
>>:92) at
>>fr.pixelpark.toolbox.servlets.PixelServlet.doGet(PixelServlet.
>>java:33) at
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
>>er(Application 
>>
>>FilterChain.java:247) at
>>org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
>>cationFilterCh 
>>
>>ain.java:193) at
>>org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
>>rapperValve.ja 
>>
>>va:243) at
>>org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
>>ipeline.java:5 
>>
>>66) at
>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
>>ine.java:472)
>>at 
>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
>>va:943) at
>>org.apache.catalina.core.StandardContextValve.invoke(StandardC
>>ontextValve.ja 
>>
>>va:190) at
>>org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
>>ipeline.java:5 
>>
>>66) at
>>org.apache.catalina.valves.CertificatesValve.invoke(Certificat
>>esValve.java:2 
>>
>>46) at
>>org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
>>ipeline.java:5 
>>
>>64) at
>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
>>ine.java:472)
>>at 
>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
>>va:943) at
>>org.apache.catalina.core.StandardContext.invoke(StandardContex
>>t.java:2343)
>>at
>>org.apache.catalina.core.StandardHostValve.invoke(StandardHost
>>Valve.java:180 
>>
>>) at
>>org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
>>ipeline.java:5 
>>
>>66) at
>>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
>>spatcherValve. 
>>
>>java:170 ) at
>>org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
>>ipeline.java:5 
>>
>>64) at
>>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
>>Valve.java:170 
>>
>>) at
>>org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
>>ipeline.java:5 
>>
>>64) at
>>org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValv
>>e.java:468) 
>>at
>>org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
>>ipeline.java:5 
>>
>>64) at
>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
>>ine.java:472)
>>at 
>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
>>va:943) at
>>org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
>>gineValve.java 
>>
>>:174) at
>>org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
>>ipeline.java:5 
>>
>>66) at
>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
>>ine.java:472)
>>at 
>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
>>va:943) at
>>org.apache.catalina.connector.http.HttpProcessor.process(HttpP
>>rocessor.java: 
>>
>>1012) at
>>org.apache.catalina.connector.http.HttpProcessor.run(HttpProce
>>ssor.java:1107 
>>
>>) at java.lang.Thread.run(Thread.java:484)
>>
>>
>>
>>
>>Le code :
>>
>>   Context initCtx = new InitialContext();
>>
>>Context envCtx = (Context) initCtx.lookup( 
>>"java:comp/env" );
>>
>>// Look up our data source
>>out.println("envCtx ="+envCtx);
>>DataSource ds = envCtx.lookup("jdbc/ErhDB");
>>
>>
>>
>>
>>--
>>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>>For additional commands: <mailto:[EMAIL PROTECTED]>
>>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>>
>
>--
>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>For additional commands: <mailto:[EMAIL PROTECTED]>
>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>
>




RE: No suitable driver Datasource Problem

2002-02-19 Thread Randy Layman


I'm would guess that your JDBC driver is not available to the
correct class loader.  Try moving the JDBC driver up to the
TOMCAT_HOME/lib/common directory, restart Tomcat, and see if that works.

Randy

> -Original Message-
> From: remy.menetrieux [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 19, 2002 7:51 AM
> To: Tomcat Users List
> Subject: No suitable driver Datasource Problem
> 
> 
> When I use a datasource I obtain this error.
> But when i use same option directly in my servelt all is OK.
> Have you seen this errors ???
> regards
> Remy
> 
> Java.sql.SQLException: No suitable driver at
> java.sql.DriverManager.getDriver(DriverManager.java:249) at
> tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSourc
> e.java:233) 
> at
> tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSourc
> e.java:204) 
> at
> fr.pixelpark.erh.servlets.ApplicantServlet.performTask(Applica
> ntServlet.java 
> 
> :92) at
> fr.pixelpark.toolbox.servlets.PixelServlet.doGet(PixelServlet.
> java:33) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(Application 
> 
> FilterChain.java:247) at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterCh 
> 
> ain.java:193) at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.ja 
> 
> va:243) at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5 
> 
> 66) at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
> va:943) at
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.ja 
> 
> va:190) at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5 
> 
> 66) at
> org.apache.catalina.valves.CertificatesValve.invoke(Certificat
> esValve.java:2 
> 
> 46) at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5 
> 
> 64) at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
> va:943) at
> org.apache.catalina.core.StandardContext.invoke(StandardContex
> t.java:2343)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:180 
> 
> ) at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5 
> 
> 66) at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
> spatcherValve. 
> 
> java:170 ) at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5 
> 
> 64) at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:170 
> 
> ) at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5 
> 
> 64) at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValv
> e.java:468) 
> at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5 
> 
> 64) at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
> va:943) at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java 
> 
> :174) at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
> ipeline.java:5 
> 
> 66) at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:472)
> at 
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
> va:943) at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpP
> rocessor.java: 
> 
> 1012) at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProce
> ssor.java:1107 
> 
> ) at java.lang.Thread.run(Thread.java:484)
> 
> 
> 
> 
> Le code :
> 
>Context initCtx = new InitialContext();
> 
> Context envCtx = (Context) initCtx.lookup( 
> "java:comp/env" );
> 
> // Look up our data source
> out.println("envCtx ="+envCtx);
> DataSource ds = envCtx.lookup("jdbc/ErhDB");
> 
> 
> 
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




No suitable driver Datasource Problem

2002-02-19 Thread remy.menetrieux

When I use a datasource I obtain this error.
But when i use same option directly in my servelt all is OK.
Have you seen this errors ???
regards
Remy

Java.sql.SQLException: No suitable driver at
java.sql.DriverManager.getDriver(DriverManager.java:249) at
tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSource.java:233) 
at
tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSource.java:204) 
at
fr.pixelpark.erh.servlets.ApplicantServlet.performTask(ApplicantServlet.java 

:92) at
fr.pixelpark.toolbox.servlets.PixelServlet.doGet(PixelServlet.java:33) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application 

FilterChain.java:247) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh 

ain.java:193) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja 

va:243) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 

66) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja 

va:190) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 

66) at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 

46) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 

64) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 

) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 

66) at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. 

java:170 ) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 

64) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 

) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 

64) at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) 
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 

64) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java 

:174) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 

66) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 

1012) at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107 

) at java.lang.Thread.run(Thread.java:484)




Le code :

   Context initCtx = new InitialContext();

Context envCtx = (Context) initCtx.lookup( "java:comp/env" );

// Look up our data source
out.println("envCtx ="+envCtx);
DataSource ds = envCtx.lookup("jdbc/ErhDB");




--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: javax.servlet.ServletException: No suitable driver

2001-08-14 Thread Christian Cleber

If you are developing jsp/servlet application you must copy the .jar into
../WEB-INF/lib.
If not, should be work ...

"Rob S." wrote:

> I always wish I was better with JDBC, but I never manage to find the time to
> get down with it... Anyway, did you load the JDBC driver class?  Just
> putting it in your classpath doesn't mean that it gets loaded.  To me, it
> would appear that the "no suitable driver" when you're trying to connect to
> the database would mean that DriverManager.getConnection can't find a
> suitable JDBC driver ;)
>
> See any JDBC tutorial on the web, like the ones at http://java.sun.com/
>
> - r
>
> On Tue, 14 Aug 2001 14:57:44 +0300 [EMAIL PROTECTED] wrote:
> > Hello,
> >
> > I have setup Tomcat-3.2.3 and Apache_1.3.20 with MySQL-3.23.36 under
> > RedHatLinux 7.1.
> > jdk1.2.2 is installed under /usr/local/src/jdk.
> > Tomcat, Apache and MySQL are basically working fine
> > I am trying to use MM.MySQL for JDBC connectivity to MySQL.
> > my CLASSPATH is /usr/local/src/jdk1.2.2/lib/mm.mysql-2.0.4-src.jar
> > This is the log that I have:
> >
> > javax.servlet.ServletException: No suitable driver
> >   at
> >
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
>
> > l.java:459)
> >   at
> >
> jsp._0002fjsp_0002ftest_0002ejsptest_jsp_7._jspService(_0002fjsp_0002ftest_0
>
> > 002ejsptest_jsp_7.java:96)
> >   at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >   at
> >
> org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja
>
> > va:130)
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >   at
> >
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
>
> > va:282)
> >   at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
> >   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
>
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >   at
> > org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> >   at org.apache.tomcat.core.Handler.service(Handler.java:287)
> >   at
> > org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> >   at
> >
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
>
> > 2)
> >   at
> > org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
> >   at
> >
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
>
> > (Ajp12ConnectionHandler.java:166)
> >   at
> > org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> >   at
> > org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
>
> >   at java.lang.Thread.run(Thread.java:479)
> > Root cause:
> > java.sql.SQLException: No suitable driver
> >   at java.sql.DriverManager.getConnection(DriverManager.java:477)
> >   at java.sql.DriverManager.getConnection(DriverManager.java:137)
> >   at
> >
> jsp._0002fjsp_0002ftest_0002ejsptest_jsp_7._jspService(_0002fjsp_0002ftest_0
>
> > 002ejsptest_jsp_7.java:67)
> >   at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >   at
> >
> org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja
>
> > va:130)
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >   at
> >
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
>
> > va:282)
> >   at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
> >   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
>
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >   at
> > org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> >   at org.apache.tomcat.core.Handler.service(Handler.java:287)
> >   at
> > org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> >   at
> >
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
>
> > 2)
> >   at
> > org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
> >   at
> >
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
>
> > (Ajp12ConnectionHandler.java:166)
> >   at
> > org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> >   at
> > org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
>
> >   at java.lang.Thread.run(Thread.java:479)
> >
> > What did I miss?
> >
> > Aykal




RE: javax.servlet.ServletException: No suitable driver

2001-08-14 Thread Mills, Theo

Also, you're pointing to the src jar... if all you have are .java files in
there, things aren't going to work. I dunno if that's the case here. Might
want to check your jar.

-Original Message-
From: Rob S. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 14, 2001 8:38 AM
To: [EMAIL PROTECTED]
Subject: Re: javax.servlet.ServletException: No suitable driver


I always wish I was better with JDBC, but I never manage to find the time to
get down with it... Anyway, did you load the JDBC driver class?  Just
putting it in your classpath doesn't mean that it gets loaded.  To me, it
would appear that the "no suitable driver" when you're trying to connect to
the database would mean that DriverManager.getConnection can't find a
suitable JDBC driver ;)

See any JDBC tutorial on the web, like the ones at http://java.sun.com/

- r

On Tue, 14 Aug 2001 14:57:44 +0300 [EMAIL PROTECTED] wrote:
> Hello,
> 
> I have setup Tomcat-3.2.3 and Apache_1.3.20 with MySQL-3.23.36 under
> RedHatLinux 7.1.
> jdk1.2.2 is installed under /usr/local/src/jdk.
> Tomcat, Apache and MySQL are basically working fine
> I am trying to use MM.MySQL for JDBC connectivity to MySQL.
> my CLASSPATH is /usr/local/src/jdk1.2.2/lib/mm.mysql-2.0.4-src.jar
> This is the log that I have:
> 
> javax.servlet.ServletException: No suitable driver
>   at
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp

> l.java:459)
>   at
>
jsp._0002fjsp_0002ftest_0002ejsptest_jsp_7._jspService(_0002fjsp_0002ftest_0

> 002ejsptest_jsp_7.java:96)
>   at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
>
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja

> va:130)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja

> va:282)
>   at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
>   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)

>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>   at org.apache.tomcat.core.Handler.service(Handler.java:287)
>   at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>   at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81

> 2)
>   at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
>   at
>
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection

> (Ajp12ConnectionHandler.java:166)
>   at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>   at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)

>   at java.lang.Thread.run(Thread.java:479)
> Root cause:
> java.sql.SQLException: No suitable driver
>   at java.sql.DriverManager.getConnection(DriverManager.java:477)
>   at java.sql.DriverManager.getConnection(DriverManager.java:137)
>   at
>
jsp._0002fjsp_0002ftest_0002ejsptest_jsp_7._jspService(_0002fjsp_0002ftest_0

> 002ejsptest_jsp_7.java:67)
>   at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
>
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja

> va:130)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja

> va:282)
>   at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
>   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)

>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>   at org.apache.tomcat.core.Handler.service(Handler.java:287)
>   at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>   at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81

> 2)
>   at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
>   at
>
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection

> (Ajp12ConnectionHandler.java:166)
>   at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>   at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)

>   at java.lang.Thread.run(Thread.java:479)
> 
> What did I miss?
> 
> Aykal





Re: javax.servlet.ServletException: No suitable driver

2001-08-14 Thread Rob S.

I always wish I was better with JDBC, but I never manage to find the time to
get down with it... Anyway, did you load the JDBC driver class?  Just
putting it in your classpath doesn't mean that it gets loaded.  To me, it
would appear that the "no suitable driver" when you're trying to connect to
the database would mean that DriverManager.getConnection can't find a
suitable JDBC driver ;)

See any JDBC tutorial on the web, like the ones at http://java.sun.com/

- r

On Tue, 14 Aug 2001 14:57:44 +0300 [EMAIL PROTECTED] wrote:
> Hello,
> 
> I have setup Tomcat-3.2.3 and Apache_1.3.20 with MySQL-3.23.36 under
> RedHatLinux 7.1.
> jdk1.2.2 is installed under /usr/local/src/jdk.
> Tomcat, Apache and MySQL are basically working fine
> I am trying to use MM.MySQL for JDBC connectivity to MySQL.
> my CLASSPATH is /usr/local/src/jdk1.2.2/lib/mm.mysql-2.0.4-src.jar
> This is the log that I have:
> 
> javax.servlet.ServletException: No suitable driver
>   at
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp

> l.java:459)
>   at
>
jsp._0002fjsp_0002ftest_0002ejsptest_jsp_7._jspService(_0002fjsp_0002ftest_0

> 002ejsptest_jsp_7.java:96)
>   at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
>
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja

> va:130)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja

> va:282)
>   at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
>   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)

>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>   at org.apache.tomcat.core.Handler.service(Handler.java:287)
>   at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>   at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81

> 2)
>   at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
>   at
>
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection

> (Ajp12ConnectionHandler.java:166)
>   at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>   at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)

>   at java.lang.Thread.run(Thread.java:479)
> Root cause:
> java.sql.SQLException: No suitable driver
>   at java.sql.DriverManager.getConnection(DriverManager.java:477)
>   at java.sql.DriverManager.getConnection(DriverManager.java:137)
>   at
>
jsp._0002fjsp_0002ftest_0002ejsptest_jsp_7._jspService(_0002fjsp_0002ftest_0

> 002ejsptest_jsp_7.java:67)
>   at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
>
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja

> va:130)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja

> va:282)
>   at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
>   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)

>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>   at org.apache.tomcat.core.Handler.service(Handler.java:287)
>   at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>   at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81

> 2)
>   at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
>   at
>
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection

> (Ajp12ConnectionHandler.java:166)
>   at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>   at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)

>   at java.lang.Thread.run(Thread.java:479)
> 
> What did I miss?
> 
> Aykal






Re: javax.servlet.ServletException: No suitable driver

2001-08-14 Thread Richard Draucker

Your classpath indictes you're using the mm.mysql src distribution.  I don't 
know that this includes the compiled classes (then again, I don't know that 
it doesn't).  
None the less, put mm.mysql-2.0.4-bin.jar in either $TOMCAT_HOME/lib or your 
application's WEB-INF/lib (you might have to create this dir) and forget 
about the classpath.

- Richard



On Tuesday 14 August 2001 07:57 am, you wrote:
> Hello,
>
> I have setup Tomcat-3.2.3 and Apache_1.3.20 with MySQL-3.23.36 under
> RedHatLinux 7.1.
> jdk1.2.2 is installed under /usr/local/src/jdk.
> Tomcat, Apache and MySQL are basically working fine
> I am trying to use MM.MySQL for JDBC connectivity to MySQL.
> my CLASSPATH is /usr/local/src/jdk1.2.2/lib/mm.mysql-2.0.4-src.jar
> This is the log that I have:
>
> javax.servlet.ServletException: No suitable driver
>   at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm
>p l.java:459)
>   at
> jsp._0002fjsp_0002ftest_0002ejsptest_jsp_7._jspService(_0002fjsp_0002ftest_
>0 002ejsptest_jsp_7.java:96)
>   at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.j
>a va:130)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.j
>a va:282)
>   at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
>   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>   at org.apache.tomcat.core.Handler.service(Handler.java:287)
>   at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>   at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:8
>1 2)
>   at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
>   at
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnectio
>n (Ajp12ConnectionHandler.java:166)
>   at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>   at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
>   at java.lang.Thread.run(Thread.java:479)
> Root cause:
> java.sql.SQLException: No suitable driver
>   at java.sql.DriverManager.getConnection(DriverManager.java:477)
>   at java.sql.DriverManager.getConnection(DriverManager.java:137)
>   at
> jsp._0002fjsp_0002ftest_0002ejsptest_jsp_7._jspService(_0002fjsp_0002ftest_
>0 002ejsptest_jsp_7.java:67)
>   at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.j
>a va:130)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.j
>a va:282)
>   at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
>   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>   at org.apache.tomcat.core.Handler.service(Handler.java:287)
>   at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>   at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:8
>1 2)
>   at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
>   at
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnectio
>n (Ajp12ConnectionHandler.java:166)
>   at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>   at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
>   at java.lang.Thread.run(Thread.java:479)
>
> What did I miss?
>
> Aykal

-- 
Richard Draucker [EMAIL PROTECTED]
Protected-Data.Com www.protected-data.com
Remote Data Support For Web Developers




javax.servlet.ServletException: No suitable driver

2001-08-14 Thread Gumus, Aykal

Hello,

I have setup Tomcat-3.2.3 and Apache_1.3.20 with MySQL-3.23.36 under
RedHatLinux 7.1. 
jdk1.2.2 is installed under /usr/local/src/jdk. 
Tomcat, Apache and MySQL are basically working fine 
I am trying to use MM.MySQL for JDBC connectivity to MySQL.
my CLASSPATH is /usr/local/src/jdk1.2.2/lib/mm.mysql-2.0.4-src.jar
This is the log that I have:

javax.servlet.ServletException: No suitable driver
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)
at
jsp._0002fjsp_0002ftest_0002ejsptest_jsp_7._jspService(_0002fjsp_0002ftest_0
002ejsptest_jsp_7.java:96)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja
va:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:282)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
2)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:479)
Root cause: 
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:477)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at
jsp._0002fjsp_0002ftest_0002ejsptest_jsp_7._jspService(_0002fjsp_0002ftest_0
002ejsptest_jsp_7.java:67)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja
va:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:282)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
2)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:479)

What did I miss?

Aykal




Re: No suitable driver

2001-08-01 Thread Hari

> String url = "jdbc:pool:oracle:thin:@localhost:1521:MY_DB";
Since you are using thin oracle client driver, I think the "pool" should not
be there.  In my work place, I use only this connection URL string.

String url = "jdbc:oracle:thin:@host:port:sid"

- Hari.


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 01, 2001 9:57 PM
Subject: No suitable driver


Hi!

Thank you, Cory.

I've got another problem after enclosing the variables in quotes:

---//-
Internal Servlet Error:

javax.servlet.ServletException: No suitable driver
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCont
extImpl.java:459)
---//---

How must I install JDBC drivers?

My configuration:
CLASSPATH=/u01/app/oracle/product/8.0.5/jdbc/lib/classes111.zip


-
This mail was sent through Eoffice: http://www.eoffice.dk





  1   2   >