Missing Devart.Data.Oracle.resources.dll file?
Posted: Tue 19 Mar 2013 07:57
Hi,
We are using Direct mode to connect to databases from C# code in a Windows service.
We regularly get a FileNotFound exception at runtime telling us that a Devart resources DLL cannot be found. Specifically this file:
Devart.Data.Oracle.resources, Version=7.1.58.0, Culture=en-US, PublicKeyToken=09af7300eec23701
We do have Devart.Data.dll and Devart.Data.Oracle.dll present in the same folder as the service executable file but we cannot find the resources DLL anywhere in our installation.
The exception only occurs under certain circumstances which we can reproduce at will. There are 2 scenarios in which we can reproduce the error:
(1) When the target server does not exist on the network and we are trying to connect by the server name (using the IP Address throws the correct exception rather than the FileNotFound exception)
(2) When the target server exists (by name OR IP Address) but the Listener port has been specified incorrectly.
The code we are using is below
As you can see from the code above we are expecting a bad server name or bad listener port to be caught as part of an OracleException that is thrown, and at one point when we were using the trial version (last August!) this worked perfectly!
We have built our code around version 7.1.58 but I installed the most recent version (7.6) and went back to the licensed version of 7.1.40 (which was our trial version) and it still throws the error about not finding the Devart.Data.Oracle.resources.dll
Here is the output from our log files with the full exception stack trace:
Any and all help would be sincerely appreciated!
Thanks in advance,
Terry.
We are using Direct mode to connect to databases from C# code in a Windows service.
We regularly get a FileNotFound exception at runtime telling us that a Devart resources DLL cannot be found. Specifically this file:
Devart.Data.Oracle.resources, Version=7.1.58.0, Culture=en-US, PublicKeyToken=09af7300eec23701
We do have Devart.Data.dll and Devart.Data.Oracle.dll present in the same folder as the service executable file but we cannot find the resources DLL anywhere in our installation.
The exception only occurs under certain circumstances which we can reproduce at will. There are 2 scenarios in which we can reproduce the error:
(1) When the target server does not exist on the network and we are trying to connect by the server name (using the IP Address throws the correct exception rather than the FileNotFound exception)
(2) When the target server exists (by name OR IP Address) but the Listener port has been specified incorrectly.
The code we are using is below
Code: Select all
OracleConnectionStringBuilder connString = new OracleConnectionStringBuilder();
connString.Direct = true;
connString.Port = listenerPort;
connString.Server = hostNameOrIp;
connString.Sid = sidToUse;
connString.UserId = username;
connString.Password = password;
orclConnection = new OracleConnection(connectionString.ConnectionString);
try
{
orclConnection.Open(); [b]<----- throws FileNotFoundException here[/b]
}
catch (OracleException oraEx) // an error connecting
{
switch (oraEx.Code)
{
case 12545:
// deal with no server found
break;
case 12541:
// deal with no listener on port
break;
case 1017:
case 1005:
// code to deal with invalid credentials
break;
case -1:
// code to deal with other issues
break;
}
}
We have built our code around version 7.1.58 but I installed the most recent version (7.6) and went back to the licensed version of 7.1.40 (which was our trial version) and it still throws the error about not finding the Devart.Data.Oracle.resources.dll
Here is the output from our log files with the full exception stack trace:
Code: Select all
18/03/2013 09:34:15 - EXCEPTION: Could not load file or assembly 'Devart.Data.Oracle.resources, Version=7.1.58.0, Culture=en-US, PublicKeyToken=09af7300eec23701' or one of its dependencies. The system cannot find the file specified.
18/03/2013 09:34:15 - STACK: at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(String name, CultureInfo culture, Version version, Boolean throwOnFileNotFound, StackCrawlMark& stackMark)
at System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(CultureInfo lookForCulture, StackCrawlMark& stackMark)
at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at Devart.Common.ad.a(String A_0)
at Devart.Data.Oracle.cz.a(String A_0, Int32 A_1, String A_2, String A_3)
at Devart.Data.Oracle.ao.a(ad A_0, Boolean A_1)
at Devart.Data.Oracle.ao.a(ad A_0, aj A_1)
at Devart.Data.Oracle.OracleInternalConnection..ctor(ad connectionOptions, OracleInternalConnection proxyConnection)
at Devart.Data.Oracle.cx.a(l A_0, Object A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionFactory.a(DbConnectionPool A_0, l A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionPoolGroup.a(DbConnectionPool A_0, DbConnectionBase A_1)
at Devart.Common.DbConnectionPool.a(DbConnectionBase A_0)
at Devart.Common.DbConnectionPool.GetObject(DbConnectionBase owningConnection)
at Devart.Common.DbConnectionFactory.b(DbConnectionBase A_0)
at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at Devart.Common.DbConnectionBase.Open()
at Devart.Data.Oracle.OracleConnection.Open()
at Certero.EndpointServer.Oracle.Model.OracleInstance.validateConnection(OracleConnectionStringBuilder connectionString)
18/03/2013 09:34:15 - INNER_EXCEPTION: Could not load file or assembly 'file:///D:\TFS\ProductSuite\Release\1.0.0.2\Endpoint Server\Website\EndpointServer\bin\Devart.Data.Oracle.resources.dll' or one of its dependencies. The system cannot find the file specified.
18/03/2013 09:34:15 - INNER_STACK: at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Certero.EndpointServer.Services.Program.AssemblyResolveEventHandler(Object sender, ResolveEventArgs args) in D:\TFS\ProductSuite\Release\1.0.0.2\Endpoint Server\Services\SchedulerService\Program.cs:line 84
at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
Thanks in advance,
Terry.