Frage

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()
War es hilfreich?

Lösung

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.

Andere Tipps

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top