My example shows a jdbc:odbc driver, but we use InterBase in development and
production. I test as many drivers as I can set up. Maybe I should check
out PostgreSQL.
There is no stack trace because the problem I'm experiencing is that calling
servlet.getServletContext().getAttribute("xxx") returns null. I even tried
the deprecated findDataSource("xxx") method, I get the same result.
Out of curiosity, I added a break point to the ActionServlet
initApplicationDataSources() method (thanks to JBuilder5 from Borland,
http://www.borland.com/).
I stepped through the population of the DataSourceConfig array and found
that it only went though the first datasource. So, I tried
findDataSource(null) and it worked as expected in that it returned a
not-null datasource.
So it appears the root problem is that initApplicationDataSources is not
stepping through all of the datasources listed in my struts-config.xml and
that putting only one data-source in there is a workaround. Using PoolMan
is another workaround if I *have* to have multiple data-sources.
Hope this helps find the problem.
Anthony
-----Original Message-----
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 25, 2002 12:11 PM
To: Struts Developers List
Subject: RE: cvs commit:
jakarta-struts/src/share/org/apache/struts/config ConfigRuleSet.java
On Fri, 25 Jan 2002, Anthony Martin wrote:
> Date: Fri, 25 Jan 2002 11:59:43 -0800
> From: Anthony Martin <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: Struts Developers List <[EMAIL PROTECTED]>
> Subject: RE: cvs commit:
> jakarta-struts/src/share/org/apache/struts/config ConfigRuleSet.java
>
> Yes, I totally missed it.
Reviewing the HTML docs, we don't have any mention of it, so this isn't
totally unexpected :-(.
> Anyway, changing over to the set-properties
> allows my ActionServlet to start again, but the data-sources still don't
> actually work the way they used to. It has something to do with the
> GenericDataSource finding the driver string null.
>
I take it you are using a recent nightly build? It's been working for me
with GenericDataSource, talking to a Postgres database. Could you post
the stack trace that you get at startup time?
One other thing to keep in mind is that the JDBC-ODBC driver isn't really
designed to deal with web-based applications -- it has thread safety
issues. But that's a different issue than a startup failure.
> My choices are to drop back to the build that works and loose those nifty
> DynaBeans, or to check out PoolMan. Just not sure about the Lesser GPL.
:P
>
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]>