Genexus 15 U4 - Query Object Preview + MySQL 64bits

0

When you click the Preview tab of the Query Object, it returns the error:

Can not display the preview of the query:
Type: GeneXus.Data.GxADODataException. An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

The client.log excerpt obtained from: C: \ ProgramData \ GeneXus \ GeneXus \ 15 \ QueryPreview

21:46:38,606 [3] DEBUG Genexus.Configuration.Config - DOMConfigurator log4net configured with web.config
21:46:38,621 [3] DEBUG Genexus.Configuration.Config - GxClasses version:15.0.4.113785
21:46:38,643 [3] DEBUG Genexus.Application.GxContext - GxContext.Ctr Default handle:1
21:46:38,663 [3] DEBUG GeneXus.Data.ADO.GxConnectionManager - GxConnectionManager.NewConnection   handle: 1, datasource:Default
21:46:38,734 [3] DEBUG Genexus.Application.GXFileWatcher - DeleteFiles C:\ProgramData\GeneXus\GeneXus\QueryPreview\PublicTempStorage\
21:46:38,735 [3] DEBUG Genexus.Configuration.Preferences - BLOB_PATH:C:\ProgramData\GeneXus\GeneXus\QueryPreview\PublicTempStorage\
21:46:38,736 [3] DEBUG GeneXus.Data.ADO.GxConnection - Setting IsolationLevel : Read Commited
21:46:39,199 [3] DEBUG GeneXus.Resources.GXResourceManager - FindResources C:\ProgramData\GeneXus\GeneXus\QueryPreview\bin\messages.eng.dll
21:46:39,257 [3] WARN  Genexus.Application.GxContext - Could not set Cache Control Http Header Value 'no-cache, no-store' to HttpResponse
21:46:39,324 [3] DEBUG Genexus.Application.GxContext - AbsoluteUri dynamicport:http://localhost:52024/QueryPreview/queryviewer.aspx
21:46:39,345 [3] DEBUG GeneXus.Data.ADO.GxConnectionManager - RemoveConnection   handle 1,datasource:Default
21:46:39,383 [3] DEBUG GeneXus.Http.GXHttpHandler - HttpHeaders: Cache-Control:no-cacheConnection:Keep-AliveContent-Length:764Content-Type:application/x-www-form-urlencodedAccept:image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*Accept-Encoding:gzip, deflateAccept-Language:pt-BRCookie:GX_CLIENT_ID=db1daaa8-0c43-4ead-a3e6-f391f0103647; GX_SESSION_ID=LEKn9U6uVzncnSe4kP%2bg1WQjWR0gsjpK0a5t8atYhrw%3dHost:localhost:52024User-Agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; Tablet PC 2.0; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
HttpCookies: 
GX_CLIENT_ID:db1daaa8-0c43-4ead-a3e6-f391f0103647
GX_SESSION_ID:LEKn9U6uVzncnSe4kP%2bg1WQjWR0gsjpK0a5t8atYhrw%3d
21:46:39,383 [3] DEBUG Genexus.Application.GxContext - AbsoluteUri dynamicport:http://localhost:52024/QueryPreview/queryviewer.aspx
21:46:40,028 [3] DEBUG Genexus.Application.GxContext - GxContext.Ctr Default handle:2
21:46:40,028 [3] DEBUG GeneXus.Data.ADO.GxConnectionManager - GxConnectionManager.NewConnection   handle: 2, datasource:Default
21:46:40,028 [3] DEBUG GeneXus.Data.ADO.GxConnection - Setting IsolationLevel : Read Commited
21:46:40,042 [3] DEBUG GeneXus.Data.ADO.GxConnectionManager - RemoveConnection   handle 2,datasource:Default
21:46:40,045 [3] DEBUG GeneXus.Http.GXHttpHandler - HttpHeaders: Cache-Control:no-cacheConnection:Keep-AliveContent-Length:0Content-Type:application/x-www-form-urlencodedAccept:*/*Accept-Encoding:gzip, deflateAccept-Language:pt-BRCookie:GX_CLIENT_ID=db1daaa8-0c43-4ead-a3e6-f391f0103647; GX_SESSION_ID=LEKn9U6uVzncnSe4kP%2bg1WQjWR0gsjpK0a5t8atYhrw%3d; ASP.NET_SessionId=jg1jji45aywwtcodo1hirgt2Host:localhost:52024Referer:http://localhost:52024/QueryPreview/queryviewer.aspxUser-Agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; Tablet PC 2.0; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
HttpCookies: 
GX_CLIENT_ID:db1daaa8-0c43-4ead-a3e6-f391f0103647
GX_SESSION_ID:LEKn9U6uVzncnSe4kP%2bg1WQjWR0gsjpK0a5t8atYhrw%3d
ASP.NET_SessionId:jg1jji45aywwtcodo1hirgt2
21:46:40,045 [3] DEBUG Genexus.Application.GxContext - AbsoluteUri dynamicport:http://localhost:52024/QueryPreview/agxpl_getrecordsetcachekey.aspx?1493776000022
21:46:40,051 [2] DEBUG Genexus.Application.GXFileWatcher - TIMEOUT (from system.web/httpRuntime ExecutionTimeout)110 seconds
21:46:40,057 [3] DEBUG Genexus.Application.GxContext - GxContext.Ctr Default handle:3
21:46:40,057 [3] DEBUG GeneXus.Data.ADO.GxConnectionManager - GxConnectionManager.NewConnection   handle: 3, datasource:Default
21:46:40,057 [3] DEBUG GeneXus.Data.ADO.GxConnection - Setting IsolationLevel : Read Commited
21:46:40,235 [3] DEBUG GeneXus.Data.ADO.GxConnectionManager - RemoveConnection   handle 3,datasource:Default
21:46:40,236 [3] DEBUG GeneXus.Http.GXHttpHandler - HttpHeaders: Cache-Control:no-cacheConnection:Keep-AliveContent-Length:946Content-Type:application/x-www-form-urlencodedAccept:*/*Accept-Encoding:gzip, deflateAccept-Language:pt-BRCookie:GX_CLIENT_ID=db1daaa8-0c43-4ead-a3e6-f391f0103647; GX_SESSION_ID=LEKn9U6uVzncnSe4kP%2bg1WQjWR0gsjpK0a5t8atYhrw%3d; ASP.NET_SessionId=jg1jji45aywwtcodo1hirgt2Host:localhost:52024Referer:http://localhost:52024/QueryPreview/queryviewer.aspxUser-Agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; Tablet PC 2.0; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
HttpCookies: 
GX_CLIENT_ID:db1daaa8-0c43-4ead-a3e6-f391f0103647
GX_SESSION_ID:LEKn9U6uVzncnSe4kP%2bg1WQjWR0gsjpK0a5t8atYhrw%3d
ASP.NET_SessionId:jg1jji45aywwtcodo1hirgt2
21:46:40,236 [3] DEBUG Genexus.Application.GxContext - AbsoluteUri dynamicport:http://localhost:52024/QueryPreview/agxpl_getmetadata.aspx?1493776000047
21:46:40,243 [3] DEBUG Genexus.Application.GxContext - GxContext.Ctr Default handle:4
21:46:40,243 [3] DEBUG GeneXus.Data.ADO.GxConnectionManager - GxConnectionManager.NewConnection   handle: 4, datasource:Default
21:46:40,243 [3] DEBUG GeneXus.Data.ADO.GxConnection - Setting IsolationLevel : Read Commited
21:46:40,350 [3] DEBUG Genexus.Application.GxContext - GxContext.Ctr Default handle:5
21:46:40,351 [3] DEBUG GeneXus.Data.ADO.GxConnectionManager - GxConnectionManager.NewConnection   handle: 5, datasource:Default
21:46:40,351 [3] DEBUG GeneXus.Data.ADO.GxConnection - Setting IsolationLevel : Read Commited
21:46:40,360 [3] DEBUG GeneXus.Data.NTier.DataStoreProvider - Start DataStoreProvider.Ctr, Parameters: handle '5', dataStoreHelper:QueryViewer.Services.dsHelper
21:46:40,365 [3] DEBUG GeneXus.Data.ADO.GxCommand - GxCommand.FetchSize: 100, handle '5'
21:46:40,369 [3] DEBUG GeneXus.Data.NTier.DataStoreProvider - gxObject:QueryViewer.Services.dsHelper, handle '5' cursorName:gxpl0001
21:46:40,375 [3] DEBUG GeneXus.Data.ADO.GxCommand - ExecuteReader: Parameters 
21:46:40,378 [3] DEBUG GeneXus.Data.GxMySql - ExecuteReader: client cursor=False, handle '5', hashcode 28123475 PreparedStmt True
21:46:40,381 [3] DEBUG GeneXus.Data.ADO.GxConnection - Start GxConnection.Open, autoCommit=False handle:5 datastore:Default
21:46:40,387 [3] DEBUG GeneXus.Data.GxMySql - MAX_TRIES=100
21:46:40,387 [3] DEBUG GeneXus.Data.GxMySql - Setting connectionString property Location=localhost;Port=3306;;User ID=root;Password=xxxxx;Data Source=CoopHortaDES;
21:46:40,392 [3] ERROR GeneXus.Data.MySqlConnectionWrapper - Return GxConnection.Open Error 
System.BadImageFormatException: Foi feita uma tentativa de se carregar um programa com um formato incorreto. (Exceção de HRESULT: 0x8007000B)
   em MySQLDriverCS.CPrototypes.mysql_init(Void* must_be_null)
   em MySQLDriverCS.MySQLConnection.Open()
   em GeneXus.Data.MySqlConnectionWrapper.Open()
