cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Csaba Kazó (JIRA) <>
Subject [jira] Commented: (COCOON-2106) DatabaseReader and SQLTransformer cannot obtain datasource
Date Tue, 18 Sep 2007 15:21:43 GMT


Csaba Kazó commented on COCOON-2106:

Okey, using this configuration seems to work.

If I typo the connection name ('personnel') in the db reader definition, I get the expected
'component not defined' exception. Using the correct name this exception is no longer raised.
(I conclude that the the component is found.)

However, a different exception arises, and until I restart the server, I get this same exception
whenever I try to access the sitemap holding the reader definition (it's a mounted one, unrelated
sitemaps don't get corrupted like this). (It all worked fine until I tried using the database
reader.) This might be completely unrelated to the current issue, but I can't tell, so here's
the exception and the top of the stack trace:

java.lang.ClassCastException: org.apache.cocoon.components.treeprocessor.variables.StringTemplateParserVariableResolver
cannot be cast to org.apache.avalon.framework.activity.Disposable
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.dispose(

> 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