Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-2106

DatabaseReader and SQLTransformer cannot obtain datasource

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2
    • 2.2
    • Blocks: Databases
    • None
    • Patch available

    Description

      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 DatabaseReader.java.

      [1] http://cocoon.zones.apache.org/daisy/cdocs/g1/g1/g2/g1/g2/681.html

      Attachments

        1. dbreader.diff
          2 kB
          Csaba Kazó
        2. sqltrans.diff
          2 kB
          Csaba Kazó

        Issue Links

          Activity

            People

              grek Grzegorz Kossakowski
              kazocsaba Csaba Kazó
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: