cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Billard <obill...@rennes.jouve.fr>
Subject Re: Strange: BlobSource cannot access Datasource
Date Thu, 04 Mar 2004 11:18:57 GMT
Hi Natz,

This problem is due to an imcompatibility between the ComponentManager and the ServiceManager.

The change should be in the CVS very soon.
Or you can manually change the BlobSource.java and rebuild cocoon :
(Thats just a change from ComponentSelector to ServiceSelector)


import org.apache.avalon.framework.service.ServiceSelector;

...

     private Connection getConnection() throws SourceException {

         ServiceSelector selector = null;
         DataSourceComponent datasource = null;

         try {
             try {
                 selector = (ServiceSelector)this.manager.lookup(DataSourceComponent.ROLE

+ "Selector");

                 datasource = (DataSourceComponent)selector.select(this.datasourceName);

             } catch(Exception e) {
                 String msg = "Cannot get datasource '" + this.datasourceName + "'";
                 getLogger().error(msg);
                 throw new SourceException(msg, e);
             }

             try {
                 return datasource.getConnection();
             } catch(Exception e) {
                 String msg = "Cannot get connection for datasource '" + this 
.datasourceName + "'";
                 getLogger().error(msg);
                 throw new SourceException(msg, e);
             }

         } finally {
             if (datasource != null) {
                 selector.release(datasource);
             }
         }
     }

HTH,

--
Olivier Billard

On 11/02/2004 12:32, natz@ya.com wrote:
>   Hello All, Please, help, because I'm really out of ideas here.. The 
> thing is, when I try to use a blob: protocol (from the BlobSource 
> component), I keep getting an Exception during source resolving.: 
> org.apache.excalibur.source.SourceException: Cannot get datasource 
> 'DBGES' At first I thought there was something wrong with the datasource 
> definition, but if I use the DBGES pool in a XSP serverpage, or in a SQL 
> transformer, it works flawlessly, so the datasource definition is 
> correct. In my previous project it worked flawlessly.. Does anybody know 
> what may i be doing wrong? Thanks all, Nacho Jimenez


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message