ITQuants blog

Fusion Invest: what's the f... with Oracle.DataAccess!

Feb 5

Written by:
2/5/2015 5:15 PM  RssIcon

Working on the migration from Sophis Value v4 to Fusion Invest v7 (same product by Misys, only the version is different), just by changing the access to the database, from DEV to UAT one, I got a message that I never had before:

Well, well, I thought, it should be due to the fact that Oracle scripts were not launched on the database, and there should be a mismatch between the dll's used (DEV) and the database (UAT). Unfortunately, the dump was the same one, recently loaded and updated by the same SQL script on both servers...

So, I had to investigate somewhere else. Taking a look at the logs as indicated in the message, I've found the following lines:

system_error : SophisValue[standard]@FRWD0003 (2264.000000000961E030) : [2015/02/05-17:02:39.482] : DBContext::InSharedTransaction() : Unexpected error during transaction: [A]Oracle.DataAccess.Client.PoolMember cannot be cast to [B]Oracle.DataAccess.Client.PoolMember. Type A originates from 'Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342' in the context 'Default' at location 'C:\windows\Microsoft.Net\assembly\GAC_64\Oracle.DataAccess\v4.0_4.112.4.0__89b483f429c47342\Oracle.DataAccess.dll'. Type B originates from 'Oracle.DataAccess, Version=2.112.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342' in the context 'Default' at location 'C:\windows\assembly\GAC_64\Oracle.DataAccess\2.112.4.0__89b483f429c47342\Oracle.DataAccess.dll'.

And using the debugger, I've found that the Oracle.DataAccess.dll was loaded twice in memory, with different versions. Taking a look at the GAC in the C:\Windows\assembly folder, I've found the v2.112.4.0 which was referenced, but not the 4.112.4.0.

Looking for different posts that could exist on the Net, I've found that we can force the selection of the right version of the assembly by setting it in the .exe.config file. I've aready done it on the SRM configuration on servers and it worked fine.

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89B483F429C47342" culture="neutral" />
        <bindingRedirect oldVersion="2.112.4.0" newVersion="4.112.4.0" />
      </dependentAssembly>
    </assemblyBinding>
</runtime>

Unfortunately, in this case, it does not work...

Trying to know from which folder the dll was really loaded, I've found that there was in my Oracle folders two dll's with this name: one in a 2.x folder and another one in the 4:

Well, the path are the same, the dll's too, only the Oracle server is different. The database was recently updated by the same dump, thus the data contained in it is the same too (we could have some model enabling that could load some specific dll, but that's not the case). Thus it could only come from the server configuration, that somewhere enables sometimes the load of the v2.112.4.0 assembly, and sometimes the load of the 4.112.4.0 assembly.

Searching the queries that could give me the information, I've found the following ones:

Also it means that the Oracle client from where Sophis Value is launched is on 11.2.0.4.

Taking a look at the configuration of the servers:

On DEV, no promble when loading Fusion Invest, client and server match:

On UAT, on which I got the problem:

Oh, the server is not rightly patched as the client is!

By the way, finally, due to the fact that the dbas may have some time to update the server, I put the Oracle.DataAccess.dll directly in the same folder as SophisValue.exe...

Tags:
Categories: Sophis

2 comment(s) so far...


Gravatar

Re: Fusion Invest: what's the f... with Oracle.DataAccess!

Some precisions concerning the resolution: I've put the 4.112.4 in the local folder of SophisValue.exe, and uninstall all assemblies that were installed in the GAC by using the following VS2010 command: gacutil /u Oracle.DataAccess. Note that you can specify the version of the assembly, but concerning the documentation provided by Microsoft, there is a little bug: instead of "Oracle.DataAccess, Version=x.x.x.x", the right syntax is "Oracle.DataAccess,Version=x.x.x.x", without blank between the comma and version (otherwise the message 'invalid option' will appear).

By Philippe Bonneau on   2/6/2015 10:37 AM
Gravatar

Re: Fusion Invest: what's the f... with Oracle.DataAccess!

Woops,finally, putting back all things to the 2.112.4.0, since some .net Sophis modules are still compiled with this version (just deleting the 4.112, reinstalling the v2 in the GAC, and compiling all .Net project again with the right reference).

By Philippe Bonneau on   2/9/2015 5:36 PM

Search blog