21:46:40,432 [3] DEBUG GeneXus.Data.GxMySql - ProcessError: dbmsErrorCode=0, emsg 'Foi feita uma tentativa de se carregar um programa com um formato incorreto. (Exceção de HRESULT: 0x8007000B)'
21:46:40,433 [3] ERROR GeneXus.Data.ADO.GxConnection - GxConnection.Open Error 
Type:GeneXus.Data.GxADODataException.Foi feita uma tentativa de se carregar um programa com um formato incorreto. (Exceção de HRESULT: 0x8007000B)
21:46:40,433 [3] ERROR GeneXus.Data.ADO.GxCommand - Return GxCommand.ExecuteReader Error 
Type:GeneXus.Data.GxADODataException.Foi feita uma tentativa de se carregar um programa com um formato incorreto. (Exceção de HRESULT: 0x8007000B)
21:46:40,433 [3] DEBUG GeneXus.Data.GxMySql - ProcessError: dbmsErrorCode=0, emsg 'Foi feita uma tentativa de se carregar um programa com um formato incorreto. (Exceção de HRESULT: 0x8007000B)'
21:46:40,458 [3] ERROR GeneXus.Data.ADO.GxCommand - GxCommand.FetchData Error 
21:46:40,462 [3] DEBUG GeneXus.Data.ADO.GxConnection - UncommitedChanges before Close:False
21:46:40,463 [3] DEBUG GeneXus.Data.ADO.GxConnection - GxConnection.Close connection is closed 
21:46:40,464 [3] DEBUG GeneXus.Data.ADO.GxConnectionManager - RemoveConnection   handle 5,datasource:Default
21:46:40,464 [3] DEBUG GeneXus.Data.ADO.GxConnection - UncommitedChanges before Close:False
21:46:40,464 [3] DEBUG GeneXus.Data.ADO.GxConnection - GxConnection.Close connection is closed 
21:46:40,478 [3] DEBUG Genexus.Application.GxContext - GxContext.Ctr Default handle:6
21:46:40,478 [3] DEBUG GeneXus.Data.ADO.GxConnectionManager - GxConnectionManager.NewConnection   handle: 6, datasource:Default
21:46:40,478 [3] DEBUG GeneXus.Data.ADO.GxConnection - Setting IsolationLevel : Read Commited
21:46:40,483 [3] DEBUG GeneXus.Data.ADO.GxConnectionManager - RemoveConnection   handle 4,datasource:Default
21:46:40,483 [3] DEBUG GeneXus.Http.GXHttpHandler - HttpHeaders: Cache-Control:no-cacheConnection:Keep-AliveContent-Length:866Content-Type:application/x-www-form-urlencodedAccept:*/*Accept-Encoding:gzip, deflateAccept-Language:pt-BRCookie:GX_CLIENT_ID=db1daaa8-0c43-4ead-a3e6-f391f0103647; GX_SESSION_ID=LEKn9U6uVzncnSe4kP%2bg1WQjWR0gsjpK0a5t8atYhrw%3d; ASP.NET_SessionId=jg1jji45aywwtcodo1hirgt2Host:localhost:52024Referer:http://localhost:52024/QueryPreview/queryviewer.aspxUser-Agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; Tablet PC 2.0; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
HttpCookies: 
GX_CLIENT_ID:db1daaa8-0c43-4ead-a3e6-f391f0103647
GX_SESSION_ID:LEKn9U6uVzncnSe4kP%2bg1WQjWR0gsjpK0a5t8atYhrw%3d
ASP.NET_SessionId:jg1jji45aywwtcodo1hirgt2
21:46:40,483 [3] DEBUG Genexus.Application.GxContext - AbsoluteUri dynamicport:http://localhost:52024/QueryPreview/agxpl_getdata.aspx?1493776000239
21:46:40,486 [9] DEBUG GeneXus.Data.ADO.GxConnectionManager - RemoveConnection   handle 6,datasource:Default
    
asked by anonymous 03.05.2017 / 03:48

3 answers

0

Claudio,

In the C: \ ProgramData \ GeneXus \ GeneXus \ 15 \ QueryPreview \ bin folder you will probably have the MySQL .dll named MySQLDriverCS.dll. Try replacing it with the 64-bit dll.

    
03.05.2017 / 18:40
0

The error message is indicating that the driver version is not correct (32 vs. 64 bits).

The Query preview uses a web server called WebDev.WebServer2, it can be either 32 or 64 bits. You have to see what version you have of this web server (GeneXus distributes the 64-bit version). In this case you must put the 64-bit driver for Mysql in the C: \ ProgramData \ GeneXus \ GeneXus \ 15 \ GXplorer \ Preview \ bin folder.

In the SAC # 40940 has additional information.

    
03.05.2017 / 21:20
0

Good evening, I did it. I believe there are some points that we can think about.

1st. the WIKI link that points to the 64bit connector, to my understanding, points to the wrong download as I downloaded it, I got the dll in SysWOW64, and it did not work. Searching the Mysql site, I went to the mysql-connector-c-6.1.10-winx64.zip . I downloaded it and the dll worked. So, would not it be the case of updating the wiki?

2nd. If GeneXus distributes 64-bit WebDev.WebServer2, why not bring the 64bit dll into install?!

Well, anyway, thanks for the tips! Can anyone mark as resolved?

    
04.05.2017 / 03:44