Cannot Initialize Streamer that is already in use

Delphi Xe3, DA 8
Sometimes I get error:
An exception was raised on the server: Cannot Initialize Streamer that is already in use.
on the server.
How I can on the server log this error? I can’t catch this error
How I can detect the source (table) of this error?
How use OnInitialized event handle of data streamer to log table?

Thanx, Teo

this error usually appears when DataStreamer isn’t finalized correctly.
correct usage should be

  DataStreamer.Initialize(stream, aiWrite);
  try
...
  finally
    DataStreamer.Finalize;
  end;

usage of above construction, should solve this error.

also datastreamer isn’t thread-safe so this error can be raised if several threads tried to use datastreamer simultaneously

On the server side I use thread on the following way (from ServerForm):
(refrer to Calling a service method from inside the server?)

begin
    ClientID:=ServerDataModule.Message.ClientID;
    fClassFactory:=GetClassFactory('SaldoService');
    fClassFactory.CreateInstance(ClientID, instance);

    try
	  try
          	(instance as ISaldoService).GetMyData;
          except
              on e:exception do begin
                ServerForm.LOG4(DateTimeToStr(now)+' -SaldoService '+e.Message);
              end;
          end;
    finally
        fClassFactory.ReleaseInstance(ClientID,instance);
    end;

Is this correct way?
And always I use initialize/finalize construction for WriteDataset and ReadDataset

yes, this is correct.
where are you using ReadDataset/WriteDataset ? inside _Impl or other server-side units like server datamodule ?

I use it inside SaldoService_impl. From above service (GetMyData) I call PrepareStreamData. ReadDataset use on the Client side

procedure TSaldoService.PrepareStreamData(aSQL, aDatasetLogicalName: String;
  var bDataOut: TROBinaryMemoryStream);
var
  LZip: TZCompressionStream;
  bs: TROBinaryMemoryStream;
  bd: TROBinaryMemoryStream;
  cmd: IDADataset;
  con: IDAConnection;
begin

  con := ServerDataModule.ConnectionManager.NewConnection
    	(ServerDataModule.ConnectionManager.GetDefaultConnectionName);
  cmd := con.NewDataset(aSQL, aDatasetLogicalName);
  cmd.Open;

  bs := TROBinaryMemoryStream.Create();
  bd := TROBinaryMemoryStream.Create();

  CS.Enter;
  try
    try
      DataStreamer.Initialize(bd, aiWrite);
      try
        DataStreamer.WriteDataset(cmd, [woSchema, woRows], -1);
      finally
        DataStreamer.Finalize;
      end;
    except

                on e: exception do begin
                  raise exception.Create('bd: '+inttostr(bd.Size) + aSQL + ' - ' + e.Message);
                end;
    end;
   :::........Here compress bd stream...........

  finally
    CS.Leave;
    bs.Free;
    bd.Free;
    bs := nil;
    bd := nil;
    cmd.Close;
    con.Close;
  end;

end;

your code looks correct and shouldn’t cause Cannot Initialize Streamer that is already in use exception.