struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brendan McCarthy <bp_mccar...@iprimus.com.au>
Subject Re: Why is dbcp / pool removed?
Date Thu, 12 Jun 2003 06:14:57 GMT
Hi Richard,

It seems to have moved into the struts-legacy.jar for RC2. Include it  
in you .war

cheers,
-Brendan

On Thursday, Jun 12, 2003, at 15:57 Australia/Brisbane, Richard Raquepo  
wrote:

> I thought GenericDataSource was still included in RC2 or am i wrong? i  
> have
> remove my old DBCP type datasource and use GenericDataSource but  it  
> seems
> it does not work too. Am i missing something? Help anyone:
>>>>> My struts-config.xml datasource is:
>   <data-source key="DATASOURCE">
>    <set-property property="driverClass" value="com.mysql.jdbc.Driver"  
> />
>    <set-property property="url" value="jdbc:mysql://localhost/crmdev"  
> />
>    <set-property property="maxCount" value="" />
>    <set-property property="minCount" value="" />
>    <set-property property="user" value="root" />
>    <set-property property="password" value="********" />
>   </data-source>
>>>>> My error is:
> 1688 [main] ERROR action.ActionServlet  - Initializing application data
> source DATASOURCE
> java.lang.ClassNotFoundException:  
> org.apache.struts.util.GenericDataSource
> [java.lang.ClassNotFoundException:  
> org.apache.struts.util.GenericDataSource
> [java.lang.NoClassDefFoundError:
> org/apache/struts/legacy/GenericDataSource]]
>         at
> com.caucho.util.DynamicClassLoader.findClass(DynamicClassLoader.java:56 
> 9)
>         at
> com.caucho.util.DynamicClassLoader.loadClass(DynamicClassLoader.java:51 
> 0)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>         at
> org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java: 
> 207)
>         at
> org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.ja 
> va:23
> 1)
>         at
> org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServ 
> let.j
> ava:1079)
>         at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:471)
>         at javax.servlet.GenericServlet.init(GenericServlet.java:82)
>         at
> com.caucho.server.http.Application.createServlet(Application.java:3103)
>         at
> com.caucho.server.http.Application.loadServlet(Application.java:3054)
>
>         at
> com.caucho.server.http.Application.initServlets(Application.java:1914)
>         at  
> com.caucho.server.http.Application.init(Application.java:1827)
>         at  
> com.caucho.server.http.VirtualHost.init(VirtualHost.java:720)
>         at
> com.caucho.server.http.ServletServer.initHosts(ServletServer.java:853)
>         at
> com.caucho.server.http.ServletServer.initInternal(ServletServer.java:69 
> 8)
>         at  
> com.caucho.server.http.ServletServer.init(ServletServer.java:509)
>         at  
> com.caucho.server.http.ResinServer.init(ResinServer.java:377)
>         at  
> com.caucho.server.http.ResinServer.main(ResinServer.java:1137)
>         at com.caucho.server.http.HttpServer.main(HttpServer.java:103)
>
> ----- Original Message -----
> From: "Kruse, Matt" <MKruse@aquent.com>
> To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> Sent: Tuesday, June 10, 2003 11:12 PM
> Subject: RE: Why is dbcp / pool removed?
>
>
>>>> The one included is not the same as what is in RC1, though,
>>>> correct?
>>> I'm not sure what Ted changed but you may be correct that
>>> it's not exactly
>>> the same.  You can still use DBCP, Struts just won't
>>> distribute it any more.
>>
>> If I move away from DBCP and try to use just the features included  
>> with
> RC2
>> (for now), it seems like there have been a lot of changes.
>>
>> GenericDataSource now handles all the pooling and stuff itself,  
>> instead of
>> relying on BasicDataSource, which is fine.
>> But, it also relies on GenericConnection, of which there are two
> versions -
>> one for JDK1.3, one for JDK1.4. And the one for JDK1.3 will _not_  
>> compile
>> JDK1.4. (according to the docs). That's a bummer, because if I  
>> release an
>> app with the 1.3 version packaged in, and the server is upgraded to  
>> 1.4,
> I'm
>> going to assume that things will break?
>>
>> I'm not looking for a long-term fix, just a short-term switch to  
>> possibly
>> avoid the problems that DBCP might have been causing for me. I'm just
>> finding it a challenge to figure out which short-term fix to use.
>>
>>> You're not tying your app to the container because you configure the
>>> DataSource implementation entirely in JNDI (my preference) or
>>> struts-config.xml.
>>
>> In struts-config.xml, if I define my type= to be a container-specific
> class,
>> though, then it's no longer portable. Unless I'm completely
> misunderstanding
>> what you mean, which is likely :)
>>
>> I'm going to explore "better" ways to handle db connections in the  
>> future,
>> but as I said above, I'm just looking for a patch to address current
>> problems with DBCP, so I want to keep defining my db conns in
>> struts-config.xml, and I want to rely only on the classes packaged  
>> with
>> struts (if possible). I'll experiment and see how it works!
>>
>> Matt Kruse
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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


Mime
View raw message