cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kazó Csaba <>
Subject DatabaseReader can't get datasource
Date Sun, 05 Aug 2007 07:41:54 GMT

I think I've stumbled upon a bug in the databases block; it's quite obvious but I've found
no mention of it so far.

The problem is that DatabaseReader and SQLTransformer fail to obtain the configured datasource.
(There might be other components with this problem, but these are the two I know of). The
exception says "Component with 'org.apache.avalon.excalibur.datasource.DataSourceComponent/personnel'
is not defined in this service manager. (Key='AvalonServiceManager')".

The result is the same whether I define the data source in the Avalon [1] or Spring way (defining
a bean of class org.springframework.jdbc.datasource.DriverManagerDataSource; at least I think
it's the Spring way, I've found no info about it yet). (The SQL transformer sample [2] is
also broken, so it's probably not me doing something wrong.)

Now, I've found this nice 'Creating a Reader' page [3] and I've noticed that the code it lists
for obtaining the data source is not the same as in [4]. Upon modifying
the reader in accordance with the sample in [3] it started to work again (both the Avalon
and Spring way).

I'm attaching my modification as a patch to make it easier to see what I'm talking about.
(I have very little understanding of what's going on in the code involved; the patch might
break things more, as far as I can tell, despite the fact that "It Works For Me"(tm).)


P.S. I'm using revision 560710 as the current head won't start because of cocoon-expression-language-impl;
I don't think it matters though, recent commits seem to be unrelated to the issue.

P.P.S. If I should've filed a bug report through JIRA, please tell me, and I'll learn how
to do so for the next time :)

[2] http://localhost:8888/blocks/cocoon-databases-sample/transform/sql-page

View raw message