compiled exe is missing zlib1.dll

Forum for users of SQL Packager database archive utility

compiled exe is missing zlib1.dll

Postby Ogglord » Mon Apr 02, 2007 8:55 am

Hi, I'm evaluating Packager. When I've created the exe from my project and started SQLPackage.exe, and then press Run I'm greeted by

Unable to load DLL 'zlib1.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

There is no file with that name, it's the compression library, isn't it?

/ Oscar
Ogglord
 
Posts: 1
Joined: Mon Apr 02, 2007 8:47 am

Postby Brian Donahue » Thu Apr 05, 2007 4:39 pm

Hi Oscar,

Yes, it is. When you create a SQL Package using compression, the zlib1.dll is copied to a folder in your %TMP% directory and referenced from your package to decompress the SQL code inside.

I suppose the first things to check are that you are running the latest version of SQL Packager to create the package and that you have read/write access to the folder pointed at by the TMP environment variable.
Brian Donahue
 
Posts: 6590
Joined: Mon Aug 23, 2004 10:48 am

Found same issue on Vista x64

Postby StevenE » Mon Jun 04, 2007 10:39 am

I have found we have the same problem on Vista. In our example we are using Business x64. We have had no problems with 2000/XP. Does any one have any ideas? :cry:
StevenE
 
Posts: 9
Joined: Mon Jun 04, 2007 10:36 am

Postby Brian Donahue » Mon Jun 04, 2007 11:20 am

What kind of system was the package created on? Was it a 64-bit OS? I wonder if the zlib1.dll has a 32-bit codebase and the package is being compiled for a 64-bit platform target?
Brian Donahue
 
Posts: 6590
Joined: Mon Aug 23, 2004 10:48 am

Postby StevenE » Mon Jun 04, 2007 11:33 am

The package was created on a 32 bit Windows XP machine.

Steven
StevenE
 
Posts: 9
Joined: Mon Jun 04, 2007 10:36 am

Postby Brian Donahue » Mon Jun 04, 2007 1:55 pm

Hi Steven,

Here is another idea: I think the user running the package needs read/write permissions to the folder that the package is being run from.
Brian Donahue
 
Posts: 6590
Joined: Mon Aug 23, 2004 10:48 am

Postby StevenE » Mon Jun 04, 2007 2:33 pm

I checked this. The current user does have read write permissions. Unfortunately this is the only problem preventing a release of our product from going out.

Any other ideas?

Many thanks

Steven Elliott
StevenE
 
Posts: 9
Joined: Mon Jun 04, 2007 10:36 am

Postby Brian Donahue » Mon Jun 04, 2007 3:53 pm

Hi Steven,

Please check to see if zlib1.dll is getting extracted from your package when you run it. There should be a subfolder in your %tmp% folder (normally this is in c:\\documents and settings\\you\\temp) with a format similar to tmp86.tmp15303109. Zlib1.dll should be in there. In order to find this temporary folder more easily, you can tell explorer to 'view details' and sort on last modified date.

If the file does not appear, you may not have read/write access to the temporary folder.

Another thing that's happened in the past is that some anti-virus software has flagged the creation of assemblies in the temporary folder as 'suspicious'. You may want to try temporarily disabling any antivirus applications and see if that helps.
Brian Donahue
 
Posts: 6590
Joined: Mon Aug 23, 2004 10:48 am

Still no joy...

Postby StevenE » Mon Jun 04, 2007 4:22 pm

I found the file twice in tmp9dea1482234 and tmpbc94.tmp113828 under
c:\\Users\\Ron\\AppData\\Local\\Temp.

The machine has no virus checker installed.

I thought I would try to work around this by putting the Zlib1.dll in the same folder as the packager exe. When I ran it I got the following error
"An attempt was amde to a load aprogram with an incorrect format". I have seen this issue where 32 bit apps/dlls try to call 64 bit dlls. Is this any help?

Many thanks

Steven Elliott
StevenE
 
