1

I'm trying to get some database related integration tests running on a MSTest test agent. We use c# and an oracle db with devart dotconnect.

Since we need to use indirect mode, I installed devart and an oracle client on the test agent.

The tests run smoothly when I execute them on my local machine. But when executed on the test agent (remotely), it can't find the client's oci.dll, which is a dependency somewhere:

System.IO.FileNotFoundException: Can not load Oracle client library oci.dll from home ..

Now, I have no idea why that happens. I checked the PATH environment variables already, but they seem fine. Any ideas why this works on my machine, but not when deployed to the test agent?

edit: added stacktrace within devart:

Devart.Data.Oracle.OracleHome.get_ClientVersion()
Devart.Data.Oracle.aw.a(Boolean A_0, Boolean A_1, OracleHome A_2, Boolean A_3)
Devart.Data.Oracle.OracleInternalConnection..ctor(aa connectionOptions, OracleInternalConnection proxyConnection)
Devart.Data.Oracle.cs.a(k A_0, Object A_1, DbConnectionBase A_2)
Devart.Common.DbConnectionFactory.a(DbConnectionPool A_0, k A_1, DbConnectionBase A_2)
Devart.Common.DbConnectionPool.a(DbConnectionBase A_0)
Devart.Common.DbConnectionPool.GetObject(DbConnectionBase owningConnection)
Devart.Common.DbConnectionFactory.a(DbConnectionBase A_0)
Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
Devart.Common.DbConnectionBase.Open()
Devart.Data.Oracle.OracleConnection.Open()
Efrain
  • 3,248
  • 4
  • 34
  • 61
  • Does the user executing the unit tests have permission to the Oracle home directory? http://forums.devart.com/viewtopic.php?t=15271 – Gene S Jul 24 '12 at 12:19
  • It could be the permissions like Gene S said. You can also check the differences of the Oracle Home in the registry. HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME zero if you have just one home. Check if there a pointing to the right dir. – Martijn B Jul 24 '12 at 12:41
  • Als checkout - http://forums.devart.com/viewtopic.php?t=22700 - Does your remote testagent runs under a different mode compared to locally? – Martijn B Jul 24 '12 at 12:51

2 Answers2

0

Thanks for the replies, got the right pointers. Apparently the problem occurs when a 64bit thread tries to load a 32bit OCI.DLL and vice versa. However, I played around with the test settings and build settings related to 32/64 things, but to no avail.

Anyway, I was able to solve the problem by additionally installing a 64-bit Oracle Client on the test agent. For some reason it seems that then the QTAgent thread finds the right OCI.DLL.

Efrain
  • 3,248
  • 4
  • 34
  • 61
0

Faced the same problem in a console project. I fixed it by changing the compilation platform setting by going to project properties -> Compilation -> Destination of the platform and selecting x86.

Sahil
  • 709
  • 1
  • 6
  • 21