RE: BasicDataSource data source usage.

2002-11-25 Thread Anthony Mutiso 2
Thanks Craig and David. It was the differences in the nested setter property
names. BasicDataSource required a "driverClassName" and "username" in place
of the GenericDataSource ones of "driverClass" and "user".

I should have been able to find this in the documentation but somehow over
looked it.

Thanks again

Anthony

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: November 22, 2002 2:56 PM
To: Struts Users Mailing List
Subject: Re: BasicDataSource data source usage.


On Fri, 22 Nov 2002, Anthony Mutiso 2 wrote:

> Date: Fri, 22 Nov 2002 13:47:04 -0700
> From: Anthony Mutiso 2 <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: "Struts Mail List (E-mail)" <[EMAIL PROTECTED]>
> Subject: BasicDataSource data source usage.
>
> The struts javadoc page for GenericDataSource says to use BasicDataSource.
>
> When I configure a struts data-source with BasicDataSource, my struts 1.1
b2
> application fails work with a
>
> java.sql.SQLException: Cannot load JDBC driver class 'null'
>
> On the appplication startup
>
> While if I remove the "type" attribute all appears well.
>
> This dies
>type="org.apache.commons.dbcp.BasicDataSource">
>
> This works
>   
>

Without seeing your nested property setter elements, it's impossible to
know for sure, but I'd bet that you didn't adjust the property names to
match.  For example, in DBCP the JDBC driver class is set by the
"driverClassName"  property, while for GenericDataSource it's
"driverClass".

> Why do I want a BasicDataSource? The docs implie that I can do it, and
> GenericDataSource's methods are all deprecated.
>

For backwards compatibility, GenericDataSource in 1.1 is just a wrapper
around BasicDataSource.  The wrapper adapts automatically to the property
name differences, so old 1.0 apps continue to work.

> I wanted to get the at the DriveClassName within the app to print out in
the
> logs the application configuration.
>
> Thanks
>
> Anthony
>

Craig


--
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: BasicDataSource data source usage.

2002-11-22 Thread Craig R. McClanahan
On Fri, 22 Nov 2002, Anthony Mutiso 2 wrote:

> Date: Fri, 22 Nov 2002 13:47:04 -0700
> From: Anthony Mutiso 2 <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: "Struts Mail List (E-mail)" <[EMAIL PROTECTED]>
> Subject: BasicDataSource data source usage.
>
> The struts javadoc page for GenericDataSource says to use BasicDataSource.
>
> When I configure a struts data-source with BasicDataSource, my struts 1.1 b2
> application fails work with a
>
> java.sql.SQLException: Cannot load JDBC driver class 'null'
>
> On the appplication startup
>
> While if I remove the "type" attribute all appears well.
>
> This dies
>type="org.apache.commons.dbcp.BasicDataSource">
>
> This works
>   
>

Without seeing your nested property setter elements, it's impossible to
know for sure, but I'd bet that you didn't adjust the property names to
match.  For example, in DBCP the JDBC driver class is set by the
"driverClassName"  property, while for GenericDataSource it's
"driverClass".

> Why do I want a BasicDataSource? The docs implie that I can do it, and
> GenericDataSource's methods are all deprecated.
>

For backwards compatibility, GenericDataSource in 1.1 is just a wrapper
around BasicDataSource.  The wrapper adapts automatically to the property
name differences, so old 1.0 apps continue to work.

> I wanted to get the at the DriveClassName within the app to print out in the
> logs the application configuration.
>
> Thanks
>
> Anthony
>

Craig


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




Re: BasicDataSource data source usage.

2002-11-22 Thread David Graham
See section 4.6.5 here
http://jakarta.apache.org/struts/userGuide/building_controller.html

David







From: Anthony Mutiso 2 <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Mail List (E-mail)" <[EMAIL PROTECTED]>
Subject: BasicDataSource data source usage.
Date: Fri, 22 Nov 2002 13:47:04 -0700

The struts javadoc page for GenericDataSource says to use BasicDataSource.

When I configure a struts data-source with BasicDataSource, my struts 1.1 
b2
application fails work with a

java.sql.SQLException: Cannot load JDBC driver class 'null'

On the appplication startup

While if I remove the "type" attribute all appears well.

This dies
  
type="org.apache.commons.dbcp.BasicDataSource">

This works
  

Why do I want a BasicDataSource? The docs implie that I can do it, and
GenericDataSource's methods are all deprecated.

I wanted to get the at the DriveClassName within the app to print out in 
the
logs the application configuration.

Thanks

Anthony

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


_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


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



BasicDataSource data source usage.

2002-11-22 Thread Anthony Mutiso 2
The struts javadoc page for GenericDataSource says to use BasicDataSource.

When I configure a struts data-source with BasicDataSource, my struts 1.1 b2
application fails work with a 

java.sql.SQLException: Cannot load JDBC driver class 'null'

On the appplication startup

While if I remove the "type" attribute all appears well.

This dies
  

This works
  

Why do I want a BasicDataSource? The docs implie that I can do it, and
GenericDataSource's methods are all deprecated.

I wanted to get the at the DriveClassName within the app to print out in the
logs the application configuration.

Thanks

Anthony

--
To unsubscribe, e-mail:   
For additional commands, e-mail: