cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grzegorz Kossakowski (JIRA)" <>
Subject [jira] Commented: (COCOON-2106) DatabaseReader and SQLTransformer cannot obtain datasource
Date Mon, 17 Sep 2007 23:14:43 GMT


Grzegorz Kossakowski commented on COCOON-2106:

I come to conclusion that registering wrappers automatically is rather troublesome and not
worth the effort. The trouble comes from the fact that I wanted to register separate wrappers
for existing beans that is not possible by using Spring XML extension because not all beans
are parsed when extension is called.

That's why I decided to just implement simple wrapping bean that must be declared manually.
The proper declaration would look like:
<bean name="org.apache.avalon.excalibur.datasource.DataSourceComponent/personnel"
  <property name="wrappedBean">
    <bean name="org.apache.avalon.excalibur.datasource.DataSourceComponent/personnel"

Csaba, could you try if this works for you?

> DatabaseReader and SQLTransformer cannot obtain datasource
> ----------------------------------------------------------
>                 Key: COCOON-2106
>                 URL:
>             Project: Cocoon
>          Issue Type: Bug
>          Components: Blocks: Databases
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Csaba Kazó
>            Assignee: Grzegorz Kossakowski
>         Attachments: dbreader.diff, sqltrans.diff
> The DatabaseReader and SQLTransformer components fail to obtain the configured data source
and throw a ServiceException like "Component with 'org.apache.avalon.excalibur.datasource.DataSourceComponent/personnel'
is not defined in this service manager. (Key='AvalonServiceManager')". The failing function
call in both cases is:
> this.manager.lookup(DataSourceComponent.ROLE + '/' + datasourceName)
> The result is the same regardless of whether the data source is defined as an Avalon
component or a Spring bean.
> Changing the code to use ServiceSelector as in the "Creating a Reader" document [1] and
the modular database actions solves the problem for both cases. The attached patch applies
this modification to
> [1]

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message