GT 4.0 OGSA-DAI: BLOBs Error Workaround

When trying to retrieve BLOBs from a relational database you will get zero rows returned (or an error). The following error message will be logged:

  Base64Provider has not been set up with a Base64 implementation

This will be fixed in the next release. In the meantime if you have the source version of the release, you can correct this bug by changing the following two files and rebuilding OGSA-DAI.

1. Editing DataServiceImpl.java

At the bottom of the initialise() method in uk/org/ogsadai/service/wsrf/dataservice/impl/DataServiceImpl.java, make the following changes:

OLD VERSION

...
    LOG.error(msg);
    }
    }
    if (LOG.isDebugEnabled()) {
    
    LOG.debug("Exiting initialise.");
    }
    mInitialised = true;
    }

NEW VERSION

...
    LOG.error(msg);
    }
    }
    
    // Create a PlatformConfigurator to use for Base64 encoding
    new uk.org.ogsadai.common.wsrf.WSRFPlatformConfigurator();
    
    if (LOG.isDebugEnabled()) {
    
    LOG.debug("Exiting initialise.");
    }
    mInitialised = true;
    }

2. Editing WSRFDataService.java

In the two contructor methods in uk/org/ogsadai/client/toolkit/wsrf/WSRFDataService.java, make the following changes:

OLD VERSION

    public WSRFDataService(String handle)
    throws MalformedURLException
    {
    mService = new WSRFDataServiceStub(handle);
    mTransport = null;
    mResource = null;
    }
    
    /**
    *
    * @param handle
    * @param id
    */
    public WSRFDataService(String handle, ResourceID resourceID)
    throws ServiceCommsException, MalformedURLException {
    mService = new WSRFDataServiceStub(handle);
    mResource = resourceID;
    }

NEW VERSION

    public WSRFDataService(String handle)
    throws MalformedURLException
    {
    mService = new WSRFDataServiceStub(handle);
    mTransport = null;
    mResource = null;
    new uk.org.ogsadai.common.wsrf.WSRFPlatformConfigurator();
    }
    
    /**
    *
    * @param handle
    * @param id
    */
    public WSRFDataService(String handle, ResourceID resourceID)
    throws ServiceCommsException, MalformedURLException {
    mService = new WSRFDataServiceStub(handle);
    mResource = resourceID;
    new uk.org.ogsadai.common.wsrf.WSRFPlatformConfigurator();
    }