Posts: 9
Joined: Mon Jun 04, 2007 10:36 am

Postby Brian Donahue » Mon Jun 04, 2007 6:01 pm

Hi Steven,

This is exactly the same idea I had, but the information you had provided indicated that all of the code was 32-bit.

What versions of .NET Framework are installed? All packages should be specifically targetted to .NET Framework 1.1. This wouldn't come with Vista -- maybe downloading the Microsoft .NET Framework 1.1 redistributable from http://www.microsoft.com/downloads and installing this may get it to work.
Brian Donahue
 
Posts: 6590
Joined: Mon Aug 23, 2004 10:48 am

Postby StevenE » Tue Jun 05, 2007 10:17 am

Version 3.0 and Version 2.0 where already on the machine. I put on version 1.1 and SP1 and it did not have any effect.


Steven Elliott
StevenE
 
Posts: 9
Joined: Mon Jun 04, 2007 10:36 am

Postby StevenE » Tue Jun 05, 2007 11:15 am

I have also tried the program on a 32 bit vista (clean install). The exe works correctly so it must be a 64 bit problem.


Steven Elliott
StevenE
 
Posts: 9
Joined: Mon Jun 04, 2007 10:36 am

Postby Brian Donahue » Tue Jun 05, 2007 1:27 pm

Hi Steve,

It works fine on Windows XP 64. I tried that yesterday.
Brian Donahue
 
Posts: 6590
Joined: Mon Aug 23, 2004 10:48 am

Postby Brian Donahue » Tue Jun 05, 2007 1:55 pm

How about making sure that the package is trying to reference the correct DLL?

If you create some registry entries in the HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Fusion key:

REG_DWORD LogFailures 1
REG_SZ LogPath c:\\FusionLog

Create a folder called 'FusionLog' in c:This should leave a bunch of HTML files in a subfolder named after the executable name of your package. Each file will be a failed assembly binding attempt with more information about why the binding had failed.
Brian Donahue
 
Posts: 6590
Joined: Mon Aug 23, 2004 10:48 am

Postby StevenE » Tue Jun 05, 2007 2:20 pm

I do not have access to XP 64 but I have found the same problem with Vista 64 home premium.

The error log from the Fusion Log folder is as follows....

*** Assembly Binder Log Entry (05/06/2007 @ 14:13:02) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from: C:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\mscorwks.dll
Running under executable C:\\Program Files\\Shire Systems\\Food Sentinel\\Database Scripts\\UpdateLive_0001_0000_0006_07151_0001_0000_0007_07152.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = Ron-PC\\Ron
LOG: DisplayName = RedGate.Compression.ZLib, Version=5.3.0.2, Culture=neutral, PublicKeyToken=7f465a1c156d4d57
(Fully-specified)
LOG: Appbase = file:///C:/Program Files/Shire Systems/Food Sentinel/Database Scripts/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = UpdateLive_0001_0000_0006_07151_0001_0000_0007_07152.exe
Calling assembly : UpdateLive_0001_0000_0006_07151_0001_0000_0007_07152, Version=1.0.2708.16557, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\config\\machine.config.
LOG: Post-policy reference: RedGate.Compression.ZLib, Version=5.3.0.2, Culture=neutral, PublicKeyToken=7f465a1c156d4d57
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Program Files/Shire Systems/Food Sentinel/Database Scripts/RedGate.Compression.ZLib.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Shire Systems/Food Sentinel/Database Scripts/RedGate.Compression.ZLib/RedGate.Compression.ZLib.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Shire Systems/Food Sentinel/Database Scripts/RedGate.Compression.ZLib.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Shire Systems/Food Sentinel/Database Scripts/RedGate.Compression.ZLib/RedGate.Compression.ZLib.EXE.
LOG: All probing URLs attempted and failed.
StevenE
 
Posts: 9
Joined: Mon Jun 04, 2007 10:36 am

Next

Return to SQL Packager Